Skip to content
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

Merged
merged 1 commit into from Jul 14, 2014

Conversation

fwyzard
Copy link
Contributor

@fwyzard fwyzard commented Jul 11, 2014

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, ...)

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 11, 2014

can anyone point me to some instructions for testing this on an OS X machine with CMSSW 7.1.x or 7.2.x ?

@cmsbuild
Copy link
Contributor

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.
You can sign-off by replying to this message having '+1' in the first line of your reply.
You can reject by replying to this message having '-1' in the first line of your reply.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 13, 2014

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)

@cmsbuild
Copy link
Contributor

Pull request #4623 was updated. @perrotta, @cmsbuild, @nclopezo, @Martin-Grunewald, @fwyzard, @Degano can you please check and sign again.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 13, 2014

+1

On 13 July 2014 20:12, cmsbuild notifications@github.com wrote:

Pull request #4623 #4623 was
updated. @perrotta https://github.com/perrotta, @cmsbuild
https://github.com/cmsbuild, @nclopezo https://github.com/nclopezo,
@Martin-Grunewald https://github.com/Martin-Grunewald, @fwyzard
https://github.com/fwyzard, @Degano https://github.com/degano can you
please check and sign again.

Reply to this email directly or view it on GitHub
#4623 (comment).

@cmsbuild
Copy link
Contributor

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, ...).
@cmsbuild
Copy link
Contributor

Pull request #4623 was updated. @perrotta, @cmsbuild, @nclopezo, @Martin-Grunewald, @fwyzard, @Degano can you please check and sign again.

@fwyzard
Copy link
Contributor Author

fwyzard commented Jul 13, 2014

+1


static time_point now() noexcept
{
thread_local mach_port_t thread_id = mach_thread_self();
Copy link
Contributor Author

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)

@cmsbuild
Copy link
Contributor

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.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

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).

ktf added a commit that referenced this pull request Jul 14, 2014
HLTrigger/Timer/test: add a thread-based cpu clock for OS X
@ktf ktf merged commit afaac50 into cms-sw:CMSSW_7_2_X Jul 14, 2014
@cmsbuild
Copy link
Contributor

@fwyzard fwyzard deleted the mach_thread_info_clock branch December 23, 2014 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants