mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Ankit Gupta" <ankgupta@codeaurora.org>
To: "Ankit Gupta" <ankgupta@codeaurora.org>,
	davem@davemloft.net, mingo@redhat.com, rostedt@goodmis.org,
	rdunlap@infradead.org, standby24x7@gmail.com,
	linux-kernel@vger.kernel.org
Cc: jason@debian.org, robh@kernel.org, grant.likely@linaro.org,
	sboyd@codeaurora.org, gavidov@codeaurora.org,
	sdharia@codeaurora.org, linus.walleij@linaro.org,
	mlocke@codeaurora.org, galak@codeaurora.org,
	agross@codeaurora.org, "Ankit Gupta" <ankgupta@codeaurora.org>
Subject: Re: [PATCH] trace/events: add chip name and hwirq to irq entry tracepoint
Date: Fri, 29 May 2015 16:15:52 -0600	[thread overview]
Message-ID: <bcb3863ba3028c215255dc4102a8cbc0.squirrel@www.codeaurora.org> (raw)
In-Reply-To: <1432936649-8563-1-git-send-email-ankgupta@codeaurora.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 message will look like:
> ...irq_handler_entry: irq=22 name=msm_serial0 domain=GIC hwirq=140
>
> Suggested-by: Stephen Boyd <sboyd@codeaurora.org>
> Signed-off-by: Gilad Avidov <gavidov@codeaurora.org>
> Signed-off-by: Ankit Gupta <ankgupta@codeaurora.org>
> ---
>  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
>
>




           reply	other threads:[~2015-05-29 22:16 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <1432936649-8563-1-git-send-email-ankgupta@codeaurora.org>]

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=bcb3863ba3028c215255dc4102a8cbc0.squirrel@www.codeaurora.org \
    --to=ankgupta@codeaurora.org \
    --cc=agross@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=galak@codeaurora.org \
    --cc=gavidov@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=jason@debian.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mlocke@codeaurora.org \
    --cc=rdunlap@infradead.org \
    --cc=robh@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sboyd@codeaurora.org \
    --cc=sdharia@codeaurora.org \
    --cc=standby24x7@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome