When doing statistics for statclock on other CPU's, use the other CPUs'

idleproc pointers instead of our own for comparisons.

Submitted by:	tegge
This commit is contained in:
jhb 2000-09-11 04:10:29 +00:00
parent 0ccc0648b7
commit 577d7fbf37
7 changed files with 21 additions and 21 deletions

View File

@ -2475,7 +2475,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
/* XXX */
if (p->p_ithd)
cpustate = CHECKSTATE_INTR;
else if (p == idleproc)
else if (p == SMP_prvspace[id].globaldata.gd_idleproc)
cpustate = CHECKSTATE_SYS;
switch (cpustate) {
@ -2507,7 +2507,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
if (pscnt > 1)
return;
if (p == idleproc) {
if (p == SMP_prvspace[id].globaldata.gd_idleproc) {
p->p_sticks++;
cp_time[CP_IDLE]++;
} else {
@ -2536,7 +2536,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
p->p_iticks++;
cp_time[CP_INTR]++;
}
if (p != idleproc) {
if (p != SMP_prvspace[id].globaldata.gd_idleproc) {
schedclock(p);
/* Update resource usage integrals and maximums. */

View File

@ -2475,7 +2475,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
/* XXX */
if (p->p_ithd)
cpustate = CHECKSTATE_INTR;
else if (p == idleproc)
else if (p == SMP_prvspace[id].globaldata.gd_idleproc)
cpustate = CHECKSTATE_SYS;
switch (cpustate) {
@ -2507,7 +2507,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
if (pscnt > 1)
return;
if (p == idleproc) {
if (p == SMP_prvspace[id].globaldata.gd_idleproc) {
p->p_sticks++;
cp_time[CP_IDLE]++;
} else {
@ -2536,7 +2536,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
p->p_iticks++;
cp_time[CP_INTR]++;
}
if (p != idleproc) {
if (p != SMP_prvspace[id].globaldata.gd_idleproc) {
schedclock(p);
/* Update resource usage integrals and maximums. */

View File

@ -2475,7 +2475,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
/* XXX */
if (p->p_ithd)
cpustate = CHECKSTATE_INTR;
else if (p == idleproc)
else if (p == SMP_prvspace[id].globaldata.gd_idleproc)
cpustate = CHECKSTATE_SYS;
switch (cpustate) {
@ -2507,7 +2507,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
if (pscnt > 1)
return;
if (p == idleproc) {
if (p == SMP_prvspace[id].globaldata.gd_idleproc) {
p->p_sticks++;
cp_time[CP_IDLE]++;
} else {
@ -2536,7 +2536,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
p->p_iticks++;
cp_time[CP_INTR]++;
}
if (p != idleproc) {
if (p != SMP_prvspace[id].globaldata.gd_idleproc) {
schedclock(p);
/* Update resource usage integrals and maximums. */

View File

@ -2475,7 +2475,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
/* XXX */
if (p->p_ithd)
cpustate = CHECKSTATE_INTR;
else if (p == idleproc)
else if (p == SMP_prvspace[id].globaldata.gd_idleproc)
cpustate = CHECKSTATE_SYS;
switch (cpustate) {
@ -2507,7 +2507,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
if (pscnt > 1)
return;
if (p == idleproc) {
if (p == SMP_prvspace[id].globaldata.gd_idleproc) {
p->p_sticks++;
cp_time[CP_IDLE]++;
} else {
@ -2536,7 +2536,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
p->p_iticks++;
cp_time[CP_INTR]++;
}
if (p != idleproc) {
if (p != SMP_prvspace[id].globaldata.gd_idleproc) {
schedclock(p);
/* Update resource usage integrals and maximums. */

View File

@ -2475,7 +2475,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
/* XXX */
if (p->p_ithd)
cpustate = CHECKSTATE_INTR;
else if (p == idleproc)
else if (p == SMP_prvspace[id].globaldata.gd_idleproc)
cpustate = CHECKSTATE_SYS;
switch (cpustate) {
@ -2507,7 +2507,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
if (pscnt > 1)
return;
if (p == idleproc) {
if (p == SMP_prvspace[id].globaldata.gd_idleproc) {
p->p_sticks++;
cp_time[CP_IDLE]++;
} else {
@ -2536,7 +2536,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
p->p_iticks++;
cp_time[CP_INTR]++;
}
if (p != idleproc) {
if (p != SMP_prvspace[id].globaldata.gd_idleproc) {
schedclock(p);
/* Update resource usage integrals and maximums. */

View File

@ -2475,7 +2475,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
/* XXX */
if (p->p_ithd)
cpustate = CHECKSTATE_INTR;
else if (p == idleproc)
else if (p == SMP_prvspace[id].globaldata.gd_idleproc)
cpustate = CHECKSTATE_SYS;
switch (cpustate) {
@ -2507,7 +2507,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
if (pscnt > 1)
return;
if (p == idleproc) {
if (p == SMP_prvspace[id].globaldata.gd_idleproc) {
p->p_sticks++;
cp_time[CP_IDLE]++;
} else {
@ -2536,7 +2536,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
p->p_iticks++;
cp_time[CP_INTR]++;
}
if (p != idleproc) {
if (p != SMP_prvspace[id].globaldata.gd_idleproc) {
schedclock(p);
/* Update resource usage integrals and maximums. */

View File

@ -2475,7 +2475,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
/* XXX */
if (p->p_ithd)
cpustate = CHECKSTATE_INTR;
else if (p == idleproc)
else if (p == SMP_prvspace[id].globaldata.gd_idleproc)
cpustate = CHECKSTATE_SYS;
switch (cpustate) {
@ -2507,7 +2507,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
if (pscnt > 1)
return;
if (p == idleproc) {
if (p == SMP_prvspace[id].globaldata.gd_idleproc) {
p->p_sticks++;
cp_time[CP_IDLE]++;
} else {
@ -2536,7 +2536,7 @@ forwarded_statclock(int id, int pscnt, int *astmap)
p->p_iticks++;
cp_time[CP_INTR]++;
}
if (p != idleproc) {
if (p != SMP_prvspace[id].globaldata.gd_idleproc) {
schedclock(p);
/* Update resource usage integrals and maximums. */