Commit fbc1d028 authored by Camille Coti's avatar Camille Coti
Browse files

Thread-local variables

parent e4748448
......@@ -41,10 +41,10 @@ const enum starpu_perf_counter_scope g_scope = starpu_perf_counter_scope_global;
const enum starpu_perf_counter_scope w_scope = starpu_perf_counter_scope_per_worker;
const enum starpu_perf_counter_scope c_scope = starpu_perf_counter_scope_per_codelet;
struct starpu_perf_counter_listener* g_listener;
struct starpu_perf_counter_listener* w_listener;
struct starpu_perf_counter_set* g_set;
struct starpu_perf_counter_set* w_set;
thread_local struct starpu_perf_counter_listener* g_listener;
thread_local struct starpu_perf_counter_listener* w_listener;
thread_local struct starpu_perf_counter_set* g_set;
thread_local struct starpu_perf_counter_set* w_set;
void init_sched_listeners( struct starpu_conf* );
void terminate_sched_listeners( void );
......@@ -315,20 +315,20 @@ void myfunction_cb( starpu_prof_info* prof_info, starpu_event_info* event_info,
/* Register listeners for the scheduler's internal counters */
/* global counters */
static int id_g_total_submitted;
static int id_g_peak_submitted;
static int id_g_peak_ready;
thread_local int id_g_total_submitted;
thread_local int id_g_peak_submitted;
thread_local int id_g_peak_ready;
/* per worker counters */
static int id_w_total_executed;
static int id_w_cumul_execution_time;
thread_local int id_w_total_executed;
thread_local int id_w_cumul_execution_time;
/* per_codelet counters */
static int id_c_total_submitted;
static int id_c_peak_submitted;
static int id_c_peak_ready;
static int id_c_total_executed;
static int id_c_cumul_execution_time;
thread_local int id_c_total_submitted;
thread_local int id_c_peak_submitted;
thread_local int id_c_peak_ready;
thread_local int id_c_total_executed;
thread_local int id_c_cumul_execution_time;
void g_listener_cb(struct starpu_perf_counter_listener *listener, struct starpu_perf_counter_sample *sample, void *context)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment