From 34026afd0434fc482b2a6419ec6aeece07dcf52f Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Thu, 2 Mar 2023 16:21:05 -0500 Subject: YJIT: Delete stale `frozen_bytes` related code (#7423) The code and comments in there have been disabled by comments for a long time. The issues that the counter used to solve are now solved more comprehensively by "runningness" [tracking][1] introduced by Code GC and [delayed deallocation][2]. Having a single counter doesn't fit our current model where code pages that could be touched or not are interleaved, anyway. Just delete the code. [1]: e7c71c6c9271b0c29f210769159090e17128e740 [2]: a0b0365e905e1ac51998ace7e6fc723406a2f157 --- yjit/src/codegen.rs | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'yjit/src/codegen.rs') diff --git a/yjit/src/codegen.rs b/yjit/src/codegen.rs index 3cfce12c34..bfad9951e2 100644 --- a/yjit/src/codegen.rs +++ b/yjit/src/codegen.rs @@ -7662,12 +7662,6 @@ pub struct CodegenGlobals { /// For implementing global code invalidation global_inval_patches: Vec, - /// For implementing global code invalidation. The number of bytes counting from the beginning - /// of the inline code block that should not be changed. After patching for global invalidation, - /// no one should make changes to the invalidated code region anymore. This is used to - /// break out of invalidation race when there are multiple ractors. - inline_frozen_bytes: usize, - // Methods for generating code for hardcoded (usually C) methods method_codegen_table: HashMap, @@ -7766,7 +7760,6 @@ impl CodegenGlobals { outline_full_cfunc_return_pos: cfunc_exit_code, branch_stub_hit_trampoline, global_inval_patches: Vec::new(), - inline_frozen_bytes: 0, method_codegen_table: HashMap::new(), ocb_pages, code_gc_count: 0, @@ -7896,14 +7889,6 @@ impl CodegenGlobals { mem::take(&mut globals.global_inval_patches) } - pub fn get_inline_frozen_bytes() -> usize { - CodegenGlobals::get_instance().inline_frozen_bytes - } - - pub fn set_inline_frozen_bytes(frozen_bytes: usize) { - CodegenGlobals::get_instance().inline_frozen_bytes = frozen_bytes; - } - pub fn get_outline_full_cfunc_return_pos() -> CodePtr { CodegenGlobals::get_instance().outline_full_cfunc_return_pos } -- cgit v1.2.3