That way is kept, but another way is added:
graprof --graprof-options -- a.out --option-for-a-out
using a default trace file located at $PWD/graprof.trace
A few notes on this added implementation:
The -- is usually used as an escape sequence, but here it gets a
slightly different meaning. Once it is there, we will assume the
parsing is done and all the rest of the parameters contain the command
to be used for profiling.
There cannot be any graprof related option behind the first '--'.
It is assumed that the first argument behind the '--' is the programs
name. This doesn't work:
graprof -C -- LD_DEBUG=bindings,symbols a.out --option-for-a-out
$PWD/graprof.trace gets overwritten without checking whether this file
already exists.
Signed-off-by: Stefan Beller stefanbeller@googlemail.com
Personally I don't like the variable name 'profilee', I'll think about better names.
As of now the usual way of operating graprof distinguishes between recording a trace and analyzing that trace by 2 different commands:
record trace with properly linked and instrumented binary:
That way is kept, but another way is added: graprof --graprof-options -- a.out --option-for-a-out using a default trace file located at $PWD/graprof.trace
A few notes on this added implementation:
Signed-off-by: Stefan Beller stefanbeller@googlemail.com
Personally I don't like the variable name 'profilee', I'll think about better names.