Mercurial > hg > Game > Cerium
changeset 1905:e8ccf8fa7bf7 draft
better dead lock display
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 16 Jan 2014 18:39:17 +0900 |
parents | fa1a3977d065 |
children | 24b3a107f83f |
files | TaskManager/Cell/CellTaskManagerImpl.cc example/fileread/Makefile |
diffstat | 2 files changed, 11 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Cell/CellTaskManagerImpl.cc Thu Jan 16 18:29:30 2014 +0900 +++ b/TaskManager/Cell/CellTaskManagerImpl.cc Thu Jan 16 18:39:17 2014 +0900 @@ -225,19 +225,24 @@ } } +static int dead_lock_shown = 0; + void CellTaskManagerImpl::show_dead_lock_info() { + if (dead_lock_shown) return; + dead_lock_shown = 1; get_scheduler()-> printf("Dead lock detected\n ppe queue %d\n", ppeManager->activeTaskQueue->length()); // 確か waitQueue は共通... // get_scheduler()-> printf(" wait queue %d\n",ppeManager->waitTaskQueue->length()); get_scheduler()-> printf(" wait queue %d\n", waitTaskQueue->length()); for (HTask *p = waitTaskQueue->getFirst(); p; p = waitTaskQueue->getNext(p)) { - printf(" Waiting task%d %lx", p->command, (long) p); + printf(" Waiting task %lx", (long) p); + p->print(); QueueInfo<TaskQueue> *w = p->wait_i; if (w) { for (TaskQueue *q = w->getFirst(); q; q = w->getNext(q)) { - printf(" waiting task%d %lx", q->task->command, - (long) q->task); + printf(" waiting task %lx ", (long) q->task); + q->task->print(); if (!waitTaskQueue->find(q->task)) { printf("!"); // stray task }
--- a/example/fileread/Makefile Thu Jan 16 18:29:30 2014 +0900 +++ b/example/fileread/Makefile Thu Jan 16 18:39:17 2014 +0900 @@ -4,6 +4,8 @@ @echo "Make for Mac OS X" @$(MAKE) -f Makefile.macosx +parallel: macosx + fifo64: FORCE @echo "Make for Mac OS X 64bit mode" @$(MAKE) -f Makefile.macosx ABIBIT=64 @@ -16,7 +18,7 @@ @echo "Make for PS3 (Cell)" @$(MAKE) -f Makefile.cell -test: +test: macosx ./fileread -dr -file c.txt FORCE: