perf evlist: Pass the event_group info via perf_attr_details
authorArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 Feb 2013 20:20:02 +0000 (17:20 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 6 Feb 2013 21:09:28 +0000 (18:09 -0300)
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>
tools/perf/builtin-evlist.c
tools/perf/util/evsel.c
tools/perf/util/evsel.h

index 85a5e35dd1477aaedc4af940e5dc254b4eed6c1a..05bd9dfe875cb95aeb6d2008b3319c2e8ca8f5eb 100644 (file)
@@ -39,7 +39,7 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused)
        OPT_BOOLEAN('F', "freq", &details.freq, "Show the sample frequency"),
        OPT_BOOLEAN('v', "verbose", &details.verbose,
                    "Show all event attr details"),
-       OPT_BOOLEAN('g', "group", &symbol_conf.event_group,
+       OPT_BOOLEAN('g', "group", &details.event_group,
                    "Show event group information"),
        OPT_END()
        };
@@ -52,7 +52,7 @@ int cmd_evlist(int argc, const char **argv, const char *prefix __maybe_unused)
        if (argc)
                usage_with_options(evlist_usage, options);
 
-       if (symbol_conf.event_group && (details.verbose || details.freq)) {
+       if (details.event_group && (details.verbose || details.freq)) {
                pr_err("--group option is not compatible with other options\n");
                usage_with_options(evlist_usage, options);
        }
index a54701504606f7145460c48cc08633b29bc39bae..9c82f98f26dedd460fb5b2c70fcb8256c33fca42 100644 (file)
@@ -1391,7 +1391,7 @@ int perf_evsel__fprintf(struct perf_evsel *evsel,
        bool first = true;
        int printed = 0;
 
-       if (symbol_conf.event_group) {
+       if (details->event_group) {
                struct perf_evsel *pos;
 
                if (!perf_evsel__is_group_leader(evsel))
index 8512f6a8a6eab17b34bcb2f6a1bf0ad4a2224bc8..52021c3087dfe23b777544164a3ffa7492b70e57 100644 (file)
@@ -254,6 +254,7 @@ static inline bool perf_evsel__is_group_leader(const struct perf_evsel *evsel)
 struct perf_attr_details {
        bool freq;
        bool verbose;
+       bool event_group;
 };
 
 int perf_evsel__fprintf(struct perf_evsel *evsel,