MJIT: s/assert/VM_ASSERT/
include/ruby/assert.h sets NDEBUG by default. As MJIT CI uses -DVM_CHECK_MODE, using only VM_ASSERT might be more helpful.
This commit is contained in:
parent
6e74c5c268
commit
cbcc92f788
4
mjit.c
4
mjit.c
@ -484,7 +484,7 @@ rb_mjit_wait_call(rb_execution_context_t *ec, struct rb_iseq_constant_body *body
|
|||||||
struct rb_mjit_compile_info*
|
struct rb_mjit_compile_info*
|
||||||
rb_mjit_iseq_compile_info(const struct rb_iseq_constant_body *body)
|
rb_mjit_iseq_compile_info(const struct rb_iseq_constant_body *body)
|
||||||
{
|
{
|
||||||
assert(body->jit_unit != NULL);
|
VM_ASSERT(body->jit_unit != NULL);
|
||||||
return &body->jit_unit->compile_info;
|
return &body->jit_unit->compile_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -496,7 +496,7 @@ mjit_recompile(const rb_iseq_t *iseq)
|
|||||||
|
|
||||||
verbose(1, "JIT recompile: %s@%s:%d", RSTRING_PTR(ISEQ_BODY(iseq)->location.label),
|
verbose(1, "JIT recompile: %s@%s:%d", RSTRING_PTR(ISEQ_BODY(iseq)->location.label),
|
||||||
RSTRING_PTR(rb_iseq_path(iseq)), FIX2INT(ISEQ_BODY(iseq)->location.first_lineno));
|
RSTRING_PTR(rb_iseq_path(iseq)), FIX2INT(ISEQ_BODY(iseq)->location.first_lineno));
|
||||||
assert(ISEQ_BODY(iseq)->jit_unit != NULL);
|
VM_ASSERT(ISEQ_BODY(iseq)->jit_unit != NULL);
|
||||||
|
|
||||||
mjit_add_iseq_to_process(iseq, &ISEQ_BODY(iseq)->jit_unit->compile_info, true);
|
mjit_add_iseq_to_process(iseq, &ISEQ_BODY(iseq)->jit_unit->compile_info, true);
|
||||||
check_unit_queue();
|
check_unit_queue();
|
||||||
|
@ -1235,7 +1235,7 @@ unload_units(void)
|
|||||||
|
|
||||||
// Detect units which are in use and can't be unloaded.
|
// Detect units which are in use and can't be unloaded.
|
||||||
ccan_list_for_each(&active_units.head, unit, unode) {
|
ccan_list_for_each(&active_units.head, unit, unode) {
|
||||||
assert(unit->iseq != NULL && unit->handle != NULL);
|
VM_ASSERT(unit->iseq != NULL && unit->handle != NULL);
|
||||||
unit->used_code_p = false;
|
unit->used_code_p = false;
|
||||||
}
|
}
|
||||||
// All threads have a root_fiber which has a mjit_cont. Other normal fibers also
|
// All threads have a root_fiber which has a mjit_cont. Other normal fibers also
|
||||||
@ -1267,7 +1267,7 @@ unload_units(void)
|
|||||||
if (max_queue_calls > ISEQ_BODY(unit->iseq)->total_calls) {
|
if (max_queue_calls > ISEQ_BODY(unit->iseq)->total_calls) {
|
||||||
verbose(2, "Unloading unit %d (calls=%lu, threshold=%lu)",
|
verbose(2, "Unloading unit %d (calls=%lu, threshold=%lu)",
|
||||||
unit->id, ISEQ_BODY(unit->iseq)->total_calls, max_queue_calls);
|
unit->id, ISEQ_BODY(unit->iseq)->total_calls, max_queue_calls);
|
||||||
assert(unit->handle != NULL);
|
VM_ASSERT(unit->handle != NULL);
|
||||||
remove_from_list(unit, &active_units);
|
remove_from_list(unit, &active_units);
|
||||||
free_unit(unit);
|
free_unit(unit);
|
||||||
unloaded_p = true;
|
unloaded_p = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user