]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: add mayAcquire annotation for trace.lock
authorAustin Clements <austin@google.com>
Wed, 20 Jul 2022 18:12:56 +0000 (14:12 -0400)
committerAustin Clements <austin@google.com>
Thu, 11 Aug 2022 20:16:37 +0000 (20:16 +0000)
commit502b6057d2a30b284a3889e4439b47289244382b
tree15bf819dd63c5eafe45a6ea108782ea03b8cf1d1
parentcc8bac88353d8067244a196f70b2fe9475f4336e
runtime: add mayAcquire annotation for trace.lock

Now that we've moved the trace locks to the leaf of the lock graph, we
can safely annotate that any trace event may acquire trace.lock even
if dynamically it turns out a particular event doesn't need to flush
and acquire this lock.

This reveals a new edge where we can trace while holding the mheap
lock, so we add this to the lock graph.

For #53789.
Updates #53979.

Change-Id: I13e2f6cd1b621cca4bed0cc13ef12e64d05c89a7
Reviewed-on: https://go-review.googlesource.com/c/go/+/418720
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/runtime/lockrank.go
src/runtime/mklockrank.go
src/runtime/trace.go