Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Floating-point operations counter!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Floating-point operations counter!




On Jan 28, 2008, at 9:31 AM, Michal Kaszczuk wrote:

Hi!

Is there any way to find out (measure or calculate) how many
floating-point operations is performed by given process?

If you look in the Advanced config pane for shark on Intel Core 2, you'll see that you can set it up to record based on the Performance Monitor Counters. PMC1 has event 199 (SIMD_INST_RETIRED). There appears to be a mask you can set to look at packed single, scalar single, packed double, or scalar double. There are probably other PMC events like that.


I don't know if Shark is really the right method to measure end-to-end floating point ops, although it can do it. (Set it up to trigger every 10,000 events then count the number of samples and multiply by 10,000 for a rough estimate.) It would probably be more flexible to use the CHUD.framework.

Note that performance monitor counters are often poorly documented and sometimes don't quite measure what you think they are measuring. Its probably a good idea to run some controls and make sure things add up to what you think they are going to add up to. You may be able to find additional information in documentation for other performance utils like perfmon2 and Appendices of the Shark documentation.

http://developer.apple.com/documentation/DeveloperTools/Conceptual/SharkUserGuide/IntelCore2PMCTablesAppendix/chapter_953_section_1.html

Ian
_______________________________________________
Do not post admin requests to the list. They will be ignored.
PerfOptimization-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Floating-point operations counter! (From: Michal Kaszczuk <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.