Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp55194rwb; Fri, 2 Sep 2022 10:05:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR7O3cd7bqZR0rynGeHuzzjz9Ujw8P0/kGJG/EnXhS1izx6l32rgMI7LWXoDmhaVXSjyJqBz X-Received: by 2002:a17:90a:ca98:b0:1fd:e46a:6c92 with SMTP id y24-20020a17090aca9800b001fde46a6c92mr5889756pjt.116.1662138356717; Fri, 02 Sep 2022 10:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662138356; cv=none; d=google.com; s=arc-20160816; b=PXgVN2LPNPttWyKcOhNS0HRS0ymvrRGWt8PYU3wcyBznx4DD/HOBy1OgGkl9iK7C/x OhzqxPQ68LU7Vs3Nc0ySjS18EbT97rBNZJFcIrAxRtF6/WSAZfNE7iiOowy9fvCFgyc2 MNbBfkgUxFdsMgriAhcHAhDKUPDs6FcBgIVA29mV5GSTR4jU0+yHCy7pr+auLYh4wixy W+jkHmwFwZuIr+Q4qjCxZGE9ug4Yp88uQIII/8nAOtcTvQOKIxPw8bd6wPaTpZUpm0wZ hgQKL9IDg27NK+3wjXpGUGxqpEKKEC19OMxV7TVct7mZ4FskBEZtoCwUNehKw0uNPgRc 5cTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=RC4mQzRB40Bk07oNFhn+paOyye0ZTv41hCU6h3imkFw=; b=CoflNdXaGaZ1vusWm3B0LVw8gyFXLL/xAKK1oBz/vX7Xf6+IYuaEZTSD/N7xJNdmN4 UDnxUPyzBZ7zC3p3e/FcuiES3JdD5HPrc0hKGvLCYAyO1lU13lqoT1/G7PhNekThqDFf 0orLY9JAgw0cVas7LG9m3VEwdC8qWHrmzXfqmv0Oki/QkRzOrABdkMJ4jMtMjpRqyEQW p7uv/pBOEY6HaEDPCOgTgIulxmT5+AfWkiIZ/gXiXYbJHWYjReE52necS2fhcqE/VGqM oqErsEpzmpwGEQqY9WZVTb4AI9xCGyUJI0+j1YGhczWWuUJIpFmgIyZ+SsAXRJjiMHYW yKRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=cIoq0HD0; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e14-20020a63ee0e000000b0041c227d3793si2449800pgi.732.2022.09.02.10.05.33; Fri, 02 Sep 2022 10:05:56 -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=@kernel.org header.s=k20201202 header.b=cIoq0HD0; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236685AbiIBQxx (ORCPT + 99 others); Fri, 2 Sep 2022 12:53:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236673AbiIBQxq (ORCPT ); Fri, 2 Sep 2022 12:53:46 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF45F10952D; Fri, 2 Sep 2022 09:53:44 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 2C930B82CCC; Fri, 2 Sep 2022 16:53:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9B6FDC433C1; Fri, 2 Sep 2022 16:53:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662137621; bh=BF54yHPaOMKIqzLhCp+JxUXk0slqOuK/MTBsIODqbk8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cIoq0HD0saj58EtD34tAbHSAX0ViBburZrWzfamK4+FFZNIjCLuY1nvv42QiGLKm1 SEoZIsUBWZE1j4aEe2u89gDxpMYjuv9iX+/JGl9jzv9UA3Sfj4Ip4pChN2DISs9gwM mYK1ixlSgkzOFXAqf1FLh5bQpUiv6yG0SsuElZ8endymzkiw8PqG4Oj7KbgkI7rFKm Rx+x9uFXP110zoxA6+S5NGhHnJA+YhGYV/XbFcSAlkWK2dCmgMF0pxEF3rCHIjDEa3 I4ezJ70jnzhgh978EXTcuTn+bY0uKrWxs+s4NishRffcWxNA+FsX7I9qvWfcx5fMXJ cmVvGpoP1VmCA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 1CB6D404A1; Fri, 2 Sep 2022 13:53:38 -0300 (-03) Date: Fri, 2 Sep 2022 13:53:38 -0300 From: Arnaldo Carvalho de Melo To: zhengjun.xing@linux.intel.com Cc: peterz@infradead.org, mingo@redhat.com, alexander.shishkin@intel.com, jolsa@kernel.org, namhyung@kernel.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, irogers@google.com, ak@linux.intel.com, kan.liang@linux.intel.com Subject: Re: [PATCH] perf stat: Fix L2 Topdown metrics disappear for raw events Message-ID: References: <20220826140057.3289401-1-zhengjun.xing@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220826140057.3289401-1-zhengjun.xing@linux.intel.com> X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 Em Fri, Aug 26, 2022 at 10:00:57PM +0800, zhengjun.xing@linux.intel.com escreveu: > From: Zhengjun Xing > > In perf/Documentation/perf-stat.txt, for "--td-level" the default "0" means > the max level that the current hardware support. So we need initialize the > stat_config.topdown_level to TOPDOWN_MAX_LEVEL when “--td-level=0” or no > “--td-level” option. Otherwise, for the hardware with a max level is 2, the > 2nd level metrics disappear for raw events in this case. The issue cannot > be observed for the perf stat default or "--topdown" options. This commit > fixes the raw events issue and removes the duplicated code for the perf > stat default. Thanks, applied, sorry for the delay. - Arnaldo