return;
}
- if (!(p->p_misc_flags & MF_SPROF_SEEN)) {
- p->p_misc_flags |= MF_SPROF_SEEN;
- sprof_save_proc(p);
- }
-
/* Runnable system process? */
if (p->p_endpoint == IDLE)
- sprof_info.idle_samples++;
+ sprof_info.idle_samples++;
else if (p->p_endpoint == KERNEL ||
- (priv(p)->s_flags & SYS_PROC && proc_is_runnable(p))) {
- sprof_save_sample(p, pc);
- sprof_info.system_samples++;
+ (priv(p)->s_flags & SYS_PROC && proc_is_runnable(p))) {
+
+ if (!(p->p_misc_flags & MF_SPROF_SEEN)) {
+ p->p_misc_flags |= MF_SPROF_SEEN;
+ sprof_save_proc(p);
+ }
+
+ sprof_save_sample(p, pc);
+ sprof_info.system_samples++;
} else {
/* User process. */
sprof_info.user_samples++;
rpc->p_sys_time = 0;
rpc->p_reg.psw &= ~TRACEBIT; /* clear trace bit */
- rpc->p_misc_flags &= ~(MF_VIRT_TIMER | MF_PROF_TIMER | MF_SC_TRACE);
+ rpc->p_misc_flags &=
+ ~(MF_VIRT_TIMER | MF_PROF_TIMER | MF_SC_TRACE | MF_SPROF_SEEN);
rpc->p_virt_left = 0; /* disable, clear the process-virtual timers */
rpc->p_prof_left = 0;