[前][次][番号順一覧][スレッド一覧]

ruby-changes:69102

From: Alan <ko1@a...>
Date: Thu, 21 Oct 2021 08:20:50 +0900 (JST)
Subject: [ruby-changes:69102] 2bd99d7d7a (master): typo, rename, comment

https://git.ruby-lang.org/ruby.git/commit/?id=2bd99d7d7a

From 2bd99d7d7a0537e4ad9fa49ca2c455b78c6045a3 Mon Sep 17 00:00:00 2001
From: Alan Wu <XrXr@u...>
Date: Thu, 26 Aug 2021 17:11:41 -0400
Subject: typo, rename, comment

---
 yjit_codegen.c | 16 ++++++++--------
 yjit_codegen.h |  2 +-
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/yjit_codegen.c b/yjit_codegen.c
index 0e2bbf2fa3..692389fed9 100644
--- a/yjit_codegen.c
+++ b/yjit_codegen.c
@@ -44,18 +44,18 @@ static uint32_t outline_full_cfunc_return_pos; https://github.com/ruby/ruby/blob/trunk/yjit_codegen.c#L44
 
 // For implementing global code invalidation
 struct codepage_patch {
-    uint32_t mainline_patch_pos;
-    uint32_t outline_target_pos;
+    uint32_t inline_patch_pos;
+    uint32_t outlined_target_pos;
 };
 
 typedef rb_darray(struct codepage_patch) patch_array_t;
 
 static patch_array_t global_inval_patches = NULL;
 
-// This number keeps track of the number of bytes counting from the beginning
-// of the page that should not be changed. After patching for global
-// invalidation, no one should make changes to the invalidated code region
-// anymore.
+// 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.
 uint32_t yjit_codepage_frozen_bytes = 0;
 
 // Print the current source location for debugging purposes
@@ -3871,8 +3871,8 @@ yjit_tracing_invalidate_all(void) https://github.com/ruby/ruby/blob/trunk/yjit_codegen.c#L3871
     const uint32_t old_pos = cb->write_pos;
     rb_darray_for(global_inval_patches, patch_idx) {
         struct codepage_patch patch = rb_darray_get(global_inval_patches, patch_idx);
-        cb_set_pos(cb, patch.mainline_patch_pos);
-        uint8_t *jump_target = cb_get_ptr(ocb, patch.outline_target_pos);
+        cb_set_pos(cb, patch.inline_patch_pos);
+        uint8_t *jump_target = cb_get_ptr(ocb, patch.outlined_target_pos);
         jmp_ptr(cb, jump_target);
     }
     cb_set_pos(cb, old_pos);
diff --git a/yjit_codegen.h b/yjit_codegen.h
index 260d379a5d..66740a30f5 100644
--- a/yjit_codegen.h
+++ b/yjit_codegen.h
@@ -32,7 +32,7 @@ typedef struct JITState https://github.com/ruby/ruby/blob/trunk/yjit_codegen.h#L32
     rb_execution_context_t* ec;
 
     // Whether we need to record the code address at
-    // the end of this bytecode instruction for tracing suppoert
+    // the end of this bytecode instruction for global invalidation
     bool record_boundary_patch_point;
 
 } jitstate_t;
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]