KCOV_REMOTE_REGISTER(9)
π kcov_remote_register(9) π
okay so welcome to the Kernel Developer's Manual, bestie β this is the page for kcov_remote_register(9) and its whole remote code-coverage squad. It's giving kernel subsystem group chat, and honestly? iconic. π¦
β¨ NAME β¨
Say hi to kcov_remote_register, kcov_remote_unregister, kcov_remote_enter, and kcov_remote_leave β together they're the remote kernel code coverage collection interface. periodt. π
πΈ SYNOPSIS πΈ
#include <sys/kcov.h>
void
kcov_remote_register(int subsystem, void *id);
void
kcov_remote_unregister(int subsystem, void *id);
void
kcov_remote_enter(int subsystem, void *id);
void
kcov_remote_leave(int subsystem, void *id);
π DESCRIPTION π
These functions are the interface for collecting code coverage from various kernel subsystems using kcov(4). The subsystem must be one of the following:
#define KCOV_REMOTE_COMMON 0
The id must be a unique identifier for a resource tied to subsystem that is known both by kernel and user space. For instance, a network interface driver could form a subsystem using the unique interface identifier as the id. highkey a whole vibe. π«Ά
kcov_remote_register(int subsystem, void *id)β registers a new instance of the given subsystem. Calling this function more than once with the same arguments is idempotent, so bestie, same args = same result, no drama. β¨kcov_remote_unregister(int subsystem, void *id)β unregisters an existing instance of the given subsystem, if present. If one or many threads are currently within a remote section,kcov_remote_unregister()will sleep until all the sections have been left. It's literally waiting for everybody to exit the group chat. πkcov_remote_enter(int subsystem, void *id)β enters a remote section. If the current thread haskcov(4)enabled, code coverage will be collected inside the remote section. Remote sections may not be nested β do not stack them, bestie, that's forbidden stacking energy π.kcov_remote_leave(int subsystem, void *id)β leaves a remote section. bye bestie! π
π§ CONTEXT π§
kcov_remote_register() and kcov_remote_unregister() can be called from process context. kcov_remote_enter() and kcov_remote_leave() can be called from interrupt and process context. slay for flexibility. π₯
π₯ CODE REFERENCES π₯
These functions are implemented in sys/dev/kcov.c. go look, it's right there. π
π SEE ALSO π
π HISTORY π
These functions first appeared in OpenBSD 6.8. a classic, no cap. π
π«Ά AUTHORS π«Ά
Anton Lindqvist <anton@openbsd.org>
okay that's the tea β β this page is from Debian, dated February 1, 2021, and yes bestie, it's the KCOV_REMOTE_REGISTER(9) manual page. mwah ππ
π¦ where this page comes from
- nixpkgs unstable: cvs-export
- Copyright (c) 2020 Anton Lindqvist <anton@openbsd.org>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms