Skip to content

Commit bc055c5

Browse files
committed
perf symbols: Relax checks on perf-PID.map ownership
Those are simple enough, and usually not produced by root, instead by whatever user is running java, rust, Node.js JIT code that end up generating those /tmp/perf-PID.map for resolution of symbols in the anonymous executable maps. Having to use --force to resolve symbols in 'perf top' is a distraction, as recently I experienced when node.js symbols were not being resolved by 'perf top'. Acked-by: Ingo Molnar <mingo@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Hítalo Silva <hitalos@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Pekka Enberg <penberg@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lkml.kernel.org/n/tip-tk2jgo2v4v2yjuj28axbpppo@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
1 parent 42337cb commit bc055c5

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

tools/perf/util/symbol.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,17 +1537,6 @@ int dso__load(struct dso *dso, struct map *map)
15371537
dso->adjust_symbols = 0;
15381538

15391539
if (perfmap) {
1540-
struct stat st;
1541-
1542-
if (lstat(map_path, &st) < 0)
1543-
goto out;
1544-
1545-
if (!symbol_conf.force && st.st_uid && (st.st_uid != geteuid())) {
1546-
pr_warning("File %s not owned by current user or root, "
1547-
"ignoring it (use -f to override).\n", map_path);
1548-
goto out;
1549-
}
1550-
15511540
ret = dso__load_perf_map(map_path, dso);
15521541
dso->symtab_type = ret > 0 ? DSO_BINARY_TYPE__JAVA_JIT :
15531542
DSO_BINARY_TYPE__NOT_FOUND;

0 commit comments

Comments
 (0)