proposed perf.counter enhancement

Stan Cox scox@redhat.com
Mon Nov 19 04:58:00 GMT 2012


global A

probe perf.type(0).config(0).thread("z") {
   # this probe, even if it is never hit, sets up the counter "z"
}

probe process("./bench.x").function("main")
{
   printf("In %s\n",pp())
   A <<< @perf("z")
}
probe end
{
   print (@hist_log(A))
}


Add @perf support
-elaborate.cxx
-elaborate.h
-parse.cxx
-staptree.cxx
-staptree.h

translate time list of perfs in a probe
-elaborate.h perf_counter_idx

Associate a perf with a task
-_stp_perf_init add task parm
-_stp_perf_read_init
-perf_counter_idx in uprobes-common.h
-perf_counters in uprobes-inode.c (runtime perf list)

Initialize a perf for a task at runtime
-stapiu_target_reg

List of perf counters encountered
-session.h

Add thread suffix to perf probe
-tapset-perfmon.cxx

Emit perf reading code (_stp_perf_read avove)
-tapsets.cxx::visit_perf_op

map of perfs for a probe
-dwarf_derived_probe

runtime list of perfs in a probe
-perf_counter_idx in uprobes-common.h




-------------- next part --------------
A non-text attachment was scrubbed...
Name: perf.patch
Type: text/x-patch
Size: 27169 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/systemtap/attachments/20121119/2774a7bb/attachment.bin>


More information about the Systemtap mailing list