From patchwork Thu Dec 15 19:28:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 33807 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp559940wrn; Thu, 15 Dec 2022 11:30:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf5dyrujRxV4Pv8zkPR3BqXE0mphHmzWTaUEWchX8r4FXZuFkSdGYXIY2yoMLnjI8LsU2Ku0 X-Received: by 2002:a17:907:3ac2:b0:7c1:765:9cfc with SMTP id fi2-20020a1709073ac200b007c107659cfcmr18538964ejc.34.1671132613231; Thu, 15 Dec 2022 11:30:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671132613; cv=none; d=google.com; s=arc-20160816; b=r3FGDgSvn7otMQAinqhL5AMYDIUPDnmxMr8EkRprNgem9wwOEzytfMgXfpOXupl3Rt GZRq6JxmNWp9CSS3DmPPS3lAf5oI/NDS9wFZdiCtBGV9XM4iC1PhYSeJrMRft256r0oD R+EA+3DWP791G3M/TO5u4/0Slj472IfjtBGwzkl+gBz+xnrg4HfSK+EZZZQIgaGwVHuS 562NGN64aFk4MoXgPUiq4c5EvnBjDdC96lqAA3k21fCwJRv4xC+VDCovRRZXilhYX42C k84Vj4dbpyDg+HvIXxiLUv9wRS8YpmpDbizcK9eGfaCSWXphfteIN1Ev85q1d0r6Ass4 qcvw== 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=6mw/wiOLYoXrXq7I0XRVNFT/hMNwNwhuLxRKV5JN7S8=; b=m4V+yepsOlyOsqlgHkizHjy1xkF0DW/HpOdazpMDkxXVPAfHayHTV+uzbKkhS18MeL 0bjlnyzx0OSibuckPY291HvYMaZ3yrxlu4Mpzb8ekR+aNNyedX+8NF3gx+9VjIAwMfmA ml/GjWSAsXYiJVuwYHBjrPIYb+7iwZclbtxygzQrmGFnzbiWKLP4iP2I7yVL01ngUt52 aNMQf2s0AHYfBQ0tDikqk/E8yXj2c7ntQl42+cV0+iMWzqUtcO8w1fhnvCQ7EF7cTXFi 8cTKlSvk1nx4jRq7lqkp/oy/aFcYXfWsbIwlTEb+E9jJop/WycipGcfH7NyVDp23ZRIK Dlww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=e7QSbOZJ; 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 sh15-20020a1709076e8f00b007c0f7b5d8e6si24635ejc.2.2022.12.15.11.29.48; Thu, 15 Dec 2022 11:30:13 -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=e7QSbOZJ; 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 S230296AbiLOT2t (ORCPT + 99 others); Thu, 15 Dec 2022 14:28:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230043AbiLOT21 (ORCPT ); Thu, 15 Dec 2022 14:28:27 -0500 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDFFB4AF13; Thu, 15 Dec 2022 11:28:26 -0800 (PST) Received: by mail-pl1-x62f.google.com with SMTP id 4so36692plj.3; Thu, 15 Dec 2022 11:28:26 -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=6mw/wiOLYoXrXq7I0XRVNFT/hMNwNwhuLxRKV5JN7S8=; b=e7QSbOZJCoCBHRDDhIIsWJbh9O3T0nRnBRdCY1f9w67KpjfbuGUtOpHOLjxP6hqaac dVHRLk15l31Q5yvmpjwvPE2wVJFQNpR5r1Pau2VMRwL2agIQ30eoijGfz2FrLucFUleU 6FyV+1QEv4XEegfd3afqrxFOPSFDQYGeJv+e61aVn87uheIWTfEl81h/4XXdK1GMYXeu LUxQvqfbzeN4IZMP8NVP6krYJUetkbq8unNfHi1l2R1y8xAqEC/0I9bzoz0aLEpF2Ege Skut7ltKgXlKfn1Yv/gzUyPL1S5TE/OmISbOLHxi7PHX4unRVqDWW5RbY0EkGr7Riife +Jbw== 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=6mw/wiOLYoXrXq7I0XRVNFT/hMNwNwhuLxRKV5JN7S8=; b=PP1OgpByVecRCN3HWWYZZGKGcyYrUq67Wg72beA59fz1dh1Q6wTOpItV+f7TEx/OJp E0e97tjOTqr9xLib0I78RpRnDpW8Vy91TfqXwA6xFn5eyrKfgX5/ppYLobjAIARu6VbV W34cLl9ifGHIuikvH3g5U+XFEW78/AL4a2JBCuv0Dfizcd2OO9JxjMCUGjIdmFi7pWZs so1iU+6MSHNg7XI6iGYn183k2BdWfZ9DRNNYXAx49asfoULdVqVVa7YOVhyaP/oizLeR gnpM9aTmqwRX0knQMEWIj+CKpvxs3L9lHjb6IAP34A5D5sSvYad4sT0RNEM2wZ2fqW7f WwOg== X-Gm-Message-State: AFqh2krlCAz1kFvKll57HT+UPklzVUSA8D4Uj0X3FaRpdkJ+W0yVfbva oPdOXt4DuDlhvmXcqFtmpbWjHFlLFpc= X-Received: by 2002:a17:90a:d993:b0:223:415d:5441 with SMTP id d19-20020a17090ad99300b00223415d5441mr5235510pjv.21.1671132506485; Thu, 15 Dec 2022 11:28:26 -0800 (PST) Received: from youngsil.svl.corp.google.com ([2620:15c:2d4:203:ecc1:3e44:be34:129c]) by smtp.gmail.com with ESMTPSA id ep14-20020a17090ae64e00b00219cf5c3829sm3475129pjb.57.2022.12.15.11.28.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Dec 2022 11:28:26 -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, Andi Kleen , Milian Wolff , Leo Yan Subject: [PATCH 5/9] perf srcline: Conditionally suppress addr2line warnings Date: Thu, 15 Dec 2022 11:28:13 -0800 Message-Id: <20221215192817.2734573-6-namhyung@kernel.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20221215192817.2734573-1-namhyung@kernel.org> References: <20221215192817.2734573-1-namhyung@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.7 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?1752309551448871208?= X-GMAIL-MSGID: =?utf-8?q?1752309551448871208?= It has symbol_conf.disable_add2line_warn to suppress some warnings. Let's make it consistent with others. Signed-off-by: Namhyung Kim --- tools/perf/util/srcline.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c index 2c212e2e1b65..33321867416b 100644 --- a/tools/perf/util/srcline.c +++ b/tools/perf/util/srcline.c @@ -573,13 +573,15 @@ static int addr2line(const char *dso_name, u64 addr, * "??"/"??:0" lines. */ if (fprintf(a2l->to_child, "%016"PRIx64"\n,\n", addr) < 0 || fflush(a2l->to_child) != 0) { - pr_warning("%s %s: could not send request\n", __func__, dso_name); + if (!symbol_conf.disable_add2line_warn) + pr_warning("%s %s: could not send request\n", __func__, dso_name); goto out; } switch (read_addr2line_record(a2l, &record_function, &record_filename, &record_line_nr)) { case -1: - pr_warning("%s %s: could not read first record\n", __func__, dso_name); + if (!symbol_conf.disable_add2line_warn) + pr_warning("%s %s: could not read first record\n", __func__, dso_name); goto out; case 0: /* @@ -588,14 +590,17 @@ static int addr2line(const char *dso_name, u64 addr, */ switch (read_addr2line_record(a2l, NULL, NULL, NULL)) { case -1: - pr_warning("%s %s: could not read delimiter record\n", __func__, dso_name); + if (!symbol_conf.disable_add2line_warn) + pr_warning("%s %s: could not read delimiter record\n", + __func__, dso_name); break; case 0: /* As expected. */ break; default: - pr_warning("%s %s: unexpected record instead of sentinel", - __func__, dso_name); + if (!symbol_conf.disable_add2line_warn) + pr_warning("%s %s: unexpected record instead of sentinel", + __func__, dso_name); break; } goto out;