OS Manuals

/usr/bin/samply

Command-line sampling profiler for macOS and Linux

From samply 0.13.1-r21 (os), captured 2026-11-05 by running samply --help (exit 0). permalink

samply is a sampling CPU profiler.
Run a command, record a CPU profile of its execution, and open the profiler UI.
Recording is currently supported on Linux and macOS.
On other platforms, samply can only load existing profiles.

EXAMPLES:
    # Default usage:
    samply record ./yourcommand yourargs

    # On Linux, you can also profile existing processes by pid:
    samply record -p 12345 # Linux only

    # Alternative usage: Save profile to file for later viewing, and then load it.
    samply record --save-only -o prof.json -- ./yourcommand yourargs
    samply load prof.json # Opens in the browser and supplies symbols

    # Import perf.data files from Linux perf:
    samply import perf.data


Usage: samply <COMMAND>

Commands:
  record  Record a profile and display it
  load    Load a profile from a file and display it
  import  Import a perf.data file and display the profile
  help    Print this message or the help of the given subcommand(s)

Options:
  -h, --help     Print help
  -V, --version  Print version
Options (2)
OptionDescriptionSource
-h, --helpPrint helphelp
-V, --versionPrint versionhelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.