[dtrace-discuss] How to monitor memory access with DTRACE?
Dan Mick
dan.mick at sun.com
Wed Jan 24 12:42:27 PST 2007
Sounds like a much better job for mdb's "write breakpoint" command. On x86
(you don't say it is, but if so) mdb uses the builtin hardware debug
registers of the x86 chip.
f7a7 wrote:
> Hi, I'm a newbie to dtrace
>
> I met such an problem that one byte in a memry block is changed by unknown operation. My question is can I monitor the memory access operation and determin which function do that?
>
> My source code like this:
> The memory block is member struct of a class -
> class A
> {
> public:
> struct MEM_BLOCK
> {
> int a;
> int b;
> char c;
> };
> MEM_BLOCK memBLK;
>
> void func(int p)
> {
> b = p;
> }
> };
>
> In my application, struct member "int b" should be accessed by "func" only. But I found it always changed by unknown operation without invoke "func" or direct member parameter visit.
> Coz the total amount of the application is too big to me for detail code review.
> I wanna to get help from DTRACE.
>
> Could u tell me whether DTARCE can monitor such kind of memory access and report which one access it?
>
> Thanx
>
>
> This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss at opensolaris.org
More information about the dtrace-discuss
mailing list