minor clean

上级 9f5a62ce
......@@ -93,12 +93,10 @@ idleloop(void)
mtstart(idleloop, myproc());
sti();
sampidle(true);
for (;;) {
acquire(&myproc()->lock);
myproc()->set_state(RUNNABLE);
sched();
sampidle(true);
finishzombies();
......
......@@ -26,7 +26,6 @@ struct pmu pmu;
struct pmulog {
u64 count;
u64 capacity;
u8 idle:1; // Currently idle?
struct pmuevent *event;
__padout__;
} __mpalign__;
......@@ -72,12 +71,6 @@ sampdump(void)
}
void
sampidle(bool b)
{
pmulog[myid()].idle = b;
}
void
sampconf(void)
{
pushcli();
......@@ -112,7 +105,7 @@ samplog(struct trapframe *tf)
e = &l->event[l->count];
e->idle = l->idle;
e->idle = (myproc() == idleproc());
e->rip = tf->rip;
getcallerpcs((void*)tf->rbp, e->trace, NELEM(e->trace));
l->count++;
......
......@@ -74,8 +74,6 @@ sched(void)
release(&myproc()->lock);
return;
}
} else {
sampidle(false);
}
if (next->get_state() != RUNNABLE)
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论