diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-02-06 15:20:02 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2013-02-06 16:09:28 -0500 |
commit | e35ef355ad3dd26bff79c8711f070ac69501dfa3 (patch) | |
tree | 85753af82f43029a73e5f1fd14c4c569d971f90c /tools | |
parent | 91b988048bea24eae386da3141d247ccea795a81 (diff) |
perf evlist: Pass the event_group info via perf_attr_details
So that we avoid dragging symbol.o into the python binding.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-izjubje7ltd1srji5wb0ygwi@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/builtin-evlist.c | 4 | ||||
-rw-r--r-- | tools/perf/util/evsel.c | 2 | ||||
-rw-r--r-- | tools/perf/util/evsel.h | 1 |
3 files changed, 4 insertions, 3 deletions
diff --git a/tools/perf/builtin-evlist.c b/tools/perf/builtin-evlist.c index 85a5e35dd147..05bd9dfe875c 100644 --- a/tools/perf/builtin-evlist.c +++ b/tools/perf/builtin-evlist.c | |||
@@ -39,7 +39,7 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused) | |||
39 | OPT_BOOLEAN('F', "freq", &details.freq, "Show the sample frequency"), | 39 | OPT_BOOLEAN('F', "freq", &details.freq, "Show the sample frequency"), |
40 | OPT_BOOLEAN('v', "verbose", &details.verbose, | 40 | OPT_BOOLEAN('v', "verbose", &details.verbose, |
41 | "Show all event attr details"), | 41 | "Show all event attr details"), |
42 | OPT_BOOLEAN('g', "group", &symbol_conf.event_group, | 42 | OPT_BOOLEAN('g', "group", &details.event_group, |
43 | "Show event group information"), | 43 | "Show event group information"), |
44 | OPT_END() | 44 | OPT_END() |
45 | }; | 45 | }; |
@@ -52,7 +52,7 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused) | |||
52 | if (argc) | 52 | if (argc) |
53 | usage_with_options(evlist_usage, options); | 53 | usage_with_options(evlist_usage, options); |
54 | 54 | ||
55 | if (symbol_conf.event_group && (details.verbose || details.freq)) { | 55 | if (details.event_group && (details.verbose || details.freq)) { |
56 | pr_err("--group option is not compatible with other options\n"); | 56 | pr_err("--group option is not compatible with other options\n"); |
57 | usage_with_options(evlist_usage, options); | 57 | usage_with_options(evlist_usage, options); |
58 | } | 58 | } |
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index a54701504606..9c82f98f26de 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
@@ -1391,7 +1391,7 @@ int perf_evsel__fprintf(struct perf_evsel *evsel, | |||
1391 | bool first = true; | 1391 | bool first = true; |
1392 | int printed = 0; | 1392 | int printed = 0; |
1393 | 1393 | ||
1394 | if (symbol_conf.event_group) { | 1394 | if (details->event_group) { |
1395 | struct perf_evsel *pos; | 1395 | struct perf_evsel *pos; |
1396 | 1396 | ||
1397 | if (!perf_evsel__is_group_leader(evsel)) | 1397 | if (!perf_evsel__is_group_leader(evsel)) |
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 8512f6a8a6ea..52021c3087df 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h | |||
@@ -254,6 +254,7 @@ static inline bool perf_evsel__is_group_leader(const struct perf_evsel *evsel) | |||
254 | struct perf_attr_details { | 254 | struct perf_attr_details { |
255 | bool freq; | 255 | bool freq; |
256 | bool verbose; | 256 | bool verbose; |
257 | bool event_group; | ||
257 | }; | 258 | }; |
258 | 259 | ||
259 | int perf_evsel__fprintf(struct perf_evsel *evsel, | 260 | int perf_evsel__fprintf(struct perf_evsel *evsel, |