New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HLTrigger/Timer/test: add a thread-based cpu clock for OS X #4623
Conversation
can anyone point me to some instructions for testing this on an OS X machine with CMSSW 7.1.x or 7.2.x ? |
A new Pull Request was created by @fwyzard (Andrea Bocci) for CMSSW_7_2_X. HLTrigger/Timer/test: add a thread-based cpu clock for OS X It involves the following packages: HLTrigger/Timer @perrotta, @cmsbuild, @nclopezo, @Martin-Grunewald, @fwyzard, @Degano can you please review it and eventually sign? Thanks. |
fixed, and tested on OS X on top of CMSSW 7.1.0-pre9 (which is the latest build I've been able to find on the macms# machines) |
+1 On 13 July 2014 20:12, cmsbuild notifications@github.com wrote:
|
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_2_X IBs unless changes or unless it breaks tests. |
Add a clock to measure the cpu time used by the current thread, with microsecond granularity, based on thread_info(mach_thread_self(), THREAD_BASIC_INFO, ...).
+1 |
|
||
static time_point now() noexcept | ||
{ | ||
thread_local mach_port_t thread_id = mach_thread_self(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keeping the thread "port" in a thread_local variable saves ~0.4 us (out of ~1.8 us)
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_2_X IBs unless changes or unless it breaks tests. |
This pull request is fully signed and it will be integrated in one of the next CMSSW_7_2_X IBs unless changes (tests are also fine). |
HLTrigger/Timer/test: add a thread-based cpu clock for OS X
Add a clock to measure the cpu time used by the current thread, with microsecond
granularity, based on thread_info(mach_thread_self(), THREAD_BASIC_INFO, ...)