public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: tglx@linutronix.de (Thomas Gleixner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V3] trace/events: add chip name and hwirq to irq entry tracepoint
Date: Sat, 11 Jul 2015 10:02:51 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.11.1507110953140.17353@nanos> (raw)
In-Reply-To: <2686ba70b03b3e16c94f93052aa56703.squirrel@www.codeaurora.org>

On Wed, 8 Jul 2015, Ankit Gupta wrote:
> > On Wed, 24 Jun 2015, Steven Rostedt wrote:
> >> > +
> >> > +#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)
> >>
> >> Note these magic functions will only be useful for the tracefs reads of
> >> the trace files. Userspace tools that extract the data (like perf and
> >> trace-cmd), will have no idea of how to parse it.
> >>
> >> I'm not against doing this, but I'm just letting you know what the
> >> effect of this change will be.
> >
> > What's worse is, that they are racy against a concurrent teardown of
> > the interrupt. Not a good idea ...
> >
> 
> Agree, I'll save the chip-name and hwirq in the struct. This technique
> using the same macros to save the chip-name and hwirq in the struct also
> works well with trace-cmd.

Though I really doubt that this is the proper way to go. Why do you want
to store redundant information on every tracepoint?

That does not make any sense.

What we really want is an interface to query the interrupt association
(linux interrupt number, chip, domain, hwirq, ...) in one go when the
tracer starts and have tracepoints which keep track of irq setup and
teardown.

That way we keep the hotpath tracepoints tiny and the analysis tools
can create rich tracepoints for postprocessing. That's how perf is
working as well.

Thanks,

	tglx

      reply	other threads:[~2015-07-11  8:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-24 16:17 [PATCH V3] trace/events: add chip name and hwirq to irq entry tracepoint Ankit Gupta
2015-06-24 16:42 ` Steven Rostedt
2015-07-05 21:28   ` Thomas Gleixner
2015-07-08 17:56     ` Ankit Gupta
2015-07-11  8:02       ` Thomas Gleixner [this message]

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=alpine.DEB.2.11.1507110953140.17353@nanos \
    --to=tglx@linutronix.de \
    --cc=linux-arm-kernel@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox