From 5106c655985729664acca18774531958c9820076 Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 1 May 2016 22:28:27 +0200 Subject: [PATCH] kill deadcode (TIME_BENCH_AMDAHL) --- src/simix/smx_global.cpp | 25 ------------------------- src/simix/smx_private.h | 10 ---------- 2 files changed, 35 deletions(-) diff --git a/src/simix/smx_global.cpp b/src/simix/smx_global.cpp index 06f6dc8b41..6192bde8fd 100644 --- a/src/simix/smx_global.cpp +++ b/src/simix/smx_global.cpp @@ -200,11 +200,6 @@ void SIMIX_global_init(int *argc, char **argv) if (!simix_global) { simix_global = xbt_new0(s_smx_global_t, 1); -#ifdef TIME_BENCH_AMDAHL - simix_global->timer_seq = xbt_os_timer_new(); - simix_global->timer_par = xbt_os_timer_new(); - xbt_os_cputimer_start(simix_global->timer_seq); -#endif simix_global->process_to_run = xbt_dynar_new(sizeof(smx_process_t), NULL); simix_global->process_that_ran = xbt_dynar_new(sizeof(smx_process_t), NULL); simix_global->process_list = xbt_swag_new(xbt_swag_offset(proc, process_hookup)); @@ -323,15 +318,6 @@ void SIMIX_clean(void) surf_exit(); -#ifdef TIME_BENCH_AMDAHL - xbt_os_cputimer_stop(simix_global->timer_seq); - XBT_INFO("Amdahl timings. Sequential time: %f; Parallel time: %f", - xbt_os_timer_elapsed(simix_global->timer_seq), - xbt_os_timer_elapsed(simix_global->timer_par)); - xbt_os_timer_free(simix_global->timer_seq); - xbt_os_timer_free(simix_global->timer_par); -#endif - xbt_mallocator_free(simix_global->synchro_mallocator); xbt_free(simix_global); simix_global = NULL; @@ -389,23 +375,12 @@ void SIMIX_run(void) do { XBT_DEBUG("New Schedule Round; size(queue)=%lu", xbt_dynar_length(simix_global->process_to_run)); -#ifdef TIME_BENCH_PER_SR - smx_ctx_raw_new_sr(); -#endif while (!xbt_dynar_is_empty(simix_global->process_to_run)) { XBT_DEBUG("New Sub-Schedule Round; size(queue)=%lu", xbt_dynar_length(simix_global->process_to_run)); /* Run all processes that are ready to run, possibly in parallel */ -#ifdef TIME_BENCH_AMDAHL - xbt_os_cputimer_stop(simix_global->timer_seq); - xbt_os_cputimer_resume(simix_global->timer_par); -#endif SIMIX_process_runall(); -#ifdef TIME_BENCH_AMDAHL - xbt_os_cputimer_stop(simix_global->timer_par); - xbt_os_cputimer_resume(simix_global->timer_seq); -#endif /* Move all killer processes to the end of the list, because killing a process that have an ongoing simcall is a bad idea */ xbt_dynar_three_way_partition(simix_global->process_that_ran, process_syscall_color); diff --git a/src/simix/smx_private.h b/src/simix/smx_private.h index fa5ffdd232..7190208dae 100644 --- a/src/simix/smx_private.h +++ b/src/simix/smx_private.h @@ -58,14 +58,9 @@ SG_BEGIN_DECL() /* Define only for SimGrid benchmarking purposes */ //#define TIME_BENCH_PER_SR /* this aims at measuring the time spent in each scheduling round per each thread. The code is thus run in sequential to bench separately each SSR */ -//#define TIME_BENCH_AMDAHL /* this aims at measuring the porting of time that could be parallelized at maximum (to get the optimal speedup by applying the amdahl law). */ //#define ADAPTIVE_THRESHOLD /* this is to enable the adaptive threshold algorithm in raw contexts*/ //#define TIME_BENCH_ENTIRE_SRS /* more general benchmark than TIME_BENCH_PER_SR. It aims to measure the total time spent in a whole scheduling round (including synchro costs)*/ -#ifdef TIME_BENCH_PER_SR -XBT_PRIVATE void smx_ctx_raw_new_sr(void); -#endif - /********************************** Simix Global ******************************/ typedef struct s_smx_global { smx_context_factory_t context_factory; @@ -81,11 +76,6 @@ typedef struct s_smx_global { void_pfn_smxprocess_t cleanup_process_function; xbt_mallocator_t synchro_mallocator; -#ifdef TIME_BENCH_AMDAHL - xbt_os_timer_t timer_seq; /* used to bench the sequential and parallel parts of the simulation, if requested to */ - xbt_os_timer_t timer_par; -#endif - xbt_os_mutex_t mutex; } s_smx_global_t, *smx_global_t; -- 2.20.1