a couple of cosmetic changes of debug messages

This commit is contained in:
Balazs Gerofi
2015-08-22 18:53:14 +09:00
parent 7c816a6b73
commit c85a9b99e1
3 changed files with 20 additions and 5 deletions

View File

@ -392,9 +392,9 @@ static void page_fault_handler(void *fault_addr, uint64_t reason, void *regs)
}
kprintf("[%d]page_fault_handler(%p,%lx,%p):"
"fault vm failed. %d\n",
"fault vm failed. %d, TID: %d\n",
ihk_mc_get_processor_id(), fault_addr,
reason, regs, error);
reason, regs, error, proc->ftn->tid);
unhandled_page_fault(proc, fault_addr, regs);
memset(&info, '\0', sizeof info);
if (error == -ERANGE) {

View File

@ -1561,6 +1561,14 @@ static int do_page_fault_process_vm(struct process_vm *vm, void *fault_addr0, ui
"access denied. %d\n",
ihk_mc_get_processor_id(), vm,
fault_addr0, reason, error);
if (((range->flag & VR_PROT_MASK) == VR_PROT_NONE))
kprintf("if (((range->flag & VR_PROT_MASK) == VR_PROT_NONE))\n");
if (((reason & PF_WRITE) && !(reason & PF_PATCH)))
kprintf("if (((reason & PF_WRITE) && !(reason & PF_PATCH)))\n");
if (!(range->flag & VR_PROT_WRITE))
kprintf("if (!(range->flag & VR_PROT_WRITE))\n");
if ((reason & PF_INSTR) && !(range->flag & VR_PROT_EXEC))
kprintf("if ((reason & PF_INSTR) && !(range->flag & VR_PROT_EXEC))\n");
goto out;
}
@ -2312,8 +2320,7 @@ redo:
}
if (switch_ctx) {
dkprintf("[%d] schedule: %d => %d \n",
ihk_mc_get_processor_id(),
dkprintf("schedule: %d => %d \n",
prev ? prev->ftn->tid : 0, next ? next->ftn->tid : 0);
if (prev && prev->ptrace_debugreg) {

View File

@ -1998,7 +1998,11 @@ unsigned long do_fork(int clone_flags, unsigned long newsp,
}
}
dkprintf("clone: kicking scheduler!,cpuid=%d pid=%d tid=%d\n", cpuid, new->ftn->pid, new->ftn->tid);
dkprintf("clone: kicking scheduler!,cpuid=%d pid=%d tid %d -> tid=%d\n",
cpuid, new->ftn->pid,
cpu_local_var(current)->ftn->tid,
new->ftn->tid);
runq_add_proc(new, cpuid);
if (ptrace_event) {
@ -4818,6 +4822,8 @@ SYSCALL_DECLARE(sched_setaffinity)
for (cpu_id = 0; cpu_id < num_processors; cpu_id++) {
if (CPU_ISSET(cpu_id, &k_cpu_set)) {
CPU_SET(cpu_id, &cpu_set);
dkprintf("sched_setaffinity(): tid %d: setting target core %d\n",
cpu_local_var(current)->ftn->tid, cpu_id);
empty_set = 0;
}
}
@ -4846,6 +4852,8 @@ found:
if (!CPU_ISSET(cpu_id, &thread->cpu_set)) {
hold_process(thread);
ihk_mc_spinlock_unlock(&get_cpu_local_var(cpu_id)->runq_lock, irqstate);
dkprintf("sched_setaffinity(): tid %d sched_request_migrate\n",
cpu_local_var(current)->ftn->tid, cpu_id);
sched_request_migrate(cpu_id, thread);
release_process(thread);
return 0;