public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/5] perf tool: Minor code clean ups
@ 2026-02-07  8:24 Ian Rogers
  2026-02-07  8:24 ` [PATCH v1 1/5] perf symbol: Reduce scope of elf__needs_adjust_symbols Ian Rogers
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Ian Rogers @ 2026-02-07  8:24 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, Eric Biggers, Palmer Dabbelt,
	Stephen Brennan, Haibo Xu, linux-kernel, linux-perf-users

Remove some unused functions, files, etc. Reduce scope of variables
and functions. Constify arrays in perf.c.

Ian Rogers (5):
  perf symbol: Reduce scope of elf__needs_adjust_symbols
  perf dump-insn: Remove dump-insn.c
  perf tool: Constify the command and option arrays
  perf bpf_map: Remove unused code
  perf record: Remove unused cpu-set-sched.h

 tools/perf/builtin-record.c     |  1 -
 tools/perf/builtin-trace.c      |  1 -
 tools/perf/perf.c               | 12 +++---
 tools/perf/util/Build           |  2 -
 tools/perf/util/bpf_map.c       | 70 ---------------------------------
 tools/perf/util/bpf_map.h       | 23 -----------
 tools/perf/util/cpu-set-sched.h | 50 -----------------------
 tools/perf/util/dump-insn.c     | 23 -----------
 tools/perf/util/symbol-elf.c    |  8 ++--
 tools/perf/util/symbol.h        |  1 -
 10 files changed, 10 insertions(+), 181 deletions(-)
 delete mode 100644 tools/perf/util/bpf_map.c
 delete mode 100644 tools/perf/util/bpf_map.h
 delete mode 100644 tools/perf/util/cpu-set-sched.h
 delete mode 100644 tools/perf/util/dump-insn.c

-- 
2.53.0.239.g8d8fc8a987-goog


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v1 1/5] perf symbol: Reduce scope of elf__needs_adjust_symbols
  2026-02-07  8:24 [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
@ 2026-02-07  8:24 ` Ian Rogers
  2026-02-07  8:24 ` [PATCH v1 2/5] perf dump-insn: Remove dump-insn.c Ian Rogers
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2026-02-07  8:24 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, Eric Biggers, Palmer Dabbelt,
	Stephen Brennan, Haibo Xu, linux-kernel, linux-perf-users

Function is only used by symsrc__init in symbol-elf.c, make static to
reduce scope. Switch to not passing the argument by value but as a
pointer.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/symbol-elf.c | 8 ++++----
 tools/perf/util/symbol.h     | 1 -
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/tools/perf/util/symbol-elf.c b/tools/perf/util/symbol-elf.c
index 76912c62b6a0..d7582dbf379e 100644
--- a/tools/perf/util/symbol-elf.c
+++ b/tools/perf/util/symbol-elf.c
@@ -1054,15 +1054,15 @@ void symsrc__destroy(struct symsrc *ss)
 	close(ss->fd);
 }
 
-bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
+static bool elf__needs_adjust_symbols(const GElf_Ehdr *ehdr)
 {
 	/*
 	 * Usually vmlinux is an ELF file with type ET_EXEC for most
 	 * architectures; except Arm64 kernel is linked with option
 	 * '-share', so need to check type ET_DYN.
 	 */
-	return ehdr.e_type == ET_EXEC || ehdr.e_type == ET_REL ||
-	       ehdr.e_type == ET_DYN;
+	return ehdr->e_type == ET_EXEC || ehdr->e_type == ET_REL ||
+	       ehdr->e_type == ET_DYN;
 }
 
 static Elf *read_gnu_debugdata(struct dso *dso, Elf *elf, const char *name, int *fd_ret)
@@ -1235,7 +1235,7 @@ int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
 	if (dso__kernel(dso) == DSO_SPACE__USER)
 		ss->adjust_symbols = true;
 	else
-		ss->adjust_symbols = elf__needs_adjust_symbols(ehdr);
+		ss->adjust_symbols = elf__needs_adjust_symbols(&ehdr);
 
 	ss->name   = strdup(name);
 	if (!ss->name) {
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
index 3fb5d146d9b1..9aa0016937b7 100644
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -217,7 +217,6 @@ int setup_intlist(struct intlist **list, const char *list_str,
 		  const char *list_name);
 
 #ifdef HAVE_LIBELF_SUPPORT
-bool elf__needs_adjust_symbols(GElf_Ehdr ehdr);
 void arch__sym_update(struct symbol *s, GElf_Sym *sym);
 #endif
 
-- 
2.53.0.239.g8d8fc8a987-goog


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v1 2/5] perf dump-insn: Remove dump-insn.c
  2026-02-07  8:24 [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
  2026-02-07  8:24 ` [PATCH v1 1/5] perf symbol: Reduce scope of elf__needs_adjust_symbols Ian Rogers
