Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp157084lqe; Fri, 5 Apr 2024 16:44:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWZaG2g8ccuj2pCxg6Avo837LPPUcpGCOiLxT4dG6MNRhNF2Gkcizzgn2vveHZ0mc+BIhUsDSwiZo3RZQn0Gywhv2VuSKMaCUxTTYhSag== X-Google-Smtp-Source: AGHT+IFpyDKW/Wy+YdSUQGjWBrcDIu8N4cT4Vig0D8gkY4hXZ+ZRC/ScEW61v/SpW1CPcLMvvwKc X-Received: by 2002:a17:906:4a81:b0:a4a:3663:2f51 with SMTP id x1-20020a1709064a8100b00a4a36632f51mr2280182eju.2.1712360672491; Fri, 05 Apr 2024 16:44:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712360672; cv=pass; d=google.com; s=arc-20160816; b=R1j3Q5HDQe1GBltbt0zhAW3lEDXDUUvtyTYORuvd00JvJ4KRoSsXeAu0Vc1go0gn9G jNF4ZVkynAMH2HWqtq7deCNe1eQImH/7guMC2LyJ+kcKHB6IXSBK1kJMuNpf4X7KyxFT grJF/VhHdz3HjW2IBZbif1+F3AhT0o0jX4mZLcChfOyM7Y0EFTVUe7CtLki2a0d6voc0 eEvV5Fb/zRos1siJFRn86+/LP0y8qOqRuVXIvEJtEgYjJTxJzPqCC70ugWCncmp0bQP1 kelH5DkYtAR/tyuQg7AXtowHjxZEsyryvVKVb+IdD9bt6p2u0o7S+IkKwsC+L91ev+Tt 0uaQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=Gzcd1UZQERfxvTBnVGRGRZ63pCnV3q/1zmShLREA7NM=; fh=QQRdUkGehKXRbesvE0449iWT4keK7mxT19I5lgRMpY4=; b=ptPD2TI+YkA9rGMdIIe49dW6MXS+ntxXZR631pRvegEUz0gbrIeaWOExbbuodTQ6xV J73mhwhI4XUDShhg3/EyxLASwNMv6Fgw2rGY1VjJd2pwcaffs6dByTjOtCb24FZAeQ0S gj+HuNK3kpJIFwPZMheJVHpF54qFL3tidD2YcbNyQOVzzFlAvNeRDP9GRthXVuOutjaQ FyyeAdIv3UKw9gs6snhvvd42e75c5aJkHR31rXS9uwpwfcaANmjhDIRjv+UAWQdXg5WY Fdv9Zn3pHZ6h8OYcvmjLZO4t+bND7TUSxMXQREKUg0A9yQbFnivLs+EZrLxAXn3I7iqS ox8Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=C6j5uwVx; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-133708-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133708-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id q25-20020a1709060e5900b00a4e58cdd593si1138028eji.5.2024.04.05.16.44.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Apr 2024 16:44:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133708-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=C6j5uwVx; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-133708-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133708-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 0D9B91F220F4 for ; Fri, 5 Apr 2024 23:44:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 97A82374D3; Fri, 5 Apr 2024 23:44:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="C6j5uwVx" Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4D9151E528 for ; Fri, 5 Apr 2024 23:44:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712360663; cv=none; b=Gtt/f5b3eYkOIDkhed2SrwQ+XUraSKQpyqETDh/qhM213haeSZ0KSQUEC6AlYJAGWqsXBWM2diR7PIzrolRtOnxeqyEm1fXJoQdpjvjNaFd3/h8aEYqH3pETtRSAGxBS/mFLps0tmurYHZOQ7Y+KjVhzfEuw+luHlBp+MXbu3N4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712360663; c=relaxed/simple; bh=IZ2lpztq4nfTZplg/hN3aPSylSfMe4ljslvcySjCYjY=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=fhsPzjnU/GQKcBM6ErSwNFkmD67SCMwBVrWCkaVxwTJ7K8vPXEpwLMee5pPe7+hb+draQczaqmhMvJdVbRaPrakMoLDRjN/QQgcp5TPxSnSLf4/uuT6SY2iiiKnviEVQj5oJMVE29PQ/ftgiY2Ecuc/koLAnnRa5SSgM2dox9ok= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=C6j5uwVx; arc=none smtp.client-ip=209.85.160.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-qt1-f175.google.com with SMTP id d75a77b69052e-430d3fcc511so52991cf.1 for ; Fri, 05 Apr 2024 16:44:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1712360661; x=1712965461; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=Gzcd1UZQERfxvTBnVGRGRZ63pCnV3q/1zmShLREA7NM=; b=C6j5uwVxA5eTVfMbPq+PMfPPDo2QWiYyY81riLYh7UqljfGL7Gvu/xpyBykajfBKlh WUD7XtSHAoZMqvCntmNKGtndzNkMw7h2q6ugdPJrasEjLGlOADYbtTMkV6GV4aW7tBvk 3b8Ujxd30JelF/muKUwIzvYCaGcNBmAzMRLJOgtW9uOQ+3leqsOR4EcJXVc4VI1n+8ne P57TxwPIwgXk9LgfNF6O1LwWpr2sSDp2Rj/GuOoLccheS3LmCsCR+v6VgUHPJ8PNYlAK 3zH6RQmgSvxpMHYaIdpKOnbW3Sylfry/4bSiBoRI9dDTN6UknbsnAFpwppxq6e4GWTTP 90Tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712360661; x=1712965461; 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=Gzcd1UZQERfxvTBnVGRGRZ63pCnV3q/1zmShLREA7NM=; b=aXh5Ne4qMmEch+FCDDs0IfiXCmhaFrxaIYIXJQHaJPf9883A8gphP63h4L3TfrJ79V R43ePlPg7ZZhPgSSWNioYKVVqCeZo/XJuhTS5ZeRPEUq3Oqy4kK1xqz9SXxKonje2yF4 PTpkYmRTBqiK6WJDuBqw0Xa1SyJpWbITe1gsFb7fCcYnpZnFSre47nKNhvHeWg7slsxv fjI/RSN04wupJ5jkfgxpy6/m1DfvQE+jCWDEraPL0V3DZRx1Kexr/c5jTozMowSA/F4q 4HBmP1mRhhaqvZ8UyN4paTpyO21v233daRRt4UVZz3V8Qgz6Hu1bjBE18+VRCQ8I1XK4 UiQw== X-Forwarded-Encrypted: i=1; AJvYcCUmqdhlPLcS98kNxGuNBv6CH+Yg77Mt6xHDconB/9pTOvLOMQ4Kqjg/QM/hO8t+G08TcdWiqe6ggnLhQFwXn6J+HjNmwUO3hzqH4yNF X-Gm-Message-State: AOJu0Yw04GornLydIyhZ0SdWGTh2ksTf8HWTYnhLGAPXLSqG8rMzF5Dn H/nGMG/BFfUJEdcL2Ftrc7NkpoxS4IIBdVSzJz8zoiWHetadtUYcAP/7Vkb20C5xAI/645p3GRz g/0uIJ1RNDKiCGDLzC0T3cvxheJb4xJe9t5sR X-Received: by 2002:a05:622a:22a7:b0:431:3d25:f699 with SMTP id ay39-20020a05622a22a700b004313d25f699mr47295qtb.19.1712360661116; Fri, 05 Apr 2024 16:44:21 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240404175716.1225482-1-namhyung@kernel.org> In-Reply-To: <20240404175716.1225482-1-namhyung@kernel.org> From: Ian Rogers Date: Fri, 5 Apr 2024 16:44:09 -0700 Message-ID: Subject: Re: [PATCHSET 0/9] perf annotate: More memory footprint reduction To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Kan Liang , Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Apr 4, 2024 at 10:57=E2=80=AFAM Namhyung Kim = wrote: > > Hello, > > This work is continuation of the previous work to reduce the memory > usage in symbol and annotation structures. Basically I moved some > fields in the annotation which consume spaces in the struct symbol > which is allocated regardless if the symbol has a sample or not when > annotation is enabled. > > With this change applied, the struct annotation only has two members - > annotated_source and annotated_branch. The next step would be to > remove the struct annotation and to have a hash table from symbol to > each annotated struct directly. > > No function changes intended. > > The code is available at perf/annotate-diet-v3 branch in > > git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git > > Thanks, > Namhyung > > > Namhyung Kim (9): > perf annotate: Fix annotation_calc_lines() > perf annotate: Staticize some local functions > perf annotate: Introduce annotated_source__get_line() > perf annotate: Check annotation lines more efficiently > perf annotate: Get rid of offsets array > perf annotate: Move widths struct to annotated_source > perf annotate: Move max_jump_sources struct to annotated_source > perf annotate: Move nr_events struct to annotated_source > perf annotate: Move start field struct to annotated_source Series: Tested-by: Ian Rogers using -fsanitize=3Daddress. Only nit was noticing 4 bytes of padding. Thanks, Ian > tools/perf/ui/browsers/annotate.c | 15 ++- > tools/perf/util/annotate.c | 174 +++++++++++++++++------------- > tools/perf/util/annotate.h | 39 +++---- > 3 files changed, 123 insertions(+), 105 deletions(-) > > > base-commit: b6347cb5e04e9c1d17342ab46e2ace2d448de727 > -- > 2.44.0.478.gd926399ef9-goog >