HomeFreeBSD

sdt: Create providers and probes in separate passes when loading sdt.ko

Description

sdt: Create providers and probes in separate passes when loading sdt.ko

The sdt module's load handler iterates over SDT linker sets for the
kernel and all loaded modules to create probes and providers defined by
SDT(9). Probes in one module may belong to a provider in a different
module, but when a probe is created we assume that the provider is
already defined. To maintain this invariant, modify the load handler to
perform two separate passes over loaded modules: one to define providers
and the other to define probes.

The problem manifests when loading linux.ko, which depends on
linux_common.ko, which defines providers used by probes defined in
linux.ko.

Reported by: gallatin
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation

Details

Provenance
markjAuthored on
Parents
rS368305: [axgbe] Fix compiler warnings in gcc-6.3; perhaps fix a PHY issue
Branches
Unknown
Tags
Unknown