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

Dueling performance monitors

Dueling performance monitors

Posted Dec 10, 2008 14:52 UTC (Wed) by jreiser (subscriber, #11027)
In reply to: Dueling performance monitors by deater
Parent article: Dueling performance monitors

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.


(Log in to post comments)

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