mirror of https://github.com/golang/go.git
runtime: dump the status of lockedg on error
When lockedg's status is bad, it will be helpful to dump the bad status. Besides, dumpgstatus() will dump current g anyway, it's more helpful to dump lockedg as well than dumping current g twice.
This commit is contained in:
parent
c5d7f2f1cb
commit
da814c51ff
|
|
@ -2039,8 +2039,8 @@ func stoplockedm() {
|
|||
noteclear(&_g_.m.park)
|
||||
status := readgstatus(_g_.m.lockedg.ptr())
|
||||
if status&^_Gscan != _Grunnable {
|
||||
print("runtime:stoplockedm: g is not Grunnable or Gscanrunnable\n")
|
||||
dumpgstatus(_g_)
|
||||
print("runtime:stoplockedm: lockedg (atomicstatus=", status, ") is not Grunnable or Gscanrunnable\n")
|
||||
dumpgstatus(_g_.m.lockedg.ptr())
|
||||
throw("stoplockedm: not runnable")
|
||||
}
|
||||
acquirep(_g_.m.nextp.ptr())
|
||||
|
|
|
|||
Loading…
Reference in New Issue