Re: [PATCH 3/3] kcov: introduce extended PC coverage collection mode
From: Alexander Potapenko
Date: Mon Mar 16 2026 - 12:51:30 EST
> Setting/saving/restoring this flag is fragile. I afraid some of future
> patches can break it in some corner cases.
> Can we have a new kcov_mode and use some mask check on tracing fast
> path, so that it's as cheap as the current == kcov_mode comparison?
>
> +glider, what did you do in your coverage deduplication patch? I have
> some vague memories we tried to do something similar.
In fact, no, we do switch (mode) for __sanitizer_cov_trace_pc_guard() here:
https://patchew.org/linux/20250731115139.3035888-1-glider@xxxxxxxxxx/20250731115139.3035888-8-glider@xxxxxxxxxx/