summaryrefslogtreecommitdiff
path: root/libgo/go/runtime/histogram.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/runtime/histogram.go')
-rw-r--r--libgo/go/runtime/histogram.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgo/go/runtime/histogram.go b/libgo/go/runtime/histogram.go
index da4910d341c..0cccbcca162 100644
--- a/libgo/go/runtime/histogram.go
+++ b/libgo/go/runtime/histogram.go
@@ -81,6 +81,10 @@ type timeHistogram struct {
}
// record adds the given duration to the distribution.
+//
+// Disallow preemptions and stack growths because this function
+// may run in sensitive locations.
+//go:nosplit
func (h *timeHistogram) record(duration int64) {
if duration < 0 {
atomic.Xadd64(&h.underflow, 1)