]> code.ossystems Code Review - openembedded-core.git/commit
perf: fix reproducibility issues
authorBruce Ashfield <bruce.ashfield@gmail.com>
Tue, 9 Mar 2021 19:23:36 +0000 (14:23 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Mar 2021 10:29:44 +0000 (10:29 +0000)
commitdea57aa1cd879df4feae1b9595b38c5b6ff74574
tree835acd2c7a5f5873e63adac5a9ec090eb0a28a91
parent89b38e4e7be9e136c71d5860ddca5369f9628393
perf: fix reproducibility issues

perf has been failing our reproducible testing due to multiple symbols
containg build paths.

With this commit, we fix the issues:

 1) The following line in the Makefle:

     override PYTHON := $(call get-executable-or-default,PYTHON,$(PYTHON_AUTO))

 "PYTHON" / "PYTHON_AUTO" have the full path as part of the variable. We've
 ensure that the environment is setup and we do not need the full path to be
 captured, since the symbol gets built into the executable, making it not
 reproducible.

 2) The following line:

    srcdir_SQ = $(patsubst %tools/perf,tools/perf,$(subst ','\'',$(srcdir))),

 Captures the full src path of perf, which of course makes it not
 reproducible. We really only need the relative location 'tools/perf', so we
 change the Makefile line to remove everything before 'tools/perf'

 3) OUTPUT is the full path, we have python on the path so we remove it from the
 definition. This is captured in the perf binary, so breaks reproducibility

     PYTHONPATH="BUILD_STR(python)

 4) To avoid bison generating #ifdefs that have captured paths, we make sure
 all the calls have YFLAGS, which contains prefix mapping information.

Upstream-status: OE specific to our cross/build environments. Variants
                 will be developed for upstream

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/perf/perf.bb