mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Mike Galbraith <efault@gmx.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>
Subject: [PATCH 01/19] perf hists: Mark entries filtered by parent
Date: Sun,  1 Aug 2010 22:08:36 -0300	[thread overview]
Message-ID: <1280711334-30000-2-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1280711334-30000-1-git-send-email-acme@infradead.org>

From: Arnaldo Carvalho de Melo <acme@redhat.com>

And don't consider them in hists__inc_nr_entries.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/hist.c |   21 ++++++++++++++++-----
 1 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index 7b5848c..d998d1d 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -5,6 +5,12 @@
 #include "sort.h"
 #include <math.h>
 
+enum hist_filter {
+	HIST_FILTER__DSO,
+	HIST_FILTER__THREAD,
+	HIST_FILTER__PARENT,
+};
+
 struct callchain_param	callchain_param = {
 	.mode	= CHAIN_GRAPH_REL,
 	.min_percent = 0.5
@@ -52,11 +58,20 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template)
 
 static void hists__inc_nr_entries(struct hists *self, struct hist_entry *entry)
 {
+	if (entry->filtered)
+		return;
 	if (entry->ms.sym && self->max_sym_namelen < entry->ms.sym->namelen)
 		self->max_sym_namelen = entry->ms.sym->namelen;
 	++self->nr_entries;
 }
 
+static u8 symbol__parent_filter(const struct symbol *parent)
+{
+	if (symbol_conf.exclude_other && parent == NULL)
+		return 1 << HIST_FILTER__PARENT;
+	return 0;
+}
+
 struct hist_entry *__hists__add_entry(struct hists *self,
 				      struct addr_location *al,
 				      struct symbol *sym_parent, u64 period)
@@ -75,6 +90,7 @@ struct hist_entry *__hists__add_entry(struct hists *self,
 		.level	= al->level,
 		.period	= period,
 		.parent = sym_parent,
+		.filtered = symbol__parent_filter(sym_parent),
 	};
 	int cmp;
 
@@ -790,11 +806,6 @@ print_entries:
 	return ret;
 }
 
-enum hist_filter {
-	HIST_FILTER__DSO,
-	HIST_FILTER__THREAD,
-};
-
 static void hists__remove_entry_filter(struct hists *self, struct hist_entry *h,
 				       enum hist_filter filter)
 {
-- 
1.6.2.5


       reply	other threads:[~2010-08-02  1:09 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1280711334-30000-1-git-send-email-acme@infradead.org>
2010-08-02  1:08 ` Arnaldo Carvalho de Melo [this message]
2010-08-02  1:08 ` [PATCH 02/19] perf sort: Make column width code per hists instance Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 03/19] perf ui: Restore SPACE as an alias to PGDN in annotate Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 04/19] perf hist: Introduce routine to measure lenght of formatted entry Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 05/19] perf ui: Consider the refreshed dimensions in ui_browser__show Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 06/19] perf ui: Show the scroll bar over the left window frame Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 07/19] perf ui: New hists tree widget Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 08/19] perf report: Don't abbreviate file paths relative to the cwd Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 09/19] perf tools: Remove unneeded code for tracking the cwd in perf sessions Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 10/19] perf man pages: Fix cut'n'paste error Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 11/19] perf record: Release resources at exit Arnaldo Carvalho de Melo
2010-08-02  7:30   ` Nick Piggin
2010-08-02  7:54     ` Ingo Molnar
2010-08-02  8:03       ` Nick Piggin
2010-08-02  9:17         ` Ingo Molnar
2010-08-02  9:59           ` Nick Piggin
2010-08-02 14:49             ` Arnaldo Carvalho de Melo
2010-08-02  8:08   ` Pekka Enberg
2010-08-02  1:08 ` [PATCH 12/19] perf symbols: Precisely specify if dso->{long,short}_name should be freed Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 13/19] perf tools: Factor out buildid reading and make it implicit in dso__load Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 14/19] perf tools: remove extra build-id check factored into dso__load Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 15/19] perf symbols: Improve debug image search when loading symbols Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 16/19] perf tui: Make CTRL+Z suspend perf Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 17/19] perf probe: Rename common fields/functions from kprobe to probe Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 18/19] perf tools: Release thread resources on PERF_RECORD_EXIT Arnaldo Carvalho de Melo
2010-08-02  1:08 ` [PATCH 19/19] perf tools: Release session and symbol resources on exit Arnaldo Carvalho de Melo
2010-08-02  6:26 ` [PATCH 00/19] perf/core improvements and fixes Ingo Molnar

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=1280711334-30000-2-git-send-email-acme@infradead.org \
    --to=acme@infradead.org \
    --cc=acme@redhat.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    /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

all inboxes | Powered by JetHome®