lkml.org 
[lkml]   [1999]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: release 0.2 of x86 performance-monitoring counters support patch
From
Date
mikpe@csd.uu.se (Mikael Pettersson) writes:
>
> > If you still want rdpmc you can leave it as a trap to kernel and simulate
> > it with a read from total.
>
> No need to trap. (That'd be so awful that people should just do a syscall
> instead.) I allow the user to register a user-space buffer with the driver.
> At process resumption, I copy the counter state to this buffer. (Technique
> stolen from sparc64's sys_perfctr() implementation.) The user executes
> RDPMC and RDTSC, retrieves the "base" values from the buffer, and then
> computes the current "virtual" 64-bit values. This should permit people
> to bracket single procedure bodies or basic blocks with sampling code
> without too much overhead.

Only thing that I'm missing in your nice patch is a way to access the performance
counters of remote processes (so that I could hack gdb to do non intrusive
profiling a la itune). Extending the ioctls could work, although a ptrace
extension would be nicer.

> I'll probably do this with mmap instead, as soon as I've figured out how...

Most likely not worth it for the small amount of data.


-Andi

--
This is like TV. I don't like TV.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.088 / U:1.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site