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 v1 0/4] perf annotate: Create a new '--tui-dump' option
Date: Tue, 13 Mar 2018 22:16:50 +0800 [thread overview]
Message-ID: <1520950614-22082-1-git-send-email-yao.jin@linux.intel.com> (raw)
There is a requirement to let perf annotate support displaying the IPC/Cycle.
In previous patch, this is supported in TUI mode. While it's not convenient
for users since they have to take screen shots and copy/paste data.
This patch series introduces a new option '--tui-dump' in perf annotate to
dump the TUI output to stdio.
User can easily use the command line like:
'perf annotate --tui-dump > /tmp/log.txt'
For example:
$ perf annotate compute_flag --tui-dump
Percent IPC Cycle
Disassembly of section .text:
0000000000400640 <compute_flag>:
compute_flag():
volatile int count;
static unsigned int s_randseed;
__attribute__((noinline))
int compute_flag()
{
23.00 1.16 sub $0x8,%rsp
int i;
i = rand() % 2;
23.06 1.16 1 callq rand@plt
return i;
27.01 3.38 mov %eax,%edx
}
3.38 add $0x8,%rsp
{
int i;
i = rand() % 2;
return i;
3.38 shr $0x1f,%edx
3.38 add %edx,%eax
3.38 and $0x1,%eax
3.38 sub %edx,%eax
}
26.93 3.38 2 retq
The '--stdio' option is still kept now. Maybe in future, we can only
maintain the TUI routines and drop the lagacy stdio code. But right
now we'd better keep it until the '--tui-dump' option is good enough.
Jin Yao (4):
perf browser: Add a new 'dump' flag
perf browser: bypass ui_init if in tui dump mode
perf annotate: Process the new switch flag tui_dump
perf annotate: Enable the '--tui-dump' mode
tools/perf/Documentation/perf-annotate.txt | 3 +++
tools/perf/builtin-annotate.c | 12 +++++++--
tools/perf/builtin-c2c.c | 2 +-
tools/perf/builtin-report.c | 2 +-
tools/perf/builtin-top.c | 2 +-
tools/perf/ui/browser.c | 38 +++++++++++++++++++++++----
tools/perf/ui/browser.h | 1 +
tools/perf/ui/browsers/annotate.c | 41 +++++++++++++++++++++---------
tools/perf/ui/browsers/hists.c | 2 +-
tools/perf/ui/setup.c | 9 +++++--
tools/perf/ui/ui.h | 2 +-
tools/perf/util/annotate.h | 6 +++--
tools/perf/util/hist.h | 11 +++++---
13 files changed, 99 insertions(+), 32 deletions(-)
--
2.7.4
next reply other threads:[~2018-03-13 6:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 14:16 Jin Yao [this message]
2018-03-13 10:01 ` Mason
2018-03-13 14:16 ` [PATCH v1 1/4] perf browser: Add a new 'dump' flag Jin Yao
2018-03-13 14:16 ` [PATCH v1 2/4] perf browser: bypass ui_init if in tui dump mode Jin Yao
2018-03-13 14:16 ` [PATCH v1 3/4] perf annotate: Process the new switch flag tui_dump Jin Yao
2018-03-13 14:16 ` [PATCH v1 4/4] perf annotate: Enable the '--tui-dump' mode Jin Yao
2018-03-13 15:20 ` [PATCH v1 0/4] perf annotate: Create a new '--tui-dump' option Arnaldo Carvalho de Melo
2018-03-14 2:04 ` Jin, Yao
2018-03-14 13:54 ` Arnaldo Carvalho de Melo
2018-03-15 3:12 ` 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=1520950614-22082-1-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
Powered by JetHome