public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* perf_counters: page fault trace record
@ 2009-06-13  1:25 Corey Ashford
  2009-06-13  3:43 ` Paul Mackerras
  0 siblings, 1 reply; 7+ messages in thread
From: Corey Ashford @ 2009-06-13  1:25 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Paul Mackerras

Hi,

One of the tools we are working on needs to be able to look not only at counts 
of page faults, but where they are occurring (ip and faulting page address).

What would you think about adding a new bit to the config record, something like:

diff --git a/include/linux/perf_counter.h b/include/linux/perf_counter.h
index 6e13395..c27d0bc 100644
--- a/include/linux/perf_counter.h
+++ b/include/linux/perf_counter.h
@@ -167,8 +167,9 @@ struct perf_counter_attr {
                                 mmap           :  1, /* include mmap data     */
                                 comm           :  1, /* include comm data     */
                                 freq           :  1, /* use freq, not period  */
-
-                               __reserved_2   : 53;
+                               page_fault     :  1, /* include page fault data
*/
+
+                               __reserved_2   : 52;

We'd need a new event type too - PERF_EVENT_PAGE_FAULT which would have:

/*
  * struct {
  *      struct perf_event_header header;
  *      u64                      ip;
  *      u64                      fault_address;
  * };
  */

etc.

I would guess that special care would need to be taken to post an event record 
like this on the thread of a page fault handler.

Any objection to this idea?



Regards,

- Corey

Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
cjashfor@us.ibm.com


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-06-15 20:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-13  1:25 perf_counters: page fault trace record Corey Ashford
2009-06-13  3:43 ` Paul Mackerras
2009-06-13  7:04   ` Ingo Molnar
2009-06-13  8:44   ` Corey Ashford
2009-06-13  9:17     ` Paul Mackerras
2009-06-13 10:09       ` Ingo Molnar
2009-06-15 20:38         ` Corey Ashford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox