-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Make code coverage measurement a requirement for Tier 2 (at least) target architectures #3517
Comments
you'll get more responses asking this on zulip instead of here |
I'm not sure there's a target supported by QEMU with the same calling convention/ABI as aarch64-apple-darwin (or any of the other |
I am not sure QEMU supports wasm guests, either. Also, @briansmith, what do you define as "mainline" QEMU? Because as far as I can tell, QEMU's GitLab contains the Loongarch64 support. |
All good points. The QEMU parts of the proposal don't seem well-reasoned because it basically excludes all non-open-source operating systems, which isn't realistic. Basically, I just want us to find a way to get to "Hey, if we just need to a single flag to the build configuration for a target to get source-based code coverage then we'll do it as part of upgrading the target to tier 2 or higher, and/or before adding target-specific language/library features like intrinsics or inline assembly. So let's add that to the checklist." wasm32 is definitely a target where we could really benefit from source-based code coverage instrumentation, because we have wasm32 intrinsics in libcore already. It's being tracked in #81684 and is a special case as it's more than flipping a flag. There is a lot of evidence that in many cases it really is just a matter of flipping a flag (and ideally testing it):
(Beyond code coverage, like rust-lang/rust#111575 suggests, there are other configuration options that are really useful for quality assurance that should be considered too, like sanitizer support.) |
I propose the following requirement for a target to be Tier 1 or Tier 2:
For a target P using architecture A (
target_arch
) to be Tier 2, there must exist a target T that has the same architecture (sametarget_arch
) that supports the following requirements:cargo test --target=T
.In other words, I propose that in order for a target to be considered Tier 2 (or higher), it must be possible for us to actually run tests measure code coverage metrics for that architecture without jumping through hoops. I am not asking that every tier 2 (or higher) target support profiling because that might not be practical for us to do, e.g. aarch64-apple-ios or aarch64-pc-windows-*.
Currently there are many Tier 2 targets with architectures for which no target for that architecture supports profiler builtins. Examples: powerpc, powerpc64le, loongarch64.
Currently there are some Tier 2 targets with architectures for which it is difficult to get QEMU working. Examples: loongarch64 requires (AFAICT) either building their custom toolchain from source or using their provided binaries, which is not practical.
/cc @joshtriplett
The text was updated successfully, but these errors were encountered: