Skip to content

Commit

Permalink
perf tools: Put the show mode into the event headers files
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Aug 16, 2009
1 parent 2cec19d commit 0f25bfc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 0 additions & 4 deletions tools/perf/builtin-annotate.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@
#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";
Expand Down
4 changes: 0 additions & 4 deletions tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@

#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";
Expand Down
6 changes: 6 additions & 0 deletions tools/perf/util/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 | *
*/
Expand Down

0 comments on commit 0f25bfc

Please sign in to comment.