Search code examples
cmacosprofilingcommand-line-interfaceshark

Launching a process with arguments and profile with shark


I need to sample a (cli) application with shark and pass parameters to it like so:

shortest-path <input-ref-littleendian|diff -u - output-ref

How can I do this with shark? Shark assumes that the parameters i need to pass to the launched cli app are for shark itself, not the process.


Solution

  • That's not "parameters to a program", that's a shell pipeline. You might need to use parenthesis to make it clear in which order things should happen, e.g. perhaps something like

    $ shark ( shortest-path < input-ref-littleendian | diff -u - output-ref )
    

    I don't have access to shark so I cannot verify this.