| #
20eaa8d5 |
| 09-Jan-2025 |
mvs <mvs@openbsd.org> |
Add 'socket' refcnt type to dt(4).
We started to widely use reference counting for sockets.
ok bluhm
|
| #
c2c0b0cf |
| 06-Apr-2024 |
mpi <mpi@openbsd.org> |
Remove (unused) in-kernel event filtering, it's currently dead code.
All events are currently exported to userland in order to support complex filters. If this becomes a bottleneck it should be pos
Remove (unused) in-kernel event filtering, it's currently dead code.
All events are currently exported to userland in order to support complex filters. If this becomes a bottleneck it should be possible to translate (some) user-land filters to in-kernel fitlers.
Prodded by a diff from Christian Ludwig to also trace the tracing program.
ok claudio@
show more ...
|
| #
a1744ce2 |
| 28-Aug-2023 |
bluhm <bluhm@openbsd.org> |
Introduce reference counting for TCP syn cache entries.
The syn_cache_reaper() is a hack to serialize timeouts. Unfortunately it has a race and panics sometimes with pool_do_get: syncache free list
Introduce reference counting for TCP syn cache entries.
The syn_cache_reaper() is a hack to serialize timeouts. Unfortunately it has a race and panics sometimes with pool_do_get: syncache free list modified. Add a reference counter for timeout and list of syn cache entries. Currently list refcout is not strictly necessary due to exclusive netlock, but will be needed when we continue unlocking.
Checking timeout_initialized() is not MP friendly, better do proper initialization during object allocation. Refcount in btrace helps to find leaks.
bug reported and fix tested by Peter J. Philipp OK claudio@
show more ...
|
| #
9b3d5a4a |
| 14-Aug-2023 |
mpi <mpi@openbsd.org> |
Extend scheduler tracepoints to follow CPU jumping.
- Add two new tracpoints sched:fork & sched:steal - Include selected CPU number in sched:wakeup - Add sched:unsleep corresponding to sched:sleep w
Extend scheduler tracepoints to follow CPU jumping.
- Add two new tracpoints sched:fork & sched:steal - Include selected CPU number in sched:wakeup - Add sched:unsleep corresponding to sched:sleep which matches add/removal of threads on the sleep queue
ok claudio@
show more ...
|
| #
69761fb1 |
| 06-Jul-2023 |
kn <kn@openbsd.org> |
use refcnt API for multicast addresses, add tracepoint:refcnt:ethmulti probe
Replace hand-rolled reference counting with refcnt_init(9) and hook it up with a new dt(4) probe.
OK mvs Feedback OK blu
use refcnt API for multicast addresses, add tracepoint:refcnt:ethmulti probe
Replace hand-rolled reference counting with refcnt_init(9) and hook it up with a new dt(4) probe.
OK mvs Feedback OK bluhm
show more ...
|
| #
a409c69c |
| 28-Jun-2023 |
kn <kn@openbsd.org> |
use refcnt API for multicast addresses, add tracepoint:refcnt:ifmaddr probe
Replace hand-rolled reference counting with refcnt_init(9) and hook it up with a new dt(4) probe.
OK bluhm mvs
|
| #
2bb3455c |
| 28-Apr-2023 |
mvs <mvs@openbsd.org> |
Add rtentry refcnt type to dt(4).
ok bluhm@
|
| #
e16508e7 |
| 11-Sep-2022 |
dv <dv@openbsd.org> |
Add the new inout vmm(4) tracepoint to dt(4).
Forgot to put it in the list of static tracepoints when I committed the tracepoint at g2k22. Woops.
|
| #
6ff447b0 |
| 02-Sep-2022 |
dv <dv@openbsd.org> |
vmm(4): add tracepoint for in/out handler.
Inserts a new static dt(4) tracepoint in vmm(4) to report details on in/out instructions (direction, port, and data).
ok mlarkin@
|
| #
18a44669 |
| 29-Aug-2022 |
bluhm <bluhm@openbsd.org> |
Use struct refcnt for interface address reference counting. There was a crash due to use after free of the ifa although it is ref counted. As ifa_refcnt was a simple integer increment, there may be
Use struct refcnt for interface address reference counting. There was a crash due to use after free of the ifa although it is ref counted. As ifa_refcnt was a simple integer increment, there may be a path where multiple CPUs access it concurrently. So change to struct refcnt which is MP safe and provides dt(4) leak debugging. Link level address for IPsec enc(4) and various MPLS interfaces is special. There ifa is part of struct sc. Use refcount anyway and add a panic to detect use after free. bug report stsp@; OK mvs@
show more ...
|
| #
9e002cc9 |
| 28-Jun-2022 |
bluhm <bluhm@openbsd.org> |
Use btrace(8) to debug reference counting. dt(4) provides a static tracepoint for each type of refcnt we have. As a start, add inpcb and tdb refcnt. When the counter changes, btrace may print the
Use btrace(8) to debug reference counting. dt(4) provides a static tracepoint for each type of refcnt we have. As a start, add inpcb and tdb refcnt. When the counter changes, btrace may print the actual object, the current counter, the change value and optionally the stack trace. discussed with visa@; OK mpi@
show more ...
|
| #
a8f11dad |
| 17-Mar-2022 |
bluhm <bluhm@openbsd.org> |
Declare dtps_static array const to move it into read-only section. OK mpi@
|
| #
4dfa972b |
| 26-Jan-2022 |
kn <kn@openbsd.org> |
Make vmm(4/amd64) tracepoints amd64-only
One can use them on non-VMM architectures, but they obviously won't hit:
# arch -s ; btrace -l | grep vmm sparc64 tracepoint:vmm:guest_enter tracepoint:
Make vmm(4/amd64) tracepoints amd64-only
One can use them on non-VMM architectures, but they obviously won't hit:
# arch -s ; btrace -l | grep vmm sparc64 tracepoint:vmm:guest_enter tracepoint:vmm:guest_exit
Move them under __amd64__ to avoid confusion and safe a few bytes.
OK dv
show more ...
|
| #
7720a192 |
| 24-Nov-2021 |
claudio <claudio@openbsd.org> |
Add a few dt(4) TRACEPOINTS to SMR. Should help to better understand what goes on in SMR. OK mpi@
|
| #
840df46f |
| 03-Sep-2021 |
jasper <jasper@openbsd.org> |
add kprobes provider for dt
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 i
add kprobes provider for dt
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@
show more ...
|
| #
63d5bccf |
| 02-Sep-2021 |
jasper <jasper@openbsd.org> |
rename struct dt_evt fields to make it clear this isn't only used for tracing syscalls and adjust btrace(8) accordingly. extracted from a larger diff by Tom Rollet.
ok mpi@
|
| #
81471de5 |
| 07-Jun-2021 |
dv <dv@openbsd.org> |
vmm(4): add dt tracepoints for guest entry/exit
To aid in development and debugging, this adds a tracepoint prior to vm entry and after vm exit. It captures the vcpu and run params plus the exit cod
vmm(4): add dt tracepoints for guest entry/exit
To aid in development and debugging, this adds a tracepoint prior to vm entry and after vm exit. It captures the vcpu and run params plus the exit code, but dt(4)/btrace(8) will need some future work to leverage those args.
The location of the tracepoint might change in the future, but for now this solves my issues trying to use printf's to debug vmcs state corruption.
ok mpi@
show more ...
|
| #
da4391b3 |
| 06-Jan-2021 |
claudio <claudio@openbsd.org> |
Add dt(4) TRACEPOINTs for pool_get() and pool_put(), this is simmilar to the ones added to malloc() and free(). Pass the struct pool pointer as argv1 since it is currently not possible to pass the po
Add dt(4) TRACEPOINTs for pool_get() and pool_put(), this is simmilar to the 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@
show more ...
|
| #
48eb9f4d |
| 31-Dec-2020 |
claudio <claudio@openbsd.org> |
Add trace points for malloc(9) and free(9). This makes them traceable via dt(4) and btrace(8). OK mpi@ millert@
|
| #
d5ec8c1a |
| 14-Sep-2020 |
jasper <jasper@openbsd.org> |
add three static probes for vfs: cleaner, bufcache_take and bufcache_rel.
while here, swap two lines in bufcache_release() to put a KASSERT() first following the pattern in bufcache_take()
ok beck@
add three static probes for vfs: cleaner, bufcache_take and bufcache_rel.
while here, swap two lines in bufcache_release() to put a KASSERT() first following the pattern in bufcache_take()
ok beck@ mpi@
show more ...
|
| #
ef591072 |
| 13-Sep-2020 |
jasper <jasper@openbsd.org> |
unbreak dt-enabled builds; it seems an unrelated change snuck in in -r1.3
also noticed by semarie@
|
| #
c28df561 |
| 12-Sep-2020 |
mpi <mpi@openbsd.org> |
Add tracepoints in the page fault handler and when entries are added to maps.
ok kettenis@
|
| #
ecfa01e0 |
| 25-Mar-2020 |
mpi <mpi@openbsd.org> |
Introduce stacktrace_save_at() and make use of it in dt(4).
This variant of stacktrace_save() takes an aditionnal argument to skip an arbitrary number of frame. This allows to skip recording frames
Introduce stacktrace_save_at() and make use of it in dt(4).
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@
show more ...
|
| #
91b2ecf6 |
| 21-Jan-2020 |
mpi <mpi@openbsd.org> |
Import dt(4) a driver and framework for Dynamic Profiling.
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
Import dt(4) a driver and framework for Dynamic Profiling.
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@
show more ...
|