diff options
author | Jiri Olsa <[email protected]> | 2016-01-05 22:09:11 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2016-01-06 20:11:16 -0300 |
commit | aef90263561a87ae6d9c6a0f4071d825ce636eef (patch) | |
tree | f20ad43d7b55830066864d539f536d1dd62d97fa /tools/perf/scripts/python | |
parent | e099eba8c8df0f96e7cd6ddc5fc3151fe37be24e (diff) |
perf script: Add python support for stat events
Add support to get stat events data in perf python scripts.
The python script shall implement the following new interface to process
stat data:
def stat__<event_name>_[<modifier>](cpu, thread, time, val, ena, run):
- is called for every stat event for given counter,
if user monitors 'cycles,instructions:u" following
callbacks should be defined:
def stat__cycles(cpu, thread, time, val, ena, run):
def stat__instructions_u(cpu, thread, time, val, ena, run):
def stat__interval(time):
- is called for every interval with its time,
in non interval mode it's called after last
stat event with total measured time in ns
The rest of the current interface stays untouched..
Please check example CPI metrics script in following patch
with command line examples in changelogs.
Signed-off-by: Jiri Olsa <[email protected]>
Tested-by: Kan Liang <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
[ Rename 'time' parameters to 'tstamp', to fix the build in older distros ]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions