Browse Source

rename internal macro STARPU_DATA_STATS to STARPU_ENABLE_STATS

Nathalie Furmento 12 years ago
parent
commit
a159adc4b3
3 changed files with 16 additions and 16 deletions
  1. 2 2
      configure.ac
  2. 1 1
      src/core/workers.c
  3. 13 13
      src/datawizard/datastats.c

+ 2 - 2
configure.ac

@@ -914,9 +914,9 @@ AC_ARG_ENABLE(stats, [AS_HELP_STRING([--enable-stats],
 			enable_stats=$enableval, enable_stats=no)
 AC_MSG_RESULT($enable_stats)
 AC_SUBST(STATS, $enable_stats)
-AC_SUBST(STARPU_DATA_STATS, $enable_stats)
+AC_SUBST(STARPU_ENABLE_STATS, $enable_stats)
 if test x$enable_stats = xyes; then
-        AC_DEFINE(STARPU_DATA_STATS, [1], [enable statistics])
+        AC_DEFINE(STARPU_ENABLE_STATS, [1], [enable statistics])
 fi
 
 AC_MSG_CHECKING(whether memory status should be displayed)

+ 1 - 1
src/core/workers.c

@@ -665,7 +665,7 @@ int starpu_init(struct starpu_conf *user_conf)
 #ifdef STARPU_MODEL_DEBUG
 	_STARPU_DISP("Warning: StarPU was configured with --enable-model-debug, which slows down a bit\n");
 #endif
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 	_STARPU_DISP("Warning: StarPU was configured with --enable-stats, which slows down a bit\n");
 #endif
 

+ 13 - 13
src/datawizard/datastats.c

@@ -20,7 +20,7 @@
 #include <datawizard/coherency.h>
 #include <common/config.h>
 
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 /* measure the cache hit ratio for each node */
 static unsigned hit_cnt[STARPU_MAXNODES];
 static unsigned miss_cnt[STARPU_MAXNODES];
@@ -28,21 +28,21 @@ static unsigned miss_cnt[STARPU_MAXNODES];
 
 void _starpu_msi_cache_hit(unsigned node __attribute__ ((unused)))
 {
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 	hit_cnt[node]++;
 #endif
 }
 
 void _starpu_msi_cache_miss(unsigned node __attribute__ ((unused)))
 {
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 	miss_cnt[node]++;
 #endif
 }
 
 void _starpu_display_msi_stats(void)
 {
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 	unsigned node;
 	unsigned total_hit_cnt = 0;
 	unsigned total_miss_cnt = 0;
@@ -73,28 +73,28 @@ void _starpu_display_msi_stats(void)
 
 /* measure the efficiency of our allocation cache */
 
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 static unsigned alloc_cnt[STARPU_MAXNODES];
 static unsigned alloc_cache_hit_cnt[STARPU_MAXNODES];
 #endif
 
 void _starpu_allocation_cache_hit(unsigned node __attribute__ ((unused)))
 {
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 	alloc_cache_hit_cnt[node]++;
 #endif
 }
 
 void _starpu_data_allocation_inc_stats(unsigned node __attribute__ ((unused)))
 {
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 	alloc_cnt[node]++;
 #endif
 }
 
 void _starpu_display_alloc_cache_stats(void)
 {
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 	fprintf(stderr, "\n#---------------------\n");
 	fprintf(stderr, "Allocation cache stats:\n");
 	unsigned node;
@@ -115,15 +115,15 @@ void _starpu_display_alloc_cache_stats(void)
 }
 
 /* measure the amount of data transfers between each pair of nodes */
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 static size_t comm_amount[STARPU_MAXNODES][STARPU_MAXNODES];
-#endif /* STARPU_DATA_STATS */
+#endif /* STARPU_ENABLE_STATS */
 
 void _starpu_comm_amounts_inc(unsigned src  __attribute__ ((unused)), unsigned dst  __attribute__ ((unused)), size_t size  __attribute__ ((unused)))
 {
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 	comm_amount[src][dst] += size;
-#endif /* STARPU_DATA_STATS */
+#endif /* STARPU_ENABLE_STATS */
 }
 
 void _starpu_display_comm_amounts(void)
@@ -132,7 +132,7 @@ void _starpu_display_comm_amounts(void)
 #  warning TODO. The information displayed here seems to be similar to the one displayed by starpu_bus_profiling_helper_display_summary()
 #endif
 
-#ifdef STARPU_DATA_STATS
+#ifdef STARPU_ENABLE_STATS
 	unsigned src, dst;
 	size_t sum = 0;