The previous calculations for displaying the time since last switch
easily overflowed, after less than 36 min for hz=1000. Now overflow
takes 2000 times longer (as long as ticks takes to overflow).
Details
Details
- Reviewers
cem markj - Commits
- rS347646: db show thread: avoid overflow in tick conversion
vali# cat - &
[1] 810
vali# sysctl debug.kdb.enter=1
debug.kdb.enter:KDB: enter: sysctl debug.kdb.enter
[ thread pid 843 tid 100153 ]
Stopped at kdb_sysctl_enter+0x98: movq $0,kdb_why
db> show proc 810
Process 810 (cat) at 0xfffff80004a29530:
state: NORMAL
uid: 0 gids: 0, 0, 5
parent: pid 808 at 0xfffff80004c5ca60
ABI: FreeBSD ELF64
arguments: cat -
repear: 0xfffff800033e4530 reapsubtree: 1
sigparent: 20
vmspace: 0xfffff80004e03000
(map 0xfffff80004e03000)
(map.pmap 0xfffff80004e030d0)
(pmap 0xfffff80004e03130)
threads: 1
100145 s cat
db> show thread 100145
Thread 100145 at 0xfffff80004a355a0:
proc (pid 810): 0xfffff80004a29530
name: cat
pcb: 0xfffffe0050cfeb80
stack: 0xfffffe0050cfb000-0xfffffe0050cfefff
flags: 0x20844 pflags: 0
state: INHIBITED: {SUSPENDED}
priority: 125
container lock: sched lock 3 (0xffffffff81eb3ac0)
last voluntary switch: 588.880 s ago
last involuntary switch: 588.880 s agoDiff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable