Skip to content

[OpenMP][AArch64] Workaround for ompt/synchronization tests #75848

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

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

ceseo
Copy link
Contributor

@ceseo ceseo commented Dec 18, 2023

ompt/synchronization/[masked.c | master.c] tests fail due to a wrong offset being calculated for the possible return addreses. PR #65936 fixes this for Darwin and the same has to be done for Linux.

Updates #69627

@llvmbot llvmbot added the openmp:libomp OpenMP host runtime label Dec 18, 2023
@shiltian shiltian requested a review from jprotze December 18, 2023 20:56
@jprotze
Copy link
Collaborator

jprotze commented Dec 18, 2023

Do we test ompt on other os than Darwin/Linux? In any case, I suggest to drop the else case and therefore the whole check for os. Just allow any 1,2,3 instruction offset for aarch64.

@ceseo
Copy link
Contributor Author

ceseo commented Dec 19, 2023

Do we test ompt on other os than Darwin/Linux? In any case, I suggest to drop the else case and therefore the whole check for os. Just allow any 1,2,3 instruction offset for aarch64.

I think Windows. But I don't have a Windows on Arm system to check whether it works or not, unfortunately.

@jprotze
Copy link
Collaborator

jprotze commented Dec 19, 2023

The OMPT tests test the codeptr address for plausibility. The main goal is to test that the codeptr does not point to a completely other part of the code (e.g. a frame nested in the runtime call).
Adding another value to the print_possible_return_addresses function means that the test will accept an additional value for codeptr. This will not break tests but potentially unbreak tests. We don't care too much about the precise value at this point.

For a precise testing, we would need to involve debug information and check whether we can successfully map back the codeptr address to the source code line. At the same time, this approach would allow to test the quality of debug information generated by the compiler.
The main reason for not implementing such testing yet is that it seemed cumbersome to set up a portable workflow considering different addr2line tools, supported dwarf versions by the installed tools, locales settings ... .

@ceseo
Copy link
Contributor Author

ceseo commented Dec 19, 2023

The OMPT tests test the codeptr address for plausibility. The main goal is to test that the codeptr does not point to a completely other part of the code (e.g. a frame nested in the runtime call). Adding another value to the print_possible_return_addresses function means that the test will accept an additional value for codeptr. This will not break tests but potentially unbreak tests. We don't care too much about the precise value at this point.

For a precise testing, we would need to involve debug information and check whether we can successfully map back the codeptr address to the source code line. At the same time, this approach would allow to test the quality of debug information generated by the compiler. The main reason for not implementing such testing yet is that it seemed cumbersome to set up a portable workflow considering different addr2line tools, supported dwarf versions by the installed tools, locales settings ... .

Right, so I think it makes sense to just drop the OS check for now. I'll re-sbumit the PR.

@jprotze
Copy link
Collaborator

jprotze commented Dec 19, 2023

Right, so I think it makes sense to just drop the OS check for now. I'll re-sbumit the PR.

You can just push a fix to your branch. The PR will be squashed at the end.

ompt/synchronization/[masked.c | master.c] tests fail due to a wrong offset
being calculated for the possible return addreses. PR llvm#65936 fixes this for
Darwin and the same has to be done for Linux.

Updates llvm#69627
@ceseo ceseo force-pushed the pr69627-workaround branch from bb1b49b to 113f0c9 Compare December 19, 2023 14:42
@ceseo
Copy link
Contributor Author

ceseo commented Dec 19, 2023

Right, so I think it makes sense to just drop the OS check for now. I'll re-sbumit the PR.

You can just push a fix to your branch. The PR will be squashed at the end.

Done

Copy link
Collaborator

@jprotze jprotze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jprotze jprotze merged commit dcd7c8b into llvm:main Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openmp:libomp OpenMP host runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants