lkml.org 
[lkml]   [2022]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v3 11/11] perf c2c: Use 'peer' as default display for Arm64
Date
Since Arm64 arch doesn't support HITMs flags, so use 'peer' as default
if user doesn't specify display type; for other arches, it still uses
'tot' as default display type if user doesn't specify it.

Suggested-by: Ali Saidi <alisaidi@amazon.com>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
tools/perf/builtin-c2c.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
index 3bd422c5e8ae..042431b7b6ba 100644
--- a/tools/perf/builtin-c2c.c
+++ b/tools/perf/builtin-c2c.c
@@ -2785,7 +2785,7 @@ static int setup_callchain(struct evlist *evlist)

static int setup_display(const char *str)
{
- const char *display = str ?: "tot";
+ const char *display = str;

if (!strcmp(display, "tot"))
c2c.display = DISPLAY_TOT_HITM;
@@ -2971,9 +2971,6 @@ static int perf_c2c__report(int argc, const char **argv)
data.path = input_name;
data.force = symbol_conf.force;

- err = setup_display(display);
- if (err)
- goto out;

err = setup_coalesce(coalesce, no_source);
if (err) {
@@ -2994,6 +2991,22 @@ static int perf_c2c__report(int argc, const char **argv)
goto out;
}

+ /*
+ * Use the 'tot' as default display type if user doesn't specify it;
+ * since Arm64 platform doesn't support HITMs flag, use 'peer' as the
+ * default display type.
+ */
+ if (!display) {
+ if (!strcmp(perf_env__arch(&session->header.env), "arm64"))
+ display = "peer";
+ else
+ display = "tot";
+ }
+
+ err = setup_display(display);
+ if (err)
+ goto out_session;
+
session->itrace_synth_opts = &itrace_synth_opts;

err = setup_nodes(session);
--
2.25.1
\
 
 \ /
  Last update: 2022-05-18 08:02    [W:0.070 / U:1.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site