Kernel development best practices

Hey guys,

Especially those of you who have been developing the BSD kernel or kernel modules.

Would you mind sharing the tools you use for development, and especially for testing potential kernel changes? I'm interested in everything from testing and debugging to virtualized tests. I would really appreciate any insights, and potentially a discussion on this interesting topic.
 
That's a very broad question. There's the usual suspects - git for tracking changes, vim or emacs depending on your belief system though I've heard there's people versed in both worlds.

There's an integrated testing harness ( kyua) that is usually relied on - it originated at Google, I think. Debugging can easily be done via gdb and a bhyve vm - at least, as long as you're not doing console driver work.

That's my 2 cents; others can probably add a lot more infos. If you have more specific things you want to know about, I might have more thoughts...
 

Edit: Figured this would contain a list of tools specific for development of the FreeBSD code, but it seems it's more of a "general" guide to various languages.
 
i have no special tools just editor and grep (not all the stuff is documented within manpages)
i debug with [device_]printf (driver code is not that complex that you really need step by step or something)
i have serial console (i mostly played with arm drivers)
 
Guys, out of curiosity, what might be an equivalent of the perf suite from Linux? I once saw some PMC related tool in BSD, but do we have anything similar, at least partially? Thanks!
(say, at least cache/TLB misses counters, false sharing detection, instruction counters, branch misses etc.)
 
Back
Top