]> git.baikalelectronics.ru Git - kernel.git/commit
perf tools: Save cmdline arguments earlier
authorJosh Poimboeuf <jpoimboe@redhat.com>
Tue, 8 Dec 2015 04:21:46 +0000 (22:21 -0600)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 9 Dec 2015 16:42:03 +0000 (13:42 -0300)
commit2f3daf6b425dafd109e4c1bc2b3971444a4b2023
treefd865389ddfa21385c2a72180696f36e5bf23301
parentac23605402faa0071a3b3968cf2632b4cb9e1a2c
perf tools: Save cmdline arguments earlier

perf_env__set_cmdline() only saves the arguments the first time it's
called.  It doesn't need to be called every time the options and
suboptions are parsed.  Instead it can just be called once.

This also has the advantage of making the option parsing code less
perf-specific so it can be moved out to a library.

Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/19b76a5aa1b688bd635bd65d80bbc103a978d75e.1449548395.git.jpoimboe@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/perf.c
tools/perf/util/env.c
tools/perf/util/parse-options.c