[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220613094605.208401-3-yangjihong1@huawei.com>
Date: Mon, 13 Jun 2022 17:45:54 +0800
From: Yang Jihong <yangjihong1@...wei.com>
To: <peterz@...radead.org>, <mingo@...hat.com>, <acme@...nel.org>,
<mark.rutland@....com>, <alexander.shishkin@...ux.intel.com>,
<jolsa@...nel.org>, <namhyung@...nel.org>,
<linux-kernel@...r.kernel.org>, <linux-perf-users@...r.kernel.org>
CC: <yangjihong1@...wei.com>
Subject: [RFC 02/13] perf kwork: Add irq record support
Record interrupt events irq:irq_handler_entry & irq_handler_exit:
Record irq events:
# perf kwork record -o perf_kwork.date -- sleep 1
[ perf record: Woken up 0 times to write data ]
[ perf record: Captured and wrote 0.524 MB perf_kwork.date ]
# perf evlist -i perf_kwork.date
irq:irq_handler_entry
irq:irq_handler_exit
dummy:HG
Signed-off-by: Yang Jihong <yangjihong1@...wei.com>
---
tools/perf/builtin-kwork.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tools/perf/builtin-kwork.c b/tools/perf/builtin-kwork.c
index b89e41fcc568..822904b2597e 100644
--- a/tools/perf/builtin-kwork.c
+++ b/tools/perf/builtin-kwork.c
@@ -25,6 +25,7 @@
#include <linux/zalloc.h>
enum kwork_class_type {
+ KWORK_CLASS_IRQ,
KWORK_CLASS_MAX,
};
@@ -68,7 +69,19 @@ struct perf_kwork {
const char *sort_order;
};
+const struct evsel_str_handler irq_tp_handlers[] = {
+ { "irq:irq_handler_entry", NULL, },
+ { "irq:irq_handler_exit", NULL, },
+};
+
+static struct kwork_class kwork_irq = {
+ .name = "irq",
+ .nr_tracepoints = 2,
+ .tp_handlers = irq_tp_handlers,
+};
+
static struct kwork_class *kwork_class_supported_list[KWORK_CLASS_MAX] = {
+ [KWORK_CLASS_IRQ] = &kwork_irq,
};
static void setup_event_list(struct perf_kwork *kwork,
--
2.30.GIT
Powered by blists - more mailing lists