File: linux-perf-remove-remaining-source-filenames-from-executable.patch

package info (click to toggle)
linux 6.18.3-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,742,780 kB
  • sloc: ansic: 26,780,494; asm: 272,079; sh: 148,752; python: 79,241; makefile: 57,741; perl: 36,527; xml: 19,542; cpp: 5,911; yacc: 4,939; lex: 2,950; awk: 1,607; sed: 30; ruby: 25
file content (41 lines) | stat: -rw-r--r-- 1,471 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From: Ben Hutchings <benh@debian.org>
Date: Tue, 30 May 2023 00:16:39 +0200
Subject: linux-perf: Remove remaining source filenames from executable

When we build perf with -ffile-prefix-map, there are still 2
source directory names embedded in the executable:

1. The Documentation subdirectory, used as a fallback from the
   installed location.
2. The python subdirectory, used in the Python script test.

Remove (1) since it is an unnecessary fallback.  Change (2)
to the installed location.

---
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -662,10 +662,12 @@ static int report__browse_hists(struct r
 
 	path = system_path(TIPDIR);
 	if (perf_tip(&help, path) || help == NULL) {
+#if 0
 		/* fallback for people who don't install perf ;-) */
 		free(path);
 		path = system_path(DOCDIR);
 		if (perf_tip(&help, path) || help == NULL)
+#endif
 			help = strdup("Cannot load tips.txt file, please install perf!");
 	}
 	free(path);
--- a/tools/perf/Build
+++ b/tools/perf/Build
@@ -52,7 +52,7 @@ CFLAGS_perf.o              += -DPERF_HTM
 			      -DPREFIX="BUILD_STR($(prefix_SQ))"
 CFLAGS_builtin-trace.o	   += -DSTRACE_GROUPS_DIR="BUILD_STR($(STRACE_GROUPS_DIR_SQ))"
 CFLAGS_builtin-report.o	   += -DTIPDIR="BUILD_STR($(tipdir_SQ))"
-CFLAGS_builtin-report.o	   += -DDOCDIR="BUILD_STR($(srcdir_SQ)/Documentation)"
+#CFLAGS_builtin-report.o	   += -DDOCDIR="BUILD_STR($(srcdir_SQ)/Documentation)"
 
 perf-util-y += util/
 perf-util-y += arch/