Page MenuHomeFreeBSD

dtrace_dtmalloc.4: Document the DTrace dtmalloc provider
Needs ReviewPublic

Authored by 0mp on Jul 17 2025, 8:56 PM.
Referenced Files
F132498860: D51396.id158708.diff
Fri, Oct 17, 10:21 AM
F132498852: D51396.id158709.diff
Fri, Oct 17, 10:21 AM
F132498836: D51396.id.diff
Fri, Oct 17, 10:21 AM
F132447671: D51396.diff
Fri, Oct 17, 12:51 AM
Unknown Object (File)
Thu, Oct 16, 8:45 AM
Unknown Object (File)
Fri, Oct 10, 11:40 PM
Unknown Object (File)
Mon, Oct 6, 9:17 AM
Unknown Object (File)
Tue, Sep 23, 6:54 PM
Subscribers

Details

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 65542
Build 62425: arc lint + arc unit

Event Timeline

0mp requested review of this revision.Jul 17 2025, 8:56 PM
share/man/man4/dtrace_dtmalloc.4
19

This could go on one line.

share/man/man4/dtrace_dtmalloc.4
11

I think the "9" in malloc(9) makes "kernel memory" redundant.

19
19

I think "type" can be explained a bit.

30
43
58

I am not really sure I understand this section.

101

Maybe "trace" instead of "instrument"? Not sure to be honest.

share/man/man4/dtrace_dtmalloc.4
23

I think explaining briefly what a malloc "type" is would be useful.

48

The probe argument types are already listed by dtrace -lv so I'm not sure it's useful to list them here unless you also describe what they are.

Briefly, the first three arguments for each probe provide references to the malloc type internals; size is the size of the allocation; zindx is the index into the kmemzones[] array used for the allocation.

In practice, size is the most useful parameter.

58

It means that if the malloc type was defined by

MALLOC_DEFINE(M_FOO_BAR, "foo bar", "FooBar subsystem");

the probes will be called dtmalloc::foo_bar:.

share/man/man4/dtrace_dtmalloc.4
58

Right, I think it'd be good to make that more explicit. I'm not sure it is immediately obvious.