summaryrefslogtreecommitdiffstats
path: root/sys/dev/dt
AgeCommit message (Collapse)AuthorFilesLines
2021-03-26Initialize error variable in dtread().bluhm1-2/+2
OK mpi@
2021-02-08Simplify sleep_setup API to two operations in preparation for splittingmpi1-5/+3
the SCHED_LOCK(). Putting a thread on a sleep queue is reduce to the following: sleep_setup(); /* check condition or release lock */ sleep_finish(); Previous version ok cheloha@, jmatthew@, ok claudio@
2021-01-06Add dt(4) TRACEPOINTs for pool_get() and pool_put(), this is simmilar to theclaudio1-1/+5
ones added to malloc() and free(). Pass the struct pool pointer as argv1 since it is currently not possible to pass the pool name to btrace. OK mpi@
2020-12-31Add trace points for malloc(9) and free(9). This makes them traceableclaudio1-1/+5
via dt(4) and btrace(8). OK mpi@ millert@
2020-09-28Add defines for the number of frames to skip on powerpc64.kettenis1-1/+4
ok mpi@
2020-09-14add three static probes for vfs: cleaner, bufcache_take and bufcache_rel.jasper1-1/+12
while here, swap two lines in bufcache_release() to put a KASSERT() first following the pattern in bufcache_take() ok beck@ mpi@
2020-09-13unbreak dt-enabled builds; it seems an unrelated change snuck in in -r1.3jasper1-3/+2
also noticed by semarie@
2020-09-12Add tracepoints in the page fault handler and when entries are added to maps.mpi1-3/+15
ok kettenis@
2020-08-13Always set `dtpr_size' to the total size required to hold all probe entries.mpi1-5/+4
2020-07-04Do the same as libc, store "-1" in the return value when a syscall failed.mpi2-6/+9
Simplify the logic by always exporting the return value and errno in the syscall profiler.
2020-07-04It's been agreed upon that global locks should be expressed usinganton2-21/+21
capital letters in locking annotations. Therefore harmonize the existing annotations. Also, if multiple locks are required they should be delimited using commas. ok mpi@
2020-06-27Replace TAILQ concatenation loop with TAILQ_CONCATbket1-6/+2
As a result remove unneeded variable OK kn@, millert@
2020-06-26Interprets profile/interval value as a frequency and not a number of ticks.mpi1-3/+3
Matches the behavior of other dynamic tracing tools. From Yuichiro NAITO.
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@