summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-10-10 14:54:19 -0700
committerGitHub <noreply@github.com>2023-10-10 14:54:19 -0700
commit4d0a619f712bfd189dcedcf9998b143a731a2211 (patch)
tree1d2b9cf61d66277f34e1abfe12d0eb36f130fa02
parentef7fa8bd0e174b8a96681abdce57b5b6afbe5c32 (diff)
YJIT: Allow --yjit-trace-exits on release builds (#8619)
-rw-r--r--doc/yjit/yjit.md2
-rw-r--r--yjit/src/stats.rs21
2 files changed, 1 insertions, 22 deletions
diff --git a/doc/yjit/yjit.md b/doc/yjit/yjit.md
index 0aeb14a69a..b1a4d5f022 100644
--- a/doc/yjit/yjit.md
+++ b/doc/yjit/yjit.md
@@ -170,7 +170,7 @@ compiled, lower values mean less code is compiled (default 200000)
- `--yjit-exec-mem-size=N`: size of the executable memory block to allocate, in MiB (default 64 MiB in Ruby 3.2, 128 MiB in Ruby 3.3+)
- `--yjit-stats`: print statistics after the execution of a program (incurs a run-time cost)
- `--yjit-stats=quiet`: gather statistics while running a program but don't print them. Stats are accessible through `RubyVM::YJIT.runtime_stats`. (incurs a run-time cost)
-- `--yjit-trace-exits`: produce a Marshal dump of backtraces from specific exits. Automatically enables `--yjit-stats` (must configure and build with `--enable-yjit=stats` to use this)
+- `--yjit-trace-exits`: produce a Marshal dump of backtraces from specific exits. Automatically enables `--yjit-stats`
- `--yjit-max-versions=N`: maximum number of versions to generate per basic block (default 4)
- `--yjit-greedy-versioning`: greedy versioning mode (disabled by default, may increase code size)
diff --git a/yjit/src/stats.rs b/yjit/src/stats.rs
index 24861205d1..653c832991 100644
--- a/yjit/src/stats.rs
+++ b/yjit/src/stats.rs
@@ -70,11 +70,6 @@ static mut YJIT_EXIT_LOCATIONS: Option<YjitExitLocations> = None;
impl YjitExitLocations {
/// Initialize the yjit exit locations
pub fn init() {
- // Return if the stats feature is disabled
- if !cfg!(feature = "stats") {
- return;
- }
-
// Return if --yjit-trace-exits isn't enabled
if !get_option!(gen_trace_exits) {
return;
@@ -124,11 +119,6 @@ impl YjitExitLocations {
return;
}
- // Return if the stats feature is disabled
- if !cfg!(feature = "stats") {
- return;
- }
-
// Return if --yjit-trace-exits isn't enabled
if !get_option!(gen_trace_exits) {
return;
@@ -538,7 +528,6 @@ pub extern "C" fn rb_yjit_get_stats(_ec: EcPtr, _ruby_self: VALUE, context: VALU
/// to be enabled.
#[no_mangle]
pub extern "C" fn rb_yjit_trace_exit_locations_enabled_p(_ec: EcPtr, _ruby_self: VALUE) -> VALUE {
- #[cfg(feature = "stats")]
if get_option!(gen_trace_exits) {
return Qtrue;
}
@@ -555,11 +544,6 @@ pub extern "C" fn rb_yjit_get_exit_locations(_ec: EcPtr, _ruby_self: VALUE) -> V
return Qnil;
}
- // Return if the stats feature is disabled
- if !cfg!(feature = "stats") {
- return Qnil;
- }
-
// Return if --yjit-trace-exits isn't enabled
if !get_option!(gen_trace_exits) {
return Qnil;
@@ -716,11 +700,6 @@ pub extern "C" fn rb_yjit_record_exit_stack(_exit_pc: *const VALUE)
return;
}
- // Return if the stats feature is disabled
- if !cfg!(feature = "stats") {
- return;
- }
-
// Return if --yjit-trace-exits isn't enabled
if !get_option!(gen_trace_exits) {
return;