This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP][OMPT] Change OMPT kind for OpenMP test lock functions
ClosedPublic

Authored by Thyre on Jun 15 2023, 7:50 AM.

Details

Summary

The OpenMP specification mentions that omp_test_lock and
omp_test_nest_lock dispatch OMPT callbacks with ompt_mutex_test_lock
and ompt_mutex_test_nest_lock for their kind respectively. Previously,
the values ompt_mutex_lock and ompt_mutex_nest_lock were used. This
could cause issues in application relying on the kind to correctly
determine lock states. This commit changes the kind to the expected
ones.

Fixes issue #63261

Depends on D153031

Diff Detail

Event Timeline

Thyre created this revision.Jun 15 2023, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 15 2023, 7:50 AM
Thyre requested review of this revision.Jun 15 2023, 7:50 AM
protze.joachim accepted this revision.Jun 26 2023, 12:58 AM

The whole stack looks good to me. My only concern is that with separate patches, the first two patches will lead to failing test pipelines.

This revision is now accepted and ready to land.Jun 26 2023, 12:58 AM
Thyre added a comment.EditedJun 26 2023, 1:41 AM

The whole stack looks good to me. My only concern is that with separate patches, the first two patches will lead to failing test pipelines.

I can see that, yeah.
From my perspective, it would make sense if D153028 causes a failing pipeline since we are changing a test case which was incorrect before. The second patch (D153031) doesn't fix the issue, but is important to allow the test to pass in the third patch. It's unfortunate that this patch will still cause the pipeline to fail.

I guess there are three options on how we can handle this:

  1. Keep the patches as they are right now
  2. Rebase the patches to include D153031 in either the first or third patch
  3. Squash all patches down to a single patch

I would tend to the first or second option. For the second option, I would include it in the bug fix itself to keep the test case a non-functional change.

I suggest to squash all 3 patches into a single commit and reference all 3 reviews in this commit. This would also make a possible revert/cherry-pick easier.

Thyre added a comment.Jun 26 2023, 4:18 AM

I suggest to squash all 3 patches into a single commit and reference all 3 reviews in this commit. This would also make a possible revert/cherry-pick easier.

Sounds good.
I'm not able to commit the changes directly since this is my first time actually contributing to LLVM (aside from creating issues). I would therefore kindly ask if someone could commit the changes on my behalf.
I guess for the commit message, the text of this patch should be sufficient, if we add the other reviews.

protze.joachim closed this revision.Jul 7 2023, 5:57 AM

Looks like a single commit cannot close multiple reviews.