public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* perf_counter: question about the user page data_head field
@ 2009-05-04 21:56 Corey Ashford
  0 siblings, 0 replies; only message in thread
From: Corey Ashford @ 2009-05-04 21:56 UTC (permalink / raw)
  To: linux-kernel, Ingo Molnar, Peter Zijlstra, Paul Mackerras

Hi,

In working on the PAPI substrate using the "Performance Counters for 
Linux" implementation (code that's currently in linux-2.6-tip, commit: 
c786fa3dc42e8e898cf1a33f9f5a25b61c7043f5), I encountered an issue with 
the data_head field.

I am implementing the profiling part of the substrate, and am using the 
mmap'd data pages to capture IP samples.  This is working quite well, 
and I've been able to profile on multiple events simultaneously.

However, one thing I ran into is when my code examines the data_head 
field from user space, it's always a multiple of the page size.  So it's 
apparently updated only on mmap page overflow.  I think I understand 
that this is done for efficiency reasons, but it's a limitation for the 
user space app in that they can miss up to 255 records (4096 byte pages 
/ 16-byte records), because the following mmap page is non empty but not 
full.

Perhaps I'm missing something.  Is there a way to force data_head to be 
updated from user space?  If not, I'd like to request that a new 
mechanism for doing such, perhaps via an ioctl call.

Thanks for your consideration,

- Corey

Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjashfor@us.ibm.com


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-05-04 21:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-04 21:56 perf_counter: question about the user page data_head field Corey Ashford

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