flamegraph icon indicating copy to clipboard operation
flamegraph copied to clipboard

How to pass binary directly?

Open ra1u opened this issue 2 years ago • 3 comments

From first example in README

flamegraph /usr/bin/yes

would not expect to get error

    error: Found argument '/usr/bin/yes' which wasn't expected, or isn't valid in this context
    
    USAGE:
        flamegraph [OPTIONS] [-- <TRAILING_ARGUMENTS>...]
    
    For more information try --help

ra1u avatar Jul 10 '22 17:07 ra1u

Note the -- before TRAILING_ARGUMENTS...

djc avatar Jul 10 '22 18:07 djc

@djc in example there is

# if you'd like to profile an arbitrary executable:
flamegraph [-o my_flamegraph.svg] /path/to/my/binary --my-arg 5

I do not want to post arguments, but path to binary

ra1u avatar Jul 10 '22 18:07 ra1u

Yeah, it seems unfortunately you still need to prefix the arguments with -- for now. Would be nice to get that fixed but it's not obvious to me right now how.

djc avatar Jul 25 '22 08:07 djc