]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: add page tracer
authorMichael Knyszek <mknyszek@google.com>
Wed, 19 Oct 2022 18:51:15 +0000 (14:51 -0400)
committerMichael Knyszek <mknyszek@google.com>
Fri, 18 Nov 2022 03:45:30 +0000 (03:45 +0000)
commite4435cb8448514d2413f9d9aa3ee40738d26fd67
treea4ada76626bb11adbe2b48ddd88ace8cb8304816
parent0613418c9865bb3fb04e26822f3d4f4a317a2540
runtime: add page tracer

This change adds a new GODEBUG flag called pagetrace that writes a
low-overhead trace of how pages of memory are managed by the Go runtime.

The page tracer is kept behind a GOEXPERIMENT flag due to a potential
security risk for setuid binaries.

Change-Id: I6f4a2447d02693c25214400846a5d2832ad6e5c0
Reviewed-on: https://go-review.googlesource.com/c/go/+/444157
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
51 files changed:
src/internal/goexperiment/exp_pagetrace_off.go [new file with mode: 0644]
src/internal/goexperiment/exp_pagetrace_on.go [new file with mode: 0644]
src/internal/goexperiment/flags.go
src/runtime/create_file_nounix.go [new file with mode: 0644]
src/runtime/create_file_unix.go [new file with mode: 0644]
src/runtime/defs1_netbsd_386.go
src/runtime/defs1_netbsd_amd64.go
src/runtime/defs1_netbsd_arm.go
src/runtime/defs1_netbsd_arm64.go
src/runtime/defs1_solaris_amd64.go
src/runtime/defs_aix.go
src/runtime/defs_aix_ppc64.go
src/runtime/defs_darwin.go
src/runtime/defs_darwin_amd64.go
src/runtime/defs_darwin_arm64.go
src/runtime/defs_dragonfly.go
src/runtime/defs_dragonfly_amd64.go
src/runtime/defs_freebsd.go
src/runtime/defs_freebsd_386.go
src/runtime/defs_freebsd_amd64.go
src/runtime/defs_freebsd_arm.go
src/runtime/defs_freebsd_arm64.go
src/runtime/defs_freebsd_riscv64.go
src/runtime/defs_linux_386.go
src/runtime/defs_linux_amd64.go
src/runtime/defs_linux_arm.go
src/runtime/defs_linux_arm64.go
src/runtime/defs_linux_loong64.go
src/runtime/defs_linux_mips64x.go
src/runtime/defs_linux_mipsx.go
src/runtime/defs_linux_ppc64.go
src/runtime/defs_linux_ppc64le.go
src/runtime/defs_linux_riscv64.go
src/runtime/defs_linux_s390x.go
src/runtime/defs_netbsd.go
src/runtime/defs_openbsd_386.go
src/runtime/defs_openbsd_amd64.go
src/runtime/defs_openbsd_arm.go
src/runtime/defs_openbsd_arm64.go
src/runtime/defs_openbsd_mips64.go
src/runtime/defs_solaris.go
src/runtime/exithook.go
src/runtime/export_unix_test.go
src/runtime/extern.go
src/runtime/mgcscavenge.go
src/runtime/mheap.go
src/runtime/pagetrace_off.go [new file with mode: 0644]
src/runtime/pagetrace_on.go [new file with mode: 0644]
src/runtime/proc.go
src/runtime/runtime2.go
src/runtime/syscall_unix_test.go [new file with mode: 0644]