summaryrefslogtreecommitdiffstats
path: root/sys/dev/dt
AgeCommit message (Collapse)AuthorFilesLines
2020-03-28Export the number of arguments exposed by a probe to userland.mpi3-5/+8
Also make the syscall provider exports the number of syscall arguments. This will allow for stricter checks when parsing `argN' and future `args->name'. This is an ABI change, don't forget to keep btrace(8) and your kernel in sync.
2020-03-25Introduce stacktrace_save_at() and make use of it in dt(4).mpi5-28/+40
This variant of stacktrace_save() takes an aditionnal argument to skip an arbitrary number of frame. This allows to skip recording frames used to execute the profiling code and produces outputs easier to understand. Inputs from and ok visa@
2020-02-04Replace msleep(9) by sleep_setup/setup_signal/finish() dance.mpi1-5/+6
This handrolled cond_wait() dealing with signals prevents a lock ordering problem when executing probes inside the scheduler code. That means we stop relying on a mutex for synchronisation and instead rely on the sleep_* internals, currently the SCHED_LOCK(). From kettenis@
2020-01-27Improve use of SMR in dt(4) by changing the time when smr_barrier()visa1-34/+9
is invoked. This enables threads to continue gathering events without interruption when another thread starts or stops recording. OK mpi@
2020-01-24New `kern.allowdt' button must be set to open(2) /dev/dt.mpi1-1/+5
dt(4) exposes kernel internals, addresses and content of states to userland. As such its interface shouldn't be available without enabling it consciously. ok millert@, deraadt@
2020-01-21Import dt(4) a driver and framework for Dynamic Profiling.mpi5-0/+1520
The design is fairly simple: events, in the form of descriptors on a ring, are being produced in any kernel context and being consumed by a userland process reading /dev/dt. Code and hooks are all guarded under '#if NDT > 0' so this commit shouldn't introduce any change as long as dt(4) is disable in GENERIC. ok kettenis@, visa@, jasper@, deraadt@