Too bad vminfo doesn't provide addresses but this may serve as a starting point...

#pragma D option quiet

/*
* For i86pc systems!
*/

#include <sys/types.h>
#include <ia32/sys/trap.h>
#include <ia32/sys/psw.h>

:::trap:entry
/pid == $target && USERMODE(args[0]->r_cs) != 0 && args[0]->r_trapno == T_PGFLT/
{
    printf("0x%p\n", args[1]);
}

dtrace -C -s trap.d -c "some command and args"

Jim
----
Joel Reymont wrote:
Can someone suggest a DTrace provider for tracking virtual memory pageins and pageouts in a certain memory range?

The memory range would be one established by mmap and I'm tracking memory access patterns within Firefox. Various dynamic libraries that Firefox uses are mmap-ed by the dynamic linker and I capture the address and range of each mapping.

What I would like to do now is see what order the pages in each library range are being pulled in from disk. Eventually, I'd like to optimize the order of symbols in each shared library to make access sequential as possible.

Any suggestions on how to track page faults in a memory range?

    Thanks, Joel

---
firefox for android!
http://wagerlabs.com

_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org


_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to