@ 2026-02-07  8:24 ` Ian Rogers
  2026-02-07  8:24 ` [PATCH v1 3/5] perf tool: Constify the command and option arrays Ian Rogers
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2026-02-07  8:24 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, Eric Biggers, Palmer Dabbelt,
	Stephen Brennan, Haibo Xu, linux-kernel, linux-perf-users

dump_insn and arch_is_uncond_branch are declared in
intel-pt-insn-decoder.c which is unconditionally part of all perf
builds. Don't declare weak versions of these symbols that will be unused.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/util/Build       |  1 -
 tools/perf/util/dump-insn.c | 23 -----------------------
 2 files changed, 24 deletions(-)
 delete mode 100644 tools/perf/util/dump-insn.c

diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index bcccad7487a9..89de23dec401 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -149,7 +149,6 @@ endif
 perf-util-y += cs-etm-base.o
 
 perf-util-y += parse-branch-options.o
-perf-util-y += dump-insn.o
 perf-util-y += parse-regs-options.o
 perf-util-y += parse-sublevel-options.o
 perf-util-y += term.o
diff --git a/tools/perf/util/dump-insn.c b/tools/perf/util/dump-insn.c
deleted file mode 100644
index c1cc0ade48d0..000000000000
--- a/tools/perf/util/dump-insn.c
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-#include <linux/compiler.h>
-#include "dump-insn.h"
-
-/* Fallback code */
-
-__weak
-const char *dump_insn(struct perf_insn *x __maybe_unused,
-		      u64 ip __maybe_unused, u8 *inbuf __maybe_unused,
-		      int inlen __maybe_unused, int *lenp)
-{
-	if (lenp)
-		*lenp = 0;
-	return "?";
-}
-
-__weak
-int arch_is_uncond_branch(const unsigned char *buf __maybe_unused,
-		   size_t len __maybe_unused,
-		   int x86_64 __maybe_unused)
-{
-	return 0;
-}
-- 
2.53.0.239.g8d8fc8a987-goog


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v1 3/5] perf tool: Constify the command and option arrays
  2026-02-07  8:24 [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
  2026-02-07  8:24 ` [PATCH v1 1/5] perf symbol: Reduce scope of elf__needs_adjust_symbols Ian Rogers
  2026-02-07  8:24 ` [PATCH v1 2/5] perf dump-insn: Remove dump-insn.c Ian Rogers
@ 2026-02-07  8:24 ` Ian Rogers
  2026-02-07  8:24 ` [PATCH v1 4/5] perf bpf_map: Remove unused code Ian Rogers
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2026-02-07  8:24 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, Eric Biggers, Palmer Dabbelt,
	Stephen Brennan, Haibo Xu, linux-kernel, linux-perf-users

Reduce scope and capture immutability.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/perf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index f475a8664ffc..1f51e8de6b1b 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -48,7 +48,7 @@ struct cmd_struct {
 	int option;
 };
 
-static struct cmd_struct commands[] = {
+static const struct cmd_struct commands[] = {
 	{ "archive",	NULL,	0 },
 	{ "buildid-cache", cmd_buildid_cache, 0 },
 	{ "buildid-list", cmd_buildid_list, 0 },
@@ -178,7 +178,7 @@ static int set_debug_file(const char *path)
 	return 0;
 }
 
-struct option options[] = {
+static const struct option options[] = {
 	OPT_ARGUMENT("help", "help"),
 	OPT_ARGUMENT("version", "version"),
 	OPT_ARGUMENT("exec-path", "exec-path"),
@@ -280,7 +280,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
 			unsigned int i;
 
 			for (i = 0; i < ARRAY_SIZE(commands); i++) {
-				struct cmd_struct *p = commands+i;
+				const struct cmd_struct *p = commands + i;
 				printf("%s ", p->cmd);
 			}
 			putchar('\n');
@@ -289,7 +289,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
 			unsigned int i;
 
 			for (i = 0; i < ARRAY_SIZE(options)-1; i++) {
-				struct option *p = options+i;
+				const struct option *p = options + i;
 				printf("--%s ", p->long_name);
 			}
 			putchar('\n');
@@ -331,7 +331,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
 #define RUN_SETUP	(1<<0)
 #define USE_PAGER	(1<<1)
 
-static int run_builtin(struct cmd_struct *p, int argc, const char **argv)
+static int run_builtin(const struct cmd_struct *p, int argc, const char **argv)
 {
 	int status;
 	struct stat st;
@@ -390,7 +390,7 @@ static void handle_internal_command(int argc, const char **argv)
 	}
 
 	for (i = 0; i < ARRAY_SIZE(commands); i++) {
-		struct cmd_struct *p = commands+i;
+		const struct cmd_struct *p = commands+i;
 		if (p->fn == NULL)
 			continue;
 		if (strcmp(p->cmd, cmd))
-- 
2.53.0.239.g8d8fc8a987-goog


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v1 4/5] perf bpf_map: Remove unused code
  2026-02-07  8:24 [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
                   ` (2 preceding siblings ...)
  2026-02-07  8:24 ` [PATCH v1 3/5] perf tool: Constify the command and option arrays Ian Rogers
@ 2026-02-07  8:24 ` Ian Rogers
  2026-02-07  8:24 ` [PATCH v1 5/5] perf record: Remove unused cpu-set-sched.h Ian Rogers
  2026-03-12 20:40 ` [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
  5 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2026-02-07  8:24 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, Eric Biggers, Palmer Dabbelt,
	Stephen Brennan, Haibo Xu, linux-kernel, linux-perf-users

bpf_map__fprintf is unused so delete it, the header file declaring it
and the now unused static helper functions.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/builtin-trace.c |  1 -
 tools/perf/util/Build      |  1 -
 tools/perf/util/bpf_map.c  | 70 --------------------------------------
 tools/perf/util/bpf_map.h  | 23 -------------
 4 files changed, 95 deletions(-)
 delete mode 100644 tools/perf/util/bpf_map.c
 delete mode 100644 tools/perf/util/bpf_map.h

diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 311d9da9896a..2aaa3ff452ac 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -21,7 +21,6 @@
 #include <bpf/libbpf.h>
 #include <bpf/btf.h>
 #endif
-#include "util/bpf_map.h"
 #include "util/rlimit.h"
 #include "builtin.h"
 #include "util/cgroup.h"
diff --git a/tools/perf/util/Build b/tools/perf/util/Build
index 89de23dec401..70cc91d00804 100644
--- a/tools/perf/util/Build
+++ b/tools/perf/util/Build
@@ -170,7 +170,6 @@ perf-util-y += mutex.o
 perf-util-y += sharded_mutex.o
 perf-util-y += intel-tpebs.o
 
-perf-util-$(CONFIG_LIBBPF) += bpf_map.o
 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_counter.o
 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_counter_cgroup.o
 perf-util-$(CONFIG_PERF_BPF_SKEL) += bpf_ftrace.o
diff --git a/tools/perf/util/bpf_map.c b/tools/perf/util/bpf_map.c
deleted file mode 100644
index 442f91b4e8e1..000000000000
--- a/tools/perf/util/bpf_map.c
+++ /dev/null
@@ -1,70 +0,0 @@
-// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
-
-#include "util/bpf_map.h"
-#include <bpf/bpf.h>
-#include <bpf/libbpf.h>
-#include <linux/err.h>
-#include <linux/kernel.h>
-#include <errno.h>
-#include <stdbool.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-static bool bpf_map__is_per_cpu(enum bpf_map_type type)
-{
-	return type == BPF_MAP_TYPE_PERCPU_HASH ||
-	       type == BPF_MAP_TYPE_PERCPU_ARRAY ||
-	       type == BPF_MAP_TYPE_LRU_PERCPU_HASH ||
-	       type == BPF_MAP_TYPE_PERCPU_CGROUP_STORAGE;
-}
-
-static void *bpf_map__alloc_value(const struct bpf_map *map)
-{
-	if (bpf_map__is_per_cpu(bpf_map__type(map)))
-		return malloc(round_up(bpf_map__value_size(map), 8) *
-			      sysconf(_SC_NPROCESSORS_CONF));
-
-	return malloc(bpf_map__value_size(map));
-}
-
-int bpf_map__fprintf(struct bpf_map *map, FILE *fp)
-{
-	void *prev_key = NULL, *key, *value;
-	int fd = bpf_map__fd(map), err;
-	int printed = 0;
-
-	if (fd < 0)
-		return fd;
-
-	err = -ENOMEM;
-	key = malloc(bpf_map__key_size(map));
-	if (key == NULL)
-		goto out;
-
-	value = bpf_map__alloc_value(map);
-	if (value == NULL)
-		goto out_free_key;
-
-	while ((err = bpf_map_get_next_key(fd, prev_key, key) == 0)) {
-		int intkey = *(int *)key;
-
-		if (!bpf_map_lookup_elem(fd, key, value)) {
-			bool boolval = *(bool *)value;
-			if (boolval)
-				printed += fprintf(fp, "[%d] = %d,\n", intkey, boolval);
-		} else {
-			printed += fprintf(fp, "[%d] = ERROR,\n", intkey);
-		}
-
-		prev_key = key;
-	}
-
-	if (err == ENOENT)
-		err = printed;
-
-	free(value);
-out_free_key:
-	free(key);
-out:
-	return err;
-}
diff --git a/tools/perf/util/bpf_map.h b/tools/perf/util/bpf_map.h
deleted file mode 100644
index c2f7c13cba23..000000000000
--- a/tools/perf/util/bpf_map.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
-#ifndef __PERF_BPF_MAP_H
-#define __PERF_BPF_MAP_H 1
-
-#include <stdio.h>
-struct bpf_map;
-
-#ifdef HAVE_LIBBPF_SUPPORT
-
-int bpf_map__fprintf(struct bpf_map *map, FILE *fp);
-
-#else
-
-#include <linux/compiler.h>
-
-static inline int bpf_map__fprintf(struct bpf_map *map __maybe_unused, FILE *fp __maybe_unused)
-{
-	return 0;
-}
-
-#endif // HAVE_LIBBPF_SUPPORT
-
-#endif // __PERF_BPF_MAP_H
-- 
2.53.0.239.g8d8fc8a987-goog


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH v1 5/5] perf record: Remove unused cpu-set-sched.h
  2026-02-07  8:24 [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
                   ` (3 preceding siblings ...)
  2026-02-07  8:24 ` [PATCH v1 4/5] perf bpf_map: Remove unused code Ian Rogers
@ 2026-02-07  8:24 ` Ian Rogers
  2026-03-12 20:40 ` [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
  5 siblings, 0 replies; 9+ messages in thread
From: Ian Rogers @ 2026-02-07  8:24 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, Eric Biggers, Palmer Dabbelt,
	Stephen Brennan, Haibo Xu, linux-kernel, linux-perf-users

Header file declares unused macros, so remove.

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/builtin-record.c     |  1 -
 tools/perf/util/cpu-set-sched.h | 50 ---------------------------------
 2 files changed, 51 deletions(-)
 delete mode 100644 tools/perf/util/cpu-set-sched.h

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 60d764068302..40917a0be238 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -40,7 +40,6 @@
 #include "util/perf_api_probe.h"
 #include "util/trigger.h"
 #include "util/perf-hooks.h"
-#include "util/cpu-set-sched.h"
 #include "util/synthetic-events.h"
 #include "util/time-utils.h"
 #include "util/units.h"
diff --git a/tools/perf/util/cpu-set-sched.h b/tools/perf/util/cpu-set-sched.h
deleted file mode 100644
index 8cf4e40d322a..000000000000
--- a/tools/perf/util/cpu-set-sched.h
+++ /dev/null
@@ -1,50 +0,0 @@
-// SPDX-License-Identifier: LGPL-2.1
-// Definitions taken from glibc for use with older systems, same licensing.
-#ifndef _CPU_SET_SCHED_PERF_H
-#define _CPU_SET_SCHED_PERF_H
-
-#include <features.h>
-#include <sched.h>
-
-#ifndef CPU_EQUAL
-#ifndef __CPU_EQUAL_S
-#if __GNUC_PREREQ (2, 91)
-# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
-  (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
-#else
-# define __CPU_EQUAL_S(setsize, cpusetp1, cpusetp2) \
-  (__extension__							      \
-   ({ const __cpu_mask *__arr1 = (cpusetp1)->__bits;			      \
-      const __cpu_mask *__arr2 = (cpusetp2)->__bits;			      \
-      size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
-      size_t __i;							      \
-      for (__i = 0; __i < __imax; ++__i)				      \
-	if (__arr1[__i] != __arr2[__i])					      \
-	  break;							      \
-      __i == __imax; }))
-#endif
-#endif // __CPU_EQUAL_S
-
-#define CPU_EQUAL(cpusetp1, cpusetp2) \
-  __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2)
-#endif // CPU_EQUAL
-
-#ifndef CPU_OR
-#ifndef __CPU_OP_S
-#define __CPU_OP_S(setsize, destset, srcset1, srcset2, op) \
-  (__extension__							      \
-   ({ cpu_set_t *__dest = (destset);					      \
-      const __cpu_mask *__arr1 = (srcset1)->__bits;			      \
-      const __cpu_mask *__arr2 = (srcset2)->__bits;			      \
-      size_t __imax = (setsize) / sizeof (__cpu_mask);			      \
-      size_t __i;							      \
-      for (__i = 0; __i < __imax; ++__i)				      \
-	((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i];    \
-      __dest; }))
-#endif // __CPU_OP_S
-
-#define CPU_OR(destset, srcset1, srcset2) \
-  __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |)
-#endif // CPU_OR
-
-#endif // _CPU_SET_SCHED_PERF_H
-- 
2.53.0.239.g8d8fc8a987-goog


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH v1 0/5] perf tool: Minor code clean ups
  2026-02-07  8:24 [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
                   ` (4 preceding siblings ...)
  2026-02-07  8:24 ` [PATCH v1 5/5] perf record: Remove unused cpu-set-sched.h Ian Rogers
@ 2026-03-12 20:40 ` Ian Rogers
  2026-03-13 21:26   ` Namhyung Kim
  5 siblings, 1 reply; 9+ messages in thread
From: Ian Rogers @ 2026-03-12 20:40 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Alexander Shishkin, Jiri Olsa, Ian Rogers,
	Adrian Hunter, James Clark, Eric Biggers, Palmer Dabbelt,
	Stephen Brennan, Haibo Xu, linux-kernel, linux-perf-users

On Sat, Feb 7, 2026 at 12:24 AM Ian Rogers <irogers@google.com> wrote:
>
> Remove some unused functions, files, etc. Reduce scope of variables
> and functions. Constify arrays in perf.c.
>
> Ian Rogers (5):
>   perf symbol: Reduce scope of elf__needs_adjust_symbols
>   perf dump-insn: Remove dump-insn.c
>   perf tool: Constify the command and option arrays
>   perf bpf_map: Remove unused code
>   perf record: Remove unused cpu-set-sched.h

Ping.

Thanks,
Ian

>  tools/perf/builtin-record.c     |  1 -
>  tools/perf/builtin-trace.c      |  1 -
>  tools/perf/perf.c               | 12 +++---
>  tools/perf/util/Build           |  2 -
>  tools/perf/util/bpf_map.c       | 70 ---------------------------------
>  tools/perf/util/bpf_map.h       | 23 -----------
>  tools/perf/util/cpu-set-sched.h | 50 -----------------------
>  tools/perf/util/dump-insn.c     | 23 -----------
>  tools/perf/util/symbol-elf.c    |  8 ++--
>  tools/perf/util/symbol.h        |  1 -
>  10 files changed, 10 insertions(+), 181 deletions(-)
>  delete mode 100644 tools/perf/util/bpf_map.c
>  delete mode 100644 tools/perf/util/bpf_map.h
>  delete mode 100644 tools/perf/util/cpu-set-sched.h
>  delete mode 100644 tools/perf/util/dump-insn.c
>
> --
> 2.53.0.239.g8d8fc8a987-goog
>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1 0/5] perf tool: Minor code clean ups
  2026-03-12 20:40 ` [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
@ 2026-03-13 21:26   ` Namhyung Kim
  2026-03-14 17:42     ` Namhyung Kim
  0 siblings, 1 reply; 9+ messages in thread
From: Namhyung Kim @ 2026-03-13 21:26 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark,
	Eric Biggers, Palmer Dabbelt, Stephen Brennan, Haibo Xu,
	linux-kernel, linux-perf-users

On Thu, Mar 12, 2026 at 01:40:53PM -0700, Ian Rogers wrote:
> On Sat, Feb 7, 2026 at 12:24 AM Ian Rogers <irogers@google.com> wrote:
> >
> > Remove some unused functions, files, etc. Reduce scope of variables
> > and functions. Constify arrays in perf.c.
> >
> > Ian Rogers (5):
> >   perf symbol: Reduce scope of elf__needs_adjust_symbols
> >   perf dump-insn: Remove dump-insn.c
> >   perf tool: Constify the command and option arrays
> >   perf bpf_map: Remove unused code
> >   perf record: Remove unused cpu-set-sched.h
 
Sorry for the delay.  Looks fine to me.

I'll test and process them soon.

Thanks,
Namhyung


> >  tools/perf/builtin-record.c     |  1 -
> >  tools/perf/builtin-trace.c      |  1 -
> >  tools/perf/perf.c               | 12 +++---
> >  tools/perf/util/Build           |  2 -
> >  tools/perf/util/bpf_map.c       | 70 ---------------------------------
> >  tools/perf/util/bpf_map.h       | 23 -----------
> >  tools/perf/util/cpu-set-sched.h | 50 -----------------------
> >  tools/perf/util/dump-insn.c     | 23 -----------
> >  tools/perf/util/symbol-elf.c    |  8 ++--
> >  tools/perf/util/symbol.h        |  1 -
> >  10 files changed, 10 insertions(+), 181 deletions(-)
> >  delete mode 100644 tools/perf/util/bpf_map.c
> >  delete mode 100644 tools/perf/util/bpf_map.h
> >  delete mode 100644 tools/perf/util/cpu-set-sched.h
> >  delete mode 100644 tools/perf/util/dump-insn.c
> >
> > --
> > 2.53.0.239.g8d8fc8a987-goog
> >

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v1 0/5] perf tool: Minor code clean ups
  2026-03-13 21:26   ` Namhyung Kim
@ 2026-03-14 17:42     ` Namhyung Kim
  0 siblings, 0 replies; 9+ messages in thread
From: Namhyung Kim @ 2026-03-14 17:42 UTC (permalink / raw)
  To: Ian Rogers
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Alexander Shishkin, Jiri Olsa, Adrian Hunter, James Clark,
	Eric Biggers, Palmer Dabbelt, Stephen Brennan, Haibo Xu,
	linux-kernel, linux-perf-users

On Fri, Mar 13, 2026 at 02:26:10PM -0700, Namhyung Kim wrote:
> On Thu, Mar 12, 2026 at 01:40:53PM -0700, Ian Rogers wrote:
> > On Sat, Feb 7, 2026 at 12:24 AM Ian Rogers <irogers@google.com> wrote:
> > >
> > > Remove some unused functions, files, etc. Reduce scope of variables
> > > and functions. Constify arrays in perf.c.
> > >
> > > Ian Rogers (5):
> > >   perf symbol: Reduce scope of elf__needs_adjust_symbols
> > >   perf dump-insn: Remove dump-insn.c
> > >   perf tool: Constify the command and option arrays
> > >   perf bpf_map: Remove unused code
> > >   perf record: Remove unused cpu-set-sched.h
>  
> Sorry for the delay.  Looks fine to me.
> 
> I'll test and process them soon.

Applied to perf-tools-next, thanks!

Best regards,
Namhyung


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-03-14 17:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-07  8:24 [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
2026-02-07  8:24 ` [PATCH v1 1/5] perf symbol: Reduce scope of elf__needs_adjust_symbols Ian Rogers
2026-02-07  8:24 ` [PATCH v1 2/5] perf dump-insn: Remove dump-insn.c Ian Rogers
2026-02-07  8:24 ` [PATCH v1 3/5] perf tool: Constify the command and option arrays Ian Rogers
2026-02-07  8:24 ` [PATCH v1 4/5] perf bpf_map: Remove unused code Ian Rogers
2026-02-07  8:24 ` [PATCH v1 5/5] perf record: Remove unused cpu-set-sched.h Ian Rogers
2026-03-12 20:40 ` [PATCH v1 0/5] perf tool: Minor code clean ups Ian Rogers
2026-03-13 21:26   ` Namhyung Kim
2026-03-14 17:42     ` Namhyung Kim

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox