Rename mjit_gc_finish_hook to mjit_gc_exit_hook
because @ko1 said "gc_finish" is confusing like a finish of entire GC process
This commit is contained in:
parent
18e43e8231
commit
82332c7d8b
2
gc.c
2
gc.c
@ -7140,7 +7140,7 @@ gc_exit(rb_objspace_t *objspace, const char *event)
|
|||||||
gc_report(1, objspace, "gc_exit: %s [%s]\n", event, gc_current_status(objspace));
|
gc_report(1, objspace, "gc_exit: %s [%s]\n", event, gc_current_status(objspace));
|
||||||
during_gc = FALSE;
|
during_gc = FALSE;
|
||||||
|
|
||||||
mjit_gc_finish_hook();
|
mjit_gc_exit_hook();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
|
6
mjit.c
6
mjit.c
@ -99,15 +99,15 @@ mjit_gc_start_hook(void)
|
|||||||
// Send a signal to workers to continue iseq compilations. It is
|
// Send a signal to workers to continue iseq compilations. It is
|
||||||
// called at the end of GC.
|
// called at the end of GC.
|
||||||
void
|
void
|
||||||
mjit_gc_finish_hook(void)
|
mjit_gc_exit_hook(void)
|
||||||
{
|
{
|
||||||
if (!mjit_enabled)
|
if (!mjit_enabled)
|
||||||
return;
|
return;
|
||||||
CRITICAL_SECTION_START(4, "mjit_gc_finish_hook");
|
CRITICAL_SECTION_START(4, "mjit_gc_exit_hook");
|
||||||
in_gc = false;
|
in_gc = false;
|
||||||
verbose(4, "Sending wakeup signal to workers after GC");
|
verbose(4, "Sending wakeup signal to workers after GC");
|
||||||
rb_native_cond_broadcast(&mjit_gc_wakeup);
|
rb_native_cond_broadcast(&mjit_gc_wakeup);
|
||||||
CRITICAL_SECTION_FINISH(4, "mjit_gc_finish_hook");
|
CRITICAL_SECTION_FINISH(4, "mjit_gc_exit_hook");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deal with ISeq movement from compactor
|
// Deal with ISeq movement from compactor
|
||||||
|
4
mjit.h
4
mjit.h
@ -82,7 +82,7 @@ extern void mjit_init(struct mjit_options *opts);
|
|||||||
extern void mjit_postponed_job_register_start_hook(void);
|
extern void mjit_postponed_job_register_start_hook(void);
|
||||||
extern void mjit_postponed_job_register_finish_hook(void);
|
extern void mjit_postponed_job_register_finish_hook(void);
|
||||||
extern void mjit_gc_start_hook(void);
|
extern void mjit_gc_start_hook(void);
|
||||||
extern void mjit_gc_finish_hook(void);
|
extern void mjit_gc_exit_hook(void);
|
||||||
extern void mjit_free_iseq(const rb_iseq_t *iseq);
|
extern void mjit_free_iseq(const rb_iseq_t *iseq);
|
||||||
extern void mjit_update_references(const rb_iseq_t *iseq);
|
extern void mjit_update_references(const rb_iseq_t *iseq);
|
||||||
extern void mjit_mark(void);
|
extern void mjit_mark(void);
|
||||||
@ -167,7 +167,7 @@ static inline void mjit_cont_free(struct mjit_cont *cont){}
|
|||||||
static inline void mjit_postponed_job_register_start_hook(void){}
|
static inline void mjit_postponed_job_register_start_hook(void){}
|
||||||
static inline void mjit_postponed_job_register_finish_hook(void){}
|
static inline void mjit_postponed_job_register_finish_hook(void){}
|
||||||
static inline void mjit_gc_start_hook(void){}
|
static inline void mjit_gc_start_hook(void){}
|
||||||
static inline void mjit_gc_finish_hook(void){}
|
static inline void mjit_gc_exit_hook(void){}
|
||||||
static inline void mjit_free_iseq(const rb_iseq_t *iseq){}
|
static inline void mjit_free_iseq(const rb_iseq_t *iseq){}
|
||||||
static inline void mjit_mark(void){}
|
static inline void mjit_mark(void){}
|
||||||
static inline void mjit_add_class_serial(rb_serial_t class_serial){}
|
static inline void mjit_add_class_serial(rb_serial_t class_serial){}
|
||||||
|
@ -1052,7 +1052,7 @@ convert_unit_to_func(struct rb_mjit_unit *unit)
|
|||||||
// print #include of MJIT header, etc.
|
// print #include of MJIT header, etc.
|
||||||
compile_prelude(f);
|
compile_prelude(f);
|
||||||
|
|
||||||
// wait until mjit_gc_finish_hook is called
|
// wait until mjit_gc_exit_hook is called
|
||||||
CRITICAL_SECTION_START(3, "before mjit_compile to wait GC finish");
|
CRITICAL_SECTION_START(3, "before mjit_compile to wait GC finish");
|
||||||
while (in_gc) {
|
while (in_gc) {
|
||||||
verbose(3, "Waiting wakeup from GC");
|
verbose(3, "Waiting wakeup from GC");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user