perf archive: Fix filtering of empty build-ids

A non-existent build-id used to be treated as all-zero SHA-1 hash.
Build-ids are now variable width. A non-existent build-id is an empty
string and "perf buildid-list" pads this with spaces. This is true even
when using old files recorded from older versions of perf;
"perf buildid-list" never reports an all-zero hash anymore.

This fixes "perf-archive" to skip missing build-ids by skipping lines
that start with a padding space rather than with zeroes.

Signed-off-by: Nicholas Fraser <>
Acked-by: Jiri Olsa <>
Cc: Alexander Shishkin <>
Cc: Huw Davies <>
Cc: Ian Rogers <>
Cc: Ingo Molnar <>
Cc: Mark Rutland <>
Cc: Namhyung Kim <>
Cc: Peter Zijlstra <>
Cc: Ulrich Czekalla <>
Signed-off-by: Arnaldo Carvalho de Melo <>
1 file changed