-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support saving procedure stack at an offset on E2K (multi-threaded only)
In case of nested GC_do_blocking and GC_call_with_gc_active calls, there is no need to save the entire procedure stack, only the stack part from the top most GC_call_with_gc_active is no be saved. * include/private/gc_priv.h [E2K && THREADS] (GC_register_stackbottom): Declare; add comment. * include/private/gc_priv.h [E2K] (PS_SYSCALL_TAIL_BYTES, GET_PROCEDURE_STACK_SIZE_INNER): Define macro. * include/private/gc_priv.h [E2K] (GET_PROCEDURE_STACK_LOCAL): Update comment; add ps_ofs argument; call GET_PROCEDURE_STACK_SIZE_INNER(); rename ofs_sz_ll local variable to ofs_sz_ull; define adj_ps_ofs local variable; pass adj_ps_ofs as argument to E2K_READ_PROCEDURE_STACK_EX syscall. * include/private/pthread_support.h [E2K] (GC_StackContext_Rep.ps_ofs): New field. * mark_rts.c [E2K] (GC_push_current_stack): Add TODO item about ps_ofs. * misc.c [E2K && THREADS] (GC_register_stackbottom): Define variable. * misc.c [E2K] (GC_call_with_stack_base): Call GET_PROCEDURE_STACK_SIZE_INNER() and store result to base.reg_base (instead of NULL). * pthread_stop_world.c [E2K] (GC_suspend_handler_inner, GC_push_all_stacks): Pass crtn->ps_ofs to GET_PROCEDURE_STACK_LOCAL(). * pthread_support.c [E2K] (do_blocking_enter): Likewise. * pthread_support.c [E2K] (GC_record_stack_base, GC_set_stackbottom): Store sb->reg_base value to crtn->ps_ofs. * pthread_support.c [E2K] (GC_thr_init): Store GC_register_stackbottom value to sb.reg_base (instead of NULL). * pthread_support.c [E2K] (GC_set_stackbottom): Store sb->reg_base value to GC_register_stackbottom. * pthread_support.c [E2K] (GC_get_my_stackbottom): Store crtn->ps_ofs value to sb->reg_base. * pthread_support.c [E2K] (GC_call_with_gc_active): Define saved_ps_ofs and sz_ull local variables; save and restore crtn->ps_ofs value to saved_ps_ofs; call GET_PROCEDURE_STACK_SIZE_INNER() and store result to crtn->ps_ofs.
- Loading branch information
Showing
6 changed files
with
83 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters