LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to get the virtual addresses accessed by an application during its execution? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-get-the-virtual-addresses-accessed-by-an-application-during-its-execution-795978/)

rookieiitg 03-17-2010 04:17 AM

How to get the virtual addresses accessed by an application during its execution?
 
Hello everyone...
Could anyone tell me about how to get the list of virtual addresses being accessed by any application during its execution time. I don't want the complete memory map but just the pages which were accessed during an application's execution?

Zuulie 03-17-2010 07:49 AM

I may not be able to help you, but the question was so intriguing that I couldn’t help having a look. The problem is the frequency of memory access in a process. It looks like systemtap almost can do it. Have a look at some of the memory examples:
http://sourceware.org/systemtap/examples/

The best option I saw was probably the kernel debug feature “mmiotrace”:
http://www.mjmwired.net/kernel/Docum.../mmiotrace.txt

There are a few things in /proc, but most of them is about memory regions rather than specific pages.

I hope that helps a bit.

syg00 03-18-2010 06:24 AM

There are no metrics maintained for that. You could try systemtap, but it relies on trace points. A trace of page fault activity might suffice - presumably ignoring soft page faults.
But then you have to decide what you are really interested in - (just) your program code, shared library calls, malloc'ed storage, shared memory segments ...

Nothing is as easy as it first looks.


All times are GMT -5. The time now is 05:56 AM.