Mercurial > hg > Game > Cerium
changeset 897:6bd218d3f643 draft
add return address in SimpleTask for debugging.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 16 Jul 2010 19:00:22 +0900 |
parents | b662e9dd26b0 |
children | 302ebfc75a79 |
files | Renderer/Engine/Makefile.def TaskManager/Cell/CellTaskManagerImpl.cc TaskManager/Cell/spe/SpeTaskManagerImpl.cc TaskManager/kernel/ppe/SimpleTask.h TaskManager/kernel/ppe/TaskManager.cc TaskManager/kernel/ppe/TaskManagerImpl.cc TaskManager/kernel/ppe/TaskManagerImpl.h TaskManager/kernel/schedule/SchedTask.cc |
diffstat | 8 files changed, 24 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/Makefile.def Fri Jul 16 17:23:49 2010 +0900 +++ b/Renderer/Engine/Makefile.def Fri Jul 16 19:00:22 2010 +0900 @@ -5,7 +5,7 @@ ABIBIT = 32 ABI = -m$(ABIBIT) CC = g++ -OPT = -g -DSPE_CREATE_POLYGON -O9 +OPT = -g -O9 # -DSPE_CREATE_POLYGON CFLAGS = -g -Wall $(ABI) $(OPT) # -DDEBUG INCLUDE = -I$(CERIUM)/include/TaskManager -I.
--- a/TaskManager/Cell/CellTaskManagerImpl.cc Fri Jul 16 17:23:49 2010 +0900 +++ b/TaskManager/Cell/CellTaskManagerImpl.cc Fri Jul 16 19:00:22 2010 +0900 @@ -247,7 +247,7 @@ void CellTaskManagerImpl::show_profile() { for (int id = 0; id < machineNum; id++) { - HTaskPtr t = create_task(ShowTime); + HTaskPtr t = create_task(ShowTime,__builtin_return_address(0)); t->set_cpu((CPU_TYPE)(id+2)); t->spawn(); } @@ -255,7 +255,7 @@ void CellTaskManagerImpl::start_profile() { for (int id = 0; id < machineNum; id++) { - HTaskPtr t = create_task(StartProfile); + HTaskPtr t = create_task(StartProfile,__builtin_return_address(0)); t->set_cpu((CPU_TYPE)(id+2)); t->spawn(); }
--- a/TaskManager/Cell/spe/SpeTaskManagerImpl.cc Fri Jul 16 17:23:49 2010 +0900 +++ b/TaskManager/Cell/spe/SpeTaskManagerImpl.cc Fri Jul 16 19:00:22 2010 +0900 @@ -24,9 +24,9 @@ void TaskManagerImpl::append_waitTask(HTask* p) {} -HTaskPtr TaskManagerImpl::create_task(int cmd) {return 0;} -HTaskPtr TaskManagerImpl::create_task(int cmd, memaddr rbuf, long rs, memaddr wbuf, long ws) { return 0; } -HTask * TaskManagerImpl::create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData) {return 0;} +HTaskPtr TaskManagerImpl::create_task(int cmd,void *from) {return 0;} +HTaskPtr TaskManagerImpl::create_task(int cmd, memaddr rbuf, long rs, memaddr wbuf, long ws,void *from) { return 0; } +HTask * TaskManagerImpl::create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData,void *from) {return 0;} void TaskManagerImpl::set_task_depend(HTaskPtr master, HTaskPtr slave) {} void TaskManagerImpl::spawn_task(HTaskPtr) {} void TaskManagerImpl::set_task_cpu(HTaskPtr, CPU_TYPE) {}
--- a/TaskManager/kernel/ppe/SimpleTask.h Fri Jul 16 17:23:49 2010 +0900 +++ b/TaskManager/kernel/ppe/SimpleTask.h Fri Jul 16 19:00:22 2010 +0900 @@ -17,8 +17,8 @@ memaddr wbuf; int r_size; int w_size; + memaddr from; int dm1; // sizeof(SimpleTask)==32 - int dm2; public: // functions
--- a/TaskManager/kernel/ppe/TaskManager.cc Fri Jul 16 17:23:49 2010 +0900 +++ b/TaskManager/kernel/ppe/TaskManager.cc Fri Jul 16 19:00:22 2010 +0900 @@ -53,18 +53,18 @@ HTaskPtr TaskManager::create_task(int cmd) { - return m_impl->create_task(cmd); + return m_impl->create_task(cmd,__builtin_return_address(0)); } HTaskPtr TaskManager::create_task(int cmd, memaddr r, long rs, memaddr w, long ws) { - return m_impl->create_task(cmd,r,rs,w,ws); + return m_impl->create_task(cmd,r,rs,w,ws,__builtin_return_address(0)); } HTaskPtr TaskManager::create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData) { - return m_impl->create_task_array(id, num_task, num_param, num_inData, num_outData) ; + return m_impl->create_task_array(id, num_task, num_param, num_inData, num_outData,__builtin_return_address(0)) ; } /**
--- a/TaskManager/kernel/ppe/TaskManagerImpl.cc Fri Jul 16 17:23:49 2010 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.cc Fri Jul 16 19:00:22 2010 +0900 @@ -36,8 +36,8 @@ TaskManagerImpl::systask_init() { systask_register(); - systask_start = create_task(StartTask,0,0,0,0); - systask_finish = create_task(FinishTask,0,0,0,0); + systask_start = create_task(StartTask,0,0,0,0,__builtin_return_address(0)); + systask_finish = create_task(FinishTask,0,0,0,0,__builtin_return_address(0)); systask_start->spawn(); @@ -49,19 +49,19 @@ } HTaskPtr -TaskManagerImpl::create_task(int cmd,memaddr rbuf, long r_size, memaddr wbuf, long w_size) -{ +TaskManagerImpl::create_task(int cmd,memaddr rbuf, long r_size, memaddr wbuf, long w_size, void *from) { HTaskPtr new_task; new_task = htaskImpl->create(cmd, rbuf, r_size, wbuf, w_size); new_task->post_func = noaction; new_task->mimpl = this; + new_task->from = (memaddr)from; return new_task; } HTaskPtr -TaskManagerImpl::create_task(int cmd) +TaskManagerImpl::create_task(int cmd,void *from) { HTaskPtr new_task; @@ -72,14 +72,15 @@ new_task->create_task_array(cmd,1,8,8,8); // rbuf, r_size were set new_task->command = TaskArray1; + new_task->from = (memaddr)from; return new_task; } HTaskPtr -TaskManagerImpl::create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData) +TaskManagerImpl::create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData, void *from) { - HTaskPtr ta = create_task(TaskArray,0,0,0,0); + HTaskPtr ta = create_task(TaskArray,0,0,0,0, from); ta->create_task_array(id, num_task, num_param, num_inData, num_outData) ; return ta; }
--- a/TaskManager/kernel/ppe/TaskManagerImpl.h Fri Jul 16 17:23:49 2010 +0900 +++ b/TaskManager/kernel/ppe/TaskManagerImpl.h Fri Jul 16 19:00:22 2010 +0900 @@ -46,9 +46,9 @@ void systask_init(); // user - virtual HTaskPtr create_task(int cmd); - virtual HTaskPtr create_task(int cmd, memaddr rbuf, long r_size, memaddr wbuf, long w_size); - virtual HTaskPtr create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData); + virtual HTaskPtr create_task(int cmd,void *from); + virtual HTaskPtr create_task(int cmd, memaddr rbuf, long r_size, memaddr wbuf, long w_size,void *from); + virtual HTaskPtr create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData,void *from); virtual void set_task_depend(HTaskPtr master, HTaskPtr slave); virtual void spawn_task(HTaskPtr); virtual void set_task_cpu(HTaskPtr, CPU_TYPE);
--- a/TaskManager/kernel/schedule/SchedTask.cc Fri Jul 16 17:23:49 2010 +0900 +++ b/TaskManager/kernel/schedule/SchedTask.cc Fri Jul 16 19:00:22 2010 +0900 @@ -263,19 +263,19 @@ HTaskPtr SchedTask::create_task(int cmd) { - return manager->create_task(cmd); + return manager->create_task(cmd, __builtin_return_address(0)); } HTaskPtr SchedTask::create_task(int cmd, memaddr r, long rs, memaddr w, long ws) { - return manager->create_task(cmd,r,rs,w,ws); + return manager->create_task(cmd,r,rs,w,ws, __builtin_return_address(0)); } HTaskPtr SchedTask::create_task_array(int id, int num_task, int num_param, int num_inData, int num_outData) { - return manager->create_task_array(id, num_task, num_param, num_inData, num_outData); + return manager->create_task_array(id, num_task, num_param, num_inData, num_outData, __builtin_return_address(0)); }