1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Guard --yjit-stats behind #[cfg(feature = "stats")] (#6409)

* Guard --yjit-stats behind #[cfg(feature = "stats")]

* Only ask for --yjit-stats with dev builds on cirrus CI

* Revert "Only ask for --yjit-stats with dev builds on cirrus CI"

This reverts commit cfb5ddfa4b.

* Make it so the --yjit-stats option works for non-release builds

* Revert accidental changes
This commit is contained in:
Maxime Chevalier-Boisvert 2022-09-20 19:30:10 -04:00 committed by GitHub
parent a8dc49b4d5
commit d3733c2ba5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2022-09-21 08:30:37 +09:00
Merged-By: maximecb <maximecb@ruby-lang.org>

View file

@ -151,8 +151,10 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> {
("greedy-versioning", "") => unsafe { OPTIONS.greedy_versioning = true },
("no-type-prop", "") => unsafe { OPTIONS.no_type_prop = true },
("stats", "") => {
// Insn::IncrCounter uses ldaddal, which works only on ARMv8.1+.
#[cfg(feature = "stats")]
#[cfg(target_arch = "aarch64")]
if !std::arch::is_aarch64_feature_detected!("lse") {
eprintln!("Your processor does not support --yjit-stats. Aborting.");
@ -161,6 +163,7 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> {
unsafe { OPTIONS.gen_stats = true }
},
("trace-exits", "") => unsafe { OPTIONS.gen_trace_exits = true; OPTIONS.gen_stats = true },
("dump-insns", "") => unsafe { OPTIONS.dump_insns = true },
("verify-ctx", "") => unsafe { OPTIONS.verify_ctx = true },