• Keith Randall's avatar
    runtime: redo stack map entries to avoid false retention · 1b45cc45
    Keith Randall authored
    Change two-bit stack map entries to encode:
    0 = dead
    1 = scalar
    2 = pointer
    3 = multiword
    
    If multiword, the two-bit entry for the following word encodes:
    0 = string
    1 = slice
    2 = iface
    3 = eface
    
    That way, during stack scanning we can check if a string
    is zero length or a slice has zero capacity.  We can avoid
    following the contained pointer in those cases.  It is safe
    to do so because it can never be dereferenced, and it is
    desirable to do so because it may cause false retention
    of the following block in memory.
    
    Slice feature turned off until issue 7564 is fixed.
    
    Update #7549
    
    LGTM=rsc
    R=golang-codereviews, bradfitz, rsc
    CC=golang-codereviews
    https://golang.org/cl/76380043
    1b45cc45
Name
Last commit
Last update
..
Makefile Loading commit data...
acid.c Loading commit data...
bits.c Loading commit data...
bv.c Loading commit data...
cc.h Loading commit data...
cc.y Loading commit data...
com.c Loading commit data...
com64.c Loading commit data...
dcl.c Loading commit data...
doc.go Loading commit data...
dpchk.c Loading commit data...
funct.c Loading commit data...
godefs.c Loading commit data...
lex.c Loading commit data...
lexbody Loading commit data...
mac.c Loading commit data...
macbody Loading commit data...
omachcap.c Loading commit data...
pgen.c Loading commit data...
pswt.c Loading commit data...
scon.c Loading commit data...
sub.c Loading commit data...
y.tab.c Loading commit data...
y.tab.h Loading commit data...