Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7297330rwb; Mon, 12 Dec 2022 12:45:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf7dNV6L3X2zgOxvglucjjMHVilnSM4/JjaVVi1l0Q1jWAvmklK83/7rQQS39RCjw9PFeNPV X-Received: by 2002:a05:6a00:1c9d:b0:577:753a:6af with SMTP id y29-20020a056a001c9d00b00577753a06afmr18869122pfw.31.1670877906228; Mon, 12 Dec 2022 12:45:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670877906; cv=none; d=google.com; s=arc-20160816; b=iOL4/agDTEv2Tk2OHlLxnVa2aQ9JVR8hp2D6hz6Jwl8CMU3orAOzDvDKcnSMfP1wYZ 6ooiQ1MZvbMBVPQsQNuVKen7FBaxATh7sXP3g5Y6CWOBjX6MSBhtxDA6vmPsVdmiHCil 4W5Xk6UE2jlGw4ImSEsE64TD3SnblNwv4QvzrxMxM7ptw6SOO6Lu7StMDu7XBzzSIwRs nXUm4ohTMDwkxRIab042rHxHmfyWkN8OqrQ7h8xsLnMR2PEspSlJlyhCPe4AWttQJclT 5+S2sNFDgHwisB0Sl/DdVZ1MQ/lDCgJrsd6I7/GdjxWdUJ/AdHWtyRo+N51S4jOmG1ro lPZg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1UoORDZn3HMoxcwaLZCzK0o1/WSCpgyNz2i63rq8K5E=; b=kXcPSwJ6Mn6jyT3c2+sZX3X7wCa7dDTWsfDfE0WOqaeSfut2U62bLhBuO/Ohku8RBH kA8IHfvSNvZ/kjLMqBCOEhTkawgsPIULXlJq/hN4UDQ25NBj2vreCMVFZtry313ujPPA 0vxvji9Z7dQwtPwfn/uzB9A2tcq7OSPr9P3K9LkdDEcP41jvBeeoAMusH6+ssDUEpzaT 5NcSNXncRYSM6+hGjTPEdmFCznEv6g5a41pzQKjg/qjAw5QK+w1wzVYk0jnj4bJ68SBQ E/0W2Cure2KBT7v9XlydVILRaRSCu3laQ2XFmXc2HcYe4KRTwHOkG+/VIDbrF+h9g/w3 1FMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jdVihdn6; 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 eb19-20020a056a004c9300b005754b42672esi9728157pfb.368.2022.12.12.12.44.56; Mon, 12 Dec 2022 12:45:06 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jdVihdn6; 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 S233143AbiLLT6Z (ORCPT + 74 others); Mon, 12 Dec 2022 14:58:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232930AbiLLT6W (ORCPT ); Mon, 12 Dec 2022 14:58:22 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AF14917431; Mon, 12 Dec 2022 11:58:20 -0800 (PST) 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 51F01B80DE1; Mon, 12 Dec 2022 19:58:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CE0F4C433D2; Mon, 12 Dec 2022 19:58:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670875098; bh=W06ornDnIgqPamggnn9sksOrET7i2brFvmdhKlkOwXw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jdVihdn6NUPo8d5PmHzGHv3RaQ5Z5WZbZ6GwcsRHxY1FjMXjLqETx/eiP3KDqOPHD qU705Pzncmk13DkW/jeJQc1YaGciwNkXz3fnsoVhli9crX1gEd5EYcOCmf8hH4BcFX Tuz21QhIxiORfBL9rL5a/sel8QznwA3PCSoxuiZgZh7x0MmHNMrZqhgQmq3xwWoGgQ TGqcaKhdtLr1b2PXy3Ibe0cqUOc/gaatFy85LI+ymT+3D6vh28XxIP28JKmsXHEqK5 aR8LgvAqADKu4cIq/VRnDxjnyyn7oJFgImvnIjx2JtoIwN0cJWJBb3ncTPgdgxof07 Z7ddzqmJZIcYA== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id DA32C40483; Mon, 12 Dec 2022 16:58:14 -0300 (-03) Date: Mon, 12 Dec 2022 16:58:14 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Jiri Olsa , Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Song Liu , Blake Jones , bpf@vger.kernel.org Subject: Re: [PATCH 0/4] perf lock contention: Support task/addr aggregation mode (v1) Message-ID: References: <20221209190727.759804-1-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221209190727.759804-1-namhyung@kernel.org> 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 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, Dec 09, 2022 at 11:07:23AM -0800, Namhyung Kim escreveu: > Hello, > > This patchset adds two more aggregation modes for perf lock contention. Thanks, applied. - Arnaldo > The first one is the per-task mode with -t/--threads option. The option > was there already but it remained broken with BPF for a while. Now it > supports the output with and without BPF. > > # perf lock contention -a -b -t -- sleep 1 > contended total wait max wait avg wait pid comm > > 11 11.85 us 2.23 us 1.08 us 0 swapper > 2 11.13 us 10.22 us 5.56 us 749053 ThreadPoolForeg > 1 8.15 us 8.15 us 8.15 us 321353 Chrome_ChildIOT > 2 2.73 us 1.77 us 1.37 us 320761 Chrome_ChildIOT > 1 1.40 us 1.40 us 1.40 us 320502 chrome > 1 379 ns 379 ns 379 ns 321227 chrome > > The other one is the per-lock-instance mode with -l/--lock-addr option. > If the lock has a symbol, it will be displayed as well. > > # perf lock contention -a -b -l -- sleep 1 > contended total wait max wait avg wait address symbol > > 3 4.79 us 2.33 us 1.60 us ffffffffbaed50c0 rcu_state > 4 4.19 us 1.62 us 1.05 us ffffffffbae07a40 jiffies_lock > 1 1.94 us 1.94 us 1.94 us ffff9262277861e0 > 1 387 ns 387 ns 387 ns ffff9260bfda4f60 > > It's based on the current acme/tmp.perf/core branch. > You can find the code in the 'perf/lock-con-aggr-v1' branch in > > git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git > > Thanks, > Namhyung > > > Namhyung Kim (4): > perf lock contention: Add lock_data.h for common data > perf lock contention: Implement -t/--threads option for BPF > perf lock contention: Add -l/--lock-addr option > perf test: Update perf lock contention test > > tools/perf/Documentation/perf-lock.txt | 4 + > tools/perf/builtin-lock.c | 95 ++++++++++++++----- > tools/perf/tests/shell/lock_contention.sh | 48 ++++++++++ > tools/perf/util/bpf_lock_contention.c | 72 ++++++++++---- > .../perf/util/bpf_skel/lock_contention.bpf.c | 67 +++++++++---- > tools/perf/util/bpf_skel/lock_data.h | 30 ++++++ > tools/perf/util/lock-contention.h | 1 + > 7 files changed, 255 insertions(+), 62 deletions(-) > create mode 100644 tools/perf/util/bpf_skel/lock_data.h > > > base-commit: b22802e295a80ec16e355d7208d2fbbd7bbc1b7a > -- > 2.39.0.rc1.256.g54fd8350bd-goog -- - Arnaldo