perf build-id: Move the routine to find DSOs with hits to the lib