From: Jiri Olsa <jolsa@redhat.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
mingo@elte.hu, andi@firstfloor.org, lwoodman@redhat.com,
hch@infradead.org, linux-kernel@vger.kernel.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCHv2 2/2] tracing,mm - add kernel pagefault tracepoint for x86 & x86_64
Date: Tue, 16 Nov 2010 10:23:06 +0100 [thread overview]
Message-ID: <20101116092306.GC1955@jolsa.brq.redhat.com> (raw)
In-Reply-To: <1289830760.12418.598.camel@gandalf.stny.rr.com>
On Mon, Nov 15, 2010 at 09:19:20AM -0500, Steven Rostedt wrote:
> On Mon, 2010-11-15 at 14:43 +0100, Frederic Weisbecker wrote:
>
>
> > dotraplinkage void __kprobes
> > do_page_fault(struct pt_regs *regs, unsigned long error_code)
> > {
> > unsigned long address;
> >
> > /* Get the faulting address: */
> > address = read_cr2();
> >
> > trace_mm_pagefault_start(address, error_code);
> > __do_page_fault(regs, address, error_code);
> > trace_mm_pagefault_end(address);
> > }
> >
> >
> > Would you be ok with that?
> >
> > Last thing I worry about is that error_code that is very arch dependent.
> > If someone writes a script that depends on the x86 code, it won't work
> > elsewhere while it's fairly possible to have a generic tracepoint there.
> >
> > So perhaps we rather need a generic enum field instead of the error_code,
> > to express the most interesting specific fault attributes. Than can
> > probably be added later though, once someone really needs it.
> >
> > Hm?
>
> Perhaps we should have:
>
> trace_arch_mm_pagefault_start(address, error_code);
> __do_page_fault(regs, address, error_code);
> trace_mm_pagefault_end(address);
>
>
> Then we have a arch/x86/kernel/trace.c that can map trace_arch_...
> events to generic events. This file will hold the
> trace_mm_pagefault_start(), which is called by
> trace_arch_mm_pagefault_start(). Have a hook that when the
> trace_mm_pagefault_start() is enabled, we also enable
> trace_arch_mm_pagefault_start() that calls this tracepoint. The
> trace_mm_pagefault_start() will then translate the
> trace_arch_mm_pagfault_start() into the generic trace_mm_pagefault_start
> event with the generic error_code that all archs will use.
>
> Reason being, we don't need to do any extra processing in the fast path
> when tracing is not enabled.
>
> Also, I'm going to start working on the stable ABI today.
do you mean stable api for the hook you described above?
or should I come up with smth..
thanks,
jirka
next prev parent reply other threads:[~2010-11-16 9:23 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 11:56 [PATCH 0/2] " Jiri Olsa
2010-11-10 11:56 ` [PATCH 1/2] " Jiri Olsa
2010-11-10 13:29 ` Christoph Hellwig
2010-11-10 13:44 ` Jiri Olsa
2010-11-10 13:52 ` Ingo Molnar
2010-11-10 15:00 ` Frederic Weisbecker
2010-11-10 15:17 ` Jiri Olsa
2010-11-10 15:20 ` Christoph Hellwig
2010-11-10 16:28 ` Andi Kleen
2010-11-10 16:44 ` Frederic Weisbecker
2010-11-11 9:09 ` [PATCHv2 0/2] " Jiri Olsa
2010-11-11 9:09 ` [PATCHv2 1/2] tracing - fix recursive user stack trace Jiri Olsa
2010-11-11 10:34 ` Andi Kleen
2010-11-11 9:09 ` [PATCHv2 2/2] tracing,mm - add kernel pagefault tracepoint for x86 & x86_64 Jiri Olsa
2010-11-11 12:51 ` Christoph Hellwig
2010-11-11 13:15 ` Jiri Olsa
2010-11-15 13:43 ` Frederic Weisbecker
2010-11-15 14:06 ` Andi Kleen
2010-11-15 14:54 ` Frederic Weisbecker
2010-11-15 15:04 ` Steven Rostedt
2010-11-15 14:19 ` Steven Rostedt
2010-11-16 9:23 ` Jiri Olsa [this message]
2010-11-16 13:13 ` Steven Rostedt
2010-11-10 11:56 ` [PATCH 2/2] tracing - fix recursive user stack trace Jiri Olsa
2010-11-11 0:13 ` Li Zefan
2010-11-11 21:57 ` Steven Rostedt
2010-11-18 14:05 ` [tip:perf/core] tracing: Fix " tip-bot for Steven Rostedt
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=20101116092306.GC1955@jolsa.brq.redhat.com \
--to=jolsa@redhat.com \
--cc=andi@firstfloor.org \
--cc=fweisbec@gmail.com \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lwoodman@redhat.com \
--cc=mingo@elte.hu \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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