Skip to content

Commit cff1720

Browse files
Yisheng Xieacmel
authored andcommitted
perf record: Avoid duplicate call of perf_default_config()
We have brought perf_default_config to the very beginning at main(), so it no need to call perf_default_config() once more for most of config in perf-record but only for record.call-graph. Signed-off-by: Yisheng Xie <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 3d20c62 commit cff1720

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tools/perf/builtin-record.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,10 +1279,12 @@ static int perf_record_config(const char *var, const char *value, void *cb)
12791279
return -1;
12801280
return 0;
12811281
}
1282-
if (!strcmp(var, "record.call-graph"))
1283-
var = "call-graph.record-mode"; /* fall-through */
1282+
if (!strcmp(var, "record.call-graph")) {
1283+
var = "call-graph.record-mode";
1284+
return perf_default_config(var, value, cb);
1285+
}
12841286

1285-
return perf_default_config(var, value, cb);
1287+
return 0;
12861288
}
12871289

12881290
struct clockid_map {

0 commit comments

Comments
 (0)