Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp812082pxb; Tue, 12 Apr 2022 14:07:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRzc2aOZ72ieXjtttYakFfkTn2TeIIqRgE7tXnjk0dY0oxfU+DwuzR0kNN82WfkSbMB9Xk X-Received: by 2002:a17:903:41ca:b0:158:8b5d:add6 with SMTP id u10-20020a17090341ca00b001588b5dadd6mr4160562ple.41.1649797668978; Tue, 12 Apr 2022 14:07:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649797668; cv=pass; d=google.com; s=arc-20160816; b=lqCkKQSGpHiIRHklM5sA742YYztVipdSHFbPcRz9aBS0/7xlYk+zMnjjAP6ql8e8Bh kEtCi0MzF05gvAATHaKpEGBMHNCbnKzBIBj1fREhOsNRQ3+fEU7rqj0OVAhIBF/ei5Ls wjOGY6mFA1Kxtv5lzEtWlWaA83EPdu5MCXtaiNyFry0hR0G3JVp/cuIsnhYCVpZ7FFTs KpPXtJu7Rn/zsiaL0AeIuji5zZA5N2JKKxITh4/LdRldmPZH4wq5w5R9LCcIEnB4dBhe QHsJs73rELeI4X/ZxrACYAv3oJex8m0mxmsURmzIQ3x+eR5vzA9U1BS+KAxDVbAPATOu yT4w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=GBEKcFBStcefh0Pa51fsNH1T0b7eDPvtedaiAWC339o=; b=G0LNIAQMtQTFCBipbBhUtmo0Sg3NEAvrptg/RDMYs0wrZkZ4M/SYXmdhWuOPQLpC6v G15QYRtpqvchppVa+Dt6EgGs11put7pCo1u15VXOCgPjcB1yP9prRYPwqyxdbcpntOEj lBRs3HGlN8Crp7S7J4MqmtpSKZeg+V9rHftAwvPcOBSV6QRBNBYStT6ceGSeZS9NJHrP v1O4YlhGrsAwl7kTgYyMsua2UEkZxtSyCxJCO2VqDj6yxdnrOY4GWHNBSEvoMyLPMckV /evBC1wKpAP86D1vJF3UR6HM8xp/nNFEOdOeyE7u1ZTsC05mgyEcp19+OLJuLEgiyf9E 4d9g== ARC-Authentication-Results: i=2; mx.google.com; dkim=fail (test mode) header.i=@fujitsu.com header.s=fj1 header.b=ulUvywOT; dkim=pass header.i=@fujitsu.onmicrosoft.com header.s=selector2-fujitsu-onmicrosoft-com header.b=dn5kYPA0; arc=pass (i=1 spf=pass spfdomain=fujitsu.com dkim=pass dkdomain=fujitsu.com dmarc=pass fromdomain=fujitsu.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r12-20020a632b0c000000b003816043ef2bsi3749900pgr.288.2022.04.12.14.07.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 14:07:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@fujitsu.com header.s=fj1 header.b=ulUvywOT; dkim=pass header.i=@fujitsu.onmicrosoft.com header.s=selector2-fujitsu-onmicrosoft-com header.b=dn5kYPA0; arc=pass (i=1 spf=pass spfdomain=fujitsu.com dkim=pass dkdomain=fujitsu.com dmarc=pass fromdomain=fujitsu.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E0F49DD966; Tue, 12 Apr 2022 13:25:16 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343688AbiDKIcx (ORCPT + 99 others); Mon, 11 Apr 2022 04:32:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234218AbiDKIcv (ORCPT ); Mon, 11 Apr 2022 04:32:51 -0400 X-Greylist: delayed 68 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 11 Apr 2022 01:30:37 PDT Received: from esa7.fujitsucc.c3s2.iphmx.com (esa7.fujitsucc.c3s2.iphmx.com [68.232.159.87]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CCB92F004; Mon, 11 Apr 2022 01:30:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=fujitsu.com; i=@fujitsu.com; q=dns/txt; s=fj1; t=1649665838; x=1681201838; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=u2Tk15c477qxjKq5NL481Jk3lIqUzUoINi4jvpOmMc0=; b=ulUvywOTs7PsmZ71aL3CXhr0DNvLs0Tst009HqgiUmF+PaBYoSDaaUL/ 3iic4p954eGlA7uapuapnIzNs6IdwCHy3uzJiMIy4+rkBr7ImgU7j14z6 csHf+gRZjH4BzC1FVShvsyQcW2Qm9eWgbNqWKmSGi2uMVisAoCDdD5Dc3 c9sMDDHgt4uFO6dcmEPaPj6WkeVBVCFpnLyAZ8vttH+kobmwWLzVgd1zb MH/lBwCR2XcRDPTU+e5aPhUrmtDSsg1dD8LhhZJxoxqYOEdMHbe7OlarF 28PeFTsNXr5p1uRR1HlGVFM26zuAry6REzBpSrRZiGSZX9A8RacGvdPeR Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10313"; a="53699517" X-IronPort-AV: E=Sophos;i="5.90,251,1643641200"; d="scan'208";a="53699517" Received: from mail-os0jpn01lp2106.outbound.protection.outlook.com (HELO JPN01-OS0-obe.outbound.protection.outlook.com) ([104.47.23.106]) by ob1.fujitsucc.c3s2.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Apr 2022 17:29:23 +0900 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dZiK1+c084jZ3DmtteVNdeYuv2YkONGfR4QEKkeXvUafWBHkjV66r2J9Z0xe/pYqYiw0up3rFSXCrJSPLUER8exI2H4b7hDVqkGthfoEDn93SIfKVJS9nZdUWpCKAgiDuBUX/iJkZYNa44QknMBIQ1AGzV7JaSblDYcTUNQLWDz6ojtmZE20ASz0ciRcggNp5DEClIgtQPUy6UZGrgaepKMbx8OZfZtbM31+vNANCUFYG3MqyxxoC8hns8t61YBIqPPDEqx7dOKlWsu5xIMxwWK+LUiVEbIOZYus3qWdfQ7pXRzOOI6YYeOVe9irPxJrRYyfjaEPbENTVMle/aXk4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=GBEKcFBStcefh0Pa51fsNH1T0b7eDPvtedaiAWC339o=; b=E36vYIjTKIvo5JwWMbzsc8WJ6+SIIYARq6xL12qwxfntSvmC0aAHp+KsIy06PT4nqUMw+KroM6Vy/YzvVx63b6Wn+pnEg2xQqUJK8EYdcRj79ijrjfC1ZnmRAsgk0eDs9wtsjBPA5elJSSHxTHwCN/YowB2lS9J/+loGPxBEZ8OtY6bzuxHGfey0uCUyOxuIfogorDWWdcxvNziehqyEgREYKzEm7hCq/ar9GZIk7glmwB/mN4F12agvra4VXeUUjiyabKS42uRqc6kvd/bLfjzwm377/Ox9yoUUDs8pcS9U7NYfUpG4xXXB6pQiT0JnqbPXN8vU20oDuxj1HQ3CFQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=fujitsu.com; dmarc=pass action=none header.from=fujitsu.com; dkim=pass header.d=fujitsu.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fujitsu.onmicrosoft.com; s=selector2-fujitsu-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=GBEKcFBStcefh0Pa51fsNH1T0b7eDPvtedaiAWC339o=; b=dn5kYPA0zG7xbfwlzXi7suezHz/U9qafghrN0FXg6yLKsQQyS5ov0wjKWwcBT/UsgD/NIkrhqtLGx/A2ayy6cDM13oL8L2T/J93tePdmjjc8fEmK/UHt1RpmpoHpfLrSa3WwqhuOuW/xmHVmUkCoeuNjUcj2bz/MuXxlLmr4AkA= Received: from OSBPR01MB4600.jpnprd01.prod.outlook.com (2603:1096:604:7e::12) by TYWPR01MB8331.jpnprd01.prod.outlook.com (2603:1096:400:162::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Mon, 11 Apr 2022 08:29:20 +0000 Received: from OSBPR01MB4600.jpnprd01.prod.outlook.com ([fe80::5db:a021:ce3e:8244]) by OSBPR01MB4600.jpnprd01.prod.outlook.com ([fe80::5db:a021:ce3e:8244%4]) with mapi id 15.20.5144.029; Mon, 11 Apr 2022 08:29:20 +0000 From: "nakamura.shun@fujitsu.com" To: 'Jiri Olsa' CC: "peterz@infradead.org" , "mingo@redhat.com" , "acme@kernel.org" , "mark.rutland@arm.com" , "alexander.shishkin@linux.intel.com" , "jolsa@redhat.com" , "namhyung@kernel.org" , "linux-kernel@vger.kernel.org" , "linux-perf-users@vger.kernel.org" Subject: RE: [RFC PATCH v2 3/7] libperf: Add perf_evsel__{refresh, period}() functions Thread-Topic: [RFC PATCH v2 3/7] libperf: Add perf_evsel__{refresh, period}() functions Thread-Index: AQHYRD0e+lbI3eCp10CNuai8nxhivqzqc7Bg Date: Mon, 11 Apr 2022 08:29:20 +0000 Message-ID: References: <20220325043829.224045-1-nakamura.shun@fujitsu.com> <20220325043829.224045-4-nakamura.shun@fujitsu.com> In-Reply-To: Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=fujitsu.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4abe55ff-d2f8-45b5-e3d5-08da1b95601a x-ms-traffictypediagnostic: TYWPR01MB8331:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NMIBaGSz3xcFcgvRx727SD4AVAJe1UzsIkOf51xwYwNrLKTiaTb83TSzwWZQ5UXRwbCkxKBem32lDZgOaEfefGEf3BsULBrlkCXSlq1gtS8+7bnOjv8bW70lISCz7VxU+DLWznorhOL3KzRMIO2y5Eo4To/Sff20gj5Cdo5/4l1H/okdFkeqGLkBHAPIfJaPmBP1NO+NYbIZwz2ne7ZRZ14ShHGTkdFGxdicq3IHQAU+wyA2O2zhJ6JHAsqhQmQ9G4QF1y+hxFjMtwyWqWY58LPs4XaLbszNcVZOz2OUkTamhegtBu5QRzoElAwc9ZB2jY45RaiL1KWpGRNybqSW9c5Gp9rEoo7CG1VY/B974+XCIrGQoWld86oZKls1AxeVedGxbhAmDy5tRxURwHy2rEC/hzHPL4JKkNwPWFAF0OduGPBZg420lr8dHlzGANeT25gUSJdjARwHA6EuMU7Rxpf4N5mr6DxAU1OybKCdHGOUSHp80AeWAb9KOF6fdB+pGWP82q7FcVtCtTo5tqlK3t1CUYWYBkUtkHoj1r7tobVG0dF6kKleutFb8jKIexXi1dVkwqjGd7AYD7hoi3s+s5L4qPPx9YbyrzupnPzVGaTX6X8722G/+3GJs7W1B/oH407uzbLf9bx/Zwr9go6UFE5E8//MnUheIDg7AGeYDKSugSKW5KMQLuStQ5mx5gCKR4TBwmo3YszuosP6wj21MA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:OSBPR01MB4600.jpnprd01.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(186003)(83380400001)(52536014)(26005)(86362001)(8936002)(85182001)(9686003)(7696005)(6506007)(2906002)(8676002)(5660300002)(71200400001)(7416002)(38070700005)(55016003)(33656002)(66946007)(66446008)(76116006)(4326008)(38100700002)(316002)(122000001)(64756008)(66476007)(66556008)(54906003)(82960400001)(6916009)(508600001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-2022-jp?B?b2w2NXNGVEFGb1ZnWk0wOWtZU3NWTmM0UUgraVhScTh2dnpBdzh2bExD?= =?iso-2022-jp?B?MW54alJzdDhRRHlEblVaYS9yaEFBMXJieGxFbHFoN2E3NjlXSkFucGJV?= =?iso-2022-jp?B?OWJicFEzNTh2bXdpc3ozbmlaMFk2MEVlcFJZRDBnbWlQeGZuUGU5czdP?= =?iso-2022-jp?B?d3czRDFQN3BKSVYrZXlhN0EzWHVrY2RhRm1xT0N0emVpRlBWT0RGbUdB?= =?iso-2022-jp?B?QzNXcTZ3MzRhb0toa3Vmd3lhbjI5dVFqVncvbk5ycEJsS0NtdjR5Mk1n?= =?iso-2022-jp?B?ZDVxNUdIa1U2Ym1QUWpETUl1aWRuN3ZjU285eGJtRndSZnlka3ZUYWVr?= =?iso-2022-jp?B?bXkzVVZaVTV3NEdvbW5jRDhSY2dFWThYajlDY1JNdmF5dGNZWkx1clBN?= =?iso-2022-jp?B?OUxZSlUwUEFpU3VyeS9ScDMycEthSkNoWkhnQnQ5NUpYeVMycjIrVFRC?= =?iso-2022-jp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4Y09UQ3gyNTJ0azJybDUzc1ZXWUR0?= =?iso-2022-jp?B?dm01Mis2cUhSZ3dFdFZDMmtiMEMzN05zM2lXem56d2pScWxSeVl1c1hG?= =?iso-2022-jp?B?d3M3MlQ3Y0ZWS0JDOUhIOERKMitvZStSRm9JdXJDZjBtTk5Xb1BWVjZW?= =?iso-2022-jp?B?b1hHQTZFZWM3Q1ZJWXVwVjcyZ0cyREVWb0N4RGd3S0hib2FIYndwV0RC?= =?iso-2022-jp?B?Qm91d0xYTElSNWVJWUtsSjhxWXBoZVRaeit3MW9vSDYvdndvSUd1azVH?= =?iso-2022-jp?B?TkYxTmZnWT0=?= Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: fujitsu.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: OSBPR01MB4600.jpnprd01.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4abe55ff-d2f8-45b5-e3d5-08da1b95601a X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Apr 2022 08:29:20.2017 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a19f121d-81e1-4858-a9d8-736e267fd4c7 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: liWlnQtKPLPiJzqQJCbmuQqD9W4UrjwpHkCrP7ytsUOl/u5i6C0bcKkqoCSLfK9Do0kiiGVo7mjPmhLHOz0uYlf3uLmhmTyQC1wf7kwEM5E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYWPR01MB8331 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi jirka > On Fri, Mar 25, 2022 at 01:38:25PM +0900, Shunsuke Nakamura wrote: >=20 > SNIP >=20 > > +int perf_evsel__refresh_cpu(struct perf_evsel *evsel, int refresh, > > +int cpu_map_idx) { > > + return perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_REFRESH, > refresh, > > +cpu_map_idx); } > > + > > +int perf_evsel__refresh(struct perf_evsel *evsel, int refresh) { > > + int i; > > + int err =3D 0; > > + > > + for (i =3D 0; i < xyarray__max_x(evsel->fd) && !err; i++) > > + err =3D perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_REFRESH, > refresh, i); > > + return err; > > +} > > + > > +int perf_evsel__period_cpu(struct perf_evsel *evsel, __u64 period, > > +int cpu_map_idx) { > > + struct perf_event_attr *attr; > > + int err =3D 0; > > + > > + attr =3D perf_evsel__attr(evsel); > > + if (!attr) > > + return -EINVAL; > > + > > + err =3D perf_evsel__run_ioctl(evsel, PERF_EVENT_IOC_PERIOD, > > + (unsigned long)&period, cpu_map_idx); > > + if (err) > > + return err; > > + > > + attr->sample_period =3D period; >=20 > what's the point in updating attr? this will be used after event is creat= ed right? >=20 This is to maintain consistency between evsel->attr->sample_period and the = sample_period of the created event. Users can reference evsel->attr->sample_period using perf_evsel__attr(). So I thought it was necessary to update the sample_period of the event and = the sample_period of evsel to avoid discrepancies. Best Regards Shunsuke