All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Jihong <yangjihong1@huawei.com>
To: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
	<mark.rutland@arm.com>, <alexander.shishkin@linux.intel.com>,
	<jolsa@kernel.org>, <namhyung@kernel.org>,
	<linux-kernel@vger.kernel.org>,
	<linux-perf-users@vger.kernel.org>
Cc: <yangjihong1@huawei.com>
Subject: [RFC 02/13] perf kwork: Add irq record support
Date: Mon, 13 Jun 2022 17:45:54 +0800	[thread overview]
Message-ID: <20220613094605.208401-3-yangjihong1@huawei.com> (raw)
In-Reply-To: <20220613094605.208401-1-yangjihong1@huawei.com>

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@huawei.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


  parent reply	other threads:[~2022-06-13  9:49 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13  9:45 [RFC 00/13] perf: Add perf kwork Yang Jihong
2022-06-13  9:45 ` [RFC 01/13] perf kwork: New tool Yang Jihong
2022-06-14 21:43   ` Namhyung Kim
2022-06-15  1:38     ` Yang Jihong
2022-06-13  9:45 ` Yang Jihong [this message]
2022-06-13  9:45 ` [RFC 03/13] perf kwork: Add softirq record support Yang Jihong
2022-06-13  9:45 ` [RFC 04/13] perf kwork: Add workqueue " Yang Jihong
2022-06-13  9:45 ` [RFC 05/13] tools lib: Add list_last_entry_or_null Yang Jihong
2022-06-13  9:45 ` [RFC 06/13] perf kwork: Implement perf kwork report Yang Jihong
2022-06-14 21:49   ` Namhyung Kim
2022-06-15  3:12     ` Yang Jihong
2022-06-15 22:01       ` Namhyung Kim
2022-06-16  1:31         ` Yang Jihong
2022-06-13  9:45 ` [RFC 07/13] perf kwork: Add irq report support Yang Jihong
2022-06-13  9:46 ` [RFC 08/13] perf kwork: Add softirq " Yang Jihong
2022-06-13  9:46 ` [RFC 09/13] perf kwork: Add workqueue " Yang Jihong
2022-06-14 21:54   ` Namhyung Kim
2022-06-15  3:22     ` Yang Jihong
2022-06-15 21:56       ` Namhyung Kim
2022-06-16  1:42         ` Yang Jihong
2022-06-13  9:46 ` [RFC 10/13] perf kwork: Implement perf kwork latency Yang Jihong
2022-06-13  9:46 ` [RFC 11/13] perf kwork: Add softirq latency support Yang Jihong
2022-06-13  9:46 ` [RFC 12/13] perf kwork: Add workqueue " Yang Jihong
2022-06-13  9:46 ` [RFC 13/13] perf kwork: Implement perf kwork timehist Yang Jihong
2022-06-22 14:59 ` [RFC 00/13] perf: Add perf kwork Paul A. Clarke
2022-06-23  1:02   ` Yang Jihong
2022-06-23 14:25     ` Paul A. Clarke
2022-06-24  1:26       ` Yang Jihong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220613094605.208401-3-yangjihong1@huawei.com \
    --to=yangjihong1@huawei.com \
    --cc=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.