User: Password:
|
|
Subscribe / Log in / New account

Dueling performance monitors

Dueling performance monitors

Posted Dec 9, 2008 22:32 UTC (Tue) by deater (subscriber, #11746)
In reply to: Dueling performance monitors by foom
Parent article: Dueling performance monitors

In what way is perfmon2 slow?

I find it to be easier to use and generate much better results than the alternatives.

Though I agree, as long as *some* performance monitor implementation gets merged I'll be happy. I'd prefer that it were perfmon, as I've spent a lot of work getting MIPS r10k, SPARC, Pentium Pro, Pentium II, and Athlon wokring and it would be a shame to have to go through and get yet another performance counter infrastructure up to speed with all of the platforms I need.


(Log in to post comments)

Dueling performance monitors

Posted Dec 10, 2008 14:52 UTC (Wed) by jreiser (subscriber, #11027) [Link]

Both the Eranian scheme (perfmon) and the Gleixner-Molnar scheme require a system call for each read of a counter from user mode. In contrast, the Pettersson scheme (perfctr) does not require a system call for each read of a counter from user mode on x86. Perfctr usually has much less overhead, so it is easier to obtain very fine-grained measurements.

Dueling performance monitors

Posted Dec 10, 2008 15:59 UTC (Wed) by deater (subscriber, #11746) [Link]

How fine-grained are you looking? If you are getting so fine-grained that an extra syscall makes a difference, then you are probably starting to run into issues with skid. Not to mention if you are trying to read multiple counters at the exact same time.

Dueling performance monitors

Posted Dec 10, 2008 21:02 UTC (Wed) by jreiser (subscriber, #11027) [Link]

As fine grain as every subroutine call and return. Some routines do encounter issues with variance due to in-flight instructions and overhead due to shortness. Usually the issues are visible and specific, and can be handled. Sometimes the profile is the proof that inlining is appropriate. A subroutine whose execution is as short as a few dozen ticks can be measured meaningfully using an automated tool based on perfctr.


Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds