All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Jiri Olsa <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: jolsa@kernel.org, peterz@infradead.org, hpa@zytor.com,
	dsahern@gmail.com, jmario@redhat.com,
	alexander.shishkin@linux.intel.com, tglx@linutronix.de,
	linux-kernel@vger.kernel.org, namhyung@kernel.org,
	mingo@kernel.org, acme@redhat.com
Subject: [tip:perf/core] perf c2c report: Make calc_width work with struct c2c_hist_entry
Date: Mon, 19 Mar 2018 23:18:25 -0700	[thread overview]
Message-ID: <tip-3773138828b38f3f1364ef318cd876b16182388a@git.kernel.org> (raw)
In-Reply-To: <20180309101442.9224-6-jolsa@kernel.org>

Commit-ID:  3773138828b38f3f1364ef318cd876b16182388a
Gitweb:     https://git.kernel.org/tip/3773138828b38f3f1364ef318cd876b16182388a
Author:     Jiri Olsa <jolsa@kernel.org>
AuthorDate: Fri, 9 Mar 2018 11:14:38 +0100
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 16 Mar 2018 13:53:05 -0300

perf c2c report: Make calc_width work with struct c2c_hist_entry

We are going to calculate tje column width based on the struct
c2c_hist_entry data, so making calc_width to work with struct
c2c_hist_entry.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Joe Mario <jmario@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20180309101442.9224-6-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/builtin-c2c.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 95765a1db903..43ce55550c9d 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -1839,20 +1839,24 @@ static inline int valid_hitm_or_store(struct hist_entry *he)
 	return has_hitm || c2c_he->stats.store;
 }
 
-static void calc_width(struct hist_entry *he)
+static void calc_width(struct c2c_hist_entry *c2c_he)
 {
 	struct c2c_hists *c2c_hists;
 
-	c2c_hists = container_of(he->hists, struct c2c_hists, hists);
-	hists__calc_col_len(&c2c_hists->hists, he);
+	c2c_hists = container_of(c2c_he->he.hists, struct c2c_hists, hists);
+	hists__calc_col_len(&c2c_hists->hists, &c2c_he->he);
 }
 
 static int filter_cb(struct hist_entry *he)
 {
+	struct c2c_hist_entry *c2c_he;
+
+	c2c_he = container_of(he, struct c2c_hist_entry, he);
+
 	if (c2c.show_src && !he->srcline)
 		he->srcline = hist_entry__get_srcline(he);
 
-	calc_width(he);
+	calc_width(c2c_he);
 
 	if (!valid_hitm_or_store(he))
 		he->filtered = HIST_FILTER__C2C;
@@ -1869,7 +1873,7 @@ static int resort_cl_cb(struct hist_entry *he)
 	c2c_he = container_of(he, struct c2c_hist_entry, he);
 	c2c_hists = c2c_he->hists;
 
-	calc_width(he);
+	calc_width(c2c_he);
 
 	if (display && c2c_hists) {
 		static unsigned int idx;

  reply	other threads:[~2018-03-20  6:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-09 10:14 [PATCHv2 0/9] perf tools: Assorted fixes Jiri Olsa
2018-03-09 10:14 ` [PATCH 1/9] perf tools: Free memory nodes data Jiri Olsa
2018-03-20  6:16   ` [tip:perf/core] perf env: " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 2/9] perf tools: Add mem2node object Jiri Olsa
2018-03-20  6:16   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 3/9] perf tests: Add mem2node object test Jiri Olsa
2018-03-20  6:17   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 4/9] perf c2c record: Record physical addresses in samples Jiri Olsa
2018-03-20  6:17   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 5/9] perf c2c report: Make calc_width work with struct c2c_hist_entry Jiri Olsa
2018-03-20  6:18   ` tip-bot for Jiri Olsa [this message]
2018-03-09 10:14 ` [PATCH 6/9] perf c2c report: Call calc_width only for displayed entries Jiri Olsa
2018-03-20  6:18   ` [tip:perf/core] perf c2c report: Call calc_width() " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 7/9] perf c2c report: Display node for cacheline address Jiri Olsa
2018-03-20  6:19   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 8/9] perf c2c report: Add span header over cacheline data Jiri Olsa
2018-03-20  6:19   ` [tip:perf/core] " tip-bot for Jiri Olsa
2018-03-09 10:14 ` [PATCH 9/9] perf c2c report: Add cacheline address count column Jiri Olsa
2018-03-09 14:56   ` Arnaldo Carvalho de Melo
2018-03-09 16:28     ` Jiri Olsa
2018-03-09 17:34       ` Arnaldo Carvalho de Melo
2018-03-20  6:20   ` [tip:perf/core] " tip-bot for Jiri Olsa

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-3773138828b38f3f1364ef318cd876b16182388a@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=dsahern@gmail.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=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.