• Austin Clements's avatar
    runtime: lift systemstack part of gcAssistAlloc · f9e1adb7
    Austin Clements authored
    This lifts the part of gcAssistAlloc that runs on the system stack to
    its own function in preparation for letting assists perform root jobs
    (notably stack scanning). This makes it easy to see that there are no
    references to the user stack once we've entered gcAssistAlloc1, which
    means it's safe to shrink the stack while in gcAssistAlloc1.
    
    This does not yet make assists perform root jobs, so it's not actually
    possible for the stack to shrink yet. That will happen in the next
    commit.
    
    The code in gcAssistAlloc1 is identical to the code that's currently
    passed in a closure to systemstack with one exception. Currently, we
    set the "completed" variable in the enclosing scope to indicate that
    the assist completed the mark phase. This is exactly the sort of
    cross-stack reference lifting this function is meant to prevent. We
    replace this variable with setting gp.param to nil or non-nil to
    indicate the completion status.
    
    Updates #15361.
    
    Change-Id: Iba7cfb758c781070a441aea86c0117b399a24dbd
    Reviewed-on: https://go-review.googlesource.com/32431
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Run-TryBot: Austin Clements <austin@google.com>
    Reviewed-by: 's avatarRick Hudson <rlh@golang.org>
    f9e1adb7
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...