[PATCH 09/18] perf symbol: Introduce symbol_conf.event_group

From: Namhyung Kim
Date: Thu Nov 29 2012 - 01:43:21 EST


From: Namhyung Kim <namhyung.kim@xxxxxxx>

The event_group field is for enabling event group view on perf report
and other commands. It requires collapsing hist entries since every
member in a group needs to be linked before final output resorting.

Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Stephane Eranian <eranian@xxxxxxxxxx>
Signed-off-by: Namhyung Kim <namhyung@xxxxxxxxxx>
---
tools/perf/util/symbol.c | 4 ++++
tools/perf/util/symbol.h | 3 ++-
2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 295f8d4feedf..a64b0bf77f32 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -15,6 +15,7 @@
#include "machine.h"
#include "symbol.h"
#include "strlist.h"
+#include "sort.h"

#include <elf.h>
#include <limits.h>
@@ -1650,6 +1651,9 @@ int symbol__init(void)

symbol_conf.kptr_restrict = symbol__read_kptr_restrict();

+ if (symbol_conf.event_group)
+ sort__need_collapse = 1;
+
symbol_conf.initialized = true;
return 0;

diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index de68f98b236d..8bef1452675f 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -96,7 +96,8 @@ struct symbol_conf {
initialized,
kptr_restrict,
annotate_asm_raw,
- annotate_src;
+ annotate_src,
+ event_group;
const char *vmlinux_name,
*kallsyms_name,
*source_prefix,
--
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/