Re: [PATCH v2 03/20] coverage: add a common debugfs interface

From: Sasha Levin

Date: Thu Nov 05 2026 - 20:08:41 EST


On Thu, Nov 05, 2026 at 06:49:27PM +0100, Peter Oberparleiter wrote:
>On 03.11.2026 02:52, Sasha Levin wrote:
>> The common reset never touches KCOV, whose coverage buffers are owned
>> by the tasks that set them up.
>
>This part is slightly inconsistent - there is a common reset attribute,
>but it doesn't apply to all coverage mechanisms. Also for gcov, there
>are two reset attributes that perform the same function.
>
>Would it make sense to only keep the attribute in the backend directory
>and possibly mandate a common name via convention?

Yes, that's cleaner. I'll drop coverage/reset in v3. Each backend keeps
a reset file in its own directory, which is named after what
coverage/backend reports, so gcov keeps gcov/reset and llvm gets
coverage/llvm/reset. I'll document that convention in coverage.rst and
in struct coverage_backend.

>> +void __init coverage_register_backend(const struct coverage_backend *backend)
>> +{
>> + if (WARN_ON(coverage_backend))
>> + return;
>
>Can this happen at all?

No. The backends are members of one Kconfig choice, so only one of them
is ever built in. I'll drop it.

--
Thanks,
Sasha