Commit 6028e1b4 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Merge pull request #496 from tcreech/lwp_hack

FreeBSD: fix multithreaded CPU% in process list
parents 95d19843 cc8375f9
...@@ -427,7 +427,7 @@ void ProcessList_goThroughEntries(ProcessList* this) { ...@@ -427,7 +427,7 @@ void ProcessList_goThroughEntries(ProcessList* this) {
int cpus = this->cpuCount; int cpus = this->cpuCount;
int count = 0; int count = 0;
struct kinfo_proc* kprocs = kvm_getprocs(fpl->kd, KERN_PROC_ALL, 0, &count); struct kinfo_proc* kprocs = kvm_getprocs(fpl->kd, KERN_PROC_PROC, 0, &count);
for (int i = 0; i < count; i++) { for (int i = 0; i < count; i++) {
struct kinfo_proc* kproc = &kprocs[i]; struct kinfo_proc* kproc = &kprocs[i];
...@@ -495,10 +495,6 @@ void ProcessList_goThroughEntries(ProcessList* this) { ...@@ -495,10 +495,6 @@ void ProcessList_goThroughEntries(ProcessList* this) {
isIdleProcess = true; isIdleProcess = true;
} }
} }
if (isIdleProcess == false && proc->percent_cpu >= 99.8) {
// don't break formatting
proc->percent_cpu = 99.8;
}
proc->priority = kproc->ki_pri.pri_level - PZERO; proc->priority = kproc->ki_pri.pri_level - PZERO;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment