Generating traces with physical addresses

922 views
Skip to first unread message

Geoffrey

unread,
Nov 7, 2012, 12:04:14 PM11/7/12
to snip...@googlegroups.com
 Is it possible  to generate  a trace of all the physical addresses accessed  by a single threaded application. If  yes where do I start?


--Geoffrey 

Trevor E. Carlson

unread,
Nov 8, 2012, 7:45:12 AM11/8/12
to snip...@googlegroups.com
Geoffrey,

Might I suggest that you take a look at Pin [1], a dynamic instrumentation framework. With Pin, you will be able to capture all of the virtual address accesses of your program (as you won't need the extra overhead of Sniper if all you want to do is capture addresses). If you are running Linux, you can then perform a translation with the /proc/self/pagemap file in your pintool to determine the physical addresses used by the application. Take a look at the Linux Kernel documentation [2,3] for more information on how to interpret the data in pagemap.

I hope that this helps,
Trevor

[2] /usr/src/linux/Documentation/vm/pagemap.txt

On Nov 7, 2012, at 6:04 PM, Geoffrey <get...@gmail.com> wrote:

 Is it possible  to generate  a trace of all the physical addresses accessed  by a single threaded application. If  yes where do I start?


--Geoffrey 

--
--
You received this message because you are subscribed to the Google
Groups "Sniper simulator" group.
To post to this group, send email to snip...@googlegroups.com
To unsubscribe from this group, send email to
snipersim+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/snipersim?hl=en

Qi Zeng

unread,
Apr 22, 2015, 6:59:48 PM4/22/15
to snip...@googlegroups.com
Hi, Trevor,

    How can I generate traces with Physical addresses of multi-program run with sniper? As the translated address use the page table inside sniper instead of Linux. 
To make it simple, I want to collect the trace information of all L3 misses with physical address?

Thanks,
Qi

Trevor Carlson

unread,
Apr 23, 2015, 2:25:35 AM4/23/15
to snip...@googlegroups.com, zengq...@gmail.com
Qi,

     Check the va2pa callback in the pin tool. You should be able to update the code to resolve the physical addresses when you create the trace.

Trevor
--
--
--
You received this message because you are subscribed to the Google
Groups "Sniper simulator" group.
To post to this group, send email to snip...@googlegroups.com
To unsubscribe from this group, send email to
snipersim+...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/snipersim?hl=en

---
You received this message because you are subscribed to the Google Groups "Sniper simulator" group.
To unsubscribe from this group and stop receiving emails from it, send an email to snipersim+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Qi Zeng

unread,
Apr 25, 2015, 7:45:31 PM4/25/15
to snip...@googlegroups.com, zengq...@gmail.com
Hi Trevor,

      I checked the function of Int64 TraceThread::va2pa, but I cannot find the implementation of page table.

     I wonder if we have the restriction as address space for virtual-physical address translation, like if we set the DRAM as 1GB, the translated physical address cannot exceed the range of 1GB because the memory is addressable.

Thanks,
Qi

Trevor Carlson

unread,
Apr 26, 2015, 11:26:31 AM4/26/15
to snip...@googlegroups.com, zengq...@gmail.com
Qi,

The va2pa function goes out to Linux (/proc/self/maps) and uses the virtual to physical mappings in the system to map the addresses. This was done to allow multi-process MPI applications that use shared memory to share the same pages. The DRAM size is not set in Sniper, only the latencies, so effectively, you can have as much memory as supported by your system. We model TLB timing in Sniper, but the actual translations happen via the map file. You can setup your own mapping by changing the va2pa function to override the physical mapping of your system.

Trevor
Reply all
Reply to author
Forward
0 new messages