mstange / samply

Command-line sampling profiler for macOS and Linux
Apache License 2.0
1.96k stars 48 forks source link

Add an --include-args=<N> CLI argument. #274

Closed mstange closed 6 days ago

mstange commented 6 days ago

Often it is necessary to look at the arguments that a process was launched with if you want to figure out what that process was supposed to do. This commit adds those arguments to the process name in the proflie. You can specify a number to limit the number of arguments.

Note that the profiler UI currently doesn't deal with long process names very well; in the thread list at the top, the name is truncated and the tooltip doesn't show it, but in the call tree, the scope bar shows the entire name, and if it's very long, it overflows and causes extra horizontal scrollbars and doesn't shrink if any calltree transforms are added.