Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp508538iog; Wed, 15 Jun 2022 06:51:19 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vMg9ojCRV4v0cNPFoRhWiJqSMB2u2vwoC3fd9KfJMlVIdQ2TS2z1oIqfVlf+hDwsgL+MPU X-Received: by 2002:a05:6a00:338e:b0:51b:c452:4210 with SMTP id cm14-20020a056a00338e00b0051bc4524210mr9905789pfb.69.1655301078838; Wed, 15 Jun 2022 06:51:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655301078; cv=none; d=google.com; s=arc-20160816; b=amM9UF9ALcGp9115/zriCiRozfpI9Wz1HISw0ZiJUtMl+G0I5X/pNvhKDQ396Mtaqj SWGyQ5wrnEm2odLSi8qCdY2EeAV8IbuPO/0/T4NEW4bJnayF2KscafkN9ZqJGNQz2m7O h6vVHovX5oiyYlJe7Fn2O0gQCGO+mEUocZ0YdCjhqRuLDI2fT//uBCuDQO3Jj9mELBsj 9iLc0AQYJreldexC6QW0fXXyF/74zvStSdKVapT50yoF9deADhOOV9ad8I3mA5SyJWs7 X+gmyWrBK0nBzDjP1gPHSX+I6jh9ricvPbQc8lAmH4BGyc5Fu90ZfgGrBJ2YdGTyseek Xhqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=9KBFEoPOvf0hvx7a49L5HUWgSilh5IBdaARHrXbVsZ0=; b=k6OPt4yzG9bAMSJcTgZwXy9ECNUay3s1itR7+slYmLTDYClxyzH+9l36mbD8EU734Z rOl7RREghADKjs7KR4rXZ81clcFjwmM1sULU5PxURaTLUEiEYM5tXBFVZYlFiPRaNiop nytPfTmYohQgrJTbvje/6F/ucLG4KKU7bZ8Twkgsuj7kpQu91XcpEaS4Y2czT3vVYosV ZtjAk1g1B7NrCFqRMIWtbiqSYgU49SW67I/zKgaFcZ4PtcHNs3WRE7SOk/1RUnvdHn3z NF4nUEoYyfcTcRxD9vTjeU+TszruSOKkrMuOuBO0+B8FjEjhJ4+wT+YMmhMj3OqFgmZA Equg== 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 u19-20020a170903305300b00163daf783d9si15232139pla.555.2022.06.15.06.50.48; Wed, 15 Jun 2022 06:51:18 -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; 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 S1354171AbiFONjQ (ORCPT + 99 others); Wed, 15 Jun 2022 09:39:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47616 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354092AbiFONjP (ORCPT ); Wed, 15 Jun 2022 09:39:15 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C2E6633374; Wed, 15 Jun 2022 06:39:14 -0700 (PDT) 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 A4DC7153B; Wed, 15 Jun 2022 06:39:14 -0700 (PDT) Received: from [10.57.84.186] (unknown [10.57.84.186]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 75B2E3F7F5; Wed, 15 Jun 2022 06:39:11 -0700 (PDT) Subject: Re: [PATCH V6 6/8] perf/tools: Extend branch type classification To: Anshuman Khandual , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, peterz@infradead.org, alexander.shishkin@linux.intel.com, jolsa@redhat.com, acme@kernel.org Cc: Robin Murphy , Suzuki Poulose , James Clark , Ingo Molnar , Mark Rutland , Namhyung Kim , Thomas Gleixner , Will Deacon , linux-arm-kernel@lists.infradead.org References: <20220610035101.424112-1-anshuman.khandual@arm.com> <20220610035101.424112-7-anshuman.khandual@arm.com> <8bfce917-84a6-23a2-d926-a1efa901f4f1@arm.com> From: German Gomez Message-ID: <60d21662-aa8f-b50a-b0a3-462f1b3dec43@arm.com> Date: Wed, 15 Jun 2022 14:39:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <8bfce917-84a6-23a2-d926-a1efa901f4f1@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_NONE,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 15/06/2022 04:21, Anshuman Khandual wrote: > [...] > > +const char *get_branch_type(struct branch_entry *e) > +{ > + if (e->flags.type == PERF_BR_UNKNOWN) > + return ""; >> There is a small change of behavior in "perf script --field brstack". >> Unknown branches were printed as "-" before but now it's an empty >> string. > get_branch_type() replaces print output in two different functions. > branch_stack__printf() used to print a space " " for PERF_BR_UNKNOWN, > and print_bstack_flags() used to print a "-" for PERF_BR_UNKNOWN. > When they are factorized via get_branch_type(), one of those print > formats need to be choosen. Thanks for clarifying, Anshuman. I only bring it up in case somebody is parsing this line for their use case. While running on x86 I came across some UNKNOWN branches during my runs. I have updated and sent a generic branch stack sampling perf test that supports both ("-" and empty string) just in case. Hope it's useful. https://lore.kernel.org/all/20220615130901.1151397-1-german.gomez@arm.com/ Thanks, German