open-telemetry / opentelemetry-cpp

The OpenTelemetry C++ Client
https://opentelemetry.io/
Apache License 2.0
889 stars 425 forks source link

[BUILD] Improve how to handle yield() in ARM. #3129

Closed santiagorr closed 2 weeks ago

santiagorr commented 2 weeks ago

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

linux-foundation-easycla[bot] commented 2 weeks ago

CLA Signed

The committers listed above are authorized under a signed CLA.

netlify[bot] commented 2 weeks ago

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

Name Link
Latest commit 3b6d64a7b627c3e97a9bf7f2889874749f0e9462
Latest deploy log https://app.netlify.com/sites/opentelemetry-cpp-api-docs/deploys/672d2ffc9d57ce0008cab190
codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3129/graphs/tree.svg?width=650&height=150&src=pr&token=FJESTYQ2AD&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3129?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) ```diff @@ 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](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3129?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry) | Coverage Δ | | |---|---|---| | [api/include/opentelemetry/common/spin\_lock\_mutex.h](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3129?src=pr&el=tree&filepath=api%2Finclude%2Fopentelemetry%2Fcommon%2Fspin_lock_mutex.h&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry#diff-YXBpL2luY2x1ZGUvb3BlbnRlbGVtZXRyeS9jb21tb24vc3Bpbl9sb2NrX211dGV4Lmg=) | `25.00% <ø> (ø)` | | ... and [100 files with indirect coverage changes](https://app.codecov.io/gh/open-telemetry/opentelemetry-cpp/pull/3129/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=open-telemetry)