Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp213724lqp; Thu, 4 Apr 2024 10:57:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtrPx8y+7/tq9nVCs0lGn60Dn88KORRGLtgvLLZ6CllQnn8oWF88QEx/l1ki/U2Bjzat5krHz1eQDEgksiS/YRUH4KKmfCI0m3W4PAvw== X-Google-Smtp-Source: AGHT+IHlMUnFkRuBYS81+16E9BYc4tGQNxWanaVhwJRJhmNho2S5NV/jZbIqPOkCbAXxCyey/gok X-Received: by 2002:a05:6a20:3ca7:b0:1a5:6d3a:65ed with SMTP id b39-20020a056a203ca700b001a56d3a65edmr313973pzj.3.1712253444898; Thu, 04 Apr 2024 10:57:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712253444; cv=pass; d=google.com; s=arc-20160816; b=YEDQnwW3eII7zE63ffa+ylWoBa6535c7QokgfBje0zUOMDefRix711Nzpw+0eJD1mp BWB8X7TVSjK3fpK+TFV677ub+J5D2JUU7gzQXm+T6OQ/33MPdUTOAjdEf4hjgzHveKtW nIvXV0SWD0UXHi8GNgV+83uh8IjseiB49gpO5RMXuMzU1BeiuWnkOMdBNd/5AShJT2S4 hOy9c4Ao5rJr+ompJUQZndV27R1/rh6P+rO2be30Jm/Szo55+Ag2GZ32EjmE7YVVihlY WeO25bcUXufPL7RS5wRD6+Vitb44KzDSXbNYi984qIRB7y4/udqtv3YQOEULGS0OQXmL CHEA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=2lwa1fSGFE4jFkdPx1hMcbdJCB7LR0uZT0OMWVmpoJI=; fh=fHhbvXgCev/wpffLVpfaAi8pPyv7hrTyhVPgsZ7HNrs=; b=CuTfeP4vUT0QZ2WyMqGm1xYn06TiJcZci5UiaRlV8nklBDWQM3D6eYq8P6+jX3wOAv KUxsSuiFcQY1TCo/E/wbtXe13wqU0+m8gN55rXZX8theqcvgQfSRTs4jdbuSiHF6q3yS BdxQp3bvNISLhpRFDUeXppkIoC5CBGxxjaxoQXJfeS0l47XnA/8/csguzzLWAO87X1CO 9slG9S6MjdA3SIrWfTsyLg5MZ/L890qgt3ZQ7cTy+HCeS5v5fLWrYaWrSqG78muR1K16 kfIQZK9Z80JaELD2AkMTjLPrIjLyHMLQ7CY61Hwq/h63bHXI0lAAc65n0749+7WGxhFn 9XBw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eArUhlwy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131918-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131918-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b1-20020a056a000cc100b006ead14a16dcsi16489697pfv.17.2024.04.04.10.57.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 10:57:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131918-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eArUhlwy; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131918-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131918-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 8FE38289E3C for ; Thu, 4 Apr 2024 17:57:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F230C12FF89; Thu, 4 Apr 2024 17:57:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eArUhlwy" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1D5BA12F37C; Thu, 4 Apr 2024 17:57:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712253439; cv=none; b=EaHfTLb3wK61WOUQyCUl4ZzhqBRyn4J3bgFL0U4ayx4YyoRjmOL0IniX94+WgzgKMeKniOeJo2WfZEXvN5kJWzbNdSUdxkTrqbqG1dyC3Z6hQkccK3983gOJziYD6tAf7vH0QgEWTci1guhTlpXM0lP3PkLfLyrsu/nyG358qzg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712253439; c=relaxed/simple; bh=d2PCxk9Zsf2Hnfy5fE4WxVlTuBZciJqW8hx+PjbLWxc=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Xn185ofCuomZ5fq85zBw4TehQZxRVb1gWWYN3p63KQya3Ws7eF+4K1Kv4Uf/TsT+8fQyi3mHWIypFSFK1Qb+3TrT5hr4n3ZL4ZfVtj+2S4fqZIpqxmo/feG7ogQ40ZZ8/weCHaNIXbKR0FXoxPFcu9Bn6OKneYDWXK7Qt0620g0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eArUhlwy; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C91DC433C7; Thu, 4 Apr 2024 17:57:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712253438; bh=d2PCxk9Zsf2Hnfy5fE4WxVlTuBZciJqW8hx+PjbLWxc=; h=From:To:Cc:Subject:Date:From; b=eArUhlwyoItIceyua56BQPR1OiS4rkbM8z7Qg+QiOHgXmiQkl2OtuXQ+t75/9a+P0 mrad/r6ijhZXXP4hpooENDm+i9DMv9FuGd7fprogSixFa56mFXE6D9eRXkaFPvYo6V +m4QCKhF8kgLcFxtceU0aMA9YqgmuzdvUU6SRR/QSmzqZQzb7/rIF+Nzj4IpNSuwdO Z4+3cqMjE8FOG7a3nc6Aco9xqLVKolwQdkBeEdfXH+wLHPDueBypvEmXYe2i+29XbW QumJDjxF2ki8lOmJw0/bU8COaZ7YlxzinT3jrivyoTsadgOUH9KgyLTFJhn7f4ZxX3 urAzYuY6ImrBA== From: Namhyung Kim To: Arnaldo Carvalho de Melo , Ian Rogers , Kan Liang Cc: Jiri Olsa , Adrian Hunter , Peter Zijlstra , Ingo Molnar , LKML , linux-perf-users@vger.kernel.org Subject: [PATCHSET 0/9] perf annotate: More memory footprint reduction Date: Thu, 4 Apr 2024 10:57:07 -0700 Message-ID: <20240404175716.1225482-1-namhyung@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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