On Fri, Feb 3, 2023 at 10:47 AM Richard Purdie
<richard.pur...@linuxfoundation.org> wrote:
>
> 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.

Looks good to me. The perf recipe is the great collector of sed manipulations :)

>
> 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!

I can do this, if you haven't started on it. I can't say that i know
exactly why it
isn't already there, but it can't be that hard to figure out :)

Bruce

>
> Signed-off-by: Richard Purdie <richard.pur...@linuxfoundation.org>
> ---
>  meta/recipes-kernel/perf/perf.bb | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb 
> b/meta/recipes-kernel/perf/perf.bb
> index c1b0bd22d82..1dff39a17e4 100644
> --- a/meta/recipes-kernel/perf/perf.bb
> +++ b/meta/recipes-kernel/perf/perf.bb
> @@ -276,6 +276,10 @@ do_configure:prepend () {
>          sed -i -e "s,$target,$replacement1$replacement2$replacement3,g" \
>                         "${S}/tools/perf/pmu-events/Build"
>      fi
> +    if [ -e "${S}/tools/perf/pmu-events/jevents.py" ]; then
> +        sed -i -e "s#os.scandir(path)#sorted(os.scandir(path), key=lambda e: 
> e.name)#g" \
> +                       "${S}/tools/perf/pmu-events/jevents.py"
> +    fi
>      # end reproducibility substitutions
>
>      # We need to ensure the --sysroot option in CC is preserved
> --
> 2.37.2
>


-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#176725): 
https://lists.openembedded.org/g/openembedded-core/message/176725
Mute This Topic: https://lists.openembedded.org/mt/96725319/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to