From: Jin Yao <yao.jin@linux.intel.com>
To: acme@kernel.org, jolsa@kernel.org, peterz@infradead.org,
mingo@redhat.com, alexander.shishkin@linux.intel.com
Cc: Linux-kernel@vger.kernel.org, ak@linux.intel.com,
kan.liang@intel.com, yao.jin@intel.com,
Jin Yao <yao.jin@linux.intel.com>
Subject: [PATCH v2 3/3] perf script python: Add fields introduction to Documentation
Date: Fri, 1 Jun 2018 17:01:03 +0800 [thread overview]
Message-ID: <1527843663-32288-4-git-send-email-yao.jin@linux.intel.com> (raw)
In-Reply-To: <1527843663-32288-1-git-send-email-yao.jin@linux.intel.com>
Add the brief introduction of fields to perf-script-python.txt.
It may help python script developer easily finding what fields
are supported.
Signed-off-by: Jin Yao <yao.jin@linux.intel.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 51ec2d2..0fb9eda 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]
--
2.7.4
next prev parent reply other threads:[~2018-06-01 1:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-01 9:01 [PATCH v2 0/3] perf script python: Add more PMU fields Jin Yao
2018-06-01 1:55 ` Andi Kleen
2018-06-06 12:45 ` Arnaldo Carvalho de Melo
2018-06-01 9:01 ` [PATCH v2 1/3] perf script python: Move dsoname code to a new function Jin Yao
2018-06-07 8:25 ` [tip:perf/urgent] " tip-bot for Jin Yao
2018-06-01 9:01 ` [PATCH v2 2/3] perf script python: Add more PMU fields Jin Yao
2018-06-06 18:36 ` Arnaldo Carvalho de Melo
2018-06-07 1:00 ` Jin, Yao
2018-06-07 8:25 ` [tip:perf/urgent] perf script python: Add more PMU fields to event handler dict tip-bot for Jin Yao
2018-06-01 9:01 ` Jin Yao [this message]
2018-06-07 8:26 ` [tip:perf/urgent] perf script python: Add dict fields introduction to Documentation tip-bot for Jin Yao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1527843663-32288-4-git-send-email-yao.jin@linux.intel.com \
--to=yao.jin@linux.intel.com \
--cc=Linux-kernel@vger.kernel.org \
--cc=acme@kernel.org \
--cc=ak@linux.intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@intel.com \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=yao.jin@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox