sizeprof

command
v0.1.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command sizeprof reports where the bytes of a Sweef binary go.

go build -trimpath -ldflags "-buildid=" -o /tmp/sweef.full ./cmd/sweef   (unstripped: symbols are needed)
go run ./tools/sizeprof -bin /tmp/sweef.full [-top 40] [-stripped /tmp/sweef]

It prints (1) the ELF sections of the stripped binary (or of the given one), (2) the symbols from `go tool nm -size` aggregated by Go package and by symbol class (code, read-only data, initialised data), and (3) the biggest single symbols. Zero-initialised memory (bss) is not part of the file and is ignored. Function metadata (.gopclntab) and type descriptors are reported as sections but are not attributed to packages by nm.

Jump to

Keyboard shortcuts

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