[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-ac56aa4549cdfd9c56387b35e99e3c868cfc7bd0@git.kernel.org>
Date: Thu, 7 Jun 2018 01:26:09 -0700
From: tip-bot for Jin Yao <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: ak@...ux.intel.com, tglx@...utronix.de, yao.jin@...el.com,
mingo@...nel.org, jolsa@...nel.org, hpa@...or.com,
linux-kernel@...r.kernel.org, peterz@...radead.org,
yao.jin@...ux.intel.com, kan.liang@...ux.intel.com,
acme@...hat.com, alexander.shishkin@...ux.intel.com
Subject: [tip:perf/urgent] perf script python: Add dict fields introduction
to Documentation
Commit-ID: ac56aa4549cdfd9c56387b35e99e3c868cfc7bd0
Gitweb: https://git.kernel.org/tip/ac56aa4549cdfd9c56387b35e99e3c868cfc7bd0
Author: Jin Yao <yao.jin@...ux.intel.com>
AuthorDate: Fri, 1 Jun 2018 17:01:03 +0800
Committer: Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Wed, 6 Jun 2018 15:40:10 -0300
perf script python: Add dict fields introduction to Documentation
Add a brief introduction about fields to perf-script-python.txt.
It should help python script developers in easily finding what fields
are supported.
Signed-off-by: Jin Yao <yao.jin@...ux.intel.com>
Reviewed-by: Andi Kleen <ak@...ux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: Jin Yao <yao.jin@...el.com>
Cc: Jiri Olsa <jolsa@...nel.org>
Cc: Kan Liang <kan.liang@...ux.intel.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Link: http://lkml.kernel.org/r/1527843663-32288-4-git-send-email-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
tools/perf/Documentation/perf-script-python.txt | 26 +++++++++++++++++++++++++
1 file changed, 26 insertions(+)
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:
nsecs_str(nsecs) - returns printable string in the form secs.nsecs
avg(total, n) - returns average given a sum and a total number of values
+SUPPORTED FIELDS
+----------------
+
+Currently supported fields:
+
+ev_name, comm, pid, tid, cpu, ip, time, period, phys_addr, addr,
+symbol, dso, time_enabled, time_running, values, callchain,
+brstack, brstacksym, datasrc, datasrc_decode, iregs, uregs,
+weight, transaction, raw_buf, attr.
+
+Some fields have sub items:
+
+brstack:
+ from, to, from_dsoname, to_dsoname, mispred,
+ predicted, in_tx, abort, cycles.
+
+brstacksym:
+ items: from, to, pred, in_tx, abort (converted string)
+
+For example,
+We can use this code to print brstack "from", "to", "cycles".
+
+if 'brstack' in dict:
+ for entry in dict['brstack']:
+ print "from %s, to %s, cycles %s" % (entry["from"], entry["to"], entry["cycles"])
+
SEE ALSO
--------
linkperf:perf-script[1]
Powered by blists - more mailing lists