This is an archive of the discontinued LLVM Phabricator instance.

Improve stability of the runtime in parent/child processes
ClosedPublic

Authored by hbae on Dec 20 2017, 1:14 PM.

Details

Summary

This change improves stability of the runtime when the application forks child processes.
Acquiring/releasing kmp_initz_lock and kmp_forkjoin_lock in the atfork handlers insures that the actual fork does not occur while those two locks are held, and __kmp_itt_reset() reverts the itt's global state to the initial state which also initializes the mutex stored in the global state.
Some missing initialization code was also inserted in the child's atfork handler.

Diff Detail

Repository
rOMP OpenMP

Event Timeline

hbae created this revision.Dec 20 2017, 1:14 PM
This revision is now accepted and ready to land.Jan 8 2018, 2:02 AM
This revision was automatically updated to reflect the committed changes.