Page MenuHomeFreeBSD

Add a central location for exclusion checks. We check here if function is excluded from FBT instrumentation
ClosedPublic

Authored by br on Jun 24 2015, 2:25 PM.
Tags
None
Referenced Files
F81924155: D2899.diff
Tue, Apr 23, 6:20 AM
Unknown Object (File)
Feb 8 2024, 7:41 PM
Unknown Object (File)
Jan 26 2024, 12:03 PM
Unknown Object (File)
Jan 24 2024, 10:57 AM
Unknown Object (File)
Dec 25 2023, 11:29 AM
Unknown Object (File)
Dec 20 2023, 12:29 AM
Unknown Object (File)
Dec 3 2023, 11:44 PM
Unknown Object (File)
Dec 3 2023, 7:52 PM

Details

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

br retitled this revision from to Add a central location for exclusion checks. We check here if function is excluded from FBT instrumentation.
br updated this object.
br edited the test plan for this revision. (Show Details)
br added a reviewer: DTrace.
br added a child revision: D2738: DTrace support for AArch64.
emaste added inline comments.
sys/cddl/dev/fbt/fbt.c
129–130

A comment perhaps?

132–137

Should this be limited to arm/arm64, or apply to all archs?

andrew added inline comments.
sys/cddl/dev/fbt/fbt.c
133–134

How about something like the following?

When DTrace is built into the kernel we need to exclude the FBT functions from instrumentation.

sys/cddl/dev/fbt/fbt.c
132–137

This will apply to all archs.

markj added inline comments.
sys/cddl/dev/fbt/fbt.c
132–137

This isn't foolproof: what if one enables both fbt::systrace_probe:entry and a syscall probe?

I think we've discussed this problem before, but there isn't an obvious/straightforward solution. It seems to me that fixing this properly will involve something along the lines of: identify object files we want to avoid tracing, modify the build to dump their symbols and generate a table that's linked into fbt.ko or the kernel, and use the table to do lookups in fbt_excluded().

I don't object to this change, but it doesn't seem like the right approach to me. Perhaps it should at least be conditionalized on #ifndef _KLD_MODULE?

sys/cddl/dev/fbt/fbt.c
132–137

Perhaps it should at least be conditionalized on #ifndef _KLD_MODULE?

Seems like that would be a reasonable interim solution.

This revision was automatically updated to reflect the committed changes.