Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9713042rwd; Wed, 21 Jun 2023 10:48:24 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6yKUe9OfbH+Ks004Rc/3guoDNaXHbC2gfwRj/7ScGWjcyqGOgvIRLphnBN2yF1c+5BKb/H X-Received: by 2002:a05:6808:1587:b0:39e:b675:4b68 with SMTP id t7-20020a056808158700b0039eb6754b68mr16731311oiw.25.1687369704506; Wed, 21 Jun 2023 10:48:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687369704; cv=none; d=google.com; s=arc-20160816; b=SzNh5RKdSIWc5x9t9rfEVq3+bZXMFCySaJhwkrKquGKQTSzTuu9xcKmeKe+XbDxqr8 rgTgYXhAv3ppF6V3sceoX7KBmZ1Gs0PGEBiz1SPAsou+0SvAmwFQd3U3CBa91fdapuTe DFr38l2TKu+HJji73Fn8aLXE4ZTNxn8rYEEjddk6+TXHGldUkLzUJYmTN5c0Cxv9M4U8 XP0v4gCwBqWW1/tePV8AQTu7q8QTTvfjarjqbCC0+OxV9LuXXNut1gwsaJYSuC225WhM 8VFdxtAi2RvG7p2RKrdjhyhqO036DZcQvHrPRLpwwXBgXKAsozXsH7GOATmcT6uOa8VA 6KJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=uiYCr3GvEYC660aEaPCdvMJMh50EzvkVOfc1oPU9xJ4=; b=eBGjRwlSDGdKKDdXomgx04AshIFrQe7p5VAUAMQr64O7QgyDymeJyhqqvvHc0OoW+O qiP9W82WkAUqTCL6914CdMa/f/D1Brt9+MQ4bFyVzJznpGvyNb/RlEffSoy8vo9XzQAN Dhh3Yie/dkooXmRch0i/JZVbhYEEX4kah+vLIvC+Pubi7W3d4wJpledTusf7oZlCdPi5 NvnDOUIKwGy+gd9ZTvyRIUXvl8wx2aeVRS8jjnUFOP2XjInABPAE5oA4gIHtTa86NoBe yvqB1HIpxmLelX6P9vmBEXZMXy21xa7C5MGprquvWV6HNhuZrATeRhq3BWR50Fp0jkyt Lt3Q== ARC-Authentication-Results: i=1; mx.google.com; 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 h191-20020a6383c8000000b00543c1b205a5si4434680pge.149.2023.06.21.10.48.02; Wed, 21 Jun 2023 10:48:24 -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; 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 S230124AbjFURWQ convert rfc822-to-8bit (ORCPT + 99 others); Wed, 21 Jun 2023 13:22:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230145AbjFURWO (ORCPT ); Wed, 21 Jun 2023 13:22:14 -0400 Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AFEE19AE; Wed, 21 Jun 2023 10:22:10 -0700 (PDT) Received: by mail-yb1-f179.google.com with SMTP id 3f1490d57ef6-bd61dd9a346so6101620276.2; Wed, 21 Jun 2023 10:22:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687368129; x=1689960129; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XZpPnQxJ9uihBCuzwCODut6HmIpI48UyBATMRmnphzI=; b=gsn5h2u1Z5oX2oDgk5S7ksOiAb01y0JtCU419fLqH8GhnhWm8thihGyXJks3CFuz8a f8bksGHTzy1ZkY0c9xzJPRphLINBOe+vgTNn6cDVIunUADbOvv0Sv6C63lkZqfECkRDi zFL2LsXYtOal7qip1Dfeqx92fM5k/XKpb2Y9qw6rK0LMWIZ0E02U5Wub36QZNybiHC3c i+o2dL2GfkYr7AQMKXBnIQTzVUNM4hhd3p04aEpuOiFVGJuY80uJc2WQOzLAmMIv4t8p VPvxCFmN2cb8JcMa3dA1pg1iD/3ptRgs0uA701Qr0GAOxpkYYceK1bz8Mtux2Nqvjn1b LnQg== X-Gm-Message-State: AC+VfDwLV3JLVqszk8KPRb2B5wqnphFHK/X72hHk195n+8O6xpLjIDQl FFE3YUclRUoUDiYhlYGON3CaGs4YdokBcnmNjxqK2KK1 X-Received: by 2002:a25:5f4d:0:b0:bcb:caf8:7aae with SMTP id h13-20020a255f4d000000b00bcbcaf87aaemr12274666ybm.44.1687368129592; Wed, 21 Jun 2023 10:22:09 -0700 (PDT) MIME-Version: 1.0 References: <20230602123815.255001-1-paniii94@gmail.com> In-Reply-To: <20230602123815.255001-1-paniii94@gmail.com> From: Namhyung Kim Date: Wed, 21 Jun 2023 10:21:58 -0700 Message-ID: Subject: Re: [PATCH v2] Subject: perf jit: Fix incorrect file name in DWARF line table To: Elisabeth Cc: Elisabeth Panholzer , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 On Fri, Jun 2, 2023 at 5:38 AM Elisabeth wrote: > > From: elisabeth > > Fixes an issue where an incorrect filename was added in the DWARF line table of > an ELF object file when calling 'perf inject --jit' due to not checking the > filename of a debug entry against the repeated name marker (/xff/0). > The marker is mentioned in the tools/perf/util/jitdump.h header, which describes > the jitdump binary format, and indicitates that the filename in a debug entry > is the same as the previous enrty. > In the function emit_lineno_info(), in the file tools/perf/util/genelf-debug.c, > the debug entry filename gets compared to the previous entry filename. If they > are not the same, a new filename is added to the DWARF line table. However, > since there is no check against '\xff\0', in some cases '\xff\0' is inserted > as the filename into the DWARF line table. > This can be seen with `objdump --dwarf=line` on the ELF file after `perf inject --jit`. > It also makes no source code information show up in 'perf annotate'. > > Signed-off-by: Elisabeth Panholzer > Cc: linux-kernel@vger.kernel.org > Cc: linux-perf-users@vger.kernel.org Applied to perf-tools-next, thanks!