summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-08-26 17:11:41 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:39 -0400
commit2bd99d7d7a0537e4ad9fa49ca2c455b78c6045a3 (patch)
treeee89ccd2c17e374d7d9edd14445e3e923c5b6b99
parent812597676ba2b1e3c41c50e9da624441e0c40a6b (diff)
typo, rename, comment
-rw-r--r--yjit_codegen.c16
-rw-r--r--yjit_codegen.h2
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;
// 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)
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
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;