perf archive: Don't try to collect files without a build-id
PATCH 1/1 perf archive: Don't try to collect files without a build-id
From: Arnaldo Carvalho de Melo <[email protected]>
To avoid these error:
[root@doppio ~]# perf archive
tar: .build-id/00/00000000000000000000000000000000000000: Cannot stat:
No such file or directory
tar: .build-id/00/00000000000000000000000000000000000000: Cannot stat:
No such file or directory
tar: .build-id/00/00000000000000000000000000000000000000: Cannot stat:
No such file or directory
tar: .build-id/00/00000000000000000000000000000000000000: Cannot stat:
No such file or directory
tar: Exiting with failure status due to previous errors [root@doppio ~]#
More work is needed to support archiving symtabs for binaries without a build-id, perhaps creating a perf.data UUID + adding build-ids for the binaries copied into the cache and then have this perf.data session UUID be a directory with symlinks to the by now calculated build-id of the files inside it.
Or just do an extra pass and insert the calculated build-ids in the perf.data header.
--- tools/perf/perf-archive.sh | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
tools/perf/perf-archive.sh +2 -1
@@ -9,8 +9,9 @@ fi DEBUGDIR=~/.debug/ BUILDIDS=$(mktemp /tmp/perf-archive-buildids.XXXXXX) +NOBUILDID=0000000000000000000000000000000000000000 -perf buildid-list -i $PERF_DATA --with-hits > $BUILDIDS +perf buildid-list -i $PERF_DATA --with-hits | grep -v "^$NOBUILDID " > $BUILDIDS if [ ! -s $BUILDIDS ] ; then echo "perf archive: no build-ids found" rm -f $BUILDIDS
Signature · 1 line
1.6.2.5
Quoted 4 lines · Arnaldo Carvalho de Melo
From: Arnaldo Carvalho de Melo <[email protected]>
To avoid these error:
Quoted 11 lines
[root@doppio ~]# perf archive
tar: .build-id/00/00000000000000000000000000000000000000: Cannot stat:
No such file or directory
tar: .build-id/00/00000000000000000000000000000000000000: Cannot stat:
No such file or directory
tar: .build-id/00/00000000000000000000000000000000000000: Cannot stat:
No such file or directory
tar: .build-id/00/00000000000000000000000000000000000000: Cannot stat:
No such file or directory
tar: Exiting with failure status due to previous errors [root@doppio ~]#
Your fix solved the problem on my box too - thanks!
Ingo