From: Corey Ashford <cjashfor@linux.vnet.ibm.com>
To: LKML <linux-kernel@vger.kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Paul Mackerras <paulus@samba.org>
Subject: perf_counters: page fault trace record
Date: Fri, 12 Jun 2009 18:25:54 -0700 [thread overview]
Message-ID: <4A330022.3070105@linux.vnet.ibm.com> (raw)
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
next reply other threads:[~2009-06-13 1:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-13 1:25 Corey Ashford [this message]
2009-06-13 3:43 ` perf_counters: page fault trace record 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
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=4A330022.3070105@linux.vnet.ibm.com \
--to=cjashfor@linux.vnet.ibm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.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