FreeBSD Bugzilla – Attachment 194476 Details for
Bug 228669
CLOCK_PROCESS_CPUTIME_ID is unnecessarily inaccurate
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
process_cputime.patch (text/plain), 458 bytes, created by
Colin Percival
on 2018-06-22 09:33:28 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Colin Percival
Created:
2018-06-22 09:33:28 UTC
Size:
458 bytes
patch
obsolete
>Index: sys/kern/kern_time.c >=================================================================== >--- sys/kern/kern_time.c (revision 335517) >+++ sys/kern/kern_time.c (working copy) >@@ -281,6 +281,10 @@ > rufetch(targetp, &ru); > runtime = targetp->p_rux.rux_runtime; > PROC_STATUNLOCK(targetp); >+ critical_enter(); >+ if (curthread->td_proc == targetp) >+ runtime += cpu_ticks() - PCPU_GET(switchtime); >+ critical_exit(); > cputick2timespec(runtime, ats); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 228669
:
194476
|
194477
|
194478