]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
db show thread: avoid overflow in tick conversion
authorrlibby <rlibby@FreeBSD.org>
Thu, 16 May 2019 05:29:54 +0000 (05:29 +0000)
committerrlibby <rlibby@FreeBSD.org>
Thu, 16 May 2019 05:29:54 +0000 (05:29 +0000)
commit61d95603409a5dfcc182ab871c6aa3d8ace051b3
treef289dd08cb9c7321f853c526a1729319b1c56960
parent48e52ae146ac32c9c5991e914241cf24a355c0c3
db show thread: avoid overflow in tick conversion

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 wrap).

Reviewed by: cem, markj
Sponsored by: Dell EMC Isilon
Differential revision: https://reviews.freebsd.org/D20273
sys/ddb/db_ps.c