Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp591141pxr; Mon, 11 Apr 2022 01:53:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxYWF5dosVEGl1Y4JEJik63jaa3ifGGCD9ReaDBOmmX/oyXIDay5RgD3eGsJ2skiGgUy0ml X-Received: by 2002:a05:6402:28a0:b0:41d:732c:d9ec with SMTP id eg32-20020a05640228a000b0041d732cd9ecmr7934096edb.197.1649667224988; Mon, 11 Apr 2022 01:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649667224; cv=none; d=google.com; s=arc-20160816; b=Yy8g6qimp66ZaBPuOxo5bt6JqO+7Woea2q9SzKb/jaVXTmABsfULrIPu/QW5/9aUGr x96HBzwUx2rqVh+F2SfSaD799YEW3CqM6SjlXq+U85A0Zyxch9kNGYeLzD9GZoFUFoPh XKEZY/lI0mOksF7kzeY+NMQ363LKoZKJGDT2WM/LsNRV3Z1QY7oepoCVvr2mhHVJdCzl VRLX5YEEuNqO9QeRqNPmfA1b1Bv4SR5qBAzmg00EiPwjYhgvp6R7ChMebgp87hVc1ZfW CLhne96Rl0SyUPZwiUO6/eUGi/GOi7tgSrZiGN4gLA54J3VIgGvLfMIHGc8ph1zq5wt5 XtLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=9Z5lmTeyx84Yo2aB1/h1dMObiSZnUIdjrOa7dhn9z+0=; b=vcrmocREZ3e/JnKpw9BFS00+rvjSomW7R3BV/U3D0QSUu0d4LTUq8wMtu/+oGO9KPw V9y8WJU1ls+6b0b5Ov1Cv3oRsL5tq544nzdH0ZLMt2kjvttkh3wwSDhuK2ypUSpAplWp xwmQGF5OV6SIDb+6r1sR6KsEpoeZiVcgJDf2oSraY9qIJWShd8y6FzjjpPL8hYV35HGx oneb30Kulr2pQbQEmQVbaFeF6V0SJjZAlsK7YPSkE9JcN4Rvh7dAmZrfnxElCQVQYYaE XPjDKt3O51vhkktG+nAHeB1ZZX6gK2Dr+k0tYNs6HqX60A5McBG5zmIXwEY1MfnNzGhv 7HaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=bWrf8tXO; 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 t11-20020a50ab4b000000b00418c2b5bf7csi6294273edc.606.2022.04.11.01.53.19; Mon, 11 Apr 2022 01:53:44 -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=20210112 header.b=bWrf8tXO; 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 S237386AbiDHXyY (ORCPT + 99 others); Fri, 8 Apr 2022 19:54:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235169AbiDHXyW (ORCPT ); Fri, 8 Apr 2022 19:54:22 -0400 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0533C1B29E7 for ; Fri, 8 Apr 2022 16:52:15 -0700 (PDT) Received: by mail-wr1-x433.google.com with SMTP id c7so15123741wrd.0 for ; Fri, 08 Apr 2022 16:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9Z5lmTeyx84Yo2aB1/h1dMObiSZnUIdjrOa7dhn9z+0=; b=bWrf8tXOOR8KJK7v9SrFzKCWzYyURowo3Mex/cgaWSy0JHDrBN5HbmpK0nYBuvar+5 hQbnXjbZsp7mu6M40ZDEUBVg+r0T1Muvri627DKFFIgkezlfeTJQSFF2kmDHiIP6xOxY u6+ylUb+xzzk1Bm8UKJppu+9esqExyHMHhtxm389OAPwJ3q7fBzdS6qgiIRCClFTpixB KupVRwkNVe5fcJDFhyxzRO0m/00vtg4zSw241C14U2jbyrzsCesen08pgQQjo2mIaoCV jVQXPJhmzNIq/6XPeBz0GNrNQmnv834mZI9BFdU85VA6JI2Km9PSLYbsq3lZSfReDUvf HISg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9Z5lmTeyx84Yo2aB1/h1dMObiSZnUIdjrOa7dhn9z+0=; b=w6H8mQDWcT7SyQTjSFXTyDOC/BMhbCEV/gt0yxWi7hzZ1RkI2SAviUlhJPw3ZaUzvN xM5l0W935Hs4k9IugwuydTn5dJEMoXPpjpM2KDxuA8ic6yEjJDOvv+mA456IwKsZrpy5 RgpKcRui/5pWDXWW/yrpUi7iW0dFXODpqF6lYOGErq4ttmwl7691SU79eGg8S38BjxYv vvEU/p08IOGu4KBqH0onk3CUS43eo6IAJryH02XJETw/YOZfHN9Ajt0wH1jgh6p4GqNG xey0i4Wet+XkWnNr+cIs0bK/sfr36TmrY6afaO6L0cdzzbNjBH9CRd1RBgerW27ewPVT jy4g== X-Gm-Message-State: AOAM533DeE0JxnVF5wXEOLN77DOTk5upXzrdHMKXoE9p06IEmbVgFROS X9QyJRT7jjUZaZz6xjxxUBnIv4BYwL0ZnfIAtEvQvg== X-Received: by 2002:adf:f6c4:0:b0:206:1581:dabc with SMTP id y4-20020adff6c4000000b002061581dabcmr16707057wrp.375.1649461933269; Fri, 08 Apr 2022 16:52:13 -0700 (PDT) MIME-Version: 1.0 References: <20220407230503.1265036-1-irogers@google.com> In-Reply-To: From: Ian Rogers Date: Fri, 8 Apr 2022 16:52:00 -0700 Message-ID: Subject: Re: [PATCH 0/5] Tidy up symbol end fixup To: Namhyung Kim Cc: Michael Petlan , Masami Hiramatsu , John Garry , Will Deacon , Mathieu Poirier , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , James Clark , Alexandre Truong , German Gomez , Dave Marchevsky , Song Liu , Ravi Bangoria , Li Huafei , =?UTF-8?Q?Martin_Li=C5=A1ka?= , William Cohen , Riccardo Mancini , Thomas Richter , Lexi Shao , Remi Bernon , Denis Nikitin , linux-arm-kernel@lists.infradead.org, linux-perf-users , linux-kernel , Stephane Eranian Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_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 On Fri, Apr 8, 2022 at 10:15 AM Namhyung Kim wrote: > > Hi Ian, > > On Thu, Apr 7, 2022 at 4:05 PM Ian Rogers wrote: > > > > Fixing up more symbol ends as introduced in: > > https://lore.kernel.org/lkml/20220317135536.805-1-mpetlan@redhat.com/ > > caused perf annotate to run into memory limits - every symbol holds > > all the disassembled code in the annotation, and so making symbols > > ends further away dramatically increased memory usage (40MB to > > >1GB). Modify the symbol end logic so that special kernel cases aren't > > applied in the common case. > > I'm not sure what was the actual problem the patch tried to solve. > It seems like a specific problem on powerpc + kprobes and now > it affects all other architectures. Thanks Namhyung, this patch set reverts that. > In the above commit, optinsn_slot and kprobe_optinsn_page will > have the same address and optinsn_slot cannot be fixed up. > But I guess the kprobe_optinsn_page still can be fixed up and > you can use the symbol instead, no? > > To me, it'd be better to revert the change and add a special > handling for the kprobe insn pages as they appear as > modules. > > Also, all the arch symbols fixup routine seem to do the same > then we might move it to the general logic. Agreed. It isn't possible for me to test that behavior and so the change tries to make the behavior clearer and to isolate Michael's change to PowerPC. I like the idea of removing the weak symbols and making the behavior common. I also don't know why we're trying to fix broken elf file symbols and don't just let the assembly/compiler writers fix that. Thanks, Ian > Thanks, > Namhyung > > > > > Minor fix to perf annotate to not stall when stderr is full. > > > > Ian Rogers (5): > > perf annotate: Drop objdump stderr > > perf symbols: Always do architecture specific fixups > > perf symbols: Add is_kernel argument to fixup end > > perf symbol: By default only fix zero length symbols > > perf symbols: More specific architecture end fixing > > > > tools/perf/arch/arm64/util/machine.c | 14 +++++++++----- > > tools/perf/arch/powerpc/util/machine.c | 10 +++++++--- > > tools/perf/arch/s390/util/machine.c | 12 ++++++++---- > > tools/perf/util/annotate.c | 1 + > > tools/perf/util/symbol-elf.c | 2 +- > > tools/perf/util/symbol.c | 14 ++++++++------ > > tools/perf/util/symbol.h | 4 ++-- > > 7 files changed, 36 insertions(+), 21 deletions(-) > > > > -- > > 2.35.1.1178.g4f1659d476-goog > >