Mercurial > hg > Game > Cerium
changeset 1907:df397764c51e draft
add debug macro
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 16 Jan 2014 18:59:01 +0900 |
parents | 24b3a107f83f |
children | bd5152f8fe3a |
files | TaskManager/Gpu/GpuScheduler.cc TaskManager/include/error.h TaskManager/kernel/schedule/SchedTask.cc |
diffstat | 3 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Gpu/GpuScheduler.cc Thu Jan 16 18:46:52 2014 +0900 +++ b/TaskManager/Gpu/GpuScheduler.cc Thu Jan 16 18:59:01 2014 +0900 @@ -134,7 +134,7 @@ } if(reply) { connector->mail_write(reply); - printf("GPU %d %s\t%lld\n",taskList->self->cpu_type,(char*)(gpu_task_list[taskList->tasks[0].command].name),taskList->task_end_time-taskList->task_start_time); + __debug(this, "GPU %d %s\t%lld\n",taskList->self->cpu_type,(char*)(gpu_task_list[taskList->tasks[0].command].name),taskList->task_end_time-taskList->task_start_time)); reply = 0; } }
--- a/TaskManager/include/error.h Thu Jan 16 18:46:52 2014 +0900 +++ b/TaskManager/include/error.h Thu Jan 16 18:59:01 2014 +0900 @@ -3,7 +3,7 @@ #ifdef DEBUG # include <stdio.h> -# define __debugs(s, ...) do { \ +# define __debug(s, ...) do { \ s->printf(__VA_ARGS__); \ } while (0) #else /* DEBUG */ @@ -12,7 +12,7 @@ #ifdef DEBUG # include <stdio.h> -# define __debugs_ppe(s, ...) do { \ +# define __debug_ppe(s, ...) do { \ s->printf("[PPE] ", __VA_ARGS__); \ } while (0) #else /* DEBUG */ @@ -21,7 +21,7 @@ #ifdef DEBUG # include <stdio.h> -# define __debugs_spe(s, ...) do { \ +# define __debug_spe(s, ...) do { \ s->printf("[SPE] ", __VA_ARGS__); \ } while (0) #else /* DEBUG */
--- a/TaskManager/kernel/schedule/SchedTask.cc Thu Jan 16 18:46:52 2014 +0900 +++ b/TaskManager/kernel/schedule/SchedTask.cc Thu Jan 16 18:59:01 2014 +0900 @@ -118,7 +118,7 @@ } (*connector->end_dmawait_profile)(&connector->global_busy_time,&connector->start_time,&connector->stop_time); list->task_end_time = gettime(); - this->printf("cpuid %ld %s\t0x%p time %lld\n",scheduler->id,(char *)(task_list[atask->command].name),(void*)list, list->task_end_time-list->task_start_time); + __debug(this->scheduler,"cpuid %ld %s\t0x%p time %lld\n",scheduler->id,(char *)(task_list[atask->command].name),(void*)list, list->task_end_time-list->task_start_time); connector->free_(readbuf); // User 側で作る方法が必要... // 書き込む領域がなければ無視