From patchwork Tue Feb 7 00:24:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 53568 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2548106wrn; Mon, 6 Feb 2023 16:25:04 -0800 (PST) X-Google-Smtp-Source: AK7set+6wTVPHXaomVSXczLonlruQ6jCSYl23kPsP5OV51YMJpoAbg/zf7TOBYMirzROUSBKEcHL X-Received: by 2002:a05:6a20:4298:b0:bf:8c0c:978b with SMTP id o24-20020a056a20429800b000bf8c0c978bmr1494716pzj.5.1675729503946; Mon, 06 Feb 2023 16:25:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675729503; cv=none; d=google.com; s=arc-20160816; b=QIk5GQR9PNRuu3DYe6oUMuf8L68KUK3mFI0DEYhmwy7/zSLaEmNcu1rRGYdlESKKB0 +RNYkO/KSyh6lwUytf87+vOcjNEMlJIV94XGJUMXXGzotiGRuNnzgK0BRyX+9ZqXT3dn 3MiwceUAe0Vt8X4+ZkVvan/kYrHrthRRZfKfqZmIO4t9+jNaYFI0iL/qp7KZKV/hf+bm 80JbN6w1K2U+QzOISPbFURbSKiDGlexZ+Y6t2bppy5VZyPJFEPampNVhOSyLoMPbgkg3 97oJKURRWN0O2VQJWjNpIAg9sWC9cdxLCDk46jJcswsGu/jIrgvOnvLt7DSjn/mzcKFj p5GQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:sender :dkim-signature; bh=kbe5ZwnW+2hhqu7fOUm3UEvMRH8Ded44FvXJC3UdrO4=; b=bhoxX7bNvlYGp4K8hZs9sS4j3MVO5InUy0pPyXt1A5qPuSD6vHSBD4U/nKXMPZjqLa QgOqhD52rm0fW8M5WK765i4/3xInpHDDP5HpZTdQ52dHGQWS9entineXFVVQZHtxzd/W oVGYtQFzYjBldTHyps1As0+i64m6v1559p6F7wpOmVbV2soTaNCmkDeJmyf4IQh4XQJO zHb52cWjl6U1REi/O7OZ/h3/oll0+6E++KOwCLXfQ+1uqkD/wBONgNujNIxTFZZ7Ok7Y ZpGlNJ6os9MVrPu4M+OeTT+gsmr7Xrrri2zAyfFDTCZKOBttLNmqLzfwWhw+8PkviQ5U XFAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=goyiGm0s; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l14-20020a63be0e000000b004c5936dd6e8si13612394pgf.11.2023.02.06.16.24.51; Mon, 06 Feb 2023 16:25:03 -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=@gmail.com header.s=20210112 header.b=goyiGm0s; 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 S229500AbjBGAYT (ORCPT + 99 others); Mon, 6 Feb 2023 19:24:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjBGAYQ (ORCPT ); Mon, 6 Feb 2023 19:24:16 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B943B32533; Mon, 6 Feb 2023 16:24:08 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id d6-20020a17090ae28600b00230aa72904fso4962574pjz.5; Mon, 06 Feb 2023 16:24:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=kbe5ZwnW+2hhqu7fOUm3UEvMRH8Ded44FvXJC3UdrO4=; b=goyiGm0sX7Ba75GkWdREOvTPS2n7RJ9Q7KFWVsydT74ahpnbgy9cv8PT28pntUjt7o 3HH27EiHhncl35wjl0LBCu9oEx/rpRrI2Fr+eBMF5F/DX1mnZXjaaWbv8J+xCMoBiaIt w+iI3baJLL3o7WEGlk/kdhB+YjSgGfhPAHersUAehQdVy/QSpepVct4l8N2gfrmbaQmn 1utXIyYheiOJP/jfvVHH+PXdG7N9SLJdq9GgbzZfEAccVzdS0tueQ2J6W2FH1V43hn+8 TrQCxiDUDMyfpzCEePiyHhQY2Rjb9fjsoHYJ/3J1C2n1Ps2tBUHob6T3mi28dtx3yhcN zwWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kbe5ZwnW+2hhqu7fOUm3UEvMRH8Ded44FvXJC3UdrO4=; b=Sb6NkWkLN050Hp774PJNUCr3RV/iILqZop9YP6UsjbumOrIwW+LDmHtbpAWMq5hoDB vG+KSR+ypnDsuLtRkDykWs/RsOefOxhu7g1hAg1+vX+7uqFKPnrYnttg+JXKHCGcQ1nW ZgFuSD9oQIXM0bp2C9UbWpWG+AXGSvz3hawmJbvkEFAAz35WOYaY4OIPnDWsnR3EZO+a rAo22P+22ufO+xsiKFixCPrNwjsnlzUwYjzzNlfWktPHCgd5wucBkb0WWRLn4yCrR7TN TefCZc7XlgihJBkk72iDsI9V3ObYdKpBlKrVMSDLOZJv/hwMrEfq7rsMuLRq56TgLqQq 6aWg== X-Gm-Message-State: AO0yUKV4khymeRa5dMTLuqzLM1Ftkbetnwr9ngXtEZuHuQXmkBq8IInh 0P07gIIFsv58Bkj7lsQCqjk= X-Received: by 2002:a17:902:f14a:b0:196:25b1:a032 with SMTP id d10-20020a170902f14a00b0019625b1a032mr565861plb.59.1675729448100; Mon, 06 Feb 2023 16:24:08 -0800 (PST) Received: from balhae.hsd1.ca.comcast.net ([2601:647:6780:ff0:47cc:64dd:1572:cf18]) by smtp.gmail.com with ESMTPSA id y1-20020a1709029b8100b00189b2b8dbedsm3544080plp.228.2023.02.06.16.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Feb 2023 16:24:07 -0800 (PST) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ingo Molnar , Peter Zijlstra , LKML , Ian Rogers , Adrian Hunter , linux-perf-users@vger.kernel.org, Will Deacon , Waiman Long , Boqun Feng , Davidlohr Bueso , Song Liu , Hao Luo , bpf@vger.kernel.org Subject: [PATCH 1/3] perf lock contention: Fix to save callstack for the default modified Date: Mon, 6 Feb 2023 16:24:01 -0800 Message-Id: <20230207002403.63590-2-namhyung@kernel.org> X-Mailer: git-send-email 2.39.1.519.gcb327c4b5f-goog In-Reply-To: <20230207002403.63590-1-namhyung@kernel.org> References: <20230207002403.63590-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS autolearn=no 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757129740147392676?= X-GMAIL-MSGID: =?utf-8?q?1757129740147392676?= The previous change missed to set the con->save_callstack for the LOCK_AGGR_CALLER mode resulting in no caller information. Fixes: ebab291641be ("perf lock contention: Support filters for different aggregation") Signed-off-by: Namhyung Kim --- tools/perf/builtin-lock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/builtin-lock.c b/tools/perf/builtin-lock.c index 0d11f301fd72..a4b5c481129c 100644 --- a/tools/perf/builtin-lock.c +++ b/tools/perf/builtin-lock.c @@ -1806,6 +1806,9 @@ static int __cmd_contention(int argc, const char **argv) con.aggr_mode = aggr_mode = show_thread_stats ? LOCK_AGGR_TASK : show_lock_addrs ? LOCK_AGGR_ADDR : LOCK_AGGR_CALLER; + if (con.aggr_mode == LOCK_AGGR_CALLER) + con.save_callstack = true; + /* for lock function check */ symbol_conf.sort_by_name = true; symbol_conf.allow_aliases = true;