summaryrefslogtreecommitdiff
path: root/src/gpgpusim_entrypoint.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgpusim_entrypoint.cc')
-rw-r--r--src/gpgpusim_entrypoint.cc26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/gpgpusim_entrypoint.cc b/src/gpgpusim_entrypoint.cc
index de81df8..ba3b9aa 100644
--- a/src/gpgpusim_entrypoint.cc
+++ b/src/gpgpusim_entrypoint.cc
@@ -89,13 +89,17 @@ void *gpgpu_sim_thread_concurrent(void*)
// concurrent kernel execution simulation thread
g_the_gpu->init();
do {
- printf("GPGPU-Sim: *** simulation thread starting and spinning waiting for work ***\n");
- fflush(stdout);
+ if(g_debug_execution >= 3) {
+ printf("GPGPU-Sim: *** simulation thread starting and spinning waiting for work ***\n");
+ fflush(stdout);
+ }
while( g_stream_manager->empty() && !g_sim_done )
;
- printf("GPGPU-Sim: ** START simulation thread (detected work) **\n");
- g_stream_manager->print(stdout);
- fflush(stdout);
+ if(g_debug_execution >= 3) {
+ printf("GPGPU-Sim: ** START simulation thread (detected work) **\n");
+ g_stream_manager->print(stdout);
+ fflush(stdout);
+ }
pthread_mutex_lock(&g_sim_lock);
g_sim_active = true;
pthread_mutex_unlock(&g_sim_lock);
@@ -119,16 +123,20 @@ void *gpgpu_sim_thread_concurrent(void*)
g_the_gpu->deadlock_check();
active = g_the_gpu->active() || !g_stream_manager->empty();
} while( active );
- printf("GPGPU-Sim: ** STOP simulation thread (no work) **\n");
- fflush(stdout);
+ if(g_debug_execution >= 3) {
+ printf("GPGPU-Sim: ** STOP simulation thread (no work) **\n");
+ fflush(stdout);
+ }
if( sim_cycles )
g_the_gpu->print_stats();
pthread_mutex_lock(&g_sim_lock);
g_sim_active = false;
pthread_mutex_unlock(&g_sim_lock);
} while( !g_sim_done );
- printf("GPGPU-Sim: *** simulation thread exiting ***\n");
- fflush(stdout);
+ if(g_debug_execution >= 3) {
+ printf("GPGPU-Sim: *** simulation thread exiting ***\n");
+ fflush(stdout);
+ }
sem_post(&g_sim_signal_exit);
return NULL;
}