YJIT: Skip printing stats at exit if --yjit-disable (#8727)
This commit is contained in:
parent
01787d53bf
commit
8a88172fd4
@ -1388,6 +1388,10 @@ class TestYJIT < Test::Unit::TestCase
|
|||||||
assert_no_exits('0xfff_ffff_ffff_ffff * 0x10')
|
assert_no_exits('0xfff_ffff_ffff_ffff * 0x10')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_disable_stats
|
||||||
|
assert_in_out_err(%w[--yjit-stats --yjit-disable])
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def code_gc_helpers
|
def code_gc_helpers
|
||||||
|
@ -515,7 +515,7 @@ pub extern "C" fn rb_yjit_stats_enabled_p(_ec: EcPtr, _ruby_self: VALUE) -> VALU
|
|||||||
/// Check if stats generation should print at exit
|
/// Check if stats generation should print at exit
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn rb_yjit_print_stats_p(_ec: EcPtr, _ruby_self: VALUE) -> VALUE {
|
pub extern "C" fn rb_yjit_print_stats_p(_ec: EcPtr, _ruby_self: VALUE) -> VALUE {
|
||||||
if get_option!(print_stats) {
|
if yjit_enabled_p() && get_option!(print_stats) {
|
||||||
return Qtrue;
|
return Qtrue;
|
||||||
} else {
|
} else {
|
||||||
return Qfalse;
|
return Qfalse;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user