Our KASSERT / panic mechanism does not capture any location information by default, sometimes leaving user with a message that is ambiguous or hard to locate (i.e. KASSERT called from a macro etc). This patch aims at improving this situation by recording information about call site from which a particular KASSERT / panic originates and displaying this as part of the panic message.
Please note that there are some KASSERT-derived macros that try to capture that info still (which is after this would be somewhat redundant), I opted in to leave them as is just because I don't have a capacity/time to test such changes.
The overhead is 24 bytes (two pointers and int) per call site plus the size of the strings, but those are likely to be re-used by the compiler, so in practice it's about 48 bytes per call site on average. There are 15k call sites in GENERIC and about 24k in LINT.
Here the test panic screenshot: