From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f201.google.com (mail-dy1-f201.google.com [74.125.82.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2C0A2386571 for ; Mon, 1 Jun 2026 06:54:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780296879; cv=none; b=Q0uOzt3MwPA3dbNqSEHVaIRCEsZS23b3e27Ty5Yf7QAGNdEO0e8xlNwMUkK9HsEEXaRxSoWa+v7DPSIR+dvx9fMpqQnlm7ifchRLakaMuoIHR2zubDt6tFe+XtJR1OIPwHY6eU3sRZV/1E/zf4siz+Aw8c9xDlPa6H0Cc7vfRiM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780296879; c=relaxed/simple; bh=ZS+PuPcuxfpypEg7CyiU1rjR7Jy+Z+y6peaFHU7xaDg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=qFx/84Oay1yo49hwWEkI8/H66qKcmMXUyKVU/qn6PWznR5iR6YnqcGNlD5tTIgQZPLHrko0wlmaxMYuLt4nK8zs8U1EwnwZ2OysbJyFLDjhCfIf/9wpbAPCbLYFjiJYRKirNXHXmne1eWoh0bON4LqCrZZxSfedP35iZB3uLlQ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=mvah0QIC; arc=none smtp.client-ip=74.125.82.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--irogers.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mvah0QIC" Received: by mail-dy1-f201.google.com with SMTP id 5a478bee46e88-304f23c55b2so2503356eec.0 for ; Sun, 31 May 2026 23:54:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1780296877; x=1780901677; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=rVM9lLh1LoUGa3yn0TIFcsOtKqCsDpL9U10ydZo9Txk=; b=mvah0QICuzN63pcUJ8lLVRWbbzkn9hQZdAcMt24rGXPQpRm/DHlE4gEqtt+mu9FUfb lC1WN4fVdTXI51AWhZp7mNA+gm5CNV+GwinmQApyZe/qcDrzDALOqtEtlTBQ3cdiJLcP fl4LS9DClyMBEFEw4U9q3+iKGzl0Nkhk4mrBI58wGYz1LcErUtp1DqPLOWKEFbNxwWxX LQWDJD32gTDs/Mhm5w9mTTRGMTOTcwqlkdsYb+4YgfuM63ZrHsBc+pdMdgjWg0q1/b6i Kl+tdSZdWQFwplxAGajzTt8Hct70MsPPO+iWFZzSxWqUAQJ3fikdoscUz3Zpj/75sAfC FK5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780296877; x=1780901677; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rVM9lLh1LoUGa3yn0TIFcsOtKqCsDpL9U10ydZo9Txk=; b=cSA5uU+jdGIttoSet4zaOHK8Jx+adbQBOkgqDZLmeyskd+teq8SiChZ6aAZ+77Mx1l UZFwxQ2K/6j8514zsrueNtcfjcC9B+ESZeTnwAmfMLiXv68Uo0wEL2mu0iaqiOxrx26O GYUPiKUM9cvtRfeZv4jGkQptQ+Qpr+44dVfGC44qOEktBNv+9On7x8CQDIB1MCccXQ4i 9bHG+Ub4UqzalfiMyX+dux6KGamqXIr+hfwsH7x58FI9Ilf89qNDLrc2dPhb0HA6F3T0 EWwpx91bPmmm5GLmqturDJmnqc9qhSeG5wHkRCC4nncC2v6y8czi73e0zdGf3xk7/vRl YThA== X-Forwarded-Encrypted: i=1; AFNElJ+iQXFJtUXZJ+xDo+2cfuN33wb2bsKudkqrkm5ard3+Hi2ck9IH4T6v8yujK0J5ksUqe1b3pncVkaEoDYI=@vger.kernel.org X-Gm-Message-State: AOJu0YxC5Wo5+OP1LWkJkECEcduF6HfNthfQEHww6RZDEkALMItCI9x4 LFOC8mc8ePRUIqz0AViu/HnhFwC3VtVc4JmXUydcqgs/xY0n2PdkKDlTnvIAT29svdobxwHm5Hl 8UuMXEcIaPA== X-Received: from dyaf2-n1.prod.google.com ([2002:a05:693c:8382:10b0:304:dfee:3633]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7300:ef83:b0:2de:2f38:a7cb with SMTP id 5a478bee46e88-304fa64c547mr3992863eec.18.1780296877117; Sun, 31 May 2026 23:54:37 -0700 (PDT) Date: Sun, 31 May 2026 23:54:01 -0700 In-Reply-To: <20260601065407.1597927-1-irogers@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260503002248.1040791-1-irogers@google.com> <20260601065407.1597927-1-irogers@google.com> X-Mailer: git-send-email 2.54.0.823.g6e5bcc1fc9-goog Message-ID: <20260601065407.1597927-13-irogers@google.com> Subject: [PATCH v10 12/18] perf c2c: Use perf_env e_machine rather than arch From: Ian Rogers To: irogers@google.com, acme@kernel.org, namhyung@kernel.org Cc: agordeev@linux.ibm.com, gor@linux.ibm.com, hca@linux.ibm.com, jameshongleiwang@126.com, japo@linux.ibm.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-s390@vger.kernel.org, sumanthk@linux.ibm.com, tmricht@linux.ibm.com Content-Type: text/plain; charset="UTF-8" Use the e_machine rather than arch string matching for AARCH64. Add include of dwarf-regs.h in case the EM_AARCH64 isn't defined, sort the headers given this include. Signed-off-by: Ian Rogers --- tools/perf/builtin-c2c.c | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c index 36f386949923..def5ed395f17 100644 --- a/tools/perf/builtin-c2c.c +++ b/tools/perf/builtin-c2c.c @@ -12,41 +12,45 @@ */ #include #include + +#include #include #include #include #include #include -#include #include -#include "debug.h" -#include "builtin.h" + +#include #include #include #include -#include "map_symbol.h" -#include "mem-events.h" -#include "session.h" -#include "hist.h" -#include "sort.h" -#include "tool.h" + +#include "builtin.h" #include "cacheline.h" #include "data.h" +#include "debug.h" #include "event.h" #include "evlist.h" #include "evsel.h" -#include "ui/browsers/hists.h" -#include "thread.h" -#include "mem2node.h" +#include "hist.h" +#include "map_symbol.h" +#include "mem-events.h" #include "mem-info.h" -#include "symbol.h" -#include "ui/ui.h" -#include "ui/progress.h" +#include "mem2node.h" #include "pmus.h" +#include "session.h" +#include "sort.h" #include "string2.h" -#include "util/util.h" -#include "util/symbol.h" +#include "symbol.h" +#include "thread.h" +#include "tool.h" +#include "ui/browsers/hists.h" +#include "ui/progress.h" +#include "ui/ui.h" #include "util/annotate.h" +#include "util/symbol.h" +#include "util/util.h" struct c2c_hists { struct hists hists; @@ -3202,7 +3206,7 @@ static int perf_c2c__report(int argc, const char **argv) * default display type. */ if (!display) { - if (!strcmp(perf_env__arch(env), "arm64")) + if (perf_env__e_machine(env, /*e_flags=*/NULL) == EM_AARCH64) display = "peer"; else display = "tot"; -- 2.54.0.823.g6e5bcc1fc9-goog