summaryrefslogtreecommitdiffstats
path: root/tools/lib/perf/include
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/lib/perf/include
parent49f550ea87c73671ee4d5e08820e0976894dd610 (diff)
downloadlinux-ba78c1c5461c2fc2f57b777e971b3a9ec0df5666.tar.gz
linux-ba78c1c5461c2fc2f57b777e971b3a9ec0df5666.tar.bz2
linux-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/lib/perf/include')
-rw-r--r--tools/lib/perf/include/perf/event.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/lib/perf/include/perf/event.h b/tools/lib/perf/include/perf/event.h
index 18106899cb4e..69b44d2cc0f5 100644
--- a/tools/lib/perf/include/perf/event.h
+++ b/tools/lib/perf/include/perf/event.h
@@ -105,6 +105,12 @@ struct perf_record_bpf_event {
__u8 tag[BPF_TAG_SIZE]; // prog tag
};
+struct perf_record_cgroup {
+ struct perf_event_header header;
+ __u64 id;
+ char path[PATH_MAX];
+};
+
struct perf_record_sample {
struct perf_event_header header;
__u64 array[];
@@ -352,6 +358,7 @@ union perf_event {
struct perf_record_mmap2 mmap2;
struct perf_record_comm comm;
struct perf_record_namespaces namespaces;
+ struct perf_record_cgroup cgroup;
struct perf_record_fork fork;
struct perf_record_lost lost;
struct perf_record_lost_samples lost_samples;