Re: [PATCH v6 07/13] perf tests: Exercise data type resolution from a register
From: Arnaldo Carvalho de Melo
Date: Wed Nov 18 2026 - 11:43:45 EST
On Tue, Nov 17, 2026 at 11:16:20PM -0800, Namhyung Kim wrote:
> On Tue, Nov 17, 2026 at 05:04:25PM -0300, Arnaldo Carvalho de Melo wrote:
> > From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
> >
> > At -O2 a struct pointer lives in a register (with DWARF describing it with
> > a register location on register-argument ABIs), while the unoptimized
> > workloads the data type tests profile keep their variables on the stack.
> >
> > Add a regptr workload with a noinline function that takes the pointer from
> > a volatile global, so the compiler cannot constant-propagate the object
> > address, and check that its three member accesses are resolved from that
> > register.
>
> Thanks for adding the workloads for data type profiling. I was unsure
> if it's ok to add since it'd requires many test cases to cover various
> aspect of binary patterns or compiler/language differences. But having
> a seperate repo for the test programs would be cumbersome too.
I think these are all super small samples that can get into the perf
binary, at some point if possible we can have it in dlsym'able .so
files. For now this way of including what is needed to fine tune/test
important new features such as data-type profiling is worth having it
linked in the main binary.
- Arnaldo