浏览代码

memory status: rename fonctions _starpu_display_data_stats&co to _starpu_display_memory_status&co to be more expliciit on what they do

Nathalie Furmento 12 年之前
父节点
当前提交
c01d1d789d
共有 3 个文件被更改,包括 12 次插入12 次删除
  1. 1 1
      src/core/workers.c
  2. 8 8
      src/datawizard/memalloc.c
  3. 3 3
      src/datawizard/memalloc.h

+ 1 - 1
src/core/workers.c

@@ -884,7 +884,7 @@ void starpu_shutdown(void)
 	_starpu_display_alloc_cache_stats();
 	_starpu_display_comm_amounts();
 
-	_starpu_display_data_stats();
+	_starpu_display_memory_status();
 
 	starpu_bus_profiling_helper_display_summary();
 	starpu_worker_profiling_helper_display_summary();

+ 8 - 8
src/datawizard/memalloc.c

@@ -932,7 +932,7 @@ static void starpu_lru(unsigned node)
 
 
 #ifdef STARPU_MEMORY_STATUS
-void _starpu_display_data_stats_by_node(int node)
+void _starpu_display_memory_status_by_node(int node)
 {
 	_STARPU_PTHREAD_RWLOCK_WRLOCK(&mc_rwlock[node]);
 
@@ -947,7 +947,7 @@ void _starpu_display_data_stats_by_node(int node)
 		     mc != _starpu_mem_chunk_list_end(mc_list[node]);
 		     mc = _starpu_mem_chunk_list_next(mc))
 		{
-			_starpu_display_data_handle_stats(mc->data);
+			_starpu_display_memory_handle_status(mc->data);
 		}
 
 	}
@@ -956,19 +956,19 @@ void _starpu_display_data_stats_by_node(int node)
 }
 #endif
 
-void _starpu_display_data_stats(void)
+void _starpu_display_memory_status(void)
 {
 #ifdef STARPU_MEMORY_STATUS
 	unsigned node;
-	const char *stats;
+	const char *status;
 
-	if ((stats = getenv("STARPU_MEMORY_STATS")) && atoi(stats))
+	if ((status = getenv("STARPU_MEMORY_STATS")) && atoi(status))
 	{
 		fprintf(stderr, "\n#---------------------\n");
-		fprintf(stderr, "Memory allocation stats :\n");
+		fprintf(stderr, "Memory status :\n");
 		for (node = 0; node < STARPU_MAXNODES; node++)
 		{
-			_starpu_display_data_stats_by_node(node);
+			_starpu_display_memory_status_by_node(node);
 		}
 		fprintf(stderr, "\n#---------------------\n");
 	}
@@ -976,7 +976,7 @@ void _starpu_display_data_stats(void)
 }
 
 #ifdef STARPU_MEMORY_STATUS
-void _starpu_display_data_handle_stats(starpu_data_handle_t handle)
+void _starpu_display_memory_handle_status(starpu_data_handle_t handle)
 {
 	unsigned node;
 

+ 3 - 3
src/datawizard/memalloc.h

@@ -63,9 +63,9 @@ int _starpu_allocate_memory_on_node(starpu_data_handle_t handle, struct _starpu_
 size_t _starpu_free_all_automatically_allocated_buffers(uint32_t node);
 void _starpu_memchunk_recently_used(struct _starpu_mem_chunk *mc, unsigned node);
 
-void _starpu_display_data_stats_by_node(int node);
-void _starpu_display_data_stats();
-void _starpu_display_data_handle_stats(starpu_data_handle_t handle);
+void _starpu_display_memory_status_by_node(int node);
+void _starpu_display_memory_status();
+void _starpu_display_memory_handle_status(starpu_data_handle_t handle);
 
 void _starpu_handle_stats_cache_hit(starpu_data_handle_t handle, unsigned node);
 void _starpu_handle_stats_loaded_shared(starpu_data_handle_t handle, unsigned node);