Skip to contentSkip to conversation

perf top: Remove redundant syme->origin field

tip:perf/urgent tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Mar 16, 2011 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  8b8ba4a9a5b04916858f79cee71873f973931649
Gitweb:     http://git.kernel.org/tip/8b8ba4a9a5b04916858f79cee71873f973931649
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Fri, 11 Mar 2011 12:38:48 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 11 Mar 2011 13:28:45 -0300

perf top: Remove redundant syme->origin field

We can get it from syme->map->dso->kernel (that should be renamed to origin, but leave this for another patch).

Cc: Frederic Weisbecker <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Cc: Tom Zanussi <[email protected]>
LKML-Reference: <new-submission>

---
 tools/perf/builtin-top.c |    1 -
 tools/perf/util/top.c    |    4 ++--
 tools/perf/util/top.h    |    1 -
 3 files changed, 2 insertions(+), 4 deletions(-)
tools/perf/builtin-top.c +0 -1
index 4bf6e02..4976400 100644
@@ -782,7 +782,6 @@ static void perf_event__process_sample(const union perf_event *event,
 	if (!syme->skip) {
 		struct perf_evsel *evsel;
 
-		syme->origin = origin;
 		evsel = perf_evlist__id2evsel(top.evlist, sample->id);
 		assert(evsel != NULL);
 		syme->count[evsel->idx]++;
tools/perf/util/top.c +2 -2
index fcfb777..a11f607 100644
@@ -184,9 +184,9 @@ float perf_top__decay_samples(struct perf_top *top, struct rb_root *root)
 		if (syme->snap_count != 0) {
 
 			if ((top->hide_user_symbols &&
-			     syme->origin == PERF_RECORD_MISC_USER) ||
+			     syme->map->dso->kernel == DSO_TYPE_USER) ||
 			    (top->hide_kernel_symbols &&
-			     syme->origin == PERF_RECORD_MISC_KERNEL)) {
+			     syme->map->dso->kernel == DSO_TYPE_KERNEL)) {
 				perf_top__remove_active_sym(top, syme);
 				continue;
 			}
tools/perf/util/top.h +0 -1
index 96a7831..ba111b2 100644
@@ -17,7 +17,6 @@ struct sym_entry {
 	unsigned long		snap_count;
 	double			weight;
 	int			skip;
-	u8			origin;
 	struct map		*map;
 	unsigned long		count[0];
 };