I'm investigating ways to integrate instrumentation-based profiling with
cachegrind.

When running a native program, cachegrind can measure estimated instruction
counts and other metrics like cache misses etc., and attribute them to
specific functions based on the debug information.

However, sometimes this doesn't produce very useful results - for example,
when the profiled program is an interpreter, this produces profiling data
for the interpreter itself but not the interpreted program.

What I'd like to do is to be able to query some data - instruction
counters, cache misses, anything else of that sort that might be available
- from the guest, assuming it knows it's running under cachegrind.

I was initially hoping to be able to query instruction counters using
rdtsc, but rdtsc is implemented using the host rdtsc instruction, so it
generates very noisy data - I was hoping to be able to use internal
simulated counters to produce stable results.

Is there a way to do something like this without modifying cachegrind? (of
course I could hack rdtsc to do what I want in theory but that'd require
using custom binaries)

Arseny
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to