From: "H. Peter Anvin" <hpa@zytor.com>
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: "Thomas Gleixner (tglx@linutronix.de)" <tglx@linutronix.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"'mingo@elte.hu' (mingo@elte.hu)" <mingo@elte.hu>,
"x86@kernel.org" <x86@kernel.org>,
"dle-develop@lists.sourceforge.net"
<dle-develop@lists.sourceforge.net>,
Satoru Moriya <satoru.moriya@hds.com>
Subject: Re: [PATCH v4] trace,x86: add x86 irq vector tracepoints
Date: Thu, 27 Sep 2012 19:25:02 -0700 [thread overview]
Message-ID: <50650A7E.90807@zytor.com> (raw)
In-Reply-To: <A5ED84D3BB3A384992CBB9C77DEDA4D41386426D@USINDEM103.corp.hds.com>
On 09/27/2012 03:33 PM, Seiji Aguchi wrote:
> Hi,
>
>> ... except the cost can be reduced to zero *AND* be made into a more general mechanism by simply hooking the IDT.
>
> Thank you for giving me the comment.
> In my understanding, we can introduce a more general mechanism by sandwiching an existing handler between tracepoints.
> The pseudo code is like this:
>
> @@ -17,7 +18,7 @@ static void default_threshold_interrupt(void)
>
> void (*mce_threshold_vector)(void) = default_threshold_interrupt;
>
> -asmlinkage void smp_threshold_interrupt(void)
> +static void do_smp_threshold_interrupt(void)
> {
> irq_enter();
> exit_idle();
> @@ -27,3 +28,10 @@ asmlinkage void smp_threshold_interrupt(void)
> /* Ack only at the end to avoid potential reentry */
> ack_APIC_irq();
> }
> +
> +asmlinkage void smp_threshold_interrupt(void) {
> + trace_arch_irq_vector_entry(THRESHOLD_APIC_VECTOR);
> + do_smp_threshold_interrupt();
> + trace_arch_irq_vector_exit(THRESHOLD_APIC_VECTOR);
> +}
>
> If I misunderstand something, please let me know.
>
Quite.
These functions are being invoked from the IDT, which is an indirect
pointer structure. When not being traced, there is absolutely no reason
why it should go through a thunk with tracepoints.
-hpa
next prev parent reply other threads:[~2012-09-28 2:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-22 0:40 [PATCH v4] trace,x86: add x86 irq vector tracepoints Seiji Aguchi
2012-09-25 3:38 ` H. Peter Anvin
2012-09-27 22:33 ` Seiji Aguchi
2012-09-28 2:25 ` H. Peter Anvin [this message]
2012-10-02 19:10 ` Seiji Aguchi
2012-10-05 14:13 ` Steven Rostedt
2012-10-06 0:16 ` H. Peter Anvin
2012-10-06 2:57 ` Steven Rostedt
2012-10-06 13:05 ` Borislav Petkov
2012-10-06 14:51 ` Steven Rostedt
2012-10-06 17:32 ` Borislav Petkov
2012-10-06 18:26 ` Steven Rostedt
2012-10-06 23:33 ` Borislav Petkov
2012-10-07 15:25 ` H. Peter Anvin
2012-10-11 17:04 ` Seiji Aguchi
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=50650A7E.90807@zytor.com \
--to=hpa@zytor.com \
--cc=dle-develop@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=satoru.moriya@hds.com \
--cc=seiji.aguchi@hds.com \
--cc=tglx@linutronix.de \
--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