From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 97EBDC433FE for ; Fri, 13 May 2022 14:28:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1380892AbiEMO2f (ORCPT ); Fri, 13 May 2022 10:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380911AbiEMO0P (ORCPT ); Fri, 13 May 2022 10:26:15 -0400 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB644506E3; Fri, 13 May 2022 07:25:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652451944; x=1683987944; h=message-id:date:mime-version:from:subject:to:cc: references:in-reply-to:content-transfer-encoding; bh=9MO4Cg9SWuQ3cY0TApzliKOPUlU3hZ6Zqzm0n1CSgmQ=; b=jH37YUvTNIG8JhrJm8Z5bHHrMhGG/C7fJaIw75GrtL1ASiVim3V4mbLn BpF3DnCuXgwuskJ4XhVD6zj1RW4Bc6NjJoKL5AN9hzatXhzBkOlKbx2an t4RT5HLnFqrb+23ZNBavV/3aUNrP4p7awv9z5ZXxkHOGvp1reY0WVBrDn oAaESy5EpiTfmvpDowcqWJKwgyplXT9ypGro8QKpZ0ihWDVxaTtQml3y5 +j5lDjEH68foidrwCH77ZL47L8NWWPYM/aostHFyyI7hLKZWb+SIH0MFt Uw30eyXx7PtXvSekBMEsB0FPitpZXNlXA7ZIYHDmlaNsObziLrW/jmB4V A==; X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="295575088" X-IronPort-AV: E=Sophos;i="5.91,223,1647327600"; d="scan'208";a="295575088" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2022 07:25:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,223,1647327600"; d="scan'208";a="659107033" Received: from linux.intel.com ([10.54.29.200]) by FMSMGA003.fm.intel.com with ESMTP; 13 May 2022 07:25:43 -0700 Received: from [10.252.212.211] (kliang2-MOBL.ccr.corp.intel.com [10.252.212.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id C7C4C580A88; Fri, 13 May 2022 07:25:40 -0700 (PDT) Message-ID: <8ba20985-8116-c7f7-a082-ec30152d9adb@linux.intel.com> Date: Fri, 13 May 2022 10:25:39 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 From: "Liang, Kan" Subject: Re: [PATCH v2 0/2] Fix topdown event weak grouping To: Ian Rogers , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Riccardo Mancini , Kim Phillips , Madhavan Srinivasan , Shunsuke Nakamura , Florian Fischer , Andi Kleen , John Garry , Zhengjun Xing , Adrian Hunter , James Clark , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Stephane Eranian References: <20220512061308.1152233-1-irogers@google.com> Content-Language: en-US In-Reply-To: <20220512061308.1152233-1-irogers@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/12/2022 2:13 AM, Ian Rogers wrote: > Keep topdown events within a group when a weak group is broken. This > is a requirement as topdown events must form a group. > > Add perf stat testing including for required topdown event group > behaviors. > > Note: as with existing topdown evsel/evlist code topdown events are > assumed to be on the PMU "cpu". On Alderlake the PMU "cpu_core" should > also be tested. Future changes can fix Alderlake. I will send a follow-up patch to fix the weak grouping for the hybrid platform shortly. For the non-hybrid platform, the patch set looks good to me. Reviewed-by: Kan Liang Thanks, Kan > > v2. Correct behavior wrt pmu prefixed events and avoid the test using > deprecated events: Suggested-by: Liang, Kan > > Ian Rogers (2): > perf evlist: Keep topdown counters in weak group > perf test: Add basic stat and topdown group test > > tools/perf/arch/x86/util/evsel.c | 12 ++++++ > tools/perf/tests/shell/stat.sh | 67 ++++++++++++++++++++++++++++++++ > tools/perf/util/evlist.c | 16 +++++++- > tools/perf/util/evsel.c | 10 +++++ > tools/perf/util/evsel.h | 3 ++ > 5 files changed, 106 insertions(+), 2 deletions(-) > create mode 100755 tools/perf/tests/shell/stat.sh >