mirror of
https://github.com/golang/go
synced 2024-11-18 06:54:49 -07:00
runtime: fix comments referring to trace functions in runtime/pprof
ae1ea2a
moved trace-related functions from runtime/pprof to
runtime/trace, but missed a doc comment and a code comment. Update
these to reflect the move.
Change-Id: I6e1e8861e5ede465c08a2e3f80b976145a8b32d8
Reviewed-on: https://go-review.googlesource.com/12525
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
This commit is contained in:
parent
4230c73f55
commit
58f3a82950
@ -127,7 +127,7 @@ type traceBuf struct {
|
||||
// StartTrace enables tracing for the current process.
|
||||
// While tracing, the data will be buffered and available via ReadTrace.
|
||||
// StartTrace returns an error if tracing is already enabled.
|
||||
// Most clients should use the runtime/pprof package or the testing package's
|
||||
// Most clients should use the runtime/trace package or the testing package's
|
||||
// -test.trace flag instead of calling StartTrace directly.
|
||||
func StartTrace() error {
|
||||
// Stop the world, so that we can take a consistent snapshot
|
||||
@ -347,7 +347,7 @@ func ReadTrace() []byte {
|
||||
if raceenabled {
|
||||
// Model synchronization on trace.shutdownSema, which race
|
||||
// detector does not see. This is required to avoid false
|
||||
// race reports on writer passed to pprof.StartTrace.
|
||||
// race reports on writer passed to trace.Start.
|
||||
racerelease(unsafe.Pointer(&trace.shutdownSema))
|
||||
}
|
||||
// trace.enabled is already reset, so can call traceable functions.
|
||||
|
Loading…
Reference in New Issue
Block a user