On 29.07.2024 16:24, Stewart Hildebrand wrote: > In preparation for using -finstrument-functions option, we need to tag a > few functions that don't work well with such instrumentation. If we > don't intervene, we would end up with linker errors such as undefined > reference to __bad_cmpxchg.
I can't spot mention of such a side effect from the documentation. Talk there is of function calls being added at function entry and exit. Nothing is being said that calls to other functions would also be affected. > --- a/xen/arch/arm/include/asm/arm64/cmpxchg.h > +++ b/xen/arch/arm/include/asm/arm64/cmpxchg.h > @@ -5,6 +5,7 @@ > > extern void __bad_xchg(volatile void *ptr, int size); > > +__attribute__((no_instrument_function)) I guess it would be nice to have #define no_instrument __attribute__((no_instrument_function)) in xen/compiler.h. I also don't think these annotations want placing ahead of the entire declaration, but rather where other similar annotations would also go. Jan
