Page MenuHomePhabricator

[OMPT] Use more general function for getting gtid
ClosedPublic

Authored by omalyshe on May 23 2016, 8:19 AM.

Details

Summary

Instead of using kmp_gtid_get_specific() which always makes function call (pthread_getspecific() or TlsGetValue()) it's better to use kmp_get_gtid() like it is done in __ompt_get_thread_id_internal(). The gtid value from the static TLS will be used, for example, in case of Linux where this method of getting gtid is default.

Diff Detail

Event Timeline

omalyshe updated this revision to Diff 58094.May 23 2016, 8:19 AM
omalyshe retitled this revision from to [OMPT] Use more general function for getting gtid.
omalyshe updated this object.
omalyshe added reviewers: jmellorcrummey, Hahnfeld.
omalyshe set the repository for this revision to rL LLVM.
omalyshe added a subscriber: omalyshe.

The fix looks good, but the file should have a full diff. Please update with a diff that includes the whole file instead of just the change.

omalyshe updated this revision to Diff 58103.May 23 2016, 9:00 AM
omalyshe edited edge metadata.

The full diff attached.

Hahnfeld accepted this revision.May 23 2016, 10:50 PM
Hahnfeld edited edge metadata.

I agree with John, LGTM

This revision is now accepted and ready to land.May 23 2016, 10:50 PM
tlwilmar edited edge metadata.May 24 2016, 8:31 AM
tlwilmar added a subscriber: openmp-commits.
tlwilmar added a subscriber: tlwilmar.
AndreyChurbanov added a subscriber: AndreyChurbanov.

committed rev. 270694