From nobody Sun Feb 8 08:19:34 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (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 74C0319B5A3 for ; Tue, 13 Aug 2024 13:24:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555498; cv=none; b=LuN38+5GgtACpIHpi60rAzZMFCz/TYUppanlNVUEclIG5Up6ZdPr/xdKqT5Ag56p+DFG0QA0d3EHQGSPK+aMAyJxL9BTLz3m7+IaDpRRjNwwCSEd6PVKZniI9NWS7IorAfc0514tFk2eAfYucwpYi5WO63+JYNH9R1oPiosT268= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555498; c=relaxed/simple; bh=169AxUGyTxrsEVYe8bfX3XyoWe92S2PZ842YmAzlLUc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IZMHwbeiGL/ykWYpPNnzYUlgqEpXepPvu056gDw8sMMOIXieMVfhALH4pqJivU45UCqBRSHHrmHIsnUW50BTZ++2u/U4p08jNWTmPs40suHXldN2HmtVBMGkC87owWi5lN8opzhmG4agoGCBQ8zNxPlLQO9EA7mnVzI0shQiwZA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=MDfVY8Y0; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MDfVY8Y0" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-42817bee9e8so41151795e9.3 for ; Tue, 13 Aug 2024 06:24:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723555495; x=1724160295; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=G8nva4x7yooIvcMdEZLd+2R1OWdlEwTPtLBsl8/711k=; b=MDfVY8Y0MrmEwRBDochpJdUq/lEnlnyW05js9JdOowF6g3qGhCqwzLAP3N7pdqi8h+ Q7/WeZWZ81sqn+jS0v3zM/7LbM11eNHc34Eh1M6VFFhVfjmWY0rsnA6wdNxPTZdgkBV+ uF4AVjP9WkUjjxkqnZrh0XxQwiE6jLDvj3GH3zuojG4YiB1Jki42eB8DD2gYinED8dHp 1sRhdGu3dIKfZ7TcA+8sUlNhxlXxeFQHAUQgfrIAQTwbp9IJ5mAFViPtITT06eZG2zv3 DPEiHNoPUHDxIgM/iA3H0NXN0/O/R2SszD6o3Go3wuw2x65VS4zWnofdNnCQzxdk1PiZ kvUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723555495; x=1724160295; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=G8nva4x7yooIvcMdEZLd+2R1OWdlEwTPtLBsl8/711k=; b=t/OB9JTiYfrpchbrovJPL3EB6sfFOVDNA8Qaz24M+AeTwxlboPBDvGTRzI5URyKFUW znq4CoL0cv4IRdl9nS9MCHrJPG0OCxfB7fJPlREc/keu8bgAsq26Hg2JGb8KoXv+G0Vq ptF5n17Hjmu0paPW8CgO74zsIKMInD3Nz1jCCTjRk716jb+pjLDuD8+3swOGJ18hlqyZ 1aXQB9CHyEb4S2DSKXB8Agb20hitk6Ev50AQWje9N7/ST+1ymYo+ACETshw5cbcVF3GH LhFAem/FaJ0MxAJf2lRYI4FZwHnTMUoY/lIzg6p6/9vLI3OzFm3bfCC3b29PG23IJAXT diEA== X-Forwarded-Encrypted: i=1; AJvYcCULgvWBzgzK8+rp9S9+6Mje/513N9vvl88e4UirZvuewbXHNNDPHqzWMTzhhhGzQ2d6WHhc7MUqUe0S6517eIRfbEm0XrI9tW9Ujl9h X-Gm-Message-State: AOJu0Yyn2w3FvJ7xViz8WtF/OiehT1gGWYdBN+YNHZvZMTnEI4v/mqMi +M5c1aeN9XIyA1IYi97HtaKrc7tfw16vvScO/WTp4IBH8BR+YG9/dC+lXi3vwOU= X-Google-Smtp-Source: AGHT+IEB1qfIIkAEbIEcPEEgKpvjsK/gwklipRfgBKtNp6pSHRtCu9iLJZf0fYv5sQNz+N8Z4iTFNA== X-Received: by 2002:a05:600c:3b07:b0:429:994:41a2 with SMTP id 5b1f17b1804b1-429d47f19f2mr27005205e9.7.1723555494826; Tue, 13 Aug 2024 06:24:54 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c738d21sm223186625e9.12.2024.08.13.06.24.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 06:24:54 -0700 (PDT) From: James Clark To: irogers@google.com, linux-perf-users@vger.kernel.org Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , Yang Jihong , Ze Gao , Dominique Martinet , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/7] perf stat: Initialize instead of overwriting clock event Date: Tue, 13 Aug 2024 14:23:09 +0100 Message-Id: <20240813132323.98728-2-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813132323.98728-1-james.clark@linaro.org> References: <20240813132323.98728-1-james.clark@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This overwrite relies on the clock event remaining at index 0 and is quite a way down from where the array is initialized, making it easy to miss. Just initialize it with the correct clock event to begin with. Signed-off-by: James Clark --- tools/perf/builtin-stat.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 1f92445f7480..a65f58f8783f 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1817,7 +1817,9 @@ static int add_default_attributes(void) { struct perf_event_attr default_attrs0[] =3D { =20 - { .type =3D PERF_TYPE_SOFTWARE, .config =3D PERF_COUNT_SW_TASK_CLOCK }, + { .type =3D PERF_TYPE_SOFTWARE, .config =3D target__has_cpu(&target) ? + PERF_COUNT_SW_CPU_CLOCK : + PERF_COUNT_SW_TASK_CLOCK }, { .type =3D PERF_TYPE_SOFTWARE, .config =3D PERF_COUNT_SW_CONTEXT_SWITCH= ES }, { .type =3D PERF_TYPE_SOFTWARE, .config =3D PERF_COUNT_SW_CPU_MIGRATIONS= }, { .type =3D PERF_TYPE_SOFTWARE, .config =3D PERF_COUNT_SW_PAGE_FAULTS }, @@ -2030,9 +2032,6 @@ static int add_default_attributes(void) =20 if (!evsel_list->core.nr_entries) { /* No events so add defaults. */ - if (target__has_cpu(&target)) - default_attrs0[0].config =3D PERF_COUNT_SW_CPU_CLOCK; - if (evlist__add_default_attrs(evsel_list, default_attrs0) < 0) return -1; if (perf_pmus__have_event("cpu", "stalled-cycles-frontend")) { --=20 2.34.1 From nobody Sun Feb 8 08:19:34 2026 Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 E09F219B5BC for ; Tue, 13 Aug 2024 13:25:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.46 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555506; cv=none; b=hYmBTqygxWLlXDN8eyBJeAKDf5BpqBDR5LGH9nXJzGBKzmS3gdM9dRxgzRipZIDnU06x3LZsMmS/xkaLG9aGC6Cq/hlwMvvxWwbsE6WjNhzO2NH8/sLqeyzQIWRGfmgDDQA0X3vR6Iy8mQLc9iooV9/afsW4c0ycNcStBp7062s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555506; c=relaxed/simple; bh=sk8jQ7TSnFQUuaoZblpBoM3GuHBThM7t2sSndxy08T0=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qvF8LfR8Nj2wzewxkkE0LPRHLzMtHoTywdGVr9KryEnBKxUHR9/UyRVbBd/A/rWxMrgvaC6ucIHo7oqW7XubUOGZU3FK5Zbj/qeL0Ys3pMRYeQXQbV60r+LrPJoXSp71V6refaFZenT3YVr9AIk46dNKq0YUiV/E/upo8TQ06QM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=RUKI/Rn3; arc=none smtp.client-ip=209.85.128.46 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="RUKI/Rn3" Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-428e3129851so40531605e9.3 for ; Tue, 13 Aug 2024 06:25:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723555503; x=1724160303; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5mUMDC/pIRcRlMc7URQ4bqWH4ou9rkjeyAIxTsLOjwA=; b=RUKI/Rn3O4aURT2ShtYQQ3jKAjOHq7BLf+P96vQgA0LDWT/losfWZfRg9MRLToZT6c UN7OV/7sOVKEF0DqW1WcpEdwNzrM0DrQ1gCby+T4x7nO1R9jLmU/XaqZH10Psp+pgnoU mvYcvLv0vO84sOdFxItRg1FsjhEf7zp7AcEQZvUkRDq9kxSR7dbOoKVHY2P+x4zNiI0Z vUQt2wmfGa8EvhMSw8zgA5oqpORUHE8Pjq91+02pHGiOe+X/l7fHaCSL1EEczig/68Yi /QJAclLe0xkdt6gi0jrvAGdwlIiBecprBLur/5h7sNWs14aDisMHME/GT4dDC8EvNmOD /tLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723555503; x=1724160303; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5mUMDC/pIRcRlMc7URQ4bqWH4ou9rkjeyAIxTsLOjwA=; b=D14zNQTgRZaWAg06JdOmfT0D9G1E7PK9HAZSz83guznOx7y1bbePUpzH+tbeojX0Td QAysez2sW2UFgmDY3F6VI4QM3eLwKVaJI2/JMqLG75vkagBOTAfYi7p3SrAOANJfUF3B PSArr5efNsdfDkc7iqc3XxSpp9w49GYTnLfNC+wcfZWF41VQc2i8WXWSx8Jt9yzGyysh oVmuJUOuBJKhIxK2tKYv57KKpwRK5onKTvM7timbIHLibTC1ZvV5CHGmUmmXkoqNYI8N eC7cAiUdAHJO3VDg9JcN23OZ+5Eznlb0UNOOZ+a2mDcr/lYSaIXSq3t+4pYRem6jDPpK XSAQ== X-Forwarded-Encrypted: i=1; AJvYcCXU+Y1O59Ga7WL7kxpr/LXx12ks+TmiSXp+puMznIlQlv6ifnUnWZzksi4dHJgHDg4HlvXeirh2IIkjthnUPFK0poS7dnWYrJLGH0wB X-Gm-Message-State: AOJu0YxKDQHyC/ozBj2QymsuInHCh3SOIZf+ihEg+mf57hgUmNTisggY v39BLIeMmudWtEywGtFoa9aMph+dchEZBTSRzLd78uHq9ucgJy+92rjFCv8m7/Y= X-Google-Smtp-Source: AGHT+IGw1QWxHLTWtfvThNKdG+ceHa5O84W33fyasp2TM4dbvhwsCi+UKFDYqmXqt/QG5hQn4Fsr4g== X-Received: by 2002:a05:600c:1d2a:b0:426:6388:d59f with SMTP id 5b1f17b1804b1-429d47f4ac1mr26464035e9.1.1723555503354; Tue, 13 Aug 2024 06:25:03 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c738d21sm223186625e9.12.2024.08.13.06.25.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 06:25:02 -0700 (PDT) From: James Clark To: irogers@google.com, linux-perf-users@vger.kernel.org Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , Yang Jihong , Ze Gao , Dominique Martinet , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/7] perf stat: Remove unused default_null_attrs Date: Tue, 13 Aug 2024 14:23:10 +0100 Message-Id: <20240813132323.98728-3-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813132323.98728-1-james.clark@linaro.org> References: <20240813132323.98728-1-james.clark@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" All current implementations of arch_evlist__add_default_attrs() do nothing if nr_attrs is 0. To avoid confusion that it's used, remove it. It appears that it used to be used as a mechanism to add topdown events, but this is now done separately. Signed-off-by: James Clark --- tools/perf/builtin-stat.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index a65f58f8783f..cf6a1923811b 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c @@ -1930,7 +1930,6 @@ static int add_default_attributes(void) (PERF_COUNT_HW_CACHE_RESULT_MISS << 16) }, }; =20 - struct perf_event_attr default_null_attrs[] =3D {}; const char *pmu =3D parse_events_option_args.pmu_filter ?: "all"; =20 /* Set attrs if no event is selected and !null_run: */ @@ -2072,10 +2071,6 @@ static int add_default_attributes(void) evlist__splice_list_tail(evsel_list, &metric_evlist->core.entries); evlist__delete(metric_evlist); } - - /* Platform specific attrs */ - if (evlist__add_default_attrs(evsel_list, default_null_attrs) < 0) - return -1; } =20 /* Detailed events get appended to the event list: */ --=20 2.34.1 From nobody Sun Feb 8 08:19:34 2026 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (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 F2AAD19D06C for ; Tue, 13 Aug 2024 13:25:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555515; cv=none; b=kEslo0U61BfsNaKP7oqnN+PlclHjlEsk3iQsEYGu38QTk1RG14NlUj9a7DVNUpUPYGXo4xGNZgcWNmQmr5Ini/OV4CboluLSEq0PWAdHwcmReNvKKX66nspzlLK7uYVec9V+NctiRV6hRO0fkNgBSn068c9nOoMGQbxy9xSYd1c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555515; c=relaxed/simple; bh=nF1MOSoYSRJ7oZ2R65moIw4vTEWLXTn8O58Nzhs5eN8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZXDjSbW5TV5uNRkVbiHZJXvFW02H3nGaG//AYptrh2PAGrVWrZNYpagEIsVVjGrTLFrJ8vYULJaSeEJb2wG1qR/g+sVnZDgsH50LFJ15/PVV+5/l1FoT8bpMLFb3tfGbYCNVZQ7gGbHmg5aEaXdXh8RU77UnDJMy9z520ubB7oQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=pjJZbwKM; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="pjJZbwKM" Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-367ab76d5e1so2496529f8f.3 for ; Tue, 13 Aug 2024 06:25:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723555512; x=1724160312; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r+kJ+/NC06vZ9X8R6p8mtg0vV2q4/5EH3hEIt7Tb/aw=; b=pjJZbwKMNoDyTP4+7gtiY7N0bDdw3xIZR2RN5ZrMpSZYLLfwAjHZV4vT365WElK0kr ATV0qaErd2XLjyj68Zr9SAft4NLVBZA5ik8A5AgZL8rfcLlaVUPjMcoCekCBm2H6PhGP PsP14qGc+Qd4EC3WBLDW+wS2AjSvJtknPdTKp7lUz1IuH5Q38MVD5xzxg1ruBdeTr5BD LljbFEdHb+NKHG+T9Mf0XabRi+rAb7Y1EQ/ZbmxDSLgZUCZM3D4BNnH9uLoAfIvS+e8Z O91V22N17/2jnUsx28uNuvbqalcNbrTQ4GuD/nqxV55gCaD3cb5Y/vH7DDyw/+ka0v2p 4y3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723555512; x=1724160312; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r+kJ+/NC06vZ9X8R6p8mtg0vV2q4/5EH3hEIt7Tb/aw=; b=DUEtJqlDWWHLPePxdeV7gf7swxCmfn9dnOfsuAec13iJNF9gu9tpbItek9lBohAjup F4mcAGQuDukkotAqMnOy0uoSQD9kLHBp1rYK/qev/7CWCKsUllyX2gyatK56uX3OtBa6 rY5Hgykaz41lQwVljn4kPJBngmZBhtURrxEFkoiGlKWWYN49jzfbrauGPZDzCwPLuV6Z KrGuHhXcmGYcKcf1ATu66Jl1nxwjPJ6EtahfI6tbZbgFTn9OgoIHM3Jj0+KV8rkrDyI+ XUqct7MfhhgXeDys8z5b1oflR7JhorAU4x0RA3CVtvqkh1wEI7bRNnGYIfDu8pFoaceR xH9w== X-Forwarded-Encrypted: i=1; AJvYcCVw7F4/3/PsQ6VVDFB5JdXSXx6Y+Tg+q+qaLEHfJwAwZeiXnPP1G2l86lrP9gdVCNyRDin3F05icbff6yI6k62X7yf+5UXgl1u2OfEP X-Gm-Message-State: AOJu0Yz0/UQkyoD42/Q2Y+c18HLXNPQ48wEABGRK7SMXI435P3yrfwjm OHg48M9itIjLy9UYKC9hhT9gO2aGdT4Ovnf4DH00omI8rs82XAv/8QwZcAC62II= X-Google-Smtp-Source: AGHT+IGjXdWWrJsG8ue7FAAFzotqCer/0Jr9WoBguXbU5v52cPPA7AkQerMal8MjToQlhspx2O6d6Q== X-Received: by 2002:adf:8b1e:0:b0:367:992f:4ac4 with SMTP id ffacd0b85a97d-3716cc542a0mr2499815f8f.0.1723555511781; Tue, 13 Aug 2024 06:25:11 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c738d21sm223186625e9.12.2024.08.13.06.25.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 06:25:11 -0700 (PDT) From: James Clark To: irogers@google.com, linux-perf-users@vger.kernel.org Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , Dominique Martinet , Yang Jihong , Ze Gao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/7] perf evsel: Use the same arch_evsel__hw_name() on arm64 as x86 Date: Tue, 13 Aug 2024 14:23:11 +0100 Message-Id: <20240813132323.98728-4-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813132323.98728-1-james.clark@linaro.org> References: <20240813132323.98728-1-james.clark@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Both of these platforms share the same extended type ID mechanism, so share the implementation of the evsel name lookup. Signed-off-by: James Clark --- tools/perf/arch/arm64/util/Build | 1 + tools/perf/arch/arm64/util/evsel.c | 7 +++++++ tools/perf/arch/x86/util/evsel.c | 17 +---------------- tools/perf/util/evsel.c | 24 ++++++++++++++++++++++++ tools/perf/util/evsel.h | 2 +- 5 files changed, 34 insertions(+), 17 deletions(-) create mode 100644 tools/perf/arch/arm64/util/evsel.c diff --git a/tools/perf/arch/arm64/util/Build b/tools/perf/arch/arm64/util/= Build index 343ef7589a77..45c77f747d54 100644 --- a/tools/perf/arch/arm64/util/Build +++ b/tools/perf/arch/arm64/util/Build @@ -1,3 +1,4 @@ +perf-util-y +=3D evsel.o perf-util-y +=3D header.o perf-util-y +=3D machine.o perf-util-y +=3D perf_regs.o diff --git a/tools/perf/arch/arm64/util/evsel.c b/tools/perf/arch/arm64/uti= l/evsel.c new file mode 100644 index 000000000000..6974f72ee37f --- /dev/null +++ b/tools/perf/arch/arm64/util/evsel.c @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 +#include "util/evsel.h" + +int arch_evsel__hw_name(struct evsel *evsel, char *bf, size_t size) +{ + return evsel__hw_name_ext_type_id(evsel, bf, size); +} diff --git a/tools/perf/arch/x86/util/evsel.c b/tools/perf/arch/x86/util/ev= sel.c index 090d0f371891..771b35fef61a 100644 --- a/tools/perf/arch/x86/util/evsel.c +++ b/tools/perf/arch/x86/util/evsel.c @@ -49,22 +49,7 @@ bool arch_evsel__must_be_in_group(const struct evsel *ev= sel) =20 int arch_evsel__hw_name(struct evsel *evsel, char *bf, size_t size) { - u64 event =3D evsel->core.attr.config & PERF_HW_EVENT_MASK; - u64 pmu =3D evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT; - const char *event_name; - - if (event < PERF_COUNT_HW_MAX && evsel__hw_names[event]) - event_name =3D evsel__hw_names[event]; - else - event_name =3D "unknown-hardware"; - - /* The PMU type is not required for the non-hybrid platform. */ - if (!pmu) - return scnprintf(bf, size, "%s", event_name); - - return scnprintf(bf, size, "%s/%s/", - evsel->pmu_name ? evsel->pmu_name : "cpu", - event_name); + return evsel__hw_name_ext_type_id(evsel, bf, size); } =20 static void ibs_l3miss_warn(void) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index bc603193c477..19f4d0e71733 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -584,6 +584,30 @@ int __weak arch_evsel__hw_name(struct evsel *evsel, ch= ar *bf, size_t size) return scnprintf(bf, size, "%s", __evsel__hw_name(evsel->core.attr.config= )); } =20 +/* + * Version of evsel__hw_name() used on platforms where perf_pmus__supports= _extended_type() + * may be true and the type needs to be extracted and masked. + */ +int evsel__hw_name_ext_type_id(struct evsel *evsel, char *bf, size_t size) +{ + u64 event =3D evsel->core.attr.config & PERF_HW_EVENT_MASK; + u64 pmu =3D evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT; + const char *event_name; + + if (event < PERF_COUNT_HW_MAX && evsel__hw_names[event]) + event_name =3D evsel__hw_names[event]; + else + event_name =3D "unknown-hardware"; + + /* The PMU type is not required for the non-hybrid platform. */ + if (!pmu) + return scnprintf(bf, size, "%s", event_name); + + return scnprintf(bf, size, "%s/%s/", + evsel->pmu_name ? evsel->pmu_name : "cpu", + event_name); +} + static int evsel__hw_name(struct evsel *evsel, char *bf, size_t size) { int r =3D arch_evsel__hw_name(evsel, bf, size); diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h index 80b5f6dd868e..f95fc2919462 100644 --- a/tools/perf/util/evsel.h +++ b/tools/perf/util/evsel.h @@ -299,7 +299,7 @@ extern const char *const evsel__sw_names[PERF_COUNT_SW_= MAX]; extern char *evsel__bpf_counter_events; bool evsel__match_bpf_counter_events(const char *name); int arch_evsel__hw_name(struct evsel *evsel, char *bf, size_t size); - +int evsel__hw_name_ext_type_id(struct evsel *evsel, char *bf, size_t size); int __evsel__hw_cache_type_op_res_name(u8 type, u8 op, u8 result, char *bf= , size_t size); const char *evsel__name(struct evsel *evsel); bool evsel__name_is(struct evsel *evsel, const char *name); --=20 2.34.1 From nobody Sun Feb 8 08:19:34 2026 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 EE80919CD01 for ; Tue, 13 Aug 2024 13:25:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555523; cv=none; b=Le2Zw9ct9J5GRCrDaPe0nCBFJZeVVB9Ko2ejA/FVnWIFGUH66Cd2IzNxqbduLBhtE3W53OAc8VmZS80eV9pxYFWNLAtdA30MYiLswL/7Vtp15Wn+DV9/FPd08W3RxrHJkAcxSfdUDwAneW6SiAo6yuAZ53sRcfetey2OITEL/oo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555523; c=relaxed/simple; bh=IC7oNtwGUsqvqbC9/FQ9oTqKSh9dIXp8Un6RDjHG7os=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=BBrRCJ1dPPfjNm83R82DMVz/qEi+dBpc24IrJG8D1BzQC0H1nEEw4m4JUGsRvtlkYQnT+XRsAYqRFwrB99X2LtDbnJdS+bJvZlb7is/zYuqxYI116hsP2s7MM9Lkwf7Kr4Suv5s7s4ys0WkwHb1+nOynnE0oBnf9dRBH9W3Id+o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=mYby9Qpk; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mYby9Qpk" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-42808071810so41616355e9.1 for ; Tue, 13 Aug 2024 06:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723555520; x=1724160320; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zR7iuyHffj9f//oCwmpY+WujZl20YxAEXMdQ/mInORg=; b=mYby9QpkdlCVbT27IIehhm5b2994znQvpNqq7ceWWXLIRq/NEp4XONMrv1n0TAZzKN am8PHLSIn6kzrR7mfLsE1Pk6wcdHwA0zliJSc5GnmzROyc2GnRvuX1Jaoo+TpPamKFiu reDaTHKpPrYvN84QoRKlyEtsE6fz0SahGFXdM8XqTPdvCcaPnzg9PTwQq5jV9NZgbK/D eiC5XLmZpc481LSMw3TBwgnwWPrvCVEmSlKj56eRhVEEB/4OXFZ4spPx2bm2WD9fihaP SSNrwIceOGAsI9jQBuWiLC0zzV02Nm09s/Wd6EzxTi+sWSVntf+dF/9fXmM6Rv+YBH9U lmQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723555520; x=1724160320; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zR7iuyHffj9f//oCwmpY+WujZl20YxAEXMdQ/mInORg=; b=ccYx9ri1p8tqRHDlsH2n1G6qi8P3EOwhNKcm02F0S1IkmTyZZ/LBjVLAsbykSWB9uF UII8YsBqEfuQYS10hevJqDuKLDKmfLkF7QynBWp+g1SGaX5BSwTWYPVGVLAmNnw7oM6l V9RpM7rXNDJjcC0W8cctjBlV4Bw52+4oH4sYBSiwrNGhVenTW2XAbLFx7vNTojot/dAT fuqF0JJvyitwaZV26H5+5tZoCGQlYuLdbHrIegXJMb2vlwIWai4jPS4Bbn2zE9+em5ah 0C1OZldApUiGvjnvnlSvcaO54jRO8obfhWo213meFReuEOQ5FWAirwADZCOpcuU2+c2z yxJg== X-Forwarded-Encrypted: i=1; AJvYcCX1hFhm8S+0Zzc3R7iTXJ7d29JoN8M3nt7Wpz3cNgdWC/zxcVq0AE79TmTqz2BFy0pTj3gZoO1fRldAZ0FYnNGu0CtFJR2USdTx5UAq X-Gm-Message-State: AOJu0Yz8BTJMb8SKZP5gjKSiM3zWc6hUfGVsoGyslChH6jafPscKmZ2n ExCChkNTfLKS2kBvfpELQztbbaKFoYGFv1XkhLbSdSvNZQJ/j2hKj6ZzNDwWVds= X-Google-Smtp-Source: AGHT+IE4O1HeOB7Ir8sD2A/JqXloTOsBz328BQAjDg9uiSlJQr+ktC91pK7XIkyLaypNjbj27p76ag== X-Received: by 2002:a05:600c:548b:b0:427:ff3b:7a20 with SMTP id 5b1f17b1804b1-429d486fea7mr30226825e9.27.1723555520303; Tue, 13 Aug 2024 06:25:20 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c738d21sm223186625e9.12.2024.08.13.06.25.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 06:25:20 -0700 (PDT) From: James Clark To: irogers@google.com, linux-perf-users@vger.kernel.org Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , Yang Jihong , Ze Gao , Dominique Martinet , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 4/7] perf evsel: Remove duplicated __evsel__hw_name() code Date: Tue, 13 Aug 2024 14:23:12 +0100 Message-Id: <20240813132323.98728-5-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813132323.98728-1-james.clark@linaro.org> References: <20240813132323.98728-1-james.clark@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" __evsel__hw_name() does the same thing so use it instead. Signed-off-by: James Clark --- tools/perf/util/evsel.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index 19f4d0e71733..ba960a39f104 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -592,12 +592,7 @@ int evsel__hw_name_ext_type_id(struct evsel *evsel, ch= ar *bf, size_t size) { u64 event =3D evsel->core.attr.config & PERF_HW_EVENT_MASK; u64 pmu =3D evsel->core.attr.config >> PERF_PMU_TYPE_SHIFT; - const char *event_name; - - if (event < PERF_COUNT_HW_MAX && evsel__hw_names[event]) - event_name =3D evsel__hw_names[event]; - else - event_name =3D "unknown-hardware"; + const char *event_name =3D __evsel__hw_name(event); =20 /* The PMU type is not required for the non-hybrid platform. */ if (!pmu) --=20 2.34.1 From nobody Sun Feb 8 08:19:34 2026 Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 8BDDA19B3E3 for ; Tue, 13 Aug 2024 13:25:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555533; cv=none; b=m1QDYU7DNPMpjnkXGK17pETeNMv4oI16cHj49/xNsKiOghRYQry6k4FPPnhMdhM7W5ONNuIdGoMvKRx/+ELd8nwUw2f65c1BfRjIU6dis9w8jRFhWiWj6kj7oa0hx3WdukPvNrnRcULKUcpFsErpsl+nDfUPzLNwUtOdHjKcQJQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555533; c=relaxed/simple; bh=u+E8ctwMhqOhWA0QdLQIlIzYAq6iAtE1bX/6M6IObcI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qaXhyj4K+8F0kv1SJaeqUaKR0LGbSXRiIOLdsjKufUcjN5UPppCKWEkZlS4xa2Xnq7d68R37BZI+Gb419BFI91kNH934Zi7jxswmESdzcNRWI+UcOr3D0QEPYamzXOjmW7WqcdfNWNIXe/CaElwGMlZKplucIy/FmSBG3PTxib4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=mmIPvP0U; arc=none smtp.client-ip=209.85.128.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="mmIPvP0U" Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-428e3129851so40535635e9.3 for ; Tue, 13 Aug 2024 06:25:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723555529; x=1724160329; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YJPiTzck/wj4Bl8bp1dFvT+bnyHvEgyjm9lLc0sAxDQ=; b=mmIPvP0UvIzGTe+PIB4y0UDelO8Vri1mEBGtWSORkOybGD3rzX/JBjAX207/xTs2Y2 8jCQsrSlJn0svUFAaRQNrU3TwSm+2ZckbK4bgLJDOIBW5TM12whPBUrtsy7xzdH7rXRb Iu8bf6JNTL6QHS6qJGdYbjdpooucdExD9+luuGl6+/ap4m5WzFmLwue8CLT5TsdRaxjP PeuDpy7PXMFcqyzL9vX8vMvQGDFaphoYg3lhg5vIBaMQFMTCkLV0S0eOCzJQOmMt9eDl GH8AHBMtIYS3UbdNbGtQvq7sMQJi26Bm8QWAImO7Gz6l/jm9dB4xC8ys94bMqsv7Aqgy /qSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723555529; x=1724160329; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YJPiTzck/wj4Bl8bp1dFvT+bnyHvEgyjm9lLc0sAxDQ=; b=ncno8dsth5mWAT0Fn7EK4MDeZ3lc+ukUc20ZgWjx3GpXwG9GNUW/S2EVMcKmD4RfJk 0Pnv/9Xj6kU1MfyEiPLNZabMkZyaV+VUMfsyYeo8oxsLAadqOcfIIn5iN+1jKoocqvES 0a7fGuG+5RxIHwNstUDJZ/XOKv6i+Ai1BimYuZi+erKOZ0jH9HFQdEYOjUZ87p8/sYI+ KT/ht87ePCwTXPpB4JoNuln8xh73ROiaD0oT8goYrFgq33fvd9FuT+IyUSXXP9cmxAJl AwG1uLYLX+eAjoYvur4kiiwXHLR5U7jUXWRjSlDViXGr5j59Bid7Chuc/7GQ+SR4QGX5 UUpA== X-Forwarded-Encrypted: i=1; AJvYcCXCvE4PsfqA2SApIS3/2x2X31xMZVPh56jTkm2ga0GiZR2u452TR/VEafE5oSlKksIBT5LBBAPVeoiz9gkpgLJjFQnYEYhnzkjCaqJA X-Gm-Message-State: AOJu0Yxm7DpTvJM9pxurQHhMv608al/9Tfkgvt6Ls/epDge7CUDscpwO +Wc/5gz5zBckyC9lRQ0MRzm3If2vRi/ZFp5eghIFHFLcr4ENMsYexCd7ZZqKHa4= X-Google-Smtp-Source: AGHT+IGpUiL8HI1I4dgUEXAngk1hqDYSTUpCg0rDVeIRHKgEB9vHTQ+oOqXVgzYYIWv7xtQbj8/VkA== X-Received: by 2002:a05:600c:358c:b0:428:ea8e:b48a with SMTP id 5b1f17b1804b1-429d47f49fbmr28609085e9.8.1723555528866; Tue, 13 Aug 2024 06:25:28 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c738d21sm223186625e9.12.2024.08.13.06.25.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 06:25:28 -0700 (PDT) From: James Clark To: irogers@google.com, linux-perf-users@vger.kernel.org Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , Dominique Martinet , Yang Jihong , Ze Gao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/7] perf evlist: Use hybrid default attrs whenever extended type is supported Date: Tue, 13 Aug 2024 14:23:13 +0100 Message-Id: <20240813132323.98728-6-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813132323.98728-1-james.clark@linaro.org> References: <20240813132323.98728-1-james.clark@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" For x86, a hybrid version of ___evlist__add_default_attrs() was added to support default perf stat events. This can actually be used whenever perf_pmus__supports_extended_type() is true, which now makes default perf stat arguments work properly on Arm big.LITTLE: $ perf stat ... 3347093940 armv8_cortex_a53/cycles/ # 0.563 GHz (98.99%) 3295523067 armv8_cortex_a57/cycles/ # 0.554 GHz (67.07%) ... Signed-off-by: James Clark --- tools/perf/arch/x86/util/evlist.c | 65 ------------------------------- tools/perf/util/evlist.c | 65 +++++++++++++++++++++++++++---- tools/perf/util/evlist.h | 6 +-- 3 files changed, 59 insertions(+), 77 deletions(-) diff --git a/tools/perf/arch/x86/util/evlist.c b/tools/perf/arch/x86/util/e= vlist.c index b1ce0c52d88d..bbe6240c7f71 100644 --- a/tools/perf/arch/x86/util/evlist.c +++ b/tools/perf/arch/x86/util/evlist.c @@ -8,71 +8,6 @@ #include "topdown.h" #include "evsel.h" =20 -static int ___evlist__add_default_attrs(struct evlist *evlist, - struct perf_event_attr *attrs, - size_t nr_attrs) -{ - LIST_HEAD(head); - size_t i =3D 0; - - for (i =3D 0; i < nr_attrs; i++) - event_attr_init(attrs + i); - - if (perf_pmus__num_core_pmus() =3D=3D 1) - return evlist__add_attrs(evlist, attrs, nr_attrs); - - for (i =3D 0; i < nr_attrs; i++) { - struct perf_pmu *pmu =3D NULL; - - if (attrs[i].type =3D=3D PERF_TYPE_SOFTWARE) { - struct evsel *evsel =3D evsel__new(attrs + i); - - if (evsel =3D=3D NULL) - goto out_delete_partial_list; - list_add_tail(&evsel->core.node, &head); - continue; - } - - while ((pmu =3D perf_pmus__scan_core(pmu)) !=3D NULL) { - struct perf_cpu_map *cpus; - struct evsel *evsel; - - evsel =3D evsel__new(attrs + i); - if (evsel =3D=3D NULL) - goto out_delete_partial_list; - evsel->core.attr.config |=3D (__u64)pmu->type << PERF_PMU_TYPE_SHIFT; - cpus =3D perf_cpu_map__get(pmu->cpus); - evsel->core.cpus =3D cpus; - evsel->core.own_cpus =3D perf_cpu_map__get(cpus); - evsel->pmu_name =3D strdup(pmu->name); - list_add_tail(&evsel->core.node, &head); - } - } - - evlist__splice_list_tail(evlist, &head); - - return 0; - -out_delete_partial_list: - { - struct evsel *evsel, *n; - - __evlist__for_each_entry_safe(&head, n, evsel) - evsel__delete(evsel); - } - return -1; -} - -int arch_evlist__add_default_attrs(struct evlist *evlist, - struct perf_event_attr *attrs, - size_t nr_attrs) -{ - if (!nr_attrs) - return 0; - - return ___evlist__add_default_attrs(evlist, attrs, nr_attrs); -} - int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs) { if (topdown_sys_has_perf_metrics() && diff --git a/tools/perf/util/evlist.c b/tools/perf/util/evlist.c index 1417f9a23083..e0c31399beb6 100644 --- a/tools/perf/util/evlist.c +++ b/tools/perf/util/evlist.c @@ -5,6 +5,7 @@ * Parts came from builtin-{top,stat,record}.c, see those files for further * copyright notes. */ +#include "pmus.h" #include #include #include @@ -338,24 +339,74 @@ int evlist__add_attrs(struct evlist *evlist, struct p= erf_event_attr *attrs, size return -1; } =20 -int __evlist__add_default_attrs(struct evlist *evlist, struct perf_event_a= ttr *attrs, size_t nr_attrs) + +static int __evlist__add_default_attrs_ext_type(struct evlist *evlist, + struct perf_event_attr *attrs, + size_t nr_attrs) { - size_t i; + LIST_HEAD(head); + size_t i =3D 0; =20 for (i =3D 0; i < nr_attrs; i++) event_attr_init(attrs + i); =20 - return evlist__add_attrs(evlist, attrs, nr_attrs); + for (i =3D 0; i < nr_attrs; i++) { + struct perf_pmu *pmu =3D NULL; + + if (attrs[i].type =3D=3D PERF_TYPE_SOFTWARE) { + struct evsel *evsel =3D evsel__new(attrs + i); + + if (evsel =3D=3D NULL) + goto out_delete_partial_list; + list_add_tail(&evsel->core.node, &head); + continue; + } + + while ((pmu =3D perf_pmus__scan_core(pmu)) !=3D NULL) { + struct perf_cpu_map *cpus; + struct evsel *evsel; + + evsel =3D evsel__new(attrs + i); + if (evsel =3D=3D NULL) + goto out_delete_partial_list; + evsel->core.attr.config |=3D (__u64)pmu->type << PERF_PMU_TYPE_SHIFT; + cpus =3D perf_cpu_map__get(pmu->cpus); + evsel->core.cpus =3D cpus; + evsel->core.own_cpus =3D perf_cpu_map__get(cpus); + evsel->pmu_name =3D strdup(pmu->name); + list_add_tail(&evsel->core.node, &head); + } + } + + evlist__splice_list_tail(evlist, &head); + + return 0; + +out_delete_partial_list: + { + struct evsel *evsel, *n; + + __evlist__for_each_entry_safe(&head, n, evsel) + evsel__delete(evsel); + } + return -1; } =20 -__weak int arch_evlist__add_default_attrs(struct evlist *evlist, - struct perf_event_attr *attrs, - size_t nr_attrs) +int __evlist__add_default_attrs(struct evlist *evlist, struct perf_event_a= ttr *attrs, + size_t nr_attrs) { + size_t i; + if (!nr_attrs) return 0; =20 - return __evlist__add_default_attrs(evlist, attrs, nr_attrs); + if (perf_pmus__supports_extended_type()) + return __evlist__add_default_attrs_ext_type(evlist, attrs, nr_attrs); + + for (i =3D 0; i < nr_attrs; i++) + event_attr_init(attrs + i); + + return evlist__add_attrs(evlist, attrs, nr_attrs); } =20 struct evsel *evlist__find_tracepoint_by_id(struct evlist *evlist, int id) diff --git a/tools/perf/util/evlist.h b/tools/perf/util/evlist.h index cccc34da5a02..06d1eeacc0d1 100644 --- a/tools/perf/util/evlist.h +++ b/tools/perf/util/evlist.h @@ -106,12 +106,8 @@ int evlist__add_attrs(struct evlist *evlist, struct pe= rf_event_attr *attrs, size int __evlist__add_default_attrs(struct evlist *evlist, struct perf_event_attr *attrs, size_t nr_attrs); =20 -int arch_evlist__add_default_attrs(struct evlist *evlist, - struct perf_event_attr *attrs, - size_t nr_attrs); - #define evlist__add_default_attrs(evlist, array) \ - arch_evlist__add_default_attrs(evlist, array, ARRAY_SIZE(array)) + __evlist__add_default_attrs(evlist, array, ARRAY_SIZE(array)) =20 int arch_evlist__cmp(const struct evsel *lhs, const struct evsel *rhs); =20 --=20 2.34.1 From nobody Sun Feb 8 08:19:34 2026 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) (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 2417819B5B4 for ; Tue, 13 Aug 2024 13:25:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555540; cv=none; b=K341yZUVUcAnsW0Lj91W7iovyRVNAw6Cc9+OXmb2nRc3Yw60QvfeYMaQ8Bu621ho9uJ2QkrJb6Gw/TnfscdbCKVM2TBMhJEyPgEn9PIr0EciDr5OEhL+L8M7ymY6lpQEMEQHliSNqWXXqu23ZZho0SFojPvxr7EHh84oHZgt5QM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555540; c=relaxed/simple; bh=TCmY5/W8UjZo5v+UmsAxTLf+W/oV6ui66khMLptw/MU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=VzxjDCqvCK7nYFBeKJH8qyfm97IslP+Tt0vbxztRPfCE/MupdMrqngfISUs7yAD5jdbC2ksYXbCbkyvtdnMcMtkT3Pz5Lj5C0MTZezzhXkjJ/boMB02ipurMhh7lia0if/jYw0CtvDmpnCuy0oiHcAWt/RUNhjccKsD7w/gaLPI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SyEubhuE; arc=none smtp.client-ip=209.85.128.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SyEubhuE" Received: by mail-wm1-f48.google.com with SMTP id 5b1f17b1804b1-428fb103724so36911095e9.1 for ; Tue, 13 Aug 2024 06:25:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723555537; x=1724160337; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=FXow/HXS2t6eZsIhNK0KrvK5I+CXmczupsEF4/wQsaM=; b=SyEubhuEKik3hYXSQIEkZ30iK4uJjqe3fZfSo4RIn9Iz8Hz7w7TDuqAiDazlwSIVbV 4gNAe4IJAdnPNivrWzM8C7i3vRuibrUMXnIcjCN6bQcozqS2O8gnMTcRCXATEfg1hC/V r5bfi62NgxifckMKRxv4d2MiPzZQRylFom2MJWXoMVIJrfv+7DoGHdWmBTsj3/zzPveG fWIxyQJGy+cp+XcLMVkGL3iSHTrtMewDIJhoC4vJi0/UJuwFA7PAwapcnEQUwE+dHbAT g+whSboAI6dGGva1UYlI3rvZqmFjJfdr6+xR7wjYtRzeUJNYLUo9bTO9FUJYo7Jxa6RR M5vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723555537; x=1724160337; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FXow/HXS2t6eZsIhNK0KrvK5I+CXmczupsEF4/wQsaM=; b=Gs52EXzS4A4fzb12nXfIAtb/bnAEBncG+EOzzpy4QDlfgqY0I7Od4IquxYc3fDf6uM CiQ91hc5rLavFCYV+EJrM12soqfEBLyb8pMd9ioOF7WfIZ6RbOEzoNT1kVO5lzVLo5B8 9sl/vJwBPI4B9SrY4jl/y/pakaCjUzb5MaRrIaKJGOA/fStsvCs5GY1HspXOzmGN/2Py tbHnRtO2Vj5yIKAEX1Zq10TvzQ6uEjS0l1fV5uDM+gMOqCYmdnc1DbEjXHYCthNqkRfQ Q9hi7T96DyGxfEfSbe+v/m1qr8tjPeDyQ3g+e3XVz58oR9KWmN3Mw1olAbO/dBAtqP5Q ZwzQ== X-Forwarded-Encrypted: i=1; AJvYcCVMO9lHjLwn8Z7VqjyrLSg1pbssWCXlBQ3ZBMVVWJ3l+z1oUZd9phjK2N3isr/Mf8yKF1brMp3OjyyG3IV2Z9D60sH1t0w+qsrWKDV9 X-Gm-Message-State: AOJu0YzCGyu+CHdJb2ntf4y0aWh51sRTYPKMpILtdfmkxlh/+2I4zajO QQbb640QFJzQZ/hqjLDByx0tvyAJ+I++518YJv/BfvIJNKQKaJ/QHae8fDvccpA= X-Google-Smtp-Source: AGHT+IGc9t+MTAwYwGAaBX95OSnKFftghFZ3NfLAkZ7AAvwA9zVwqXl0BELY2LWwoeQ2oa+XAXA1ag== X-Received: by 2002:a05:600c:3550:b0:424:a401:f012 with SMTP id 5b1f17b1804b1-429d6269733mr21164045e9.3.1723555537440; Tue, 13 Aug 2024 06:25:37 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c738d21sm223186625e9.12.2024.08.13.06.25.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 06:25:36 -0700 (PDT) From: James Clark To: irogers@google.com, linux-perf-users@vger.kernel.org Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , Yang Jihong , Dominique Martinet , Ze Gao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 6/7] perf test: Make stat test work on DT devices Date: Tue, 13 Aug 2024 14:23:14 +0100 Message-Id: <20240813132323.98728-7-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813132323.98728-1-james.clark@linaro.org> References: <20240813132323.98728-1-james.clark@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" PMUs aren't listed in /sys/devices/ on DT devices, so change the search directory to /sys/bus/event_source/devices which works everywhere. Also add armv8_cortex_* as a known PMU type to search for to make the test run on more devices. Signed-off-by: James Clark --- tools/perf/tests/shell/stat.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/perf/tests/shell/stat.sh b/tools/perf/tests/shell/stat.sh index 3f1e67795490..525d0c44fdc6 100755 --- a/tools/perf/tests/shell/stat.sh +++ b/tools/perf/tests/shell/stat.sh @@ -117,16 +117,18 @@ test_cputype() { =20 # Find a known PMU for cputype. pmu=3D"" - for i in cpu cpu_atom armv8_pmuv3_0 + devs=3D"/sys/bus/event_source/devices" + for i in $devs/cpu $devs/cpu_atom $devs/armv8_pmuv3_0 $devs/armv8_cortex= _* do - if test -d "/sys/devices/$i" + i_base=3D$(basename "$i") + if test -d "$i" then - pmu=3D"$i" + pmu=3D"$i_base" break fi - if perf stat -e "$i/instructions/" true > /dev/null 2>&1 + if perf stat -e "$i_base/instructions/" true > /dev/null 2>&1 then - pmu=3D"$i" + pmu=3D"$i_base" break fi done --=20 2.34.1 From nobody Sun Feb 8 08:19:34 2026 Received: from mail-lf1-f44.google.com (mail-lf1-f44.google.com [209.85.167.44]) (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 2C22B19B5BB for ; Tue, 13 Aug 2024 13:25:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.44 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555549; cv=none; b=E8bh5bsA1KvgyLhiJ/quo73YiyY/Xdun0od+uhKchrgbsOh2cOpXzFhif+iYZS0O2BlEhq6yhroO+MvVCtTVLmTLHP9oALF8a5onY51vyYo0ivfvE2TJkc5H3qU4C/rHkMaTWu+5amMxU/CqWSBill8KwiAO8XNiiDJ/xt4wA9A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723555549; c=relaxed/simple; bh=iGoL+HLhqexTWkJ+dZ/JHwY3v5/+1jHfueA9y1XMENI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=fRB9glKaO+Vw8j1PGkSRP82YVYbWnE4xsXCfev16L4Ej1BsMaVZf3uYAhmY8sTqzf/CQXwlBzC3K3m6DTa2FNQ/dnrJiE7ztA7bFQpViSb2+dITtX6CD73iXjchL3t9ok3XFxSuSvSclpY6PseoRkvQDqQDUaFK8ZJDLmJncWM8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=VacMwHr5; arc=none smtp.client-ip=209.85.167.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="VacMwHr5" Received: by mail-lf1-f44.google.com with SMTP id 2adb3069b0e04-5314c6dbaa5so4846782e87.2 for ; Tue, 13 Aug 2024 06:25:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1723555546; x=1724160346; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Vqh5EYvMFCPE5arJzUrVuYN8olqKoGJkP7ilX3wyAGI=; b=VacMwHr5yxVPr+U0smjT2svEZ0i/m5fxq0A+O4pdyImIjbn8dpW2gEGKYpoGQCq3uL 3WuOoYVm8yYckSGZmpqcR+1BfIm/M3M5qHNN9USHOZfkT/vDF/kRe+w6qzu9mcCp07XG Xr59FoESDgWF8Th/eOTFtOzs7mVxA7y9g6FvdswgaY4LoqRiIbEtxt8viO48cI77tc89 /iqIftiJfLGof4G6uFJKcYPzaRsliYjPAWYREwr7UxP9onv4Az7oL+qRx0T3mH0EhgdY O/N5bTtC6np+CppNWvBApLGBpsLKHlxJdBzqbx29gO3qZRl6Qn/BGiq0mkbOHb3LBGan eSQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723555546; x=1724160346; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Vqh5EYvMFCPE5arJzUrVuYN8olqKoGJkP7ilX3wyAGI=; b=UJ6dUezSGXlhMfr9BtEH/oaDOE+u0ujyZfITmPBi9aNDUFRz4GoPssj24boBIsegUv kjHtQa5JNpsjCBKwW0btOp+JqQISjiqV30NauUVJfMmLwVFFdqeU+aZc8MHdr55CfKvK DnimqYTn4fASjmsYWFhKitXK9EtvqzyGze10CxSKeYroVxtwdT9tAsvvWr07fxJn75Es CZ2Lnwz0B4lvApuBvBkxq1LL9Fvjp4sF4OzfUXuB+mysVm7+Tn7j/HNv4oxpj/RK9y+I oUaWJjssxdrnzjmfxmjF8L2/b0Qj2f7iJvS7/zWUGSqLkvHq007/onEAfjUuddCKab1s ZeTA== X-Forwarded-Encrypted: i=1; AJvYcCUczDHSo3pWVr5egy79WV/CUIeGCNObz114Ry1sJ95gxnAXZ+k/STB6VcUvEmo2XmeU9H0mN8LNFJ+kA7YerR7CkWEewpLa5azBVeFk X-Gm-Message-State: AOJu0YyE2lo6NbaffjrlGxjq52KJcDTXuLQGT1BKMXRlKsGtBn/sLwIo RygnBRuNTCHjcS8EhNWGB7xvEy+GkaO25cZsygN4F/v7YmyMMn780TAaST0ZAkI= X-Google-Smtp-Source: AGHT+IHMLVGDigrqektOOEcKtHUBUrZ0H1yBfl4W0aPOysz0l5q5wIN+XwIpSkq9sMLm2xPQfj7tKA== X-Received: by 2002:a05:6512:2348:b0:52c:e0e1:9ae3 with SMTP id 2adb3069b0e04-53213694527mr2503106e87.57.1723555546132; Tue, 13 Aug 2024 06:25:46 -0700 (PDT) Received: from localhost.localdomain ([89.47.253.130]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4290c738d21sm223186625e9.12.2024.08.13.06.25.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Aug 2024 06:25:45 -0700 (PDT) From: James Clark To: irogers@google.com, linux-perf-users@vger.kernel.org Cc: James Clark , John Garry , Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Adrian Hunter , "Liang, Kan" , Yang Jihong , Dominique Martinet , Ze Gao , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/7] perf test: Add a test for default perf stat command Date: Tue, 13 Aug 2024 14:23:15 +0100 Message-Id: <20240813132323.98728-8-james.clark@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240813132323.98728-1-james.clark@linaro.org> References: <20240813132323.98728-1-james.clark@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Test that one cycles event is opened for each core PMU when "perf stat" is run without arguments. Signed-off-by: James Clark --- tools/perf/tests/shell/stat.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tools/perf/tests/shell/stat.sh b/tools/perf/tests/shell/stat.sh index 525d0c44fdc6..7118cfc37f48 100755 --- a/tools/perf/tests/shell/stat.sh +++ b/tools/perf/tests/shell/stat.sh @@ -148,6 +148,26 @@ test_cputype() { echo "cputype test [Success]" } =20 +test_hybrid() { + # Test the default stat command on hybrid devices opens one cycles event= for + # each CPU type. + echo "hybrid test" + + # Count the number of core PMUs + pmus=3D$(ls /sys/bus/event_source/devices/*/cpus 2>/dev/null | wc -l) + + # Run default Perf stat + cycles_events=3D$(perf stat -- true 2>&1 | grep "cycles" | wc -l) + + if [ "$pmus" -ne "$cycles_events" ] + then + echo "hybrid test [Found $pmus PMUs but $cycles_events cycles events. = Failed]" + err=3D1 + return + fi + echo "hybrid test [Success]" +} + test_default_stat test_stat_record_report test_stat_record_script @@ -155,4 +175,5 @@ test_stat_repeat_weak_groups test_topdown_groups test_topdown_weak_groups test_cputype +test_hybrid exit $err --=20 2.34.1