From 1b305e3ec8da036ea1f6d02c68ae00de056c13f0 Mon Sep 17 00:00:00 2001 From: Keren Kotler Date: Tue, 19 Nov 2024 06:36:01 +0000 Subject: [PATCH] bpftool: add profile support for cpu_clock metric Signed-off-by: Keren Kotler --- src/prog.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/prog.c b/src/prog.c index e634861..e6cface 100644 --- a/src/prog.c +++ b/src/prog.c @@ -2055,6 +2055,14 @@ struct profile_metric { .ratio_desc = "dtlb misses per million insns", .ratio_mul = 1e6, }, + { + .name = "cpu_clock", + .attr = { + .type = PERF_TYPE_SOFTWARE, + .config = PERF_COUNT_SW_CPU_CLOCK, + .exclude_user = 1, + }, + }, }; static __u64 profile_total_count;