Browse Source

Fix symbol visibility

Believe it or not, this seems to have been the the real cause of the
performance regression. I guess all these non-local references were adding a
lot of PLTs which end up triggering a bad lookup behavior.
Samuel Thibault 4 years ago
parent
commit
0c146ecca6

+ 7 - 7
examples/worker_collections/worker_list_example.c

@@ -35,13 +35,13 @@ int main()
         starpu_worker_get_ids_by_type(STARPU_CPU_WORKER, procs, ncpus);
 
 	struct starpu_worker_collection *co = (struct starpu_worker_collection*)malloc(sizeof(struct starpu_worker_collection));
-	co->has_next = worker_list.has_next;
-	co->get_next = worker_list.get_next;
-	co->add = worker_list.add;
-	co->remove = worker_list.remove;
-	co->init = worker_list.init;
-	co->deinit = worker_list.deinit;
-	co->init_iterator = worker_list.init_iterator;
+	co->has_next = starpu_worker_list.has_next;
+	co->get_next = starpu_worker_list.get_next;
+	co->add = starpu_worker_list.add;
+	co->remove = starpu_worker_list.remove;
+	co->init = starpu_worker_list.init;
+	co->deinit = starpu_worker_list.deinit;
+	co->init_iterator = starpu_worker_list.init_iterator;
 	co->type = STARPU_WORKER_LIST;
 
 	FPRINTF(stderr, "ncpus %u\n", ncpus);

+ 7 - 7
examples/worker_collections/worker_tree_example.c

@@ -44,13 +44,13 @@ int main()
         starpu_worker_get_ids_by_type(STARPU_CPU_WORKER, procs, ncpus);
 
 	struct starpu_worker_collection *co = (struct starpu_worker_collection*)calloc(1, sizeof(struct starpu_worker_collection));
-	co->has_next = worker_tree.has_next;
-	co->get_next = worker_tree.get_next;
-	co->add = worker_tree.add;
-	co->remove = worker_tree.remove;
-	co->init = worker_tree.init;
-	co->deinit = worker_tree.deinit;
-	co->init_iterator = worker_tree.init_iterator;
+	co->has_next = starpu_worker_tree.has_next;
+	co->get_next = starpu_worker_tree.get_next;
+	co->add = starpu_worker_tree.add;
+	co->remove = starpu_worker_tree.remove;
+	co->init = starpu_worker_tree.init;
+	co->deinit = starpu_worker_tree.deinit;
+	co->init_iterator = starpu_worker_tree.init_iterator;
 	co->type = STARPU_WORKER_TREE;
 
 	FPRINTF(stderr, "ncpus %u \n", ncpus);

+ 2 - 2
include/starpu_worker.h

@@ -154,8 +154,8 @@ struct starpu_worker_collection
 	void (*init_iterator_for_parallel_tasks)(struct starpu_worker_collection *workers, struct starpu_sched_ctx_iterator *it, struct starpu_task *task);
 };
 
-extern struct starpu_worker_collection worker_list;
-extern struct starpu_worker_collection worker_tree;
+extern struct starpu_worker_collection starpu_worker_list;
+extern struct starpu_worker_collection starpu_worker_tree;
 
 /**
    Return the number of workers (i.e. processing units executing

+ 4 - 4
src/common/graph.c

@@ -37,16 +37,16 @@ static starpu_pthread_rwlock_t graph_lock;
 int _starpu_graph_record;
 
 /* This list contains all nodes without incoming dependency */
-struct _starpu_graph_node_multilist_top top;
+static struct _starpu_graph_node_multilist_top top;
 /* This list contains all nodes without outgoing dependency */
-struct _starpu_graph_node_multilist_bottom bottom;
+static struct _starpu_graph_node_multilist_bottom bottom;
 /* This list contains all nodes */
-struct _starpu_graph_node_multilist_all all;
+static struct _starpu_graph_node_multilist_all all;
 
 /* Protects the dropped list, always taken before graph lock */
 static starpu_pthread_mutex_t dropped_lock;
 /* This list contains all dropped nodes, i.e. the job terminated by the corresponding node is still int he graph */
-struct _starpu_graph_node_multilist_dropped dropped;
+static struct _starpu_graph_node_multilist_dropped dropped;
 
 void _starpu_graph_init(void)
 {

+ 1 - 1
src/common/knobs.c

@@ -426,7 +426,7 @@ void starpu_perf_counter_set_per_codelet_listener(struct starpu_codelet *cl, str
 
 /* - */
 
-void unset_listener(struct starpu_perf_counter_sample *sample)
+static void unset_listener(struct starpu_perf_counter_sample *sample)
 {
 	_starpu_spin_lock(&sample->lock);
 	STARPU_ASSERT(sample->listener != NULL);

+ 1 - 1
src/common/utils.c

@@ -623,7 +623,7 @@ char *starpu_getenv(const char *str)
 	return getenv(str);
 }
 
-int _strings_ncmp(const char *strings[], const char *str)
+static int _strings_ncmp(const char *strings[], const char *str)
 {
 	int pos = 0;
 	while (strings[pos])

+ 1 - 1
src/core/debug.c

@@ -81,7 +81,7 @@ void _starpu_print_to_logfile(const char *format STARPU_ATTRIBUTE_UNUSED, ...)
 
 /* Record codelet to give ayudame nice function ids starting from 0. */
 #if defined(STARPU_USE_AYUDAME1)
-struct ayudame_codelet
+static struct ayudame_codelet
 {
 	char *name;
 	struct starpu_codelet *cl;

+ 1 - 1
src/core/disk_ops/disk_unistd.c

@@ -66,7 +66,7 @@ struct starpu_disk_ops starpu_disk_unistd_ops =
 #else
 	.copy = NULL,
 #endif
-	.bandwidth = get_unistd_global_bandwidth_between_disk_and_main_ram,
+	.bandwidth = _starpu_get_unistd_global_bandwidth_between_disk_and_main_ram,
 #ifdef HAVE_AIO_H
 	.async_read = starpu_unistd_global_async_read,
 	.async_write = starpu_unistd_global_async_write,

+ 1 - 1
src/core/disk_ops/disk_unistd_o_direct.c

@@ -138,7 +138,7 @@ struct starpu_disk_ops starpu_disk_unistd_o_direct_ops =
 #else
 	.copy = NULL,
 #endif
-	.bandwidth = get_unistd_global_bandwidth_between_disk_and_main_ram,
+	.bandwidth = _starpu_get_unistd_global_bandwidth_between_disk_and_main_ram,
 #if defined(HAVE_AIO_H) || defined(HAVE_LIBAIO_H)
         .async_read = starpu_unistd_o_direct_global_async_read,
         .async_write = starpu_unistd_o_direct_global_async_write,

+ 2 - 2
src/core/disk_ops/unistd/disk_unistd_global.c

@@ -87,7 +87,7 @@ struct starpu_unistd_copy_thread
 	struct starpu_unistd_work_copy_list list;
 };
 
-struct starpu_unistd_copy_thread copy_thread[STARPU_MAXNODES][STARPU_MAXNODES];
+static struct starpu_unistd_copy_thread copy_thread[STARPU_MAXNODES][STARPU_MAXNODES];
 static unsigned starpu_unistd_nb_disk_opened = 0;
 /* copy_file_range syscall can return ENOSYS. Use global var to catch
  * and prevent StarPU using direct disk to disk copy */
@@ -735,7 +735,7 @@ void starpu_unistd_global_unplug(void *base)
 	free(fileBase);
 }
 
-int get_unistd_global_bandwidth_between_disk_and_main_ram(unsigned node, void *base)
+int _starpu_get_unistd_global_bandwidth_between_disk_and_main_ram(unsigned node, void *base)
 {
 	int res;
 	unsigned iter;

+ 1 - 1
src/core/disk_ops/unistd/disk_unistd_global.h

@@ -51,7 +51,7 @@ int starpu_unistd_global_read (void *base, void *obj, void *buf, off_t offset, s
 int starpu_unistd_global_write (void *base, void *obj, const void *buf, off_t offset, size_t size);
 void * starpu_unistd_global_plug (void *parameter, starpu_ssize_t size);
 void starpu_unistd_global_unplug (void *base);
-int get_unistd_global_bandwidth_between_disk_and_main_ram(unsigned node, void *base);
+int _starpu_get_unistd_global_bandwidth_between_disk_and_main_ram(unsigned node, void *base);
 void* starpu_unistd_global_async_read (void *base, void *obj, void *buf, off_t offset, size_t size);
 void* starpu_unistd_global_async_write (void *base, void *obj, void *buf, off_t offset, size_t size);
 void * starpu_unistd_global_async_full_write (void * base, void * obj, void * ptr, size_t size);

+ 1 - 1
src/core/perfmodel/perfmodel.c

@@ -481,7 +481,7 @@ double starpu_task_bundle_expected_data_transfer_time(starpu_task_bundle_t bundl
 
 				/* Insert the handle in the sorted list in case
 				 * it's not already in that list. */
-				_insertion_handle_sorted(&handles, handle, mode);
+				_starpu_insertion_handle_sorted(&handles, handle, mode);
 			}
 		}
 

+ 17 - 17
src/core/sched_ctx.c

@@ -32,7 +32,7 @@ enum _starpu_ctx_change_op
 static starpu_pthread_mutex_t sched_ctx_manag = STARPU_PTHREAD_MUTEX_INITIALIZER;
 static starpu_pthread_mutex_t finished_submit_mutex = STARPU_PTHREAD_MUTEX_INITIALIZER;
 static struct starpu_task stop_submission_task = STARPU_TASK_INITIALIZER;
-starpu_pthread_key_t sched_ctx_key;
+static starpu_pthread_key_t sched_ctx_key;
 static unsigned with_hypervisor = 0;
 static double hyp_start_sample[STARPU_NMAX_SCHED_CTXS];
 static double hyp_start_allow_sample[STARPU_NMAX_SCHED_CTXS];
@@ -1773,27 +1773,27 @@ struct starpu_worker_collection* starpu_sched_ctx_create_worker_collection(unsig
 	{
 #ifdef STARPU_HAVE_HWLOC
 	case STARPU_WORKER_TREE:
-		sched_ctx->workers->has_next = worker_tree.has_next;
-		sched_ctx->workers->get_next = worker_tree.get_next;
-		sched_ctx->workers->add = worker_tree.add;
-		sched_ctx->workers->remove = worker_tree.remove;
-		sched_ctx->workers->init = worker_tree.init;
-		sched_ctx->workers->deinit = worker_tree.deinit;
-		sched_ctx->workers->init_iterator = worker_tree.init_iterator;
-		sched_ctx->workers->init_iterator_for_parallel_tasks = worker_tree.init_iterator_for_parallel_tasks;
+		sched_ctx->workers->has_next = starpu_worker_tree.has_next;
+		sched_ctx->workers->get_next = starpu_worker_tree.get_next;
+		sched_ctx->workers->add = starpu_worker_tree.add;
+		sched_ctx->workers->remove = starpu_worker_tree.remove;
+		sched_ctx->workers->init = starpu_worker_tree.init;
+		sched_ctx->workers->deinit = starpu_worker_tree.deinit;
+		sched_ctx->workers->init_iterator = starpu_worker_tree.init_iterator;
+		sched_ctx->workers->init_iterator_for_parallel_tasks = starpu_worker_tree.init_iterator_for_parallel_tasks;
 		sched_ctx->workers->type = STARPU_WORKER_TREE;
 		break;
 #endif
 //	case STARPU_WORKER_LIST:
 	default:
-		sched_ctx->workers->has_next = worker_list.has_next;
-		sched_ctx->workers->get_next = worker_list.get_next;
-		sched_ctx->workers->add = worker_list.add;
-		sched_ctx->workers->remove = worker_list.remove;
-		sched_ctx->workers->init = worker_list.init;
-		sched_ctx->workers->deinit = worker_list.deinit;
-		sched_ctx->workers->init_iterator = worker_list.init_iterator;
-		sched_ctx->workers->init_iterator_for_parallel_tasks = worker_list.init_iterator_for_parallel_tasks;
+		sched_ctx->workers->has_next = starpu_worker_list.has_next;
+		sched_ctx->workers->get_next = starpu_worker_list.get_next;
+		sched_ctx->workers->add = starpu_worker_list.add;
+		sched_ctx->workers->remove = starpu_worker_list.remove;
+		sched_ctx->workers->init = starpu_worker_list.init;
+		sched_ctx->workers->deinit = starpu_worker_list.deinit;
+		sched_ctx->workers->init_iterator = starpu_worker_list.init_iterator;
+		sched_ctx->workers->init_iterator_for_parallel_tasks = starpu_worker_list.init_iterator_for_parallel_tasks;
 		sched_ctx->workers->type = STARPU_WORKER_LIST;
 		break;
 

+ 1 - 1
src/core/task_bundle.c

@@ -185,7 +185,7 @@ void _starpu_task_bundle_destroy(starpu_task_bundle_t bundle)
 	free(bundle);
 }
 
-void _insertion_handle_sorted(struct _starpu_handle_list **listp, starpu_data_handle_t handle, enum starpu_data_access_mode mode)
+void _starpu_insertion_handle_sorted(struct _starpu_handle_list **listp, starpu_data_handle_t handle, enum starpu_data_access_mode mode)
 {
 	STARPU_ASSERT(listp);
 

+ 2 - 2
src/core/task_bundle.h

@@ -108,7 +108,7 @@ struct _starpu_handle_list
  */
 void _starpu_task_bundle_destroy(starpu_task_bundle_t bundle);
 
-/** _insertion_handle_sorted
+/** _starpu_insertion_handle_sorted
  * ========================
  * Purpose
  * =======
@@ -131,6 +131,6 @@ void _starpu_task_bundle_destroy(starpu_task_bundle_t bundle);
  * mode			(input)
  * 			Access mode of the handle.
  */
-void _insertion_handle_sorted(struct _starpu_handle_list **listp, starpu_data_handle_t handle, enum starpu_data_access_mode mode);
+void _starpu_insertion_handle_sorted(struct _starpu_handle_list **listp, starpu_data_handle_t handle, enum starpu_data_access_mode mode);
 
 #endif // __CORE_TASK_BUNDLE_H__

+ 2 - 2
src/core/workers.c

@@ -108,7 +108,7 @@ static void global_knobs__get(const struct starpu_perf_knob * const knob, void *
 	}
 }
 
-void worker_knobs__set(const struct starpu_perf_knob * const knob, void *context, const struct starpu_perf_knob_value * const value)
+static void worker_knobs__set(const struct starpu_perf_knob * const knob, void *context, const struct starpu_perf_knob_value * const value)
 {
 	const unsigned workerid = *(unsigned *)context;
 	struct _starpu_worker * const worker = _starpu_get_worker_struct(workerid);
@@ -127,7 +127,7 @@ void worker_knobs__set(const struct starpu_perf_knob * const knob, void *context
 		abort();
 	}
 }
-void worker_knobs__get(const struct starpu_perf_knob * const knob, void *context,       struct starpu_perf_knob_value * const value)
+static void worker_knobs__get(const struct starpu_perf_knob * const knob, void *context,       struct starpu_perf_knob_value * const value)
 {
 	const unsigned workerid = *(unsigned *)context;
 	struct _starpu_worker * const worker = _starpu_get_worker_struct(workerid);

+ 1 - 1
src/datawizard/coherency.c

@@ -1033,7 +1033,7 @@ int starpu_idle_prefetch_task_input_for(struct starpu_task *task, unsigned worke
 	return starpu_idle_prefetch_task_input_for_prio(task, worker, prio);
 }
 
-struct _starpu_data_replicate *get_replicate(starpu_data_handle_t handle, enum starpu_data_access_mode mode, int workerid, unsigned node)
+static struct _starpu_data_replicate *get_replicate(starpu_data_handle_t handle, enum starpu_data_access_mode mode, int workerid, unsigned node)
 {
 	if (mode & (STARPU_SCRATCH|STARPU_REDUX))
 	{

+ 0 - 1
src/datawizard/coherency.h

@@ -379,6 +379,5 @@ void _starpu_data_end_reduction_mode(starpu_data_handle_t handle);
 void _starpu_data_end_reduction_mode_terminate(starpu_data_handle_t handle);
 
 void _starpu_data_set_unregister_hook(starpu_data_handle_t handle, _starpu_data_handle_unregister_hook func);
-struct _starpu_data_replicate *get_replicate(starpu_data_handle_t handle, enum starpu_data_access_mode mode, int workerid, unsigned node);
 
 #endif // __COHERENCY__H__

+ 4 - 4
src/debug/traces/starpu_fxt.c

@@ -120,7 +120,7 @@ struct task_info
 	int mpi_rank;
 };
 
-struct task_info *tasks_info;
+static struct task_info *tasks_info;
 
 static struct task_info *get_task(unsigned long job_id, int mpi_rank)
 {
@@ -300,7 +300,7 @@ struct data_info
 	long mpi_tag;
 };
 
-struct data_info *data_info;
+static struct data_info *data_info;
 
 static struct data_info *get_data(unsigned long handle, int mpi_rank)
 {
@@ -600,7 +600,7 @@ static char *scheduler_container_alias(char *output, int len, const char *prefix
 
 static int nworkers = 0;
 
-struct worker_entry
+static struct worker_entry
 {
 	UT_hash_handle hh;
 	unsigned long tid;
@@ -4832,7 +4832,7 @@ struct parse_task
 
 static struct parse_task tasks[STARPU_NMAXWORKERS];
 
-struct starpu_data_trace_kernel
+static struct starpu_data_trace_kernel
 {
 	UT_hash_handle hh;
 	char *name;

+ 6 - 6
src/debug/traces/starpu_fxt_mpi.c

@@ -109,18 +109,18 @@ static struct mpi_transfer *mpi_sends[STARPU_FXT_MAX_FILES] = {NULL};
 static struct mpi_transfer *mpi_recvs[STARPU_FXT_MAX_FILES] = {NULL};
 
 /* number of available slots in the lists  */
-unsigned mpi_sends_list_size[STARPU_FXT_MAX_FILES] = {0};
-unsigned mpi_recvs_list_size[STARPU_FXT_MAX_FILES] = {0};
+static unsigned mpi_sends_list_size[STARPU_FXT_MAX_FILES] = {0};
+static unsigned mpi_recvs_list_size[STARPU_FXT_MAX_FILES] = {0};
 
 /* number of slots actually used in the list  */
-unsigned mpi_sends_used[STARPU_FXT_MAX_FILES] = {0};
-unsigned mpi_recvs_used[STARPU_FXT_MAX_FILES] = {0};
+static unsigned mpi_sends_used[STARPU_FXT_MAX_FILES] = {0};
+static unsigned mpi_recvs_used[STARPU_FXT_MAX_FILES] = {0};
 
 /* number of slots already matched at the beginning of the list. This permits
  * going through the lists from the beginning to match each and every
  * transfer, thus avoiding a quadratic complexity. */
-unsigned mpi_recvs_matched[STARPU_FXT_MAX_FILES][STARPU_FXT_MAX_FILES] = { {0} };
-unsigned mpi_sends_matched[STARPU_FXT_MAX_FILES][STARPU_FXT_MAX_FILES] = { {0} };
+static unsigned mpi_recvs_matched[STARPU_FXT_MAX_FILES][STARPU_FXT_MAX_FILES] = { {0} };
+static unsigned mpi_sends_matched[STARPU_FXT_MAX_FILES][STARPU_FXT_MAX_FILES] = { {0} };
 
 void _starpu_fxt_mpi_add_send_transfer(int src, int dst STARPU_ATTRIBUTE_UNUSED, long mpi_tag, size_t size, float date, long jobid, unsigned long handle, unsigned type, int prio)
 {

+ 6 - 6
src/drivers/mp_common/source_common.c

@@ -802,8 +802,8 @@ void _starpu_src_common_init_switch_env(unsigned this)
         save_thread_env[this].current_worker = STARPU_PTHREAD_GETSPECIFIC(_starpu_worker_key);
         save_thread_env[this].current_worker_set = STARPU_PTHREAD_GETSPECIFIC(_starpu_worker_set_key);
 #ifdef STARPU_OPENMP
-        save_thread_env[this].current_omp_thread = STARPU_PTHREAD_GETSPECIFIC(omp_thread_key);
-        save_thread_env[this].current_omp_task = STARPU_PTHREAD_GETSPECIFIC(omp_task_key);
+        save_thread_env[this].current_omp_thread = STARPU_PTHREAD_GETSPECIFIC(_starpu_omp_thread_key);
+        save_thread_env[this].current_omp_task = STARPU_PTHREAD_GETSPECIFIC(_starpu_omp_task_key);
 #endif
 }
 
@@ -813,16 +813,16 @@ static void _starpu_src_common_switch_env(unsigned old, unsigned new)
         save_thread_env[old].current_worker = STARPU_PTHREAD_GETSPECIFIC(_starpu_worker_key);
         save_thread_env[old].current_worker_set = STARPU_PTHREAD_GETSPECIFIC(_starpu_worker_set_key);
 #ifdef STARPU_OPENMP
-        save_thread_env[old].current_omp_thread = STARPU_PTHREAD_GETSPECIFIC(omp_thread_key);
-        save_thread_env[old].current_omp_task = STARPU_PTHREAD_GETSPECIFIC(omp_task_key);
+        save_thread_env[old].current_omp_thread = STARPU_PTHREAD_GETSPECIFIC(_starpu_omp_thread_key);
+        save_thread_env[old].current_omp_task = STARPU_PTHREAD_GETSPECIFIC(_starpu_omp_task_key);
 #endif
 
         _starpu_set_current_task(save_thread_env[new].current_task);
         STARPU_PTHREAD_SETSPECIFIC(_starpu_worker_key, save_thread_env[new].current_worker);
         STARPU_PTHREAD_SETSPECIFIC(_starpu_worker_set_key, save_thread_env[new].current_worker_set);
 #ifdef STARPU_OPENMP
-        STARPU_PTHREAD_SETSPECIFIC(omp_thread_key, save_thread_env[new].current_omp_thread);
-        STARPU_PTHREAD_SETSPECIFIC(omp_task_key, save_thread_env[new].current_omp_task);
+        STARPU_PTHREAD_SETSPECIFIC(_starpu_omp_thread_key, save_thread_env[new].current_omp_thread);
+        STARPU_PTHREAD_SETSPECIFIC(_starpu_omp_task_key, save_thread_env[new].current_omp_task);
 #endif
 }
 #endif

+ 4 - 4
src/sched_policies/component_composed.c

@@ -75,7 +75,7 @@ struct composed_component
 /* this function actualy build the composed component data by changing the list of
  * (component_create_fun, arg_create_fun) into a tree where all components have 1 childs
  */
-struct composed_component create_composed_component(struct starpu_sched_tree *tree, struct starpu_sched_component_composed_recipe * recipe
+static struct composed_component create_composed_component(struct starpu_sched_tree *tree, struct starpu_sched_component_composed_recipe * recipe
 #ifdef STARPU_HAVE_HWLOC
 						    ,hwloc_obj_t obj
 #endif
@@ -121,7 +121,7 @@ static int composed_component_push_task(struct starpu_sched_component * componen
 	return starpu_sched_component_push_task(component,c->top,task);
 }
 
-struct starpu_task * composed_component_pull_task(struct starpu_sched_component *component, struct starpu_sched_component * to STARPU_ATTRIBUTE_UNUSED)
+static struct starpu_task * composed_component_pull_task(struct starpu_sched_component *component, struct starpu_sched_component * to STARPU_ATTRIBUTE_UNUSED)
 {
 	struct composed_component *c = component->data;
 	struct starpu_task *task;
@@ -145,7 +145,7 @@ struct starpu_task * composed_component_pull_task(struct starpu_sched_component
 	return task;
 }
 
-double composed_component_estimated_load(struct starpu_sched_component * component)
+static double composed_component_estimated_load(struct starpu_sched_component * component)
 {
 	struct composed_component * c = component->data;
 	return c->top->estimated_load(c->top);
@@ -185,7 +185,7 @@ static void composed_component_notify_change_workers(struct starpu_sched_compone
 	}
 }
 
-void composed_component_deinit_data(struct starpu_sched_component * _component)
+static void composed_component_deinit_data(struct starpu_sched_component * _component)
 {
 	struct composed_component *c = _component->data;
 	c->bottom->children = NULL;

+ 1 - 1
src/sched_policies/component_sched.c

@@ -216,7 +216,7 @@ void starpu_sched_component_destroy_rec(struct starpu_sched_component * componen
 		starpu_sched_component_destroy(component);
 }
 
-void set_properties(struct starpu_sched_component * component)
+static void set_properties(struct starpu_sched_component * component)
 {
 	STARPU_ASSERT(component);
 	component->properties = 0;

+ 1 - 1
src/sched_policies/component_userchoice.c

@@ -34,7 +34,7 @@ static struct starpu_task * userchoice_pull_task(struct starpu_sched_component *
 	return starpu_sched_component_parents_pull_task(component, to);
 }
 
-int userchoice_can_pull(struct starpu_sched_component * component)
+static int userchoice_can_pull(struct starpu_sched_component * component)
 {
 	_STARPU_DISP("stage component is not supposed to be pull from...\n");
 	return starpu_sched_component_can_pull(component);

+ 5 - 5
src/sched_policies/component_work_stealing.c

@@ -189,7 +189,7 @@ static struct starpu_task * pull_task(struct starpu_sched_component * component,
 		return NULL;
 }
 
-double _ws_estimated_end(struct starpu_sched_component * component)
+static double _ws_estimated_end(struct starpu_sched_component * component)
 {
 	STARPU_ASSERT(starpu_sched_component_is_work_stealing(component));
 	struct _starpu_component_work_stealing_data * wsd = component->data;
@@ -211,7 +211,7 @@ double _ws_estimated_end(struct starpu_sched_component * component)
 	return (sum_start + sum_len) / nb_workers;
 }
 
-double _ws_estimated_load(struct starpu_sched_component * component)
+static double _ws_estimated_load(struct starpu_sched_component * component)
 {
 	STARPU_ASSERT(starpu_sched_component_is_work_stealing(component));
 	struct _starpu_component_work_stealing_data * wsd = component->data;
@@ -326,7 +326,7 @@ int starpu_sched_tree_work_stealing_push_task(struct starpu_task *task)
 }
 
 
-void _ws_add_child(struct starpu_sched_component * component, struct starpu_sched_component * child)
+static void _ws_add_child(struct starpu_sched_component * component, struct starpu_sched_component * child)
 {
 	struct _starpu_component_work_stealing_data * wsd = component->data;
 	starpu_sched_component_add_child(component, child);
@@ -347,7 +347,7 @@ void _ws_add_child(struct starpu_sched_component * component, struct starpu_sche
 	wsd->mutexes[component->nchildren - 1] = mutex;
 }
 
-void _ws_remove_child(struct starpu_sched_component * component, struct starpu_sched_component * child)
+static void _ws_remove_child(struct starpu_sched_component * component, struct starpu_sched_component * child)
 {
 	struct _starpu_component_work_stealing_data * wsd = component->data;
 
@@ -374,7 +374,7 @@ void _ws_remove_child(struct starpu_sched_component * component, struct starpu_s
 	}
 }
 
-void _work_stealing_component_deinit_data(struct starpu_sched_component * component)
+static void _work_stealing_component_deinit_data(struct starpu_sched_component * component)
 {
 	struct _starpu_component_work_stealing_data * wsd = component->data;
 	free(wsd->per_worker);

+ 1 - 1
src/sched_policies/parallel_eager.c

@@ -30,7 +30,7 @@ struct _starpu_peager_common_data
 	int ref_count;
 };
 
-struct _starpu_peager_common_data *_peager_common_data = NULL;
+static struct _starpu_peager_common_data *_peager_common_data = NULL;
 
 struct _starpu_peager_data
 {

+ 1 - 1
src/sched_policies/scheduler_maker.c

@@ -119,7 +119,7 @@ static struct sched_component_list helper_make_scheduler(struct starpu_sched_tre
 	return l;
 }
 /* return the firt component in prefix order such as component->obj == obj, or NULL */
-struct starpu_sched_component * _find_sched_component_with_obj(struct starpu_sched_component * component, hwloc_obj_t obj)
+static struct starpu_sched_component * _find_sched_component_with_obj(struct starpu_sched_component * component, hwloc_obj_t obj)
 {
 	if(component == NULL)
 		return NULL;

+ 14 - 14
src/util/openmp_runtime_support.c

@@ -37,8 +37,8 @@
 #define _STARPU_INITIAL_THREAD_STACKSIZE 2097152
 
 static struct starpu_omp_global _global_state;
-starpu_pthread_key_t omp_thread_key;
-starpu_pthread_key_t omp_task_key;
+starpu_pthread_key_t _starpu_omp_thread_key;
+starpu_pthread_key_t _starpu_omp_task_key;
 
 struct starpu_omp_global *_starpu_omp_global_state = NULL;
 double _starpu_omp_clock_ref = 0.0; /* clock reference for starpu_omp_get_wtick */
@@ -60,24 +60,24 @@ static void starpu_omp_task_preempt(void);
 
 struct starpu_omp_thread *_starpu_omp_get_thread(void)
 {
-	struct starpu_omp_thread *thread = STARPU_PTHREAD_GETSPECIFIC(omp_thread_key);
+	struct starpu_omp_thread *thread = STARPU_PTHREAD_GETSPECIFIC(_starpu_omp_thread_key);
 	return thread;
 }
 
 static inline void _starpu_omp_set_thread(struct starpu_omp_thread *thread)
 {
-	STARPU_PTHREAD_SETSPECIFIC(omp_thread_key, thread);
+	STARPU_PTHREAD_SETSPECIFIC(_starpu_omp_thread_key, thread);
 }
 
 struct starpu_omp_task *_starpu_omp_get_task(void)
 {
-	struct starpu_omp_task *task = STARPU_PTHREAD_GETSPECIFIC(omp_task_key);
+	struct starpu_omp_task *task = STARPU_PTHREAD_GETSPECIFIC(_starpu_omp_task_key);
 	return task;
 }
 
 static inline void _starpu_omp_set_task(struct starpu_omp_task *task)
 {
-	STARPU_PTHREAD_SETSPECIFIC(omp_task_key, task);
+	STARPU_PTHREAD_SETSPECIFIC(_starpu_omp_task_key, task);
 }
 
 struct starpu_omp_region *_starpu_omp_get_region_at_level(int level)
@@ -915,8 +915,8 @@ void _starpu_omp_dummy_init(void)
 {
 	if (_starpu_omp_global_state != &_global_state)
 	{
-		STARPU_PTHREAD_KEY_CREATE(&omp_thread_key, NULL);
-		STARPU_PTHREAD_KEY_CREATE(&omp_task_key, NULL);
+		STARPU_PTHREAD_KEY_CREATE(&_starpu_omp_thread_key, NULL);
+		STARPU_PTHREAD_KEY_CREATE(&_starpu_omp_task_key, NULL);
 	}
 }
 
@@ -927,8 +927,8 @@ void _starpu_omp_dummy_shutdown(void)
 {
 	if (_starpu_omp_global_state != &_global_state)
 	{
-		STARPU_PTHREAD_KEY_DELETE(omp_thread_key);
-		STARPU_PTHREAD_KEY_DELETE(omp_task_key);
+		STARPU_PTHREAD_KEY_DELETE(_starpu_omp_thread_key);
+		STARPU_PTHREAD_KEY_DELETE(_starpu_omp_task_key);
 	}
 }
 
@@ -953,8 +953,8 @@ int starpu_omp_init(void)
 
 	_starpu_omp_global_state = &_global_state;
 
-	STARPU_PTHREAD_KEY_CREATE(&omp_thread_key, NULL);
-	STARPU_PTHREAD_KEY_CREATE(&omp_task_key, NULL);
+	STARPU_PTHREAD_KEY_CREATE(&_starpu_omp_thread_key, NULL);
+	STARPU_PTHREAD_KEY_CREATE(&_starpu_omp_task_key, NULL);
 	_global_state.initial_device = create_omp_device_struct();
 	_global_state.initial_region = create_omp_region_struct(NULL, _global_state.initial_device);
 	_global_state.initial_thread = create_omp_thread_struct(_global_state.initial_region);
@@ -1022,8 +1022,8 @@ void starpu_omp_shutdown(void)
 	_starpu_spin_unlock(&_global_state.hash_workers_lock);
 	_starpu_spin_destroy(&_global_state.hash_workers_lock);
 	_starpu_omp_environment_exit();
-	STARPU_PTHREAD_KEY_DELETE(omp_task_key);
-	STARPU_PTHREAD_KEY_DELETE(omp_thread_key);
+	STARPU_PTHREAD_KEY_DELETE(_starpu_omp_task_key);
+	STARPU_PTHREAD_KEY_DELETE(_starpu_omp_thread_key);
 #ifdef STARPU_SIMGRID
 	_starpu_simgrid_deinit_late();
 #endif

+ 1 - 1
src/util/openmp_runtime_support_environment.c

@@ -118,7 +118,7 @@ static int read_int_var(const char *str, int *dst)
 	return 1;
 }
 
-int _strings_cmp(const char *strings[], const char *str)
+static int _strings_cmp(const char *strings[], const char *str)
 {
 	int mode = 0;
 	while (strings[mode])

+ 2 - 2
src/util/starpu_data_cpy.c

@@ -79,7 +79,7 @@ static void common_data_cpy_func(void *descr[], void *cl_arg)
 
 }
 
-void mp_cpy_kernel(void *descr[], void *cl_arg)
+static void mp_cpy_kernel(void *descr[], void *cl_arg)
 {
 	unsigned interface_id = *(unsigned *)cl_arg;
 
@@ -98,7 +98,7 @@ void mp_cpy_kernel(void *descr[], void *cl_arg)
 
 }
 
-struct starpu_perfmodel copy_model =
+static struct starpu_perfmodel copy_model =
 {
 	.type = STARPU_HISTORY_BASED,
 	.symbol = "starpu_data_cpy"

+ 1 - 1
src/worker_collection/worker_list.c

@@ -295,7 +295,7 @@ static void list_init_iterator_for_parallel_tasks(struct starpu_worker_collectio
 	workers->nunblocked_workers = nub;
 }
 
-struct starpu_worker_collection worker_list =
+struct starpu_worker_collection starpu_worker_list =
 {
 	.has_next = list_has_next,
 	.get_next = list_get_next,

+ 1 - 1
src/worker_collection/worker_tree.c

@@ -356,7 +356,7 @@ static void tree_init_iterator_for_parallel_tasks(struct starpu_worker_collectio
 	}
 }
 
-struct starpu_worker_collection worker_tree =
+struct starpu_worker_collection starpu_worker_tree =
 {
 	.has_next = tree_has_next,
 	.get_next = tree_get_next,