Thanks for your reply, so does oprofile can help in sampling the PC for
multi-threaded application. Means oprofile must save or having means to know
the PC value for code section so if i want to know the PC for each part of
code and which thread is using at that time ,how i can get it through
oprofile. As i was going through its docs it indicates there are some per
cpu buffer concept and it processed it to get the information. But i dont
know how to do it?
On Mon, Feb 23, 2009 at 8:12 PM, Kristian Nielsen
> nitin choubey <nit.projects@...> writes:
> > i am using amd opteron dual core and linux as OS to get
> > address of each data referenced by threads.CAN SOMEBODY know how oprofile
> > can give this information,.For example i have written one mulithreaded
> > program in c in which two threads are accessing same/different arrays ,so
> > want to get raw VA(for data ) accessed by this two threads within a
> I don't think OProfile will help you with this.
> OProfile does statistical profiling of how many times certain discrete
> occur in different parts of the code running in the system. It generally
> not provide addresses or other information of specific data accesses.
> You could just printf("%p") the pointers in the application to get the
> address (or use gdb to print them).
> However, maybe when you say "raw VA" it is because you really want not the
> virtual address (which is the one the user-space code sees), but instead
> actual hardware address that the kernel maps the virtual address onto RAM
> swap file location if swapped out)? However, I also don't think OProfile
> help you with this.
> - Kristian.