diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2021-09-09 18:41:40 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2021-09-09 18:41:40 +0000 |
commit | 4189a711bf2627c538a4fbaf6736f31f0f084d5f (patch) | |
tree | ba380aae5286e7b2fe12889b2d706f538a8c642c /sys/kern/sched_bsd.c | |
parent | 5a114288b0441d563fda542091d0155ffab20042 (diff) |
Add THREAD_PID_OFFSET to tracepoint arguments that pass a TID to userland.
Bring these values in sync with the `tid' builtin which already include
the offset. This is necessary to build script comparing them, like:
tracepoint:sched:enqueue
{
@ts[arg0] = nsecs;
}
tracepoint:sched:on__cpu
/@ts[tid]/
{
latency = nsecs - @ts[tid];
}
Discussed with and ok bluhm@
Diffstat (limited to 'sys/kern/sched_bsd.c')
-rw-r--r-- | sys/kern/sched_bsd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/sched_bsd.c b/sys/kern/sched_bsd.c index 3b0a0b2cfc7..956ea24ea07 100644 --- a/sys/kern/sched_bsd.c +++ b/sys/kern/sched_bsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sched_bsd.c,v 1.68 2021/08/02 15:15:47 tb Exp $ */ +/* $OpenBSD: sched_bsd.c,v 1.69 2021/09/09 18:41:39 mpi Exp $ */ /* $NetBSD: kern_synch.c,v 1.37 1996/04/22 01:38:37 christos Exp $ */ /*- @@ -387,7 +387,7 @@ mi_switch(void) if (p != nextproc) { uvmexp.swtch++; - TRACEPOINT(sched, off__cpu, nextproc->p_tid, + TRACEPOINT(sched, off__cpu, nextproc->p_tid + THREAD_PID_OFFSET, nextproc->p_p->ps_pid); cpu_switchto(p, nextproc); TRACEPOINT(sched, on__cpu, NULL); |