summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/sync/work_osd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/modules/sync/work_osd.c')
-rw-r--r--src/osd/modules/sync/work_osd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/osd/modules/sync/work_osd.c b/src/osd/modules/sync/work_osd.c
index 031884e3dd5..950f26ae530 100644
--- a/src/osd/modules/sync/work_osd.c
+++ b/src/osd/modules/sync/work_osd.c
@@ -223,10 +223,11 @@ osd_work_queue *osd_work_queue_alloc(int flags)
allocthreadnum = queue->threads + 1;
else
allocthreadnum = queue->threads;
-#if 0
- // tools like chdman are not linked with osd_printf_*
- osd_printf_verbose("osdprocs: %d effecprocs: %d threads: %d allocthreads: %d osdthreads: %d maxthreads: %d queuethreads: %d\n", osd_num_processors, numprocs, threadnum, allocthreadnum, osdthreadnum, WORK_MAX_THREADS, queue->threads);
+
+#if KEEP_STATISTICS
+ printf("osdprocs: %d effecprocs: %d threads: %d allocthreads: %d osdthreads: %d maxthreads: %d queuethreads: %d\n", osd_num_processors, numprocs, threadnum, allocthreadnum, osdthreadnum, WORK_MAX_THREADS, queue->threads);
#endif
+
queue->thread = (work_thread_info *)osd_malloc_array(allocthreadnum * sizeof(queue->thread[0]));
if (queue->thread == NULL)
goto error;
@@ -382,7 +383,7 @@ void osd_work_queue_free(osd_work_queue *queue)
allocthreadnum = queue->threads;
// output per-thread statistics
- for (threadnum = 0; threadnum <= allocthreadnum; threadnum++)
+ for (threadnum = 0; threadnum < allocthreadnum; threadnum++)
{
work_thread_info *thread = &queue->thread[threadnum];
osd_ticks_t total = thread->runtime + thread->waittime + thread->spintime;