public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Alexis Berlemont <alexis.berlemont@gmail.com>,
	linux-kernel@vger.kernel.org, mingo@redhat.com,
	alexander.shishkin@linux.intel.com
Subject: Re: [PATCH 1/2] perf, x86-mm: Add exit-fault tracing
Date: Wed, 26 Oct 2016 16:53:39 -0200	[thread overview]
Message-ID: <20161026185339.GC4704@kernel.org> (raw)
In-Reply-To: <20161026085116.GZ3102@twins.programming.kicks-ass.net>

Em Wed, Oct 26, 2016 at 10:51:16AM +0200, Peter Zijlstra escreveu:
> On Wed, Oct 26, 2016 at 01:51:59AM +0200, Alexis Berlemont wrote:
> 
> -ENOCHANGELOG

Yeah, please add one explaining why we want this, how we can use it, for
example, in 'perf trace', to measure how long each page fault took,
examples of it in use, etc.
 
> > Signed-off-by: Alexis Berlemont <alexis.berlemont@gmail.com>
> > ---
> 
> > diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> > index 9f72ca3..e31e8ef 100644
> > --- a/arch/x86/mm/fault.c
> > +++ b/arch/x86/mm/fault.c
> > @@ -1488,6 +1488,7 @@ trace_do_page_fault(struct pt_regs *regs, unsigned long error_code)
> >  	prev_state = exception_enter();
> >  	trace_page_fault_entries(address, regs, error_code);
> >  	__do_page_fault(regs, error_code, address);
> > +	trace_page_fault_exit(address);
> 
> Aside from my general hatred of tracepoint, it bugs me that its not
> symmetric like the irq vector ones. But I'll leave that to x86 people.

What is the simmetry problem, you think we should have:

  exceptions:page_fault_kernel_exit
  exceptions:page_fault_user_exit

To be counterparts of:

[root@jouet ~]# perf list exceptions:*

List of pre-defined events (to be used in -e):

  exceptions:page_fault_kernel                       [Tracepoint event]
  exceptions:page_fault_user                         [Tracepoint event]

[root@jouet ~]# 

? 

For perf usage yeah, the good thing would be to have just
exceptions:page_fault_entry and exceptions:page_fault_exit, and then use
perf_event_attr fields to filter what kind was desired, with a
header.misc stating where it took place, just like with other events,
but by now we have two for entry, so two for exit?

- Arnaldo

> >  	exception_exit(prev_state);
> >  }
> >  NOKPROBE_SYMBOL(trace_do_page_fault);
> > -- 
> > 2.10.1
> > 

  reply	other threads:[~2016-10-26 18:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-25 23:51 [PATCH 0/2] perf: measure page fault duration in perf trace Alexis Berlemont
2016-10-25 23:51 ` [PATCH 1/2] perf, x86-mm: Add exit-fault tracing Alexis Berlemont
2016-10-26  8:51   ` Peter Zijlstra
2016-10-26 18:53     ` Arnaldo Carvalho de Melo [this message]
2016-10-27  8:37       ` Peter Zijlstra
2016-10-27 23:31         ` [PATCH v2] perf, x86-mm: declare page-faults tracepoints like irq-vectors ones Alexis Berlemont
2016-10-27 23:31         ` Alexis Berlemont
2016-11-18  0:21         ` [PATCH v3 0/2] perf: measure page fault duration in perf trace Alexis Berlemont
2016-12-05 23:40           ` Alexis Berlemont
2016-12-06 14:46             ` Arnaldo Carvalho de Melo
2016-11-18  0:21         ` [PATCH v3 1/2] perf, x86-mm: declare page-faults tracepoints like irq-vectors ones Alexis Berlemont
2016-11-18  0:21         ` [PATCH v3 2/2] perf: add page fault duration measures in perf trace Alexis Berlemont
2016-10-27  8:38       ` [PATCH 1/2] perf, x86-mm: Add exit-fault tracing Peter Zijlstra
2016-10-25 23:52 ` [PATCH 2/2] perf: add page fault duration measures in perf trace Alexis Berlemont
2016-10-26  8:46 ` [PATCH 0/2] perf: measure page fault duration " Peter Zijlstra
2016-10-26 18:47   ` Arnaldo Carvalho de Melo

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=20161026185339.GC4704@kernel.org \
    --to=acme@kernel.org \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=alexis.berlemont@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@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