Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp672710rwd; Mon, 12 Jun 2023 21:17:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5fGoyeBjKU5DsR0W2u6AlQfCcJSUC3rnaKCq/Rs1XlHbllporUmYYskrPlE5UaNz18Dwrb X-Received: by 2002:a05:6359:286:b0:12b:c8e9:e576 with SMTP id ek6-20020a056359028600b0012bc8e9e576mr4111405rwb.20.1686629833184; Mon, 12 Jun 2023 21:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686629833; cv=none; d=google.com; s=arc-20160816; b=tF8dp2olexL9kMNv+C7G7r1/SVoCch2RyFH4v0ZI5z/97k0Y/ozYo9MrEcX8ZyZAa2 mZS729i7yX5EPH9h0qvFy6CmZkbe0ISHn/ZW4II4khGUzplCs71t8mfkY5wvuLB1lipt 6CA8u3qCtUV0bHoCEQcXZYNZLx1oW3LJtu5hwr/3ONGzhBqY0cI51mR+haoHIDOnTbTp DqfEQSfrNvNKWkPnn0nNg72z0bKaf3wL/64ei5Sl3E2pk2nhHeZBXp08xfo3MVUYWIjE JMWG1HfpqHdKyqjPVYGCcGA/bZHHXRqf0GwZL4ho02oVMypee05btkx7pPLIUhpP3iiT Su0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:from:subject:mime-version:message-id:date :dkim-signature; bh=yRFC2gTGY007exC0q04MPM2juCknJSwNc/jlO0n+WpM=; b=BiZZkNblu8FKwAfAro4ow3B1XazX3t/qfDcqe2dBNxwHjt04IHbugcr8QZXxiRsRKk LMP9ioXZq4AbreBxsbaAV0zpHViiDcuDfds6i0IJPl62ULeyzFjRk4aAoBLUjGRbyraR puh2UWd+UNrRsN40yjxOu9xMh3C51JwDkDqQOvTUoUb4H7LAg/TGWJtEnUE5hk2iSx/i WGLscIzQS8X5WGRb/XzTM3F8Ie3wpT9c8Wyboug+rDez+iVzANf70C+tp9njyP/XRowm NyVyRGz34KIHYEn8wo8BKQueTdkA9eHnUEh5JurbF1R7Fra3bfoRoT84bSqURcysyhIh gTWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20221208 header.b=VTWfjUVR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t16-20020a63b250000000b00543d2bb9c1bsi4154853pgo.745.2023.06.12.21.17.00; Mon, 12 Jun 2023 21:17:13 -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=@google.com header.s=20221208 header.b=VTWfjUVR; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237495AbjFMDsZ (ORCPT + 99 others); Mon, 12 Jun 2023 23:48:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229749AbjFMDsW (ORCPT ); Mon, 12 Jun 2023 23:48:22 -0400 Received: from mail-yw1-x114a.google.com (mail-yw1-x114a.google.com [IPv6:2607:f8b0:4864:20::114a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80F061A5 for ; Mon, 12 Jun 2023 20:48:21 -0700 (PDT) Received: by mail-yw1-x114a.google.com with SMTP id 00721157ae682-565a33c35b1so74344897b3.0 for ; Mon, 12 Jun 2023 20:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1686628100; x=1689220100; h=to:from:subject:mime-version:message-id:date:from:to:cc:subject :date:message-id:reply-to; bh=yRFC2gTGY007exC0q04MPM2juCknJSwNc/jlO0n+WpM=; b=VTWfjUVR8/UW1zs2ihPMDXWF3W50tJ+8vNMUicZElwkf6TK3Qpfo71NnZNRyhZ4lMh 1cgRzyRkY4qxCCnK74TPSj6Si1gl2Xo85izzGgGCkK+WlK4i5aI+Vl1qcbJ+DZeXNyhy 53ElrNS7kpDILNA2tLMEro7VstfXg6d1fxusQnOMoB4dHnD4KlxEIY5F9DsbVHpIf3PU Tp9G7njcFEWQk7HQAnMhWLlMQEs75aNWGNim6jLyQPeAupbigfRdUVxfQW1ND+rqP6/H SGOiskS8HRJi30IigNaKRQTkjLgOK7fG6ghqadu28kCraVYyZCagS+Pkz1okJDa6Eba0 zuuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686628100; x=1689220100; h=to:from:subject:mime-version:message-id:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=yRFC2gTGY007exC0q04MPM2juCknJSwNc/jlO0n+WpM=; b=jwzbGo6xVIZKMF9vKSYZrRNcct6LUgUKxjEo03pS+EYoWT8L1ErLlJHFhwIc2eX+K8 INF1LFMAYgoT2/Zg31l4u0PkaxzfYrFXIDjHlslIImd4a/vLvucVDEkcDZz5CDUlwwu5 dACalKLBF6Z1fcurHPRPn6i2AdSk3Vg6eJrCSmgqIKRK763kR0VP2ZuoTDrQ5kaijmyP 153v+/9MEarYslhSIdSewkcJ7oq64fcJCJMmlG4G2tXBAhjB1RHlCRhgEY/QfwXNnbwy xcSixNMYQGeRYJAOcNvJh7Ty2IV7w/U+EGFeQHmZKrxr0MmLSjSyBTjs9I2ij1N3IQ3F Agpw== X-Gm-Message-State: AC+VfDwB4bMgM+15EmVMm2672mjUd6tQF4plQ5chxMrv4o3/+WalBWjn H2VHlPGvvfhx4JCqCpDcQnOsYIGLU5L3 X-Received: from irogers.svl.corp.google.com ([2620:15c:2d4:203:a704:56d6:f79d:33e7]) (user=irogers job=sendgmr) by 2002:a81:b3c1:0:b0:559:e97a:cb21 with SMTP id r184-20020a81b3c1000000b00559e97acb21mr284968ywh.9.1686628100761; Mon, 12 Jun 2023 20:48:20 -0700 (PDT) Date: Mon, 12 Jun 2023 20:48:15 -0700 Message-Id: <20230613034817.1356114-1-irogers@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.41.0.162.gfafddb0af9-goog Subject: [PATCH v2 0/2] Fix srcline addr2line issue with the ',' sentinel From: Ian Rogers To: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Ian Rogers , Adrian Hunter , Nathan Chancellor , Nick Desaulniers , Tom Rix , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Changbin Du Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL 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 addr2line makes it hard to detect when inline output has finished. To detect it srcline issues a bogus ',' symbol and expects to see a filename:line of "??:0". For binutils addr2line ',' gets turned into address 0 and if there is a symbol there then the sentinel isn't detected, this problem has been occurring with kernel binaries. The issue was reported by and debugged by Changbin Du . v2. Incorporate feedback from Changbin. Ian Rogers (2): perf srcline: Make addr2line configuration failure more verbose perf srcline: Make sentinel reading for binutils addr2line more robust tools/perf/util/srcline.c | 93 ++++++++++++++++++++++++++++++--------- 1 file changed, 73 insertions(+), 20 deletions(-) -- 2.41.0.162.gfafddb0af9-goog