From: Steven Rostedt <rostedt@goodmis.org>
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org, hpa@zytor.com,
mingo@elte.hu, bp@alien8.de, tglx@linutronix.de,
fdeslaur@gmail.com, raphael.beamonte@gmail.com,
dle-develop@lists.sourceforge.net, tomoki.sekiyama@hds.com
Subject: Re: [RFC][PATCH] Introduce page fault tracepoint
Date: Thu, 22 Aug 2013 10:15:57 -0400 [thread overview]
Message-ID: <20130822101557.2a6efae0@gandalf.local.home> (raw)
In-Reply-To: <51F843B1.4050609@hds.com>
On Tue, 30 Jul 2013 18:52:33 -0400
Seiji Aguchi <seiji.aguchi@hds.com> wrote:
/* IOAPIC */
> #define IO_APIC_IRQ(x) (((x) >= NR_IRQS_LEGACY) || ((1<<(x)) & io_apic_irqs))
> diff --git a/arch/x86/include/asm/trace/exceptions.h b/arch/x86/include/asm/trace/exceptions.h
> new file mode 100644
> index 0000000..660fcf1
> --- /dev/null
> +++ b/arch/x86/include/asm/trace/exceptions.h
> @@ -0,0 +1,51 @@
> +#undef TRACE_SYSTEM
> +#define TRACE_SYSTEM exceptions
> +
> +#if !defined(_TRACE_PAGE_FAULT_H) || defined(TRACE_HEADER_MULTI_READ)
> +#define _TRACE_PAGE_FAULT_H
> +
> +#include <linux/tracepoint.h>
> +
> +extern void trace_irq_vector_regfunc(void);
> +extern void trace_irq_vector_unregfunc(void);
> +
> +DECLARE_EVENT_CLASS(x86_exceptions,
> +
> + TP_PROTO(unsigned long address, struct pt_regs *regs,
> + unsigned long error_code),
> +
> + TP_ARGS(address, regs, error_code),
> +
> + TP_STRUCT__entry(
> + __field( unsigned long, address )
> + __field( struct pt_regs *, regs )
> + __field( unsigned long, error_code )
> + ),
> +
> + TP_fast_assign(
> + __entry->address = address;
> + __entry->regs = regs;
> + __entry->error_code = error_code;
> + ),
> +
> + TP_printk("address=0x%lx regs=0x%p error_code=0x%lx",
> + __entry->address, __entry->regs, __entry->error_code) );
Printing the regs pointer is rather useless. This is specific for x86,
why not print the ip of where it happened and the faulting address
itself? Note, you only need to change the TP_printk() to do that. For
efficiency reasons, only pass in regs.
-- Steve
next prev parent reply other threads:[~2013-08-22 14:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 22:52 Seiji Aguchi
2013-08-09 19:31 ` Seiji Aguchi
2013-08-22 14:15 ` Steven Rostedt [this message]
2013-08-22 14:44 ` 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=20130822101557.2a6efae0@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=bp@alien8.de \
--cc=dle-develop@lists.sourceforge.net \
--cc=fdeslaur@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=raphael.beamonte@gmail.com \
--cc=seiji.aguchi@hds.com \
--cc=tglx@linutronix.de \
--cc=tomoki.sekiyama@hds.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
all inboxes | Powered by JetHome®