From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, jolsa@kernel.org,
dzickus@redhat.com, acme@redhat.com, hpa@zytor.com,
a.p.zijlstra@chello.nl, dsahern@gmail.com, andi@firstfloor.org,
namhyung@kernel.org, mingo@kernel.org, jmario@redhat.com,
tglx@linutronix.de
Subject: [tip:perf/core] perf c2c report: Add c2c related stats stdio output
Date: Sat, 22 Oct 2016 01:52:04 -0700 [thread overview]
Message-ID: <tip-ypz84f3a9fumyttrxurm458z@git.kernel.org> (raw)
Commit-ID: 2709b97dc2e250b5365629b99da5aa1cca7708f8
Gitweb: http://git.kernel.org/tip/2709b97dc2e250b5365629b99da5aa1cca7708f8
Author: Jiri Olsa <jolsa@kernel.org>
AuthorDate: Sat, 27 Aug 2016 11:40:23 +0200
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 21 Oct 2016 10:31:56 -0300
perf c2c report: Add c2c related stats stdio output
Display c2c related configuration options/setup.
So far it's output of monitored events:
$ perf c2c report --stats
...
=================================================
c2c details
=================================================
Events : cpu/mem-loads,ldlat=50/pp
: cpu/mem-stores/pp
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-ypz84f3a9fumyttrxurm458z@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-c2c.c | 33 +++++++++++++++++++++++++++------
1 file changed, 27 insertions(+), 6 deletions(-)
diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index f7b118b..88d88ea 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -13,6 +13,8 @@
#include "tool.h"
#include "data.h"
#include "sort.h"
+#include "evlist.h"
+#include "evsel.h"
#include <asm/bug.h>
#include "ui/browsers/hists.h"
@@ -1893,13 +1895,32 @@ static void print_pareto(FILE *out)
}
}
-static void perf_c2c__hists_fprintf(FILE *out)
+static void print_c2c_info(FILE *out, struct perf_session *session)
+{
+ struct perf_evlist *evlist = session->evlist;
+ struct perf_evsel *evsel;
+ bool first = true;
+
+ fprintf(out, "=================================================\n");
+ fprintf(out, " c2c details \n");
+ fprintf(out, "=================================================\n");
+
+ evlist__for_each_entry(evlist, evsel) {
+ fprintf(out, "%-36s: %s\n", first ? " Events" : "",
+ perf_evsel__name(evsel));
+ first = false;
+ }
+}
+
+static void perf_c2c__hists_fprintf(FILE *out, struct perf_session *session)
{
setup_pager();
print_c2c__display_stats(out);
fprintf(out, "\n");
print_shared_cacheline_info(out);
+ fprintf(out, "\n");
+ print_c2c_info(out, session);
if (c2c.stats_only)
return;
@@ -2073,18 +2094,18 @@ out:
return 0;
}
-static void perf_c2c_display(void)
+static void perf_c2c_display(struct perf_session *session)
{
if (c2c.use_stdio)
- perf_c2c__hists_fprintf(stdout);
+ perf_c2c__hists_fprintf(stdout, session);
else
perf_c2c__hists_browse(&c2c.hists.hists);
}
#else
-static void perf_c2c_display(void)
+static void perf_c2c_display(struct perf_session *session)
{
use_browser = 0;
- perf_c2c__hists_fprintf(stdout);
+ perf_c2c__hists_fprintf(stdout, session);
}
#endif /* HAVE_SLANG_SUPPORT */
@@ -2197,7 +2218,7 @@ static int perf_c2c__report(int argc, const char **argv)
ui_quirks();
- perf_c2c_display();
+ perf_c2c_display(session);
out_session:
perf_session__delete(session);
reply other threads:[~2016-10-22 8:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=tip-ypz84f3a9fumyttrxurm458z@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=andi@firstfloor.org \
--cc=dsahern@gmail.com \
--cc=dzickus@redhat.com \
--cc=hpa@zytor.com \
--cc=jmario@redhat.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=tglx@linutronix.de \
/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