• Dmitriy Vyukov's avatar
    runtime: fix deadlock when gctrace · a0dbbeae
    Dmitriy Vyukov authored
    Calling ReadMemStats which does stoptheworld on m0 holding locks
    was not a good idea.
    Stoptheworld holding locks is a recipe for deadlocks (added check for this).
    Stoptheworld on g0 may or may not work (added check for this as well).
    As far as I understand scavenger will print incorrect numbers now,
    as stack usage is not subtracted from heap. But it's better than deadlocking.
    
    LGTM=khr
    R=golang-codereviews, rsc, khr
    CC=golang-codereviews, rlh
    https://golang.org/cl/124670043
    a0dbbeae
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...