https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80223

Fangrui Song <i at maskray dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |i at maskray dot me

--- Comment #7 from Fangrui Song <i at maskray dot me> ---
Some notes.

{gcc,clang} -fsanitize-coverage={trace-pc,trace-cmp} is another coverage
feature. It uses no_sanitize_coverage instead of no_instrument_function. The
GCC support for no_sanitize_coverage is very new (by Martin, in 2021-05-25).
(In Clang, the feature has more modes, e.g. you can control func/bb/edge.)

The Linux kernel use case (include/linux/compiler_types.h ) uses 'noinline' so
inlining is not a concern.

/* Section for code which can't be instrumented at all */
#define noinstr                                                         \
        noinline notrace __attribute((__section__(".noinstr.text")))    \
        __no_kcsan __no_sanitize_address

Clang supports another filtering mechanism, -fprofile-list=
(https://reviews.llvm.org/D94820). But the kernel use case seems to prefer a
function attribute.

Reply via email to