aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/Documentation/perf-script-python.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/Documentation/perf-script-python.txt')
-rw-r--r--tools/perf/Documentation/perf-script-python.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/tools/perf/Documentation/perf-script-python.txt b/tools/perf/Documentation/perf-script-python.txt
index 51ec2d20068a..0fb9eda3cbca 100644
--- a/tools/perf/Documentation/perf-script-python.txt
+++ b/tools/perf/Documentation/perf-script-python.txt
@@ -610,6 +610,32 @@ Various utility functions for use with perf script:
610 nsecs_str(nsecs) - returns printable string in the form secs.nsecs 610 nsecs_str(nsecs) - returns printable string in the form secs.nsecs
611 avg(total, n) - returns average given a sum and a total number of values 611 avg(total, n) - returns average given a sum and a total number of values
612 612
613SUPPORTED FIELDS
614----------------
615
616Currently supported fields:
617
618ev_name, comm, pid, tid, cpu, ip, time, period, phys_addr, addr,
619symbol, dso, time_enabled, time_running, values, callchain,
620brstack, brstacksym, datasrc, datasrc_decode, iregs, uregs,
621weight, transaction, raw_buf, attr.
622
623Some fields have sub items:
624
625brstack:
626 from, to, from_dsoname, to_dsoname, mispred,
627 predicted, in_tx, abort, cycles.
628
629brstacksym:
630 items: from, to, pred, in_tx, abort (converted string)
631
632For example,
633We can use this code to print brstack "from", "to", "cycles".
634
635if 'brstack' in dict:
636 for entry in dict['brstack']:
637 print "from %s, to %s, cycles %s" % (entry["from"], entry["to"], entry["cycles"])
638
613SEE ALSO 639SEE ALSO
614-------- 640--------
615linkperf:perf-script[1] 641linkperf:perf-script[1]