perf tools: Put the show mode into the event headers files
authorFrederic Weisbecker <fweisbec@gmail.com>
Sun, 16 Aug 2009 17:56:54 +0000 (19:56 +0200)
committerIngo Molnar <mingo@elte.hu>
Sun, 16 Aug 2009 17:59:13 +0000 (19:59 +0200)
Annotate and report share the same flags to filter events
considering their context (kernel, user, hypervisor).

Both tools have their own definitions of these flags. Factorize
them out into the event headers file.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <1250445414-29237-1-git-send-email-fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
tools/perf/builtin-annotate.c
tools/perf/builtin-report.c
tools/perf/util/event.h

index 820e7ccec62d72ba270044275fa1745915fa9dad..6d751516616d437e1ff70cbbc779c8515e67fe1b 100644 (file)
 #include "util/parse-events.h"
 #include "util/thread.h"
 
-#define SHOW_KERNEL    1
-#define SHOW_USER      2
-#define SHOW_HV                4
-
 static char            const *input_name = "perf.data";
 
 static char            default_sort_order[] = "comm,symbol";
index e104ed3c8418a31d05dac7f98f772199d1c664a1..05d52ff4c33d0bbf8afe71348a69df30857828bf 100644 (file)
 
 #include "util/thread.h"
 
-#define SHOW_KERNEL    1
-#define SHOW_USER      2
-#define SHOW_HV                4
-
 static char            const *input_name = "perf.data";
 
 static char            default_sort_order[] = "comm,dso,symbol";
index fa7c50b654e144ae4cc44c407891b798937f43a2..fa2d4e91d3291d0814a03b20bd7d12c9af66afd2 100644 (file)
@@ -4,6 +4,12 @@
 #include "util.h"
 #include <linux/list.h>
 
+enum {
+       SHOW_KERNEL     = 1,
+       SHOW_USER       = 2,
+       SHOW_HV         = 4,
+};
+
 /*
  * PERF_SAMPLE_IP | PERF_SAMPLE_TID | *
  */