Page MenuHomeFreeBSD

Add a very limited DDB dumpon(8)-alike to MI dumper code
ClosedPublic

Authored by cem on Aug 28 2019, 3:08 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 21 2024, 10:09 PM
Unknown Object (File)
Feb 23 2024, 9:02 AM
Unknown Object (File)
Feb 9 2024, 9:53 AM
Unknown Object (File)
Jan 16 2024, 6:19 PM
Unknown Object (File)
Jan 10 2024, 5:57 AM
Unknown Object (File)
Dec 28 2023, 9:34 AM
Unknown Object (File)
Dec 12 2023, 4:48 AM
Unknown Object (File)
Nov 24 2023, 9:16 PM
Subscribers

Details

Summary

This allows ddb(4) commands to construct a static dumperinfo during
panic/debug and invoke doadump(false) using the provided dumper
configuration (always inserted first in the list).

The intended usecase is a ddb(4)-time netdump(4) command.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 26168
Build 24677: arc lint + arc unit

Event Timeline

Looks like some code is missing?

Looks like some code is missing?

Like a consumer? :-)

Work is in progress; I intend to post that as a separate revision.

In D21448#466970, @cem wrote:

Looks like some code is missing?

Like a consumer? :-)

Work is in progress; I intend to post that as a separate revision.

Ah, ok.

Looks fine to me, but KPIs for use by DDB are typically named *_ddb (witness_ddb_*, stack_*_ddb, linker_ddb_*, etc.), so I'd suggest naming it dumper_ddb_{insert,remove}() instead. db_* is for interfaces implemented by DDB itself.

This revision is now accepted and ready to land.Aug 28 2019, 5:27 PM

In the absence of consumers it's hard to see whether dumper_remove() might ever try to free one of the static dumperinfos. Depending on how it pans out, it might make sense to give static dumperinfos a special flag to help catch that.

Thanks — I'll plan to make the name change. Re: the flag, the idea is that this type of dumper is only added to the list during db/panic time, when no external event would cause a dumper_remove (unless I'm forgetting something). And then removed before normal context resumes (if !panic). So maybe the flag is redundant? It wouldn't hurt to add in any case.

This revision now requires review to proceed.Aug 28 2019, 10:04 PM

I'm not sure the "_static" suffix really adds anything, FWIW.

This revision is now accepted and ready to land.Aug 29 2019, 7:33 PM

I'm not sure the "_static" suffix really adds anything, FWIW.

I've removed it/them in my git stack.