[dtrace-discuss] How to monitor memory access with DTRACE?

f7a7 f7a7 at hotmail.com
Wed Jan 24 05:28:55 PST 2007


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


More information about the dtrace-discuss mailing list