mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, acme@redhat.com,
	namhyung@kernel.org, hpa@zytor.com, jmario@redhat.com,
	a.p.zijlstra@chello.nl, jolsa@kernel.org, andi@firstfloor.org,
	tglx@linutronix.de, dsahern@gmail.com, dzickus@redhat.com
Subject: [tip:perf/core] perf c2c report: Setup number of header lines for hists
Date: Sat, 22 Oct 2016 01:48:10 -0700	[thread overview]
Message-ID: <tip-4ilsf0ulubrd4y96g7tnpwzk@git.kernel.org> (raw)

Commit-ID:  1d62fcd693c0014dca74490a1139be36271f4af6
Gitweb:     http://git.kernel.org/tip/1d62fcd693c0014dca74490a1139be36271f4af6
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Tue, 24 May 2016 10:12:31 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 19 Oct 2016 13:18:31 -0300

perf c2c report: Setup number of header lines for hists

Allow to setup number of header lines for c2c hists objects.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
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-4ilsf0ulubrd4y96g7tnpwzk@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-c2c.c | 18 ++++++++++++------
 1 file changed, 12 insertions(+), 6 deletions(-)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 0f898d3..44a8567 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -100,11 +100,13 @@ static struct hist_entry_ops c2c_entry_ops = {
 };
 
 static int c2c_hists__init(struct c2c_hists *hists,
-			   const char *sort);
+			   const char *sort,
+			   int nr_header_lines);
 
 static struct c2c_hists*
 he__get_c2c_hists(struct hist_entry *he,
-		  const char *sort)
+		  const char *sort,
+		  int nr_header_lines)
 {
 	struct c2c_hist_entry *c2c_he;
 	struct c2c_hists *hists;
@@ -118,7 +120,7 @@ he__get_c2c_hists(struct hist_entry *he,
 	if (!hists)
 		return NULL;
 
-	ret = c2c_hists__init(hists, sort);
+	ret = c2c_hists__init(hists, sort, nr_header_lines);
 	if (ret) {
 		free(hists);
 		return NULL;
@@ -214,7 +216,7 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
 		if (!mi_dup)
 			goto free_mi;
 
-		c2c_hists = he__get_c2c_hists(he, "offset");
+		c2c_hists = he__get_c2c_hists(he, "offset", 2);
 		if (!c2c_hists)
 			goto free_mi_dup;
 
@@ -1591,7 +1593,8 @@ static int hpp_list__parse(struct perf_hpp_list *hpp_list,
 }
 
 static int c2c_hists__init(struct c2c_hists *hists,
-			   const char *sort)
+			   const char *sort,
+			   int nr_header_lines)
 {
 	__hists__init(&hists->hists, &hists->list);
 
@@ -1602,6 +1605,9 @@ static int c2c_hists__init(struct c2c_hists *hists,
 	 */
 	perf_hpp_list__init(&hists->list);
 
+	/* Overload number of header lines.*/
+	hists->list.nr_header_lines = nr_header_lines;
+
 	return hpp_list__parse(&hists->list, NULL, sort);
 }
 
@@ -1730,7 +1736,7 @@ static int perf_c2c__report(int argc, const char **argv)
 
 	file.path = input_name;
 
-	err = c2c_hists__init(&c2c.hists, "dcacheline");
+	err = c2c_hists__init(&c2c.hists, "dcacheline", 2);
 	if (err) {
 		pr_debug("Failed to initialize hists\n");
 		goto out;

                 reply	other threads:[~2016-10-22  8:48 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-4ilsf0ulubrd4y96g7tnpwzk@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