Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

stackcollapse-perf: fix flag in example #281

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wolfgang42
Copy link

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 ;-)

Looks like the intent was to pass --fields, not --force
@brendangregg
Copy link
Owner

No, please see lines 115 to 118 -- the docs should match the usage message.

@wolfgang42
Copy link
Author

Well, that's confusing, it depends on the kernel version?:

[1] perf script must emit both PID and TIDs for these to work; eg, Linux < 4.1:
perf script -f comm,pid,tid,cpu,time,event,ip,sym,dso,trace
for Linux >= 4.1:
perf script -F comm,pid,tid,cpu,time,event,ip,sym,dso,trace

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants