Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1309064pxb; Fri, 20 Aug 2021 02:47:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRJjTqZLwMDw7SDjxlpG2aRYTJT+Tmo4AkcLra6kAq6ppB/uGAzsItwyRRXTkN/3TnFc+C X-Received: by 2002:a5d:8990:: with SMTP id m16mr15262509iol.170.1629452850853; Fri, 20 Aug 2021 02:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629452850; cv=none; d=google.com; s=arc-20160816; b=H5rWKNmm4EwZKqTSzLtO0+GJsDiarTbSFyUMQ2ltw5mrC7dzUofFBQiTqgxq0L5VkG nhSGpBx+Hbucv4Ylv/SGI0SBuWXIv5uLw4OnCeLIKjdGllG90sqy3gNqofjr1sBD3N1n EZBywj8TuNak3pKNt98sb9pwsHRd9hVdYkxrfmB0X+vpaX+RQrge1Iq7/iNe896guHTs KWkxf0cSIk1F7juRy/Nz2FLkJhWUde1+o9g7nGYeZvHAhJlwaj0o3gSRfPkebX7bmxDV JvruKs266j+94RwSOgYAAS9q8X40JWNyOR3OOEQIAr/QVjm//m1+wo16TSMr5QRyYH54 AqRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr; bh=xjy0ZRBn2iblgvusGZusGfpBuSDRvubUNl3e97MWaes=; b=0vsieqoNq3LqXWW41uoGbHin/gY6lgM1THGNmBP5thLY5auyg6BRNMZzKfxJH/K5xA fmkLmFCVwc51AnZCtCuT6DZ8ncFFWLSbgW5vxxXQ3h1nuOVRU9DYTaPRq+p73oav5Yu8 16wCacEIMXYHLp/g+c124dzJhSWKckcYs7WkgJ+U6OxQt3WhjHq0Di46JckZkhS79Z20 A2SvuI+7fVcNgVPZ6gvoeREFYJZyilJ4cHdoP/4CM2UiOUH2w4m0nDrVH+szvHy5s8ea zqFY6/bkNdgIGR0jq/JxId+PIu7fXiMv6qFFHkzt13YkzGNROb7LD7PUBiLaL99J4g28 BMKw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u15si5932982ilq.38.2021.08.20.02.47.19; Fri, 20 Aug 2021 02:47:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=fujitsu.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235321AbhHTJrP (ORCPT + 99 others); Fri, 20 Aug 2021 05:47:15 -0400 Received: from esa11.hc1455-7.c3s2.iphmx.com ([207.54.90.137]:42166 "EHLO esa11.hc1455-7.c3s2.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233976AbhHTJrO (ORCPT ); Fri, 20 Aug 2021 05:47:14 -0400 X-Greylist: delayed 432 seconds by postgrey-1.27 at vger.kernel.org; Fri, 20 Aug 2021 05:47:14 EDT IronPort-SDR: RhdEdyIZlXyuYQWLSfP62ScafB1uoVSpFMFmpphdkSU29FqHOOqutpUiihWlKRrK3Ihs7KWeya UMQwQ1VnSg7wJDVTw632x5xIoetFZIXB4o7qFgoVRiW2zBwz/zwR6k76niIJpSAxM/Kf69UewQ IFuCiuCS+VXVaD5lvA4EA5oN4k+SHjBAotvFDC7lOjmY7IGBJ5ZchBU8TFVLeAfZ0Y6IGprtD2 IcPmCiy6JhlS2f2UDDTeIsr0yO1zeVnTcSRA76yZ5+7sw4NnsBBdeEzzaJBfMGcgIl3UJcpeC3 hVHy2oZn/T2WR/iOCohHymyN X-IronPort-AV: E=McAfee;i="6200,9189,10081"; a="20706131" X-IronPort-AV: E=Sophos;i="5.84,337,1620658800"; d="scan'208";a="20706131" Received: from unknown (HELO oym-r3.gw.nic.fujitsu.com) ([210.162.30.91]) by esa11.hc1455-7.c3s2.iphmx.com with ESMTP; 20 Aug 2021 18:39:20 +0900 Received: from oym-m1.gw.nic.fujitsu.com (oym-nat-oym-m1.gw.nic.fujitsu.com [192.168.87.58]) by oym-r3.gw.nic.fujitsu.com (Postfix) with ESMTP id 94BB11FB38E; Fri, 20 Aug 2021 18:39:19 +0900 (JST) Received: from oym-om1.fujitsu.com (oym-om1.o.css.fujitsu.com [10.85.58.161]) by oym-m1.gw.nic.fujitsu.com (Postfix) with ESMTP id D574CC522F; Fri, 20 Aug 2021 18:39:18 +0900 (JST) Received: from pumpkin.openstacklocal (pumpkin.fct.css.fujitsu.com [10.130.70.189]) by oym-om1.fujitsu.com (Postfix) with ESMTP id 8B78B4011E7FF; Fri, 20 Aug 2021 18:39:18 +0900 (JST) From: Shunsuke Nakamura To: peterz@infradead.org, mingo@redhat.com, acme@kernel.org, mark.rutland@arm.com, alexander.shishkin@linux.intel.com, jolsa@redhat.com, namhyung@kernel.org Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH 0/3] libperf: Add support for scaling counters obtained from the read() system call during multiplexing Date: Fri, 20 Aug 2021 18:39:05 +0900 Message-Id: <20210820093908.734503-1-nakamura.shun@fujitsu.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch series supports counter scaling when perf_evsel__read() obtains a counter using the read() system call during multiplexing. The first patch adds scaling of counters obtained from the read() system call during multiplexing. The second patch fixes verbose printing. The third patch adds a test for the first patch. This patch is based on Vince's rdpmc_multiplexing.c [1] [1] https://github.com/deater/perf_event_tests/blob/master/tests/rdpmc/rdpmc_multiplexing.c Shunsuke Nakamura (3): libperf: Add processing to scale the counters obtained during the read () system call when multiplexing libperf tests: Fix verbose printing libperf tests: Add test_stat_multiplexing test tools/lib/perf/evsel.c | 4 + tools/lib/perf/include/internal/tests.h | 2 + tools/lib/perf/tests/test-evlist.c | 138 ++++++++++++++++++++++++ 3 files changed, 144 insertions(+) -- 2.25.1