Age | Commit message (Collapse) | Author |
|
It makes uvm_swap_free() faster: extents have a cost of O(n*n) which doesn't
really scale with gigabytes of swap.
Based on initial work from mpi@
The blist implementation comes from DragonFlyBSD.
The diff adds also a ddb(4) 'show swap' command to show the blist and help
debugging, and fix some off-by-one in size printed during hibernate.
ok mpi@
|
|
accessible from ddb. Implement "show all routes" to print routing
tables, and "show route 0xfffffd807e9b0000" for a single route
entry. Note that the rtable id is not part of a route entry, so
it makes no sense to print it there.
OK deraadt@
|
|
If ddb.console is set and your serial console driver uses it, db_rint(),
lets you enter ddb(4) by typing the ESC D escape sequence. This is
useful for drivers like sfuart(4) where the hardware doesn't have a true
BREAK mechanism.
Suggested by miod@, ok kettenis@ miod@
|
|
ok jca@
|
|
Define a consistently named db_machine_command_table[] across all
archs that implement the MD "machine" command, and hook this into
the main command table instead of patching it at runtime.
ok mpi@ jca@
|
|
and "show all tdbs" in ddb.
tested by Hrvoje Popovski; OK mvs@
|
|
|
|
ok semarie@
|
|
this allows us to dynamically trace function boundaries with btrace by patching
prologues and epilogues with a breakpoint upon which the handler records the data,
sends it back to userland for btrace to consume.
currently it's hidden behind DDBPROF, and there is still a lot to cleanup and
improve, but basic scripts that observe return codes from a probed function
work.
from Tom Rollet, with various changes by me
feedback and ok mpi@
|
|
|
|
atomically which CPU is currently tracing.
OK cheloha@
|
|
Add a 512-byte buffer (ci_panicbuf) to each cpu_info struct on each
platform for use by panic(9). The first panic on a given CPU writes
its message to this buffer. Subsequent panics on a given CPU print
the panic message to the console but do not modify the buffer. This
aids debugging in two cases:
- If 2+ CPUs panic simultaneously there is no risk of garbled messages
in the panic buffer.
- If a CPU panics and then the operator causes a second panic while
using ddb(4), the operator can still recall the first failure on
a particular CPU.
Misc. changes to support this bigger change:
- Set panicstr atomically to identify the first CPU to reach panic().
- Tweak db_show_panic_cmd() to print all panic messages across all
CPUs. Prefix the first panic with an asterisk ('*').
- Prefer db_printf() to printf() during a panic if we have it.
Apparently it disturbs less global state.
- On amd64, tweak fault() to write the local panic buffer. This needs
more work.
Prompted by bluhm@ and deraadt@. Mostly written by deraadt@.
Discussed with bluhm@, deraadt@ and kettenis@.
Borne from a discussion on tech@ about making panic(9) more MP-safe:
https://marc.info/?l=openbsd-tech&m=162086462316143&w=2
ok kettenis@, visa@, bluhm@, deraadt@
|
|
|
|
ok visa
|
|
I missed the verbose pattern that it used for error checking the first
time around.
OK millert@
|
|
ok gkoehler@
|
|
ok kn
|
|
|
|
When ddb loads symbols, the .strtab contains char strings and doesn't
need long alignment. Our bootloader provides long alignment, but I
started loading symbols on powerpc64 without our bootloader.
ok mpi@ guenther@ kettenis@
|
|
require the debugger on most architectures, and the separation makes the
code easier to use from other subsystems.
The function definitions are still conditional to DDB. However, that
should not matter for now.
OK deraadt@, mpi@
|
|
and pass information to ddb. This helps to debug kernel NULL pointer
function calls.
input guenther@; OK kettenis@
|
|
Symbols not present in the CTF data are generally assembly routines which
have either no argument or do not follow the ABI that the various MD stack
unwinders understand.
This makes ddb(4) trace simpler to understand.
ok jasper@
|
|
ok deraadt@
|
|
Spotted by deraadt@
|
|
ok dlg@, jasper@, anton@
|
|
From Christian Ludwig <christian_ludwig at genua dot de>
ok visa@
|
|
inputted line just ends at sizeof(db_history), ddb started writing the
histories to out of the region. diff from IIJ.
ok deraadt anton
|
|
|
|
ok deraadt
|
|
|
|
referenced to using a pointer to long. When writing to such a variable,
cast it to the correct type. Writing would otherwise on 64-bit
architectures cause the next variable adjacent in memory to also be
modified.
ok deraadt@ visa@
|
|
corresponding digits. So the change the ddb x/x output.
OK sashan@ deraadt@ visa@ mpi@
|
|
|
|
OK jasper@
|
|
and indicate if a saved stack trace is empty.
OK guenther@
|
|
|
|
Currently there is only support for amd64, if this change settles
I will add support for the rest of the architectures.
OK kettenis@.
|
|
ok pirofti@
|
|
for blocks re-fetchable from the filesystem. However at reboot time,
filesystems are unmounted, and since processes lack backing store they
are killed. Since the scheduler is still running, in some cases init is
killed... which drops us to ddb [noted by bluhm]. Solution is to convert
filesystems to read-only [proposed by kettenis]. The tale follows:
sys_reboot() should pass proc * to MD boot() to vfs_shutdown() which
completes current IO with vfs_busy VB_WRITE|VB_WAIT, then calls VFS_MOUNT()
with MNT_UPDATE | MNT_RDONLY, soon teaching us that *fs_mount() calls a
copyin() late... so store the sizes in vfsconflist[] and move the copyin()
to sys_mount()... and notice nfs_mount copyin() is size-variant, so kill
legacy struct nfs_args3. Next we learn ffs_mount()'s MNT_UPDATE code is
sharp and rusty especially wrt softdep, so fix some bugs adn add
~MNT_SOFTDEP to the downgrade. Some vnodes need a little more help,
so tie them to &dead_vnops.
ffs_mount calling DIOCCACHESYNC is causing a bit of grief still but
this issue is seperate and will be dealt with in time.
couple hundred reboots by bluhm and myself, advice from guenther and
others at the hut
|
|
From Klemens Nanni.
|
|
ok mpi@
|
|
ok jasper@
|
|
|
|
mount point. Print it to allow debugging through the data structures
from there.
OK krw@
|
|
|
|
- refuse to pretty-print if there's no CTF
ok mpi@
|
|
ok mpi@
|
|
Send an uncatchable SIGABRT to the process specified by the pid
argument. Useful in case of CPU exhaustion to kill the DoSing
process and generate a core for later inspection.
ok phessler@, visa@, kettenis@, miod@
|
|
functionnalities are available in GENERIC.
ok jasper@, deraadt@, guenther@, dlg@
|
|
the corresponding struct definitions.
ok dlg@
|