-
Notifications
You must be signed in to change notification settings - Fork 438
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
[BUILD] Improve how to handle yield() in ARM. #3129
Conversation
✅ Deploy Preview for opentelemetry-cpp-api-docs canceled.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3129 +/- ##
==========================================
+ Coverage 87.12% 87.85% +0.73%
==========================================
Files 200 195 -5
Lines 6109 6138 +29
==========================================
+ Hits 5322 5392 +70
+ Misses 787 746 -41
|
The yield instruction was introduced in ARM processors more recent than armel. So building in armel ends up in "Error: selected processor does not support `yield' in ARM mode". Also, the __yield() intrinsic instruction is not understood for armel by g++. So let's do nothing for armel.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if it is working fine with this patch for ARMel in the CI as mentioned in the description :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, based on the external armel build CI job provided.
Thanks for the fix.
Changes
The yield instruction was introduced in ARM processors more recent than armel. So building in armel ends up in "Error: selected processor does not support `yield' in ARM mode". Also, the __yield() intrinsic instruction is not understood for armel by g++. So let's do nothing for armel.
This armel build CI job has the patch applied: https://salsa.debian.org/science-team/opentelemetry-cpp/-/jobs/6543996
Ref: https://developer.arm.com/documentation/ddi0406/b/Application-Level-Architecture/Application-Level-Programmers--Model/Exceptions--debug-events-and-checks/The-Yield-instruction?lang=en
Fixes #3128
P.S. Example of other project handling similar instructions in different architectures: https://github.com/geidav/spinlocks-bench/blob/master/os.hpp#L31