mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Vaibhav Nagarnaik <vnagarnaik@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>, Michael Rubin <mrubin@google.com>,
	David Sharp <dhsharp@google.com>,
	linux-kernel@vger.kernel.org, x86@kernel.org,
	Jiaying Zhang <jiayingz@google.com>
Subject: Re: [PATCH] trace: Add special x86 irq entry/exit tracepoints
Date: Fri, 29 Apr 2011 02:14:30 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1104290158320.3005@ionos> (raw)
In-Reply-To: <1303512981-26234-1-git-send-email-vnagarnaik@google.com>

On Fri, 22 Apr 2011, Vaibhav Nagarnaik wrote:
>  #include <asm/perf_event.h>
>  #include <asm/x86_init.h>
> @@ -857,7 +858,9 @@ void __irq_entry smp_apic_timer_interrupt(struct pt_regs *regs)
>  	 */
>  	exit_idle();
>  	irq_enter();
> +	trace_special_irq_entry(LOCAL_TIMER_VECTOR);

Gah. trace_special_irq is the worst name you could come up with. It's
tracing a vector which is nothing special and nothing x86 specific.

>  #include <asm/vsyscall.h>
>  #include <asm/x86_init.h>
> @@ -26,6 +27,8 @@
>  volatile unsigned long __jiffies __section_jiffies = INITIAL_JIFFIES;
>  #endif
>  
> +static struct irqaction *irq0_action;
> +

Ouch! You need an extra pointer for that ? Moving the stupid irq0
struct up a few lines would do the trick as well, right ?

> --- a/include/trace/events/irq.h
> +++ b/include/trace/events/irq.h
> @@ -139,6 +139,74 @@ DEFINE_EVENT(softirq, softirq_raise,
>  	TP_ARGS(vec_nr)
>  );
>  
> +#ifdef CONFIG_X86
> +#include <asm/irq_vectors.h>
> +#define special_irq_name(sirq) { sirq, #sirq }
> +#define show_special_irq_name(val)					\
> +	__print_symbolic(val,						\
> +			 special_irq_name(NMI_VECTOR),			\
> +			 special_irq_name(LOCAL_TIMER_VECTOR),		\
> +			 special_irq_name(ERROR_APIC_VECTOR),		\
> +			 special_irq_name(RESCHEDULE_VECTOR),		\
> +			 special_irq_name(CALL_FUNCTION_VECTOR),	\
> +			 special_irq_name(CALL_FUNCTION_SINGLE_VECTOR),	\
> +			 special_irq_name(THERMAL_APIC_VECTOR),		\
> +			 special_irq_name(THRESHOLD_APIC_VECTOR),	\
> +			 special_irq_name(REBOOT_VECTOR),		\
> +			 special_irq_name(SPURIOUS_APIC_VECTOR),	\
> +			 special_irq_name(IRQ_WORK_VECTOR),		\
> +			 special_irq_name(X86_PLATFORM_IPI_VECTOR)	\
> +			)
> +
> +#define IS_INVALIDATE_TLB_VECTOR(__irq) (\
> +		__irq >= INVALIDATE_TLB_VECTOR_START && \
> +		__irq <= INVALIDATE_TLB_VECTOR_END)

No way, really.

Interrupt vectors are not x86 specific and they do no need any
architecture specific handling at all. 

The symbolic printout is a nice to have extra, but it can be solved by
providing an arch specific lookup table which does not require any of
that #ifdef X86 mess. If the table does not exist, then you simply can
print the vector number and be done with it.

Thanks,

	tglx

  parent reply	other threads:[~2011-04-29  0:14 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22 22:56 Vaibhav Nagarnaik
2011-04-25 23:41 ` Vaibhav Nagarnaik
2011-04-28 23:16   ` Vaibhav Nagarnaik
2011-04-28 23:41   ` Steven Rostedt
2011-04-29 20:12   ` [PATCH] trace: Add x86 irq vector " Vaibhav Nagarnaik
2011-04-29 20:26     ` Thomas Gleixner
2011-04-29 22:04       ` Vaibhav Nagarnaik
2011-05-31 21:28     ` [PATCH v2] " Vaibhav Nagarnaik
2011-06-01  0:00       ` Frederic Weisbecker
2011-06-01 22:38         ` Vaibhav Nagarnaik
2011-06-01 23:30           ` David Sharp
2011-06-16  3:02             ` Frederic Weisbecker
2011-06-21 18:43               ` Vaibhav Nagarnaik
2011-07-06 23:43               ` H. Peter Anvin
2011-07-06 23:56                 ` Frederic Weisbecker
2011-07-07  0:02                   ` H. Peter Anvin
2011-07-07  0:25                     ` Frederic Weisbecker
2011-07-07  0:30                       ` H. Peter Anvin
2011-07-07  0:51                         ` Frederic Weisbecker
2011-07-07  9:57                         ` Ingo Molnar
2011-07-07 22:50                           ` David Sharp
2011-07-07 23:00                             ` Frederic Weisbecker
2011-06-21 18:45       ` [PATCH v3] " Vaibhav Nagarnaik
2011-07-06 21:50         ` Vaibhav Nagarnaik
2011-07-06 23:38           ` Andi Kleen
2011-07-07 23:34         ` Frederic Weisbecker
2011-07-08  0:54           ` David Sharp
2011-07-11 15:54             ` Frederic Weisbecker
2011-07-11 18:21               ` Vaibhav Nagarnaik
2011-07-12 18:09                 ` Frederic Weisbecker
2011-07-12 22:08                   ` Vaibhav Nagarnaik
2011-07-13 14:11                     ` Frederic Weisbecker
2011-07-13 18:18                       ` Vaibhav Nagarnaik
2011-04-29  0:14 ` Thomas Gleixner [this message]
2011-04-29 20:15   ` [PATCH] trace: Add special x86 irq " Vaibhav Nagarnaik

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.LFD.2.02.1104290158320.3005@ionos \
    --to=tglx@linutronix.de \
    --cc=dhsharp@google.com \
    --cc=jiayingz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mrubin@google.com \
    --cc=rostedt@goodmis.org \
    --cc=vnagarnaik@google.com \
    --cc=x86@kernel.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

Powered by JetHome