-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Code coverage does not work on armv7-unknown-linux-gnueabihf due to missing profiler_builtins
#79640
Comments
My guess is the version of |
This may be related to #79556 |
Related in the sense that both issues report that the build of the compiler for their target platforms does not set "profiler = true". Yes, the default is "profiler = false", but various pre-built distros enable "profiler = true". Some don't. I don't know who makes those decisions, whether we should change this to enable "profiler = true" by default in the future, and/or whether the profiler_builtins library works or not for some platforms. |
Is there any update on this? Is this simply a matter of adding |
@rich-g I think this is something pretty low-level to be enabled first inside the compiled rust docker image, nothing that can just be activated via that parameter. I will try to re-check on the upcoming weekend to see if there has something changed silently. |
@rich-g Nope, still the same issue. Retried on a fresh install of the whole system (Bullseye-based raspbianOS ... whatever its called) and got the same output:
versions:
EDIT: just to point out, the used rust comes from the docker-container, not the hosting OS |
Potential duplicate of #79556? |
@clarfonthey similar but no duplicate, because the other issue targets MUSL, this is ARMv7-specific 😸 |
Right, but the root cause appears to be an issue with the releases provided for tier 2 targets, which affects both. |
This already got suggested here: #79640 (comment) All it comes down to "profiler_builtins" not being present. If both issues are having the same root cause, thats okay, but as every target is configured differently (like already mentioned here: #79640 (comment)), so I do not see a duplicate here. #79556 is specificly targeting MUSL, this is non-MUSL and includes an easy reproducable example. |
The armhf rustc is not compiled with profiling enabled. See rust-lang/rust#79640 BUG=b:239255082 TEST=lucicfg validate Change-Id: I65f66e1119f9560aea72fd00d8cc3427c1161525 Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3831286 Reviewed-by: Daniel Verkamp <[email protected]> Tested-by: Dennis Kempin <[email protected]>
Is there a way to activate it when building the compiler manually as a temporary solution? |
Try building with |
…k-Simulacrum Enable profiler for armv7-unknown-linux-gnueabihf. Allow code coverage measurement for armv7-unknown-linux-gnueabihf targets. Fixes rust-lang#79640.
…k-Simulacrum Enable profiler for armv7-unknown-linux-gnueabihf. Allow code coverage measurement for armv7-unknown-linux-gnueabihf targets. Fixes rust-lang#79640.
Rollup merge of rust-lang#124829 - briansmith:b/armv7-profiler, r=Mark-Simulacrum Enable profiler for armv7-unknown-linux-gnueabihf. Allow code coverage measurement for armv7-unknown-linux-gnueabihf targets. Fixes rust-lang#79640.
I verified that with today's Rust Nightly, code coverage is working. See briansmith/ring#2056. This target "just works"; it doesn't require forcing |
I am new to the Rust ecosystem, but as part of my own learning curve, I wanted to create a small personal project which includes test coverage executed on my raspberry pi server.
My setup contains a self-hosted Gitlab-instance (which runs inside docker) running on a 32-bit based Raspbian on my Raspberry Pi 4 (with 8gb RAM). After some hours of trying to get grcov working I tried to reproduce my problems, and found out, that
profiler_builtins
are missing for armv7-unknown-linux-gnueabihf.I opened up an issue on the GRCOV-project (mozilla/grcov#508), because I first thought I was missing some important instruction to set up my system. It now seems to me that the package provided via
rustup
does not include the required crates/libs to make it work to have code coverage being analysed.Steps to reproduce
rust-project
containing a normal project (inited viacargo init
)Content of
main.rs
:Dockerfile
aside of that folder:docker build -t rust-grcov-raspberry-bug:latest .
docker run --rm -ti rust-grcov-raspberry-bug:latest
Result on Raspberry Pi 4 (32bit arm)
Result on local Windows 10 using docker-desktop (64bit amd64)
The text was updated successfully, but these errors were encountered: