From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4801EB64DB for ; Wed, 14 Jun 2023 18:41:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234587AbjFNSkv (ORCPT ); Wed, 14 Jun 2023 14:40:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233913AbjFNSk3 (ORCPT ); Wed, 14 Jun 2023 14:40:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71CCA137; Wed, 14 Jun 2023 11:40:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 05E5E63F09; Wed, 14 Jun 2023 18:40:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34CF8C433C0; Wed, 14 Jun 2023 18:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686768027; bh=WXHRTF+WzBkYJvzlkvsxv8Qx115ir+Jf7QPO9fuOuuc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=C+WnV60e7YW+KvmS/7ZoyjRlsXp6P4+CpN83QmXl+Ib78QXl2MxR3SQVdekTPDiPM jbHhYL0iqPaI/VMJLCZKCpMlS1JQhEFQL0XDfZ//lZZBZKfsBnU9fatwy4z56HM/8C wmyF2ES0X0i6jyAkQC25tjQZgK6qzVTyjLqhkuoyy4up98ZXGQCFnHxU9RS/DQnlO0 QMKt6f5wXU0nXx2scEiKbivzljme8P6l8Di3KpcE/gN4Jjyyn0B2hsfo+EMLXlBIaQ TerF5bRyxlJIy71A+MgufH1VSAeqz5DmyAFqGqssbuxP3wg4Gfzy9ggyFOVX+jweAY l+WR3GO83iAQw== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 8E4F640692; Wed, 14 Jun 2023 15:40:24 -0300 (-03) Date: Wed, 14 Jun 2023 15:40:24 -0300 From: Arnaldo Carvalho de Melo To: Artem Savkov Cc: Namhyung Kim , linux-perf-users@vger.kernel.org, Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/2] perf tools: annotation browser from c2c tui Message-ID: References: <20230608084407.140323-1-asavkov@redhat.com> <20230609083731.GA168559@samus.usersys.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Jun 14, 2023 at 03:38:35PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Fri, Jun 09, 2023 at 10:37:31AM +0200, Artem Savkov escreveu: > > On Thu, Jun 08, 2023 at 02:09:06PM -0700, Namhyung Kim wrote: > > > On Thu, Jun 8, 2023 at 1:44 AM Artem Savkov wrote: > > > > These patches add ability to start annotation browser from c2c report > > > > tui. The idea comes from Arnaldo's "Profiling Data Structures" talk [1]. > > > I was thinking about how it works and realized that it didn't collect > > > samples by symbol. Then I'm not sure if the result is meaningful. > > > I think it'd show a random symbol that touched the cache line > > > first. The same cache line can be accessed from other locations > > > but it cannot know where they are. > > > Also different instructions in a function (symbol) would access a > > > different cache line. The annotate output just shows any memory > > > access. So it might be good to check the instruction at the point > > > but others should not be considered related. > > > Hmm.. I suspect even the same instruction will hit the different > > > cache lines at different times. Then probably the annotation > > > won't work well in terms of correlating cache lines. > > The annotation hotkey is only added to the cacheline detailed view where > > we do have symbol instruction information. The idea is to give the user > > ability to quickly jump to source code/disassembly directly from c2c > > TUI. > > The hit percentages in annotation view don't make much sense in this > > case though, so maybe it is better to use dummy evsel so that none are > > shown. > Yes, the point is just to reuse the source browser, if there is no > annotation data applicable, don't use any. I tried to work on having the annotation browser, both --stdio2 and the TUI to work with evsels without annotation data, just so that we could simply navigate source code or disassembly functions using the more compact form we have in perf than the original one from objdump. - Arnaldo