Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp7363955ioo; Fri, 3 Jun 2022 05:17:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCpF6bOQYp2hr7JxiTEZgUkuBSbuMnY4O5EGD8gz3Tm3fOoQcUp8Y5Uov6KsnN5rZFZMLj X-Received: by 2002:a17:907:8686:b0:708:1282:cbe6 with SMTP id qa6-20020a170907868600b007081282cbe6mr8526818ejc.288.1654258623699; Fri, 03 Jun 2022 05:17:03 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654258623; cv=pass; d=google.com; s=arc-20160816; b=b1/wpEPl3SRxI4NT0NNYGXOUbgARxeTet0V3/DklRIbLIRHZl0i7dXHgxeOkjcLoUr WFDI5Lei7E5Aa4XK26J3gAzMiuaUk7D28Eeh+1+6GO6cZD3jYEFAkce+bN6YkWQfPKfz /674iTpp5l27CVWCLIFUV4FDl5p3KJl9pMoj5gtoiR2U37TO5cW2TzSEowfmJqPGHp9d 24MAFyljdLweP+YFQVV2qHVoGnpOoCPJdBjcVzElm///7u5xHYD6sv7QxrSPKzW8NaMG fDeFNa5+90x3E+wrpZJ1tl1K99KTz1+6bjwrYAqd0he3yvtAWRLV0CZtj2dGO3mq8mjH ISfA== 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 :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=NII/+76QUkKz3DGEpOp6TncNu8SXgxAtXq0Xr+emVRI=; b=i+uJmzpmKcjUWRm6YCLUt4x3eHfncEyhl62cRWGDu27uRkOj1hX52rVBOAp9TDfaNt 04c8PbPAWioWlMjaHKs7qRpJJBEJNMQ/m4uoLFr1HLzzNw6lt1NgxbliCkuYmEyRTXcD 0NoTM6Da3GnseTUI/8qlQaZg1XOuYjaS4za1tVgedmu5edqQMJi+VUcLcePbRKDl9cnN l0TeumNyPwylq+h+VpffKypMRWuCiqwzC7bkPu7tQbnI/cFayqyeFauJCkRekNNiiXgZ 0ZyZGjhSm8i2M12MuQdQVIPt1ZBomC/ANnY5Y+7fga+XOuc4MUUu0cRwHeRsZ6zFHcU0 rNPg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=mjr21YhZ; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020aa7c588000000b0042de92df698si579171edq.432.2022.06.03.05.16.38; Fri, 03 Jun 2022 05:17:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=mjr21YhZ; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240483AbiFCF2i (ORCPT + 99 others); Fri, 3 Jun 2022 01:28:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35810 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230366AbiFCF2h (ORCPT ); Fri, 3 Jun 2022 01:28:37 -0400 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2043.outbound.protection.outlook.com [40.107.243.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C8143819C; Thu, 2 Jun 2022 22:28:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FBxzxDMojYcsQDI65Ll5rrmpSBON77xJT4DQgoVwfQVCazlAnrIxplYAjb4gRFZDP37u3zT2n8cnmhzWZup+3kTude+lu4U/HkU/lWGy+Mis4NHk47jVNSFCjLvkXjLARIoku70S0XofXR64J9gpz6qBv71exKqysV029MiXGqQV4EqpC3KlXAurVMAbctJ7iCl+HCR/ldLAFYxbOq/wU/8gKV11Hfm5MC5e7gAr9j7iM9hhZN0NYU9J8rjoLMytDZB3OSXSTnDyvvpwmRRAsEo7GqUsUTIYuslcZeRJ4HW+kMts6Gb529SGVlBefcy3uB8hw7Sz9B+PQZoj2H+jfA== 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=NII/+76QUkKz3DGEpOp6TncNu8SXgxAtXq0Xr+emVRI=; b=odgA6e3ll8eXXAQKsal0MqDuPoaoIDFPVzAl3k9iN1O3pGWiex+UVC6eDGlGkaZC497vosCm6CvqKcoUeYfuv02l7SffzzOZLwTPcyQ24ExY4g/t/YthfzAU8SFAGYq1pMtkM0d3AQ4CZuYS7IDJADBGgw7/eesQFFbOC4krp07iXZgV0CgZ5N0xSjWv2nAP7DoomUMMiLWSmCLoT0xObDFeUjnH7J77If3XbUhle1Z+xr4xN4PED4CdeDIjFSMuWP4OqY6sCj8SEDF0LySWFmSUO1bZMRT18buIY9eus8z24IcISkzUEOJKnagZZrlKmbc4kLJFwEICze0lJ9dNeQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NII/+76QUkKz3DGEpOp6TncNu8SXgxAtXq0Xr+emVRI=; b=mjr21YhZjBzndaWh9aazE2VtIXQDa0wmV+vXDB7uymOe/Z6i1gs6+btWWjhfp3iHpYbW+oSX/uDpg/e1rBB87iA0rhdyN7g/x2hx28USsLNmOKQRAFeJ+oRru+yeTDfSp60RCgp6jR34yR7VLJO3Z6Kj8e6f2wC9gVJe+bLJdSU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from PH7PR12MB6588.namprd12.prod.outlook.com (2603:10b6:510:210::10) by CY4PR12MB1350.namprd12.prod.outlook.com (2603:10b6:903:41::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.17; Fri, 3 Jun 2022 05:28:31 +0000 Received: from PH7PR12MB6588.namprd12.prod.outlook.com ([fe80::5044:b3eb:8442:fe92]) by PH7PR12MB6588.namprd12.prod.outlook.com ([fe80::5044:b3eb:8442:fe92%9]) with mapi id 15.20.5314.013; Fri, 3 Jun 2022 05:28:31 +0000 Message-ID: <76f02f9c-139b-f26b-0cc6-6edc486f5244@amd.com> Date: Fri, 3 Jun 2022 10:58:13 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 Subject: Re: [PATCH v5 1/8] perf record ibs: Warn about sampling period skew Content-Language: en-US To: acme@kernel.org, namhyung@kernel.org Cc: kan.liang@linux.intel.com, jolsa@kernel.org, irogers@google.com, peterz@infradead.org, rrichter@amd.com, mingo@redhat.com, mark.rutland@arm.com, tglx@linutronix.de, bp@alien8.de, james.clark@arm.com, leo.yan@linaro.org, ak@linux.intel.com, eranian@google.com, like.xu.linux@gmail.com, x86@kernel.org, linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, sandipan.das@amd.com, ananth.narayan@amd.com, kim.phillips@amd.com, santosh.shukla@amd.com, Ravi Bangoria References: <20220603051223.4272-1-ravi.bangoria@amd.com> From: Ravi Bangoria In-Reply-To: <20220603051223.4272-1-ravi.bangoria@amd.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0168.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:de::8) To PH7PR12MB6588.namprd12.prod.outlook.com (2603:10b6:510:210::10) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ed1d793e-b82f-45fb-3b7f-08da4521e515 X-MS-TrafficTypeDiagnostic: CY4PR12MB1350: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: AzULvVNOnJ1HQkFqjrIMQlaf1iD3HEmSxfyCK47soV0jmRzED6afCA9C1enDQiBhtPYlI6cVhVnIzJRcMLvbgZuj+sKeJCgg2NQ/IfNXxzMBDUN27XbtRJEEfPEMEUnMyyhLYHUKuB78TeYUf609vTSPwfh7JOg8HY0t1x2o/qAkhMpxaFW0N45ItaP2qHP9pBOrMIQ3YP162miJqNtHdcMjtMDyxdGqCepxqTmictnO/AgXe+DD+BYHP/F1vTPmvMNIPw7CRC+8rr6d5vO5P+Km73Qt+EKI+/IczAZWp3NxMMJ9hCbTBkjnXCyqKIJP4LZxoNv06GOVJpYBuXu9Uy5kgf+mCJinvIf/lG8qC15fXHCbFk5A4ezQG6c7l4K9x307dfRHNFYXArntPtYtlyAtPZw4IJbH+cypHiX9IJNqrv1D+lLZ80Fo/jxs5All58ye/SfMotiY4LilzUXZF5qyGqIOFxFx6+jRP0JpynJJakYnNgaqsUfvP4nO1t8RgxB65O7OlsY4uruaG7XzSyXWhzaVYjK4KNmE8t9kHjJlEW6Rc9625bqwa9aoxn3af5/vJDrx5WaSUWSjC0+FMyO9Ky05pIkhmesrpVTDDhHGTtcfB0th/cxx/PQn07VlwpARlWQPgbTW3WsxHabemDAFWxHJhv1Vj2KHn8oxix0w60+CtC2zjLJe+ag7yKRKnJNYhsbwEOdSpb79w8NOCFSpKYiReadGfHFHnVDVEmk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR12MB6588.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(86362001)(7416002)(186003)(2616005)(26005)(6486002)(36756003)(8676002)(31686004)(6512007)(66556008)(66946007)(66476007)(316002)(53546011)(4326008)(31696002)(2906002)(44832011)(4744005)(508600001)(38100700002)(8936002)(5660300002)(6506007)(6666004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZHh3ak9YWjQzT0NXSlRlSkZpSG10NjUvN1hpSi9wOE42dHVzRit4R3NGcG9y?= =?utf-8?B?YU9WNk1SUUpNWEptcm5nWkd3Y3FOZGZZUUdzR3dWK0IxS1ZQckxUUTJ6MXRV?= =?utf-8?B?MHhxWTNndDViVVcxRUw1RTNpd1JmNkkyL2RCV2traTZ0SDRKV1dEeWZRZmYr?= =?utf-8?B?cDNFR08vd2FqbnZEQ3dhVWdUU3hLN3pyTWR4WFk2b2paQStqa0R0TXROeW1F?= =?utf-8?B?ckMyVE9LazFXRGpFUUpPVGhsZHdWLzJGczVqSlNxazA3eFNidDlvd0t2Vzdh?= =?utf-8?B?N1hMVlZBYU1OUnVkS0RuU0JqbE1wSzVOZG1NSGNRZGxLcFVmd2RqNy9VNzJk?= =?utf-8?B?bXNYc1Fjbk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GUx?= =?utf-8?B?M2VJcmU0WXUybCsxZ0E5dnRqcHMvd2hOcEh3ejFWVVFHcEgyRFp1aW5LYlVo?= =?utf-8?B?djBLQWJ6YmpkQ0xyM2k2dTJhcUhnazA4bTJQbGx1dkQzNnowSVVzb21qTFNl?= =?utf-8?B?MnlCZXRzTG43SXMyRmc2TmdNMlJIWjA3TEJRckp5RmZ4K0hyOHhqZz09?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed1d793e-b82f-45fb-3b7f-08da4521e515 X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB6588.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jun 2022 05:28:31.0501 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: P0B1pXkcfSGcuXC5t6E7Ew1d0aS6Y7SWVNIzGIDghx9HZEnmh5dTiFMr/WfyXUAV6juUFOS9WyyN0LtVRepJKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1350 X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 03-Jun-22 10:42 AM, Ravi Bangoria wrote: >>> + if (ibs_fetch_pmu && ibs_fetch_pmu->type == evsel_pmu->type) { >>> + if (attr->config & (1ULL << 59)) { >> >> It'd be nice if we used a macro or something instead of the >> magic number. >> >>> + ibs_l3miss_warn(); >>> + warned_once = 1; >>> + } >>> + } else if (ibs_op_pmu && ibs_op_pmu->type == evsel_pmu->type) { >>> + if (attr->config & (1ULL << 16)) { >> >> Ditto. > > Thanks for the review, Namhyung. > > Arnaldo, Would you be able to squash below trivial patch into original > patch? Please let me know if you want me to respin the series instead. I'm planning to respin with asprintf() change. Sorry for the noise. Thanks, Ravi