From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f73.google.com (mail-dl1-f73.google.com [74.125.82.73]) (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 9E6221E5B88 for ; Sun, 3 May 2026 00:23:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777767801; cv=none; b=c+33HDS6QSalzLxput9dME93UmHeLKujsOHbnMqsF7oyUA24+sZQsGukphE7kil+nQ1twAMzBr7i8BOAiCsI2iX7jHyfHAvjioExHmZGTUbgo3axKAyAfwWBsjLJ2CGZsGSHuLckLZp0BFLy6UHawO3Oc2OcPiaFu9y1ts8N+BI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777767801; c=relaxed/simple; bh=d95RN7/rMJzrpe1UoXLER23VbQTmBzaPGsXRYVYoWgg=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=mgiLWkjH43UJqUn+m1tYsIIMq2H9qB7fPi43GNGCJ5BrAhKh8eY2taszZG6rdZ/w7wyxxiCV5Bq6gOS1DEcFY8TQF6YavfIW7L6SAIxM9c2oL6oOBnVLpm0WTpy8d0lsJaNrefybalfX5lL57p6HpD+bVYQzwwQIQv52jP3I8cs= 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=LTe7jf/1; arc=none smtp.client-ip=74.125.82.73 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="LTe7jf/1" Received: by mail-dl1-f73.google.com with SMTP id a92af1059eb24-12c8ccc7593so2441569c88.1 for ; Sat, 02 May 2026 17:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1777767797; x=1778372597; 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=22j8DoF2fXHm+jGHFBjOBjrvQEypyYf+IRlyHBjQD5I=; b=LTe7jf/1QwwTcq36henFTWK9JftSDZjimq6F8m7MIncX1q3HEUR70vzMv5CVFzqMMU KBx2XUBi+ooEB7mCnWbG0697ntMEDAmrnyVMFSlQRAuGMN+Zb7gcB31bPHVm2lDdANDk OZQsrUbFI+SJUXco1EW35iKy/iOThveGvvuP1VinxIxigTyHm0pRdsGq812TvrBKb7HL m1Ye1H+6bK8KWVHkOxnEQWJYQZ4b0fJDsMam1paea6b2EtnL8Y8j5pEdAQtvSynqWvXL GCHt4T01oC9DfJ5ISfs6nyyo2RO+J/UJX6FcMGwq7NFq9X+2agHZXq0YvRhymsYy4Yqu ttWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777767797; x=1778372597; 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=22j8DoF2fXHm+jGHFBjOBjrvQEypyYf+IRlyHBjQD5I=; b=cKcqd2cebIaV47kJjYnD8OqNpJvMYmwS5xOfcztBrLvqoLrSmnCSTxHn5gDLsuLrIp +/ddvDM5kJI1B4urtDUxesDYSqAOjk4HqWPEvrG1tJ1L5tHHIR96aW98fm2gMPE/VOaJ HMzOXudVNkmVMIJIZoeDVjy6juX4CLbRGPDMWGdlzwmrXbVWCjI5y7VzJw4HytD0rEVX UlMakbMYXMT/HCeXu6mcQtfWiJt7Kzb4NE0ZlCi4xjh2DaOdqyal9WvrO44qCVk9GUlv oPiHA2U655wzYj9aDVbOwiWRZi/fryQJ0mT3yaOr34ojxue61xEk8x6gYzL1//66dR4u pGbw== X-Forwarded-Encrypted: i=1; AFNElJ/tpPiGOnV4ZBpywXe549s2LZj6bV6MDHh5SIylnOq57jax0CtgQewrPE8mkmthckMfzjrdr4vjwwaQS8A=@vger.kernel.org X-Gm-Message-State: AOJu0YywuY/tL80tEiW1zDKY8ufnNaIwzCkKEeHxT8bCrWKEY1VHhK6c 6L3Vu3AzMcSNjHDDiYZhFk3B2LoEIVce1Ps6lOwB3Qg69QewysawUECzxGvp2YNqf3GFTWGxO3j toqilkfnTog== X-Received: from dll26.prod.google.com ([2002:a05:7022:21a:b0:12d:b48e:8597]) (user=irogers job=prod-delivery.src-stubby-dispatcher) by 2002:a05:7022:68a1:b0:128:dcbd:e27c with SMTP id a92af1059eb24-12dfd823241mr2253597c88.20.1777767796555; Sat, 02 May 2026 17:23:16 -0700 (PDT) Date: Sat, 2 May 2026 17:22:42 -0700 In-Reply-To: <20260503002248.1040791-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: <20260502065935.291960-1-irogers@google.com> <20260503002248.1040791-1-irogers@google.com> X-Mailer: git-send-email 2.54.0.545.g6539524ca2-goog Message-ID: <20260503002248.1040791-13-irogers@google.com> Subject: [PATCH v9 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, tmricht@linux.ibm.com 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 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 72a7802775ee..c55cab53531b 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.545.g6539524ca2-goog