diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-03 12:06:08 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-03 16:52:15 +0000 |
commit | 063bdffc04714c7ed4bdba2aa93a19dd94f256a9 (patch) | |
tree | 2c02475c382f6a28b5808903707827aea81c2236 /meta/recipes-kernel/perf | |
parent | 61c35514cfd27dda045735695f8960126e0704b5 (diff) | |
download | poky-063bdffc04714c7ed4bdba2aa93a19dd94f256a9.tar.gz |
perf: Fix 6.1 kernel reproducibility issue
The pmu-events.c file is generated by a python script making os.scandir()
calls. The return value is "order on disk" which can cary between machines.
Add in a sed to fix the perf source to sort this data which makes
the pmu-events.c file deterministic.
We should try and upstream this change but we'll need to sed for varying
kernel versions. We should also try and get the perf source being added
to the perf-devsrc package so when failures like this occur, diffoscope
is much more helpful!
(From OE-Core rev: d2c27ae5c0d06363d2f0a2a8eb4e8e492df58444)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/perf')
-rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index c1b0bd22d8..1dff39a17e 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
@@ -276,6 +276,10 @@ do_configure:prepend () { | |||
276 | sed -i -e "s,$target,$replacement1$replacement2$replacement3,g" \ | 276 | sed -i -e "s,$target,$replacement1$replacement2$replacement3,g" \ |
277 | "${S}/tools/perf/pmu-events/Build" | 277 | "${S}/tools/perf/pmu-events/Build" |
278 | fi | 278 | fi |
279 | if [ -e "${S}/tools/perf/pmu-events/jevents.py" ]; then | ||
280 | sed -i -e "s#os.scandir(path)#sorted(os.scandir(path), key=lambda e: e.name)#g" \ | ||
281 | "${S}/tools/perf/pmu-events/jevents.py" | ||
282 | fi | ||
279 | # end reproducibility substitutions | 283 | # end reproducibility substitutions |
280 | 284 | ||
281 | # We need to ensure the --sysroot option in CC is preserved | 285 | # We need to ensure the --sysroot option in CC is preserved |