labeloffsetprobe

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2026 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Overview

labeloffsetprobe is a development-only tool that captures a live heap dump from itself and probes for the byte offset of runtime.g.labels in the running Go runtime. Its output is a candidate runtimelayout.TableEntry that can be pasted into internal/runtimelayout/table.go to extend /debug/memusage support to a new Go version.

Usage:

go run ./cmd/labeloffsetprobe

Heap-allocated label strings are used for the probe so the bytes are guaranteed to appear in the heap dump object contents on every platform, independent of whether the in-process memory reader is available. The probe also opens the in-process reader (if supported on this OS) and prints which source it ended up using — useful when diagnosing FreeBSD configurations where procfs is unmounted and the ELF fallback applies.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL