Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp226936lqp; Thu, 4 Apr 2024 11:17:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWETMmj3unrPGHgM9A6RIKD51mX3lHeJ0UkneZnYmBag2yjpn7Kc0BmlYpE60H2AsnZR0Rj6FOc5PKNYu5bKk3oG8AGhBe/37HerwT5kA== X-Google-Smtp-Source: AGHT+IFtrgwtJkQ+k/tYSh0XqgTERGT78sTo6ghDUeyXmmip11D+Y7enWKiqhhuKIqDQZ4piwS4K X-Received: by 2002:a17:903:41c8:b0:1e0:d631:5563 with SMTP id u8-20020a17090341c800b001e0d6315563mr3732201ple.66.1712254651915; Thu, 04 Apr 2024 11:17:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712254651; cv=pass; d=google.com; s=arc-20160816; b=jGClxNAGJMuSj7IhvoJ1EjFk3qrWr2VIdaWOS8/NSRjcJI0ZC27xBRv4deMlsnYz24 hDX2toYEjdAtf47AwpyfTQQTQdnz62/vP2UOedS1NI4jZIiefFiJSwAy3J7SwupVkS46 R7duIdLl7U8FoW8KwAKnjsqnRnAha0npakrkXoIO2GrIBR2oIhR5AGmWTgC3n8aIk17s asSK1yM4ugg9p+U91cqZp6ooki0+WA6TwkLdxJr7mus8Oe1Ir+X/WuExcpqYKVVfMRCy d76Hmk49n5JTQHpCm6nuwwxBCWxJh/ZzAN0udRaJgEovP3v7Z+g3Gi7MaK0L7PZ3UkJC KPKw== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=sBMV8is2ysPOcsMs/MxqU/IFzcrScYET5yEgXOEp+W8=; fh=fHhbvXgCev/wpffLVpfaAi8pPyv7hrTyhVPgsZ7HNrs=; b=zoHJ1B5nB2aIXO+IvQNjUC2XF9+dV6zB6Ou74hC3PO+LbYfnRYecMpTU0ji2AmTOir JANwza92Pwdcp4wnUT12jk5DNOyREHAyxdTlpTxgiuF1lP3t9qekpOVaelaXWKCJEd/X MA6ydXHx47rRxzlaKO60YVFAClDizIXOOp4efIRX3t4Z4+YosJJOzTAYCbAxo1Qc6mFy xeuQKKH9VRH5pWGnOZMUe9RHx1oqtfTJHjqWqwQkZHJfe6Sp+6gxU7evpBqVUPGa4qgy yIz7RIWVSg1Sh2Zp9ZgaGMYulPJazxYAkpcGaaOFTne5Av5/sNHa3oTLaTJY2tTFka5V F+JA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eoQweGDv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131920-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z20-20020a170903409400b001e030ca061asi4955479plc.452.2024.04.04.11.17.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 11:17:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eoQweGDv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-131920-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131920-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id ED2FEB27162 for ; Thu, 4 Apr 2024 17:57:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 29634130E24; Thu, 4 Apr 2024 17:57:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eoQweGDv" 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 4654013048D; Thu, 4 Apr 2024 17:57:20 +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=1712253440; cv=none; b=N4tH1mUqjgFTMkFI80hSTH300aMfbPrMz0FVViEQfX4ApO0QXrVVD1DQne4oz/1pJ4BV/Geo2uh8DyOxtszjUi4d5tEMkmhH/v4IuOp3IjPgAP82DI7Jo2CXbMnHrvuj1NYd3UWBGzOLvKFuBHyi9wGhmv7fug8rXIDeJS5p3OI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712253440; c=relaxed/simple; bh=SJjN9aXGnax1R0X3pXFjDpiQ0mqjOWsvypYEn+6C/2k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Lw19+4S2gUuJSG9UISuBJ/FUqQj15jyzjFlpovXZgiIRZOKYpg/fR/CvPMoEbFuI0DBiYAhqsjAe7gPubuuh0WE6R04kAl6oVysGnHUTUQ6IaHqJCPbCDFClPMCozPC105QJ8QGD8ykkMWaZwRLm6xggkRNFmwH1jdUdEOfr1Nk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eoQweGDv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 823F9C43390; Thu, 4 Apr 2024 17:57:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712253439; bh=SJjN9aXGnax1R0X3pXFjDpiQ0mqjOWsvypYEn+6C/2k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eoQweGDvM4FNT1XXPnBdQsJCU1szgEFfLDQ7BRWS7gnjWtoMVOc8AmpEfzM4J9uUT RhkIpOiv+u0ShLWupXmvyjf1XLSrjpwjsFDw87WdbBE4AdhqBAZGwD1/fKuGj7ePD0 45sxE+QfY6hoQaRpSK4PZb5O0A7ldvA4R1Y7MI7mb+4C25Jjn2jIxyKEEEbXS/Zu7F bh0wBdT6+whJSQeEfUymbgdglOpJXRram/Ib2DRSYRD4QB9W6ui7OGzUIsXKR5My9x psqmMkclPYRpjyj3zqxOBvO0wRZxl+4Oh0Plsm5lXPQ6OetOr5O6i3Uqb9T9ypjQqz CTlUxIAOUlXPw== 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: [PATCH 2/9] perf annotate: Staticize some local functions Date: Thu, 4 Apr 2024 10:57:09 -0700 Message-ID: <20240404175716.1225482-3-namhyung@kernel.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog In-Reply-To: <20240404175716.1225482-1-namhyung@kernel.org> References: <20240404175716.1225482-1-namhyung@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit I found annotation__mark_jump_targets(), annotation__set_offsets() and annotation__init_column_widths() are only used in the same file. Let's make them static. Signed-off-by: Namhyung Kim --- tools/perf/util/annotate.c | 8 +++++--- tools/perf/util/annotate.h | 3 --- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c index a330e92c2552..bbf4894b1309 100644 --- a/tools/perf/util/annotate.c +++ b/tools/perf/util/annotate.c @@ -1316,7 +1316,8 @@ bool disasm_line__is_valid_local_jump(struct disasm_line *dl, struct symbol *sym return true; } -void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym) +static void +annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym) { u64 offset, size = symbol__size(sym); @@ -1347,7 +1348,7 @@ void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym) } } -void annotation__set_offsets(struct annotation *notes, s64 size) +static void annotation__set_offsets(struct annotation *notes, s64 size) { struct annotation_line *al; struct annotated_source *src = notes->src; @@ -1404,7 +1405,8 @@ static int annotation__max_ins_name(struct annotation *notes) return max_name; } -void annotation__init_column_widths(struct annotation *notes, struct symbol *sym) +static void +annotation__init_column_widths(struct annotation *notes, struct symbol *sym) { notes->widths.addr = notes->widths.target = notes->widths.min_addr = hex_width(symbol__size(sym)); diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h index b3007c9966fd..3f383f38f65f 100644 --- a/tools/perf/util/annotate.h +++ b/tools/perf/util/annotate.h @@ -340,10 +340,7 @@ static inline bool annotation_line__filter(struct annotation_line *al) return annotate_opts.hide_src_code && al->offset == -1; } -void annotation__set_offsets(struct annotation *notes, s64 size); -void annotation__mark_jump_targets(struct annotation *notes, struct symbol *sym); void annotation__update_column_widths(struct annotation *notes); -void annotation__init_column_widths(struct annotation *notes, struct symbol *sym); void annotation__toggle_full_addr(struct annotation *notes, struct map_symbol *ms); static inline struct sym_hist *annotated_source__histogram(struct annotated_source *src, int idx) -- 2.44.0.478.gd926399ef9-goog