From: "Chuck Wolber" <chuck@wolber.net>
To: "Marco Elver" <elver@google.com>
Cc: kasan-dev@googlegroups.com, nathan@kernel.org,
akpm@linux-foundation.org, anton.ivanov@cambridgegreys.com,
oberpar@linux.ibm.com, ardb@kernel.org, arnd@arndb.de,
bhelgaas@google.com, bp@alien8.de, dave.hansen@linux.intel.com,
dvyukov@google.com, hpa@zytor.com, jinghao7@illinois.edu,
johannes@sipsolutions.net, jpoimboe@kernel.org,
justinstitt@google.com, kees@kernel.org,
kent.overstreet@linux.dev, linux-arch@vger.kernel.org,
linux-efi@vger.kernel.org, linux-kbuild@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-um@lists.infradead.org, llvm@lists.linux.dev,
luto@kernel.org, marinov@illinois.edu, masahiroy@kernel.org,
maskray@google.com, mathieu.desnoyers@efficios.com,
mhiramat@kernel.org, mingo@redhat.com, morbo@google.com,
"Nick Desaulniers" <ndesaulniers@google.com>,
"Paul E. McKenney" <paulmck@kernel.org>,
richard@nod.at, "Steven Rostedt" <rostedt@goodmis.org>,
samitolvanen@google.com, tglx@linutronix.de,
tingxur@illinois.edu, tyxu@illinois.edu, wentaoz5@illinois.edu,
x86@kernel.org, peterz@infradead.org,
"Sasha Levin" <sashal@kernel.org>,
"Aleksandr Nogikh" <nogikh@google.com>,
"Taras Madan" <tarasmadan@google.com>,
"Alexander Potapenko" <glider@google.com>
Subject: Re: [PROPOSAL] Replace gcov and kcov with llvm-cov
Date: Tue, 06 Oct 2026 16:27:11 +0000 [thread overview]
Message-ID: <41913a77-5c57-4967-8166-765dd5dde1bf@app.fastmail.com> (raw)
In-Reply-To: <CANpmjNOaykC4McAj=gZghqPSQc9aGBP_CjgKmp3n2yjeJTxDSA@mail.gmail.com>
On Tue, Oct 6, 2026, at 4:10 PM, Marco Elver wrote:
> On Tue, 6 Oct 2026 at 17:14, Chuck Wolber <chuck@wolber.net> wrote:
>>
>> Stemming from some hallway track conversations with maintainers at LPC
>> 2026, I propose replacing gcov and kcov in the kernel with llvm-cov.
>
> I know the origin of the discussion, and wanted to chat, but I guess
> that didn't happen and instead we get this proposal. It would have
> been good to understand the requirements of users of gcov and kcov
> (more below).
No problem, I still plan to seek you out to discuss this further. I just
wanted to get the discussion going in case there was a broader set of
opinions on this matter.
>> We have a set of patches [1] that implements kernel based llvm-cov.
>> They need to be updated and some additional patches are required to
>> address some stubs that are missing noinstr annotation. But otherwise
>> I should be able to send a full set of patches (including taking on
>> the maintainer role) to remove gcov and kcov and replace it with
>> llvm-cov in fairly short order.
>
> The hallway chat was supposed to figure out if there's a way to bridge
> some of the gaps, but jumping the gun like this without having
> addressed the requirements of kcov users does not make any sense at
> all.
I totally agree, and I am still up for that discussion.
>> If there is a desire to take this in pieces or implement other
>> intermediate steps, let me know. Otherwise I can generate a
>> monolithic set all at once.
>>
>> [1] https://lore.kernel.org/lkml/20240905043245.1389509-1-wentaoz5@illinois.edu/
>
> llvm-cov is generally useful to have; llvm-cov is closest to gcov, so
> that might make sense to replace.
Swapping llvm-cov for gcov to start with is pretty straightforward, so I
can aim my initial patch set there.
> KCOV, however, cannot be replaced by llvm-cov. KCOV isn't a coverage
> reporting tool for users, it's a low-overhead interface for fuzzers
> (syzkaller/syzbot and many others). llvm-cov has no equivalent of:
>
> - per-task and remote (kthread/softirq/USB/vhost) coverage collection
> (to avoid polluting coverage with concurrent tasks);
> llvm-cov counters are global and polluted by everything else running;
Correct, and I have pondered some ideas for doing exactly that, but they
would be quite experimental at this time. The patches come with the
ability to clear the counters so that specific tests can be run, but
that is still monolithic. I would love to discuss the potential for
other methods of masking coverage so we can get granular results.
> - ordered PC traces (edge signal) and comparison operands (TRACE_CMP);
>
> - performance: a per-task mmap'd buffer reset with one store, vs.
> reading/resetting
> megabytes of global counters after every program;
>
> - GCC support (we may want to keep at least one GCC-supported coverage tool).
>
> It's also UAPI (include/uapi/linux/kcov.h), with existing users.
> syzkaller heavily relies on KCOV's features above to achieve good
> performance and coverage; there's no reasonable way today to migrate
> to anything else.
>
> As-is, NAK on removing KCOV. Consider replacing gcov with it.
Understood. I will focus on replacing gcov for now, and I am interested
in exploring what else is possible.
Thank you,
..Ch:W..
next prev parent reply other threads:[~2026-10-06 16:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-06 15:14 Chuck Wolber
2026-10-06 16:10 ` Marco Elver
2026-10-06 16:27 ` Chuck Wolber [this message]
2026-10-07 2:30 ` Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41913a77-5c57-4967-8166-765dd5dde1bf@app.fastmail.com \
--to=chuck@wolber.net \
--cc=akpm@linux-foundation.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=hpa@zytor.com \
--cc=jinghao7@illinois.edu \
--cc=johannes@sipsolutions.net \
--cc=jpoimboe@kernel.org \
--cc=justinstitt@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kees@kernel.org \
--cc=kent.overstreet@linux.dev \
--cc=linux-arch@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=luto@kernel.org \
--cc=marinov@illinois.edu \
--cc=masahiroy@kernel.org \
--cc=maskray@google.com \
--cc=mathieu.desnoyers@efficios.com \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=nogikh@google.com \
--cc=oberpar@linux.ibm.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=richard@nod.at \
--cc=rostedt@goodmis.org \
--cc=samitolvanen@google.com \
--cc=sashal@kernel.org \
--cc=tarasmadan@google.com \
--cc=tglx@linutronix.de \
--cc=tingxur@illinois.edu \
--cc=tyxu@illinois.edu \
--cc=wentaoz5@illinois.edu \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®