Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5348398rwb; Sun, 4 Dec 2022 19:53:51 -0800 (PST) X-Google-Smtp-Source: AA0mqf7uZOt2qyuCgZzyCp+sU7/GwAO36jvzEVEaJN9snOgp0+ctnyzio1CNvXS5QmhK+SgJ1ZCP X-Received: by 2002:a05:6402:f27:b0:46b:d117:e5 with SMTP id i39-20020a0564020f2700b0046bd11700e5mr17718968eda.411.1670212431158; Sun, 04 Dec 2022 19:53:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670212431; cv=none; d=google.com; s=arc-20160816; b=PJeu2jhLQtFDu9m3qS+bsj9BffF1rA97x/wg6/jkLZVz+zwwojCbldu0RV1YMW0cCZ CBxIsg5fMd5qzdazgl4IcmzdBuIB30Vg5msQ5GaQnV1atJLYOmRrj3WQd+RqfruJ/6eR WVehVMLClGzItummNbHz9HlHhuGmLUH79SeXs2nzOUbK+i5akLsIjAiUsR2hqu+S1dKs 3Uz0Ypy78qLxFLdFxYaz+X+VCii4rouEDzeEighZHbBKrkJysc9jbbgHfR1RfkxbHhQK //FkvTQYP6U6029nGdpo50oJlUd/trVaYFFZBqBRBdEY0rqrPYWmDjXxo08UuSouTlaJ fY8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=V36SbjYTcorYyZ0ucONi4bwf+piAWIsHjReivGGDGCE=; b=fsWH6n3wfyKHg1plIJVe2SclynkwMOdAIkBHGrgGsrZc9EyYTczkNwo0KTSsleqdLc cslxaPgm4NtPQrIIxS8TLRXxz2+9soLjpJFfoZSCPc2+cSDW5IPkaRh5it6oVQCc9UTE y5fK89Wm6usUl/R3UGs/19ZtFZB/3cnpugy5k6xYkNpjBfWd6IsdW4DM3pHAuTR7SNol gvY8QJwVlnFw28xbnsKuxqqL1tfsd6u6T/qL22L578Jtj/7YWLSaR6qv6CMcjH0oPcUc kM/K3iuGEeo81/uGyXOkSrZ6gmDn+8brja5ZV6Uv9rdORa1VGrN2Sto+ZbLJ85r8lN9T d7LQ== ARC-Authentication-Results: i=1; mx.google.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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ae4-20020a17090725c400b007aac98ec3dfsi11219821ejc.303.2022.12.04.19.53.29; Sun, 04 Dec 2022 19:53:51 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231140AbiLEDlZ (ORCPT + 83 others); Sun, 4 Dec 2022 22:41:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230479AbiLEDlX (ORCPT ); Sun, 4 Dec 2022 22:41:23 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76F1BDEB8; Sun, 4 Dec 2022 19:41:22 -0800 (PST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 978B423A; Sun, 4 Dec 2022 19:41:28 -0800 (PST) Received: from [10.163.44.51] (unknown [10.163.44.51]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4D13B3F73B; Sun, 4 Dec 2022 19:41:17 -0800 (PST) Message-ID: <64f7f939-0c71-e5de-9812-fd46bfdd89a8@arm.com> Date: Mon, 5 Dec 2022 09:11:18 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PATCH] perf/core: Reset remaining bits in perf_clear_branch_entry_bitfields() Content-Language: en-US To: linux-kernel@vger.kernel.org, Peter Zijlstra Cc: james.clark@arm.com, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , linux-perf-users@vger.kernel.org References: <20221201055103.302019-1-anshuman.khandual@arm.com> From: Anshuman Khandual In-Reply-To: <20221201055103.302019-1-anshuman.khandual@arm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE 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 12/1/22 11:21, Anshuman Khandual wrote: > perf_clear_branch_entry_bitfields() resets all struct perf_branch_entry bit > fields before capturing branch records. This resets remaining bit fields > except 'new_type', which is valid only when 'type' is PERF_BR_EXTEND_ABI. > > Cc: Peter Zijlstra > Cc: Ingo Molnar > Cc: Arnaldo Carvalho de Melo > Cc: Mark Rutland > Cc: Alexander Shishkin > Cc: Jiri Olsa > Cc: Namhyung Kim > Cc: linux-perf-users@vger.kernel.org> > Cc: linux-kernel@vger.kernel.org > Signed-off-by: Anshuman Khandual > --- > This applies on v6.1-rc6 > > 'perf_branch_entry.new_type' can remain uninitialized as explained earlier. > Also there is no PERF_BR_NEW_UNKNOWN to spare, because 'perf_branch_entry. > new_type' enumeration starts at PERF_BR_NEW_FAULT_ALGN, to save a position > for the extended branch types instead. > > include/linux/perf_event.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h > index 0031f7b4d9ab..c97b5f6f77a4 100644 > --- a/include/linux/perf_event.h > +++ b/include/linux/perf_event.h > @@ -1110,8 +1110,9 @@ static inline void perf_clear_branch_entry_bitfields(struct perf_branch_entry *b > br->in_tx = 0; > br->abort = 0; > br->cycles = 0; > - br->type = 0; > + br->type = PERF_BR_UNKNOWN; > br->spec = PERF_BR_SPEC_NA; > + br->priv = PERF_BR_PRIV_UNKNOWN; > br->reserved = 0; > } > Hello Peter, Just wondering is there a chance that this patch could make it to v6.2-rc1 ? - Anshuman