ruby-changes:73637
From: Maxime <ko1@a...>
Date: Wed, 21 Sep 2022 08:30:33 +0900 (JST)
Subject: [ruby-changes:73637] d3733c2ba5 (master): Guard `--yjit-stats` behind `#[cfg(feature = "stats")]` (#6409)
https://git.ruby-lang.org/ruby.git/commit/?id=d3733c2ba5 From d3733c2ba5207d29ef5b52a93672873ae369b52c Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...> Date: Tue, 20 Sep 2022 19:30:10 -0400 Subject: 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 cfb5ddfa4b9394ca240447eee02637788435b02a. * Make it so the --yjit-stats option works for non-release builds * Revert accidental changes --- yjit/src/options.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/yjit/src/options.rs b/yjit/src/options.rs index cad7bf332a..e588876173 100644 --- a/yjit/src/options.rs +++ b/yjit/src/options.rs @@ -151,8 +151,10 @@ pub fn parse_option(str_ptr: *const std::os::raw::c_char) -> Option<()> { https://github.com/ruby/ruby/blob/trunk/yjit/src/options.rs#L151 ("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<()> { https://github.com/ruby/ruby/blob/trunk/yjit/src/options.rs#L163 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 }, -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/