Skip to contentSkip to conversation

perf top and deleted binaries

RFC Arun Sharma 2 participants 2 messages May 9, 2011

lore
Share & tools
lore
#0 lore raw

For long running binaries which may have been replaced or deleted, today perf top spits out a warning and doesn't show anything. For eg:

test.c:

main()

{
	while(1);
}

gcc -O2 test.c -o test
./test &
gcc -O2 test.c -o test # overwrite the binary
perf top -p <pid>

shows nothing. It could instead show:

100% <unresolved> test

like perf record/report would show for the same test case. Comments?

-Arun

#1 lore raw

Em Mon, May 09, 2011 at 11:28:23AM -0700, Arun Sharma escreveu:

Quoted 16 lines

For long running binaries which may have been replaced or deleted, today perf top spits out a warning and doesn't show anything. For eg:

test.c:

main()

{
	while(1);
}

gcc -O2 test.c -o test
./test &
gcc -O2 test.c -o test # overwrite the binary
perf top -p <pid>

Quoted 5 lines

shows nothing. It could instead show:

100% <unresolved> test

like perf record/report would show for the same test case. Comments?

Agreed :-)

When/if we get build-id as first class citizen, stashing it in some kernel data structure at DSO load time, we'll be able to use it for content based DSO lookup in the cache.

- Arnaldo