FlameGraph
FlameGraph copied to clipboard
stackcollapse-perf: fix flag in example
Looks like the intent was to pass --fields, not --force.
I was already confused when I started reading the docs for this script, using the wrong option didn't help matters any ;-)
No, please see lines 115 to 118 -- the docs should match the usage message.
Well, that's confusing, it depends on the kernel version?:
https://github.com/brendangregg/FlameGraph/blob/15c0c5719fe4d14190c96d155cfe4ad5dd883b98/stackcollapse-perf.pl#L115-L118
Ah, I see, the meaning of -f
was changed in 4.1:
And -f is already taken up by --fields, which makes --force confused, so change the short option name of --fields to -F like what other perf commands do (e.g. perf report -F) and use -f as the short option name of --force.
In that case, would you instead accept a patch to just change the docs in this file to use the long option --fields
and skip the short option confusion altogether? It looks to me like that should work back to 2.6.39 when custom field selection was introduced.