Page MenuHomeFreeBSD

dtrace: stop using eventhandlers for the part compiled into the kernel
ClosedPublic

Authored by mjg on Nov 22 2020, 4:01 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 1, 4:39 PM
Unknown Object (File)
May 18 2024, 10:54 PM
Unknown Object (File)
May 10 2024, 11:58 PM
Unknown Object (File)
May 10 2024, 11:58 PM
Unknown Object (File)
May 10 2024, 4:52 AM
Unknown Object (File)
May 9 2024, 10:04 PM
Unknown Object (File)
Apr 27 2024, 10:02 AM
Unknown Object (File)
Apr 27 2024, 10:01 AM
Subscribers

Details

Summary

Side note is that allocations sizes seem also out of whack, will be sorted out separately.

Duplication in creation of proc/thread0 will have to be sorted out as well but that's beyond the scope.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

mjg requested review of this revision.Nov 22 2020, 4:01 AM
mjg created this revision.

I am fine with conversion.

What surprises me is that just the presence of the hooks implies mallocs.

That said, why not piggy-back dtrace memory on struct thread, as we already have the scheduler data placed that way, see sched_sizeof_thread() and sched_sizeof_proc(). Just put one more addend into the zone creation size argument.

sys/kern/kern_dtrace.c
87

(void) while you are there

markj added inline comments.
sys/kern/kern_proc.c
68

If we are going to unconditionally include this header, it would be better to define the hooks for both KDTRACE_HOOKS and !KDTRACE_HOOKS, to avoid further polluting the code with ifdefs.

This revision is now accepted and ready to land.Nov 22 2020, 6:46 PM

threads are NOFREE so this would add more memory which can't be reclaimed until reboot