Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp703328rdf; Fri, 3 Nov 2023 12:21:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmtGBsCzoCoy2Ke1OjYt1rishOdzUpoz4xQ/rNfdrLs3S+eN9WVb3TL68jcvYsuIo9NS9Y X-Received: by 2002:a17:903:2310:b0:1b9:de75:d5bb with SMTP id d16-20020a170903231000b001b9de75d5bbmr28375837plh.7.1699039262370; Fri, 03 Nov 2023 12:21:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699039262; cv=none; d=google.com; s=arc-20160816; b=HejHlyh6UHQmOeZFbt/kUPTpjN3WA0mvFQPp4W0zVP/WHJk6x5Qmoz6oxciV9WTLL7 n0tnsalNJfHXDXble4z1/Y7TrGZItczAh5CcEvBsuR1E1NNnKNfRoBqcBQ423t0ptJc4 crJL2yWWMQtu9NPDje1FgSwthRtVkSID2xQJCRoxzY5dwZupUjehI0lfgeE+Yrub+7RR EaYQGZEiLzUwJZ+HmsNvSR3BRxCdS92Ltxgdm5dJjmmT/hvP/T/uXZiNUaxjziojXliC rJFgcDlZPW9oB/EmITABz/aqfjCPa4kkdDvBzDfN7TBKHSFXk/epPDo+RN5GX+p4ogLX VJlg== 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 :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=A/lpgYKX/gR35qBoWxiaOvO5gEklUt5pUGK1IY4URpI=; fh=dEmjb93PdOJTvdPu/f/jsaBqMdye6vrnelmCgjjKNOM=; b=u1WS3jcvI6fEzGjVMsS3c/686KfTTqMxZ2A6Uzorh1uOt6FXuKvcyiCd9Ko88K5Rma LZJr1sajdTYxC09/4+LyGWQHXxuPeMhS1oQvuoSoC9iLOJRKwV9PKxO3yteNN90kgn1m jMqHJ3PoxmeRCx4RP6SX9EpmrX3/HZOsXQY8+jy7ZTRto2YNXkLToi6H2LOnNaIvkms6 JI6v2PiPRfNBSxnDqSeJ+My9qj3zdoF7uYRKdE99oHL4hOJ+TXEoxVUcN16SG1BZ8V8K 9MDpNjHnzAOcp19FBPMzwXg8Z+DZrb9+Cq0IBQZLCko1mxPgs3bjdPQG6qz+z1Bvj+ua uC9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LLPb5pI0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id m11-20020a170902f20b00b001cae5766330si1924406plc.619.2023.11.03.12.21.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 12:21:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LLPb5pI0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A8DDA82C0F8A; Fri, 3 Nov 2023 12:19:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376881AbjKCTTP (ORCPT + 99 others); Fri, 3 Nov 2023 15:19:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234266AbjKCTTO (ORCPT ); Fri, 3 Nov 2023 15:19:14 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE918D60; Fri, 3 Nov 2023 12:19:11 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id 98e67ed59e1d1-28098ebd5aeso2270803a91.0; Fri, 03 Nov 2023 12:19:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699039151; x=1699643951; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:from:to:cc:subject:date:message-id:reply-to; bh=A/lpgYKX/gR35qBoWxiaOvO5gEklUt5pUGK1IY4URpI=; b=LLPb5pI0ry9vw5ATA9rFnErDoMd+x2lGH/r3LGldi6h1LiwFn7zpBWRV/byaBpu5Lp X+hoxlgJNzFhToW6hRQi0NXRMGGwi0JoVnUgzLnnCBipj5glioS0s2usDKPVt3vAArZN aKpuJQMAuGwNRUsPZPdq84pWF9F7+SqR86inqPqCDtVqaZ1JwRmzcIN67a/lyRzjEEcn xxeLviKGZf9MqZhkWRuP+lCtwdDFcdSKGoVV/JcBY62z3OdkfEHMS8p1H0FBMdt2sp7K q9teRKCooNM3CRKS9SyHZWQEbhsbDivptYnO6uUiGZ0TKUkic9bBzXl7qpPCzZ3Iz08s RTXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699039151; x=1699643951; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:sender:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=A/lpgYKX/gR35qBoWxiaOvO5gEklUt5pUGK1IY4URpI=; b=SWhHEcBx3ID7Sxbo2pEwH/fw51TZY2HKh9hsctqvZGhCYkxkiLBtcXJCqtk1pTEOyk VKaX6/pywukuEBbdpwL+2ODMdywSi3KdgE2alwp1g7dlE/e+OZ7rlyJgk2evAT31sN+h tKUB/lyxa/YllVyboACKRUA6eBXsTOvJ25sbK5UQCSZQP3xXiHmxeRyE+ks2jNqAdFBU RMmQmK/kvIirR+OsqjXd27aJCpHtXbuv32f2AvINem2e293oXg7ZI/6efJWlddQMZF5c DLYZUtvvIVdQAJZm11Zpzk95BKyLy+vFnQYLW6dO5ruT/1GVwjMfGJjVMoGLd0exWX6M p4aw== X-Gm-Message-State: AOJu0YziVdmqK7K8TvcMSevObFsrO3FGrHXGTFv7irOV2IzPsvj8ned5 ctaW0GxM6d9HPKMOB+k+cs0= X-Received: by 2002:a17:90a:17a2:b0:27c:fe72:6e9 with SMTP id q31-20020a17090a17a200b0027cfe7206e9mr19234826pja.27.1699039151179; Fri, 03 Nov 2023 12:19:11 -0700 (PDT) Received: from bangji.hsd1.ca.comcast.net ([2601:647:6780:42e0:8234:4ed3:2635:c9d6]) by smtp.gmail.com with ESMTPSA id y17-20020a17090aca9100b0027cf4c554dasm1761349pjt.11.2023.11.03.12.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 12:19:09 -0700 (PDT) Sender: Namhyung Kim From: Namhyung Kim To: Arnaldo Carvalho de Melo , Jiri Olsa Cc: Ian Rogers , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org, Christophe JAILLET Subject: [PATCHSET 0/5] perf annotate: Reduce memory footprint (v2) Date: Fri, 3 Nov 2023 12:19:02 -0700 Message-ID: <20231103191907.54531-1-namhyung@kernel.org> X-Mailer: git-send-email 2.42.0.869.gea05f2083d-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Fri, 03 Nov 2023 12:19:52 -0700 (PDT) Hello, This is a part of my work to improve perf annotate. At first, I'd like reduce the size of struct annotation which will be allocated together with struct symbol in some cases. In fact, it doesn't use most of them so it needs to slim down and lazy-allocate used part. * v2 changes) - fix typo - reorder struct annotated_source - add Ian's Reviewed-by tags With this applied, size of the struct goes down from 96 to 48. The code is available at perf/annotate-diet-v2 branch in git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git Thanks, Namhyung Namhyung Kim (5): perf annotate: Split struct cycles_info perf annotate: Split struct annotated_branch perf annotate: Move max_coverage to annotated_branch perf annotate: Move some fields to annotated_source perf annotate: Move offsets to annotated_source tools/perf/builtin-annotate.c | 7 +- tools/perf/ui/browsers/annotate.c | 18 ++-- tools/perf/util/annotate.c | 162 ++++++++++++++++-------------- tools/perf/util/annotate.h | 49 +++++---- tools/perf/util/block-info.c | 4 +- tools/perf/util/block-range.c | 7 +- tools/perf/util/sort.c | 14 +-- 7 files changed, 147 insertions(+), 114 deletions(-) -- 2.42.0.869.gea05f2083d-goog