Re: RDTSC for good profiling under Linux

Uwe Bonnes (bon@elektron.ikp.physik.th-darmstadt.de)
Mon, 16 Sep 1996 09:38:51 +0200


>>>>> "Michael" == Michael B Herf <herf+@cmu.edu> writes:

Michael> I'm developing some high-performance graphics applications
Michael> under Linux, and I was looking for a good profiler (i.e. better
Michael> than gprof). I've learned of the RDTSC and related profiling
Michael> instructions available on the Pentium and P-Pro processors.
Michael> These return cycle-level performance (including cycles elapsed,
Michael> cache information, and related items). On the P-Pro, these
Michael> instructions can be run in Ring 3, which is really good.

Michael> However, on the Pentium, they require Ring 0 execution, which
Michael> makes things hard under Linux. Does anyone out there have a
Michael> kernel module that allows access to these instructions on the
Michael> Pentium, or does anyone more knowledgeable about the kernel
Michael> want to help me write a set of system calls to give
Michael> high-performance profiling information?

There is a patch floating around, implementing a /proc-entry for these
things. I don't have the name handy, but can look for it at home, if you ask
me.

Uwe Bonnes bon@elektron.ikp.physik.th-darmstadt.de

Institut fuer Kernphysik Schlossgartenstrasse 9 64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------