Skip to content
SPECIFICTION
Get listed

Go pprof

pkg.go.dev

API
Visit pkg.go.dev
Spec score 7.4 #20 of 29 in Profiling Software

Spec sheet

Purpose
The runtime/pprof package writes runtime profiling data in the format expected by the pprof visualization tool.Read 4 Oct 2026 · pkg.go.dev
License
The package documentation lists the license as BSD-3-Clause.Read 3 Oct 2026 · pkg.go.dev
Analysis tool
The Go command-line tool interprets and displays profiles of Go programs and can be invoked as go tool pprof binary profile.Read 3 Oct 2026 · pkg.go.dev
CPU and memory profiling
Go’s testing package supports profiling benchmarks with go test flags that write CPU and memory profiles.Read 3 Oct 2026 · pkg.go.dev
CPU profile limit
CPU profiling uses StartCPUProfile and StopCPUProfile because CPU profiles stream output to a writer rather than appearing as a Profile.Read 3 Oct 2026 · pkg.go.dev
CPU profiling
StartCPUProfile enables CPU profiling for the current process and writes buffered profile data to an io.Writer.Read 4 Oct 2026 · pkg.go.dev
Custom profiles
Packages can create and maintain named profiles, commonly to track resources that must be explicitly closed, such as files or network connections.Read 4 Oct 2026 · pkg.go.dev
Heap profiling
The heap profile reports allocation statistics from the most recently completed garbage collection, subject to the documented no-GC exception.Read 4 Oct 2026 · pkg.go.dev
HTTP integration
Importing net/http/pprof installs handlers under /debug/pprof/ for downloading live profiles.Read 4 Oct 2026 · pkg.go.dev
HTTP profiles
The net/http/pprof package serves live runtime profiles through HTTP handlers under /debug/pprof/.Read 3 Oct 2026 · pkg.go.dev
Kernel caveat
The documentation cautions that profiles are only as good as the kernel support used to generate them.Read 3 Oct 2026 · pkg.go.dev
Labels
Context labels can be attached to profiling data, and the documentation says only CPU and goroutine profiles currently use label information.Read 4 Oct 2026 · pkg.go.dev
License and project
Go is an open source project developed by a team at Google and community contributors, distributed under a BSD-style license.Read 4 Oct 2026 · go.dev
Limits
The documentation cautions that profile quality depends on kernel support and notes a Unix-like c-archive/c-shared CPU profiling limitation involving SIGPROF.Read 4 Oct 2026 · pkg.go.dev
Platform caveat
On Unix-like systems, CPU profiling does not work by default for Go code built with -buildmode=c-archive or -buildmode=c-shared.Read 3 Oct 2026 · pkg.go.dev
Profile format
Profile.WriteTo can emit a gzip-compressed protocol buffer or a legacy text format with function names and line numbers.Read 3 Oct 2026 · pkg.go.dev
Profile output
Profile.WriteTo can write gzip-compressed protocol buffer data or a legacy text format, depending on its debug argument.Read 4 Oct 2026 · pkg.go.dev
Profile types
The documented predefined profiles include goroutine, goroutineleak, allocs, heap, threadcreate, block, and mutex.Read 3 Oct 2026 · pkg.go.dev
Profiles
Predefined profiles cover goroutines, memory allocations, OS thread creation, blocking, and mutex contention.Read 4 Oct 2026 · pkg.go.dev
Security reporting
The Go project directs security-related reports to [email protected] and links to its security policy.Read 4 Oct 2026 · go.dev
Support and community
The Go project lists user discussion, developer, and code review mailing lists, and directs bug reports to its issue tracker.Read 4 Oct 2026 · go.dev
Trace integration
The HTTP profiling package serves execution trace data for use with the go tool trace command.Read 3 Oct 2026 · pkg.go.dev
Visualization
The Go documentation describes using go tool pprof to inspect profiles, including a top summary and an interactive call graph.Read 4 Oct 2026 · pkg.go.dev

Where Specifiction places it

Alternatives to Go pprofAll alternatives →