perf evlist: Pass the event_group info via perf_attr_details
Commit-ID: e35ef355ad3dd26bff79c8711f070ac69501dfa3 Gitweb: http://git.kernel.org/tip/e35ef355ad3dd26bff79c8711f070ac69501dfa3 Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Wed, 6 Feb 2013 17:20:02 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Wed, 6 Feb 2013 18:09:28 -0300
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 <[email protected]>
Cc Frederic Weisbecker <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Mike Galbraith <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Stephane Eranian <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/builtin-evlist.c | 4 ++-- tools/perf/util/evsel.c | 2 +- tools/perf/util/evsel.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)
tools/perf/builtin-evlist.c +2 -2
@@ -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); }
tools/perf/util/evsel.c +1 -1
@@ -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))
tools/perf/util/evsel.h +1 -0
@@ -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,