Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the changes in 2014-10-26/sc which cause a performance regression in some cases #300

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion code/ss.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ Res StackScan(ScanState ss, void *stackCold,

arena = ss->arena;

AVER(arena->stackWarm != NULL);
/* If we save stack context efficiently at all entry points to the MPS,
we should not need to save the stack context here, and so we should
AVER(arena->stackWarm != NULL) here , to make sure that we have
succeeded in writing the correct code at every entry point; However,
we do not save stack context at entry points, as the performance
penalty is too great. So we expect arena->stackWarm to be NULL at
this point, and the stack context is saved here */

warmest = arena->stackWarm;
if (warmest == NULL) {
/* Somehow missed saving the context at the entry point
Expand Down
12 changes: 10 additions & 2 deletions code/ss.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ void StackHot(void **stackOut);

/* STACK_CONTEXT_BEGIN -- save context */

#define STACK_CONTEXT_BEGIN(arena) \
#define STACK_CONTEXT_BEGIN(arena) STACK_CONTEXT_BEGIN_NOP

#define STACK_CONTEXT_BEGIN_NOP BEGIN

#define STACK_CONTEXT_BEGIN_SETJMP(arena) \
BEGIN \
StackContextStruct _sc; \
STACK_CONTEXT_SAVE(&_sc); \
Expand All @@ -50,7 +54,11 @@ void StackHot(void **stackOut);

/* STACK_CONTEXT_END -- clear context */

#define STACK_CONTEXT_END(arena) \
#define STACK_CONTEXT_END(arena) STACK_CONTEXT_END_NOP

#define STACK_CONTEXT_END_NOP END

#define STACK_CONTEXT_END_SETJMP(arena) \
END; \
AVER(arena->stackWarm != NULL); \
arena->stackWarm = NULL; \
Expand Down
Loading