From 3c13698a6fb43ca5abc04d53c95965bef7b82c04 Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Tue, 18 Feb 2025 16:43:47 -0500 Subject: [PATCH] Improve 'samply help' output. Fixes #501. Also fixes the issue pointed out in https://github.com/mstange/samply/issues/402#issuecomment-2444988410 . --- samply/src/main.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/samply/src/main.rs b/samply/src/main.rs index 1ff2e79d..610ebb84 100644 --- a/samply/src/main.rs +++ b/samply/src/main.rs @@ -46,23 +46,21 @@ use windows::profiler; name = "samply", version, about = r#" -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. +samply is a sampling CPU profiler for Windows, macOS, and Linux. +See "samply record --help" for additional information about the "samply record" command. EXAMPLES: - # Default usage: + # Profile a freshly launched process: samply record ./yourcommand yourargs - # On Linux, you can also profile existing processes by pid: - samply record -p 12345 # Linux only + # Profile an existing process by pid: + samply record -p 12345 # 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: + # Import perf.data files from Linux perf or Android simpleperf: samply import perf.data "# )]