summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r--tools/perf/util/evsel.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 6647925d5f28..b096ef7a240c 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -651,12 +651,17 @@ static void apply_config_terms(struct perf_evsel *evsel,
/* parse callgraph parameters */
if (callgraph_buf != NULL) {
- param.enabled = true;
- if (parse_callchain_record(callgraph_buf, &param)) {
- pr_err("per-event callgraph setting for %s failed. "
- "Apply callgraph global setting for it\n",
- evsel->name);
- return;
+ if (!strcmp(callgraph_buf, "no")) {
+ param.enabled = false;
+ param.record_mode = CALLCHAIN_NONE;
+ } else {
+ param.enabled = true;
+ if (parse_callchain_record(callgraph_buf, &param)) {
+ pr_err("per-event callgraph setting for %s failed. "
+ "Apply callgraph global setting for it\n",
+ evsel->name);
+ return;
+ }
}
}
if (dump_size > 0) {