diff options
author | Ingo Molnar <mingo@kernel.org> | 2016-02-27 10:34:13 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2016-02-27 10:34:13 +0100 |
commit | ce1984cc45ccf943f1b78b1674dfdbe5df2d45a9 (patch) | |
tree | 36b9da4cb04afca35b712ca65833d517fdb04701 /tools/perf/builtin-script.c | |
parent | 06466212a69c0511c5dcff7363c207ffc8913731 (diff) | |
parent | 1d6c9407d45dd622b277ca9f725da3cc9e95b5de (diff) |
Merge tag 'perf-core-for-mingo-20160226' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
User visible changes:
- Show extra line telling no entries below --percent-limit are
at that --hierarchy level (Namhyung Kim)
- 'perf report/top --hierarchy' assorted alignment fixes (Namhyung Kim)
- Handle empty print fmts in 'perf script -s' i.e. when running
python or perl scripts (Taeung Song)
- Improve support for bpf-output events in 'perf trace' (Wang Nan)
- Fix parsing of pmu events with empty list of modifiers, this
cures a perf/core-only regression where '-e intel_pt//' got
broken (Arnaldo Carvalho de Melo)
Infrastructure changes:
- Improve missing OpenJDK devel files error message in jvmti
Makefile (Stephane Eranian)
- Remove duplicated code and needless script_spec__findnew() (Taeung Song)
- Bring perf_default_config to the very beginning at main(), removing
the need for each subcommand to do this (Wang Nan)
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/builtin-script.c')
-rw-r--r-- | tools/perf/builtin-script.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index ec4fbd410a4b0..57f9a7e7f7d3e 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1212,23 +1212,6 @@ static struct script_spec *script_spec__find(const char *spec) return NULL; } -static struct script_spec *script_spec__findnew(const char *spec, - struct scripting_ops *ops) -{ - struct script_spec *s = script_spec__find(spec); - - if (s) - return s; - - s = script_spec__new(spec, ops); - if (!s) - return NULL; - - script_spec__add(s); - - return s; -} - int script_spec_register(const char *spec, struct scripting_ops *ops) { struct script_spec *s; @@ -1237,9 +1220,11 @@ int script_spec_register(const char *spec, struct scripting_ops *ops) if (s) return -1; - s = script_spec__findnew(spec, ops); + s = script_spec__new(spec, ops); if (!s) return -1; + else + script_spec__add(s); return 0; } |