Frame pointer callchains are not supported on s390. Ignore the option
and print a warning.
Signed-off-by: Ian Rogers <irogers@google.com>
---
tools/perf/util/evsel.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 2258fea2ef5b..a54ef52e01d2 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1021,6 +1021,11 @@ static void __evsel__config_callchain(struct evsel *evsel, struct record_opts *o
bool function = evsel__is_function_event(evsel);
struct perf_event_attr *attr = &evsel->core.attr;
+ if (EM_HOST == EM_S390 && param->record_mode == CALLCHAIN_FP) {
+ pr_warning("Framepointer unwinding not supported on s390, option ignored. Try '--call-graph dwarf'\n");
+ return;
+ }
+
evsel__set_sample_bit(evsel, CALLCHAIN);
attr->sample_max_stack = param->max_stack;
--
2.53.0.851.ga537e3e6e9-goog