Received: by 2002:a05:6a10:144:0:0:0:0 with SMTP id 4csp807507pxw; Sat, 9 Apr 2022 00:48:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzV72vCctdDX1j+EaL9RpPGdesbxoca94YdoezyXHtlQc1OGtxcO6Yk22u7gsH9t7ERALxh X-Received: by 2002:a17:906:7955:b0:6e8:a9b:8c7b with SMTP id l21-20020a170906795500b006e80a9b8c7bmr21608795ejo.691.1649490503116; Sat, 09 Apr 2022 00:48:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649490503; cv=none; d=google.com; s=arc-20160816; b=zthiiMYM1xUSk3Z4nFwKyEXJ8+/VnGI+ANgkLs7e4pUjXE419V1dRF4CwGSHAn5UlK sATD/nfkewpTDrLcZ9qjmLEgRAZWXyKff42VBvUCkd0E41afnZttS3ueNjcmGVij1KUo MX+6u3JwRcIVvt4kAOC8QCcXiJlTK0j2tIIx+QvGy795bnaTh6WCvLUsXd7CzVAgZt+T NnAUDCqrvC1a5hVsRs/W18K35ULujKP1Uf56dC/TOB3i51nCoCzlwA8kEtf8sdLedV/x V0epuwzzqZ4a+pGOflF3b/B0MdZVfpqUCIoSjP+Af4b76pxPqaCL9LtITXzzNQz18JcZ vacg== 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; bh=BVoXI5fgim3/iK2/LX7lFIzEYssjRbCGQ7oINBoW+5Y=; b=yJjIEHts5Udfz3xijx3ltp8eSoBHXjqP8uGD5H74kXFlteDofpyEfhyzsV+kk+9Tk2 uaRJPpzDSxOpbBKO2VquHym1RlvlSLaSeZLyfy8EkrVQ1vjF4Li6NBqUKaXKkBeX2jPp fAaJxSXDd8hMAHs1MYUKxYTFcgN6qfow0J8KotDBdnAOOS5cRM/wwJJhZVaEfkjxopgj /hHK5kNU6JUgjN8vVcxYxG9D9BvWI+V8+PD0reNPmXS64ht/484hbbDO5YiKrdX9zkjm 9lyPB9fPEVCbDxnl+2/3rUPI1WT8YEz9U+QcpEIWR3xnblNJm9mb6I+x3Fe7IIE280+l 93Iw== 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 he14-20020a1709073d8e00b006e834c6948esi50533ejc.762.2022.04.09.00.47.55; Sat, 09 Apr 2022 00:48:23 -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 S238068AbiDHRRn (ORCPT + 99 others); Fri, 8 Apr 2022 13:17:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238115AbiDHRRj (ORCPT ); Fri, 8 Apr 2022 13:17:39 -0400 Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F8BFAE5F; Fri, 8 Apr 2022 10:15:35 -0700 (PDT) Received: by mail-lf1-f47.google.com with SMTP id p10so16111777lfa.12; Fri, 08 Apr 2022 10:15:35 -0700 (PDT) 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=BVoXI5fgim3/iK2/LX7lFIzEYssjRbCGQ7oINBoW+5Y=; b=Ht5pw85XY7vbBclZjidb1ElcN4DNsKMK/Py8TmN0GOb3ms8KG91+OpK/BQgGBRj1// TqY46wg0/szGeMpexa34JzuVScztna88l4dlHNojQrtrjyp9/LlQw0usBTuXMa/f39bz 0CiVvKgxtBR+pNQUDi7ScP5RTYC2BujhGv6bQB2ilc88WblW3H0MTqbFd4ssOddy6VFH VHdxRVxin2ySla2Efx92uHk5xt2epWqKC493a6R/t4GvF7u+ia8HuOm1Nr/4A08tb8Ab WWtEXtThHaSTgU3ZNVOOa1xVlbAua6bXDCn69Egqg9XsNWCTP9Kun6QE9vEoS8QbdMLx f4rg== X-Gm-Message-State: AOAM533axevof8W2wKKnbbuKTnV4sfo9kUkmXEbTgdNFsMZT/aWKz+dm 4mstMq/+HpuCKOVhDKzzaf2+sPS0R6CV4HpLtyk= X-Received: by 2002:a05:6512:3094:b0:44a:6dcc:42da with SMTP id z20-20020a056512309400b0044a6dcc42damr13479257lfd.454.1649438133504; Fri, 08 Apr 2022 10:15:33 -0700 (PDT) MIME-Version: 1.0 References: <20220407230503.1265036-1-irogers@google.com> In-Reply-To: <20220407230503.1265036-1-irogers@google.com> From: Namhyung Kim Date: Fri, 8 Apr 2022 10:15:22 -0700 Message-ID: Subject: Re: [PATCH 0/5] Tidy up symbol end fixup To: Ian Rogers , Michael Petlan , Masami Hiramatsu Cc: 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=-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 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. 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. 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 >