This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Hi,
On Tue, Oct 10, 2006 at 03:46:29PM -0400, Frank Ch. Eigler wrote:
Beside that, I would like to measure (count) the number of branches (call, jmp, jcc, loop) executed so far by a given process while it's executing in user space. Do you think MSR (in particular) branch_retired register could be useful for what I'm trying to do?
Certainly. Systemtap proper does not expose those registers yet, but using e.g. inline C code, it should be able to pull out such information.
Cool. Any ideas (all the list, I mean :-)) on how to do it "from scratch"? Never played with MSR at all.
Moreover, I would like to save this register (or a combo of registers) into the process task_struct since I would like to keep this counter accross processes' context switch [...]
Check out the perfmon2 patches for the kernel. Among other things, they do this sort of context switch tracking.
Fine, thx! I'll check it out ASAP. :-)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |