From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754013AbbFVXFX (ORCPT ); Mon, 22 Jun 2015 19:05:23 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59735 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753373AbbFVXFS (ORCPT ); Mon, 22 Jun 2015 19:05:18 -0400 From: Ankit Gupta To: rostedt@goodmis.org, mingo@redhat.com, agross@codeaurora.org, davem@davemloft.net, rdunlap@infradead.org, standby24x7@gmail.com, sboyd@codeaurora.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Cc: gavidov@codeaurora.org, sdharia@codeaurora.org, linux-arm-msm@vger.kernel.org, mlocke@codeaurora.org, Ankit Gupta Subject: [PATCH v2] trace/events: add chip name and hwirq to irq entry tracepoint Date: Mon, 22 Jun 2015 17:05:10 -0600 Message-Id: <1435014310-2080-1-git-send-email-ankgupta@codeaurora.org> X-Mailer: git-send-email 2.4.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add chip name and hw-irq number to the trace_irq_handler_entry() tracepoint. When tracing interrupt events the chip-name and hw-irq numbers are stable and known in advance. This makes them a better choice as a filtering criteria for the trace buffer dump. On the flipside, the os-irq numbers are dynamically allocated which makes them difficult to use for the same purpose. Dump messages will look like: ...irq_handler_entry: irq=22 name=msm_serial0 domain=GIC hwirq=140 Suggested-by: Stephen Boyd Reviewed-by: Andy Gross Signed-off-by: Gilad Avidov Signed-off-by: Ankit Gupta --- Changes since V1: - added reviewed by Andy Gross --- include/trace/events/irq.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index 3608beb..5370075 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h @@ -23,6 +23,17 @@ struct softirq_action; softirq_name(HRTIMER), \ softirq_name(RCU)) + +#define show_chip_name(irq) \ + (irq_get_irq_data(irq) \ + ? irq_get_irq_data(irq)->chip->name \ + : "NULL") + +#define show_hwirq(irq) \ + (irq_get_irq_data(irq) \ + ? irq_get_irq_data(irq)->hwirq \ + : -ENODEV) + /** * irq_handler_entry - called immediately before the irq action handler * @irq: irq number @@ -50,7 +61,9 @@ TRACE_EVENT(irq_handler_entry, __assign_str(name, action->name); ), - TP_printk("irq=%d name=%s", __entry->irq, __get_str(name)) + TP_printk("irq=%d name=%s chip_name=%s hwirq=%ld", __entry->irq, + __get_str(name), show_chip_name(__entry->irq), + show_hwirq(__entry->irq)) ); /** -- 1.8.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/