aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/perf_event_attr_fprintf.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2020-03-25 21:45:30 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-04-03 09:37:55 -0300
commitba78c1c5461c2fc2f57b777e971b3a9ec0df5666 (patch)
tree751b4855e928a27eababaa590ca8ffd3e261151c /tools/perf/util/perf_event_attr_fprintf.c
parentperf tools: Add file-handle feature test (diff)
downloadlinux-dev-ba78c1c5461c2fc2f57b777e971b3a9ec0df5666.tar.xz
linux-dev-ba78c1c5461c2fc2f57b777e971b3a9ec0df5666.zip
perf tools: Basic support for CGROUP event
Implement basic functionality to support cgroup tracking. Each cgroup can be identified by inode number which can be read from userspace too. The actual cgroup processing will come in the later patch. Reported-by: kernel test robot <rong.a.chen@intel.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> [ fix perf test failure on sampling parsing ] Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20200325124536.2800725-4-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/perf_event_attr_fprintf.c')
-rw-r--r--tools/perf/util/perf_event_attr_fprintf.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/perf_event_attr_fprintf.c b/tools/perf/util/perf_event_attr_fprintf.c
index 355d3458d4e6..b94fa07f5d32 100644
--- a/tools/perf/util/perf_event_attr_fprintf.c
+++ b/tools/perf/util/perf_event_attr_fprintf.c
@@ -35,6 +35,7 @@ static void __p_sample_type(char *buf, size_t size, u64 value)
bit_name(BRANCH_STACK), bit_name(REGS_USER), bit_name(STACK_USER),
bit_name(IDENTIFIER), bit_name(REGS_INTR), bit_name(DATA_SRC),
bit_name(WEIGHT), bit_name(PHYS_ADDR), bit_name(AUX),
+ bit_name(CGROUP),
{ .name = NULL, }
};
#undef bit_name
@@ -132,6 +133,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
PRINT_ATTRf(ksymbol, p_unsigned);
PRINT_ATTRf(bpf_event, p_unsigned);
PRINT_ATTRf(aux_output, p_unsigned);
+ PRINT_ATTRf(cgroup, p_unsigned);
PRINT_ATTRn("{ wakeup_events, wakeup_watermark }", wakeup_events, p_unsigned);
PRINT_ATTRf(bp_type, p_unsigned);