Re: [PATCH v1] perf tests: Fix data symbol test with LTO builds
From: Namhyung Kim
Date: Sat Mar 08 2025 - 13:24:37 EST
On Wed, 26 Feb 2025 15:01:09 -0800, Ian Rogers wrote:
> With LTO builds, although regular builds could also see this as
> all the code is in one file, the datasym workload can realize the
> buf1.reserved data is never accessed. The compiler moves the
> variable to bss and only keeps the data1 and data2 parts as
> separate variables. This causes the symbol check to fail in the
> test. Make the variable volatile to disable the more aggressive
> optimization. Rename the variable to make which buf1 in perf is
> being referred to.
>
> [...]
Applied to perf-tools-next, thanks!
Best regards,
Namhyung