Skip to content
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

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

santiagorr
Copy link
Contributor

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

@santiagorr santiagorr requested a review from a team as a code owner November 6, 2024 14:27
Copy link

linux-foundation-easycla bot commented Nov 6, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: santiagorr / name: Santiago (c4ad65b)
  • ✅ login: ThomsonTan / name: Tom Tan (05bc155)
  • ✅ login: marcalff / name: Marc Alff (3b6d64a)

Copy link

netlify bot commented Nov 6, 2024

Deploy Preview for opentelemetry-cpp-api-docs canceled.

Name Link
🔨 Latest commit 3b6d64a
🔍 Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/672d2ffc9d57ce0008cab190

Copy link

codecov bot commented Nov 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.85%. Comparing base (497eaf4) to head (3b6d64a).
Report is 157 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            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     
Files with missing lines Coverage Δ
api/include/opentelemetry/common/spin_lock_mutex.h 25.00% <ø> (ø)

... and 100 files with indirect coverage 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.
Copy link
Member

@lalitb lalitb left a 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 :)

@marcalff marcalff changed the title Improve how to handle yield() in ARM. [BUILD] Improve how to handle yield() in ARM. Nov 7, 2024
Copy link
Member

@marcalff marcalff left a 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.

@ThomsonTan ThomsonTan enabled auto-merge (squash) November 7, 2024 21:26
@ThomsonTan ThomsonTan merged commit ff2447d into open-telemetry:main Nov 7, 2024
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fails to build on ARMEL
4 participants