aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debuglog_on.go
AgeCommit message (Collapse)Author
2021-02-20all: go fmt std cmd (but revert vendor)Russ Cox
Make all our package sources use Go 1.17 gofmt format (adding //go:build lines). Part of //go:build change (#41184). See https://golang.org/design/draft-gobuild Change-Id: Ia0534360e4957e58cd9a18429c39d0e32a6addb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/294430 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
2019-04-04runtime: ring buffer for binary debug loggingAustin Clements
This adds an internal runtime debug log. It uses per-M time-stamped ring buffers of binary log records. On panic, these buffers are collected, interleaved, and printed. The entry-point to the debug log is a new "dlog" function. dlog is designed so it can be used even from very constrained corners of the runtime such as signal handlers or inside the write barrier. The facility is only enabled if the debuglog build tag is set. Otherwise, it compiles away to a no-op implementation. The debug log format is also designed so it would be reasonable to decode from a core dump, though this hasn't been implemented. Change-Id: I6e2737c286358e97a0d8091826498070b95b66a3 Reviewed-on: https://go-review.googlesource.com/c/go/+/157997 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Michael Knyszek <mknyszek@google.com>