|
@@ -1,7 +1,7 @@
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
/* StarPU --- Runtime system for heterogeneous multicore architectures.
|
|
*
|
|
*
|
|
* Copyright (C) 2009, 2010 Université de Bordeaux 1
|
|
* Copyright (C) 2009, 2010 Université de Bordeaux 1
|
|
- * Copyright (C) 2010, 2011 Centre National de la Recherche Scientifique
|
|
|
|
|
|
+ * Copyright (C) 2010, 2011, 2012 Centre National de la Recherche Scientifique
|
|
*
|
|
*
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
* StarPU is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
* it under the terms of the GNU Lesser General Public License as published by
|
|
@@ -47,6 +47,7 @@ void _starpu_display_msi_stats(void)
|
|
unsigned total_hit_cnt = 0;
|
|
unsigned total_hit_cnt = 0;
|
|
unsigned total_miss_cnt = 0;
|
|
unsigned total_miss_cnt = 0;
|
|
|
|
|
|
|
|
+ fprintf(stderr, "\n#---------------------\n");
|
|
fprintf(stderr, "MSI cache stats :\n");
|
|
fprintf(stderr, "MSI cache stats :\n");
|
|
|
|
|
|
for (node = 0; node < STARPU_MAXNODES; node++)
|
|
for (node = 0; node < STARPU_MAXNODES; node++)
|
|
@@ -66,6 +67,7 @@ void _starpu_display_msi_stats(void)
|
|
fprintf(stderr, "\tmiss : %u (%2.2f \%%)\n", miss_cnt[node], (100.0f*miss_cnt[node])/(hit_cnt[node]+miss_cnt[node]));
|
|
fprintf(stderr, "\tmiss : %u (%2.2f \%%)\n", miss_cnt[node], (100.0f*miss_cnt[node])/(hit_cnt[node]+miss_cnt[node]));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ fprintf(stderr, "#---------------------\n");
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
@@ -93,6 +95,7 @@ void _starpu_data_allocation_inc_stats(unsigned node __attribute__ ((unused)))
|
|
void _starpu_display_alloc_cache_stats(void)
|
|
void _starpu_display_alloc_cache_stats(void)
|
|
{
|
|
{
|
|
#ifdef STARPU_DATA_STATS
|
|
#ifdef STARPU_DATA_STATS
|
|
|
|
+ fprintf(stderr, "\n#---------------------\n");
|
|
fprintf(stderr, "Allocation cache stats:\n");
|
|
fprintf(stderr, "Allocation cache stats:\n");
|
|
unsigned node;
|
|
unsigned node;
|
|
for (node = 0; node < STARPU_MAXNODES; node++)
|
|
for (node = 0; node < STARPU_MAXNODES; node++)
|
|
@@ -104,7 +107,10 @@ void _starpu_display_alloc_cache_stats(void)
|
|
fprintf(stderr, "\tcached alloc: %u (%2.2f \%%)\n",
|
|
fprintf(stderr, "\tcached alloc: %u (%2.2f \%%)\n",
|
|
alloc_cache_hit_cnt[node], (100.0f*alloc_cache_hit_cnt[node])/(alloc_cnt[node]));
|
|
alloc_cache_hit_cnt[node], (100.0f*alloc_cache_hit_cnt[node])/(alloc_cnt[node]));
|
|
}
|
|
}
|
|
|
|
+ else
|
|
|
|
+ fprintf(stderr, "No allocation on node %d\n", node);
|
|
}
|
|
}
|
|
|
|
+ fprintf(stderr, "#---------------------\n");
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
@@ -122,11 +128,17 @@ void _starpu_comm_amounts_inc(unsigned src __attribute__ ((unused)), unsigned d
|
|
|
|
|
|
void _starpu_display_comm_amounts(void)
|
|
void _starpu_display_comm_amounts(void)
|
|
{
|
|
{
|
|
|
|
+#ifdef STARPU_DEVEL
|
|
|
|
+# 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_DATA_STATS
|
|
unsigned src, dst;
|
|
unsigned src, dst;
|
|
-
|
|
|
|
size_t sum = 0;
|
|
size_t sum = 0;
|
|
|
|
|
|
|
|
+ fprintf(stderr, "\n#---------------------\n");
|
|
|
|
+ fprintf(stderr, "Data transfer stats:\n");
|
|
|
|
+
|
|
for (dst = 0; dst < STARPU_MAXNODES; dst++)
|
|
for (dst = 0; dst < STARPU_MAXNODES; dst++)
|
|
for (src = 0; src < STARPU_MAXNODES; src++)
|
|
for (src = 0; src < STARPU_MAXNODES; src++)
|
|
{
|
|
{
|
|
@@ -134,7 +146,7 @@ void _starpu_display_comm_amounts(void)
|
|
sum += comm_amount[dst][src];
|
|
sum += comm_amount[dst][src];
|
|
}
|
|
}
|
|
|
|
|
|
- fprintf(stderr, "\nData transfers stats:\nTOTAL transfers %f MB\n", (float)sum/1024/1024);
|
|
|
|
|
|
+ fprintf(stderr, "TOTAL transfers %f MB\n", (float)sum/1024/1024);
|
|
|
|
|
|
for (dst = 0; dst < STARPU_MAXNODES; dst++)
|
|
for (dst = 0; dst < STARPU_MAXNODES; dst++)
|
|
for (src = dst + 1; src < STARPU_MAXNODES; src++)
|
|
for (src = dst + 1; src < STARPU_MAXNODES; src++)
|
|
@@ -145,71 +157,7 @@ void _starpu_display_comm_amounts(void)
|
|
src, dst, ((float)comm_amount[src][dst])/(1024*1024),
|
|
src, dst, ((float)comm_amount[src][dst])/(1024*1024),
|
|
dst, src, ((float)comm_amount[dst][src])/(1024*1024));
|
|
dst, src, ((float)comm_amount[dst][src])/(1024*1024));
|
|
}
|
|
}
|
|
|
|
+ fprintf(stderr, "#---------------------\n");
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
-#ifdef STARPU_MEMORY_STATUS
|
|
|
|
-void _starpu_display_data_stats(void)
|
|
|
|
-{
|
|
|
|
- unsigned node;
|
|
|
|
- for (node = 0; node < STARPU_MAXNODES; node++)
|
|
|
|
- {
|
|
|
|
- _starpu_display_data_stats_by_node(node);
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-void _starpu_display_data_handle_stats(starpu_data_handle_t handle)
|
|
|
|
-{
|
|
|
|
- unsigned node;
|
|
|
|
-
|
|
|
|
- fprintf(stderr, "#-----\n");
|
|
|
|
- fprintf(stderr, "Data : %p\n", handle);
|
|
|
|
- fprintf(stderr, "Size : %d\n", (int)handle->data_size);
|
|
|
|
- fprintf(stderr, "\n");
|
|
|
|
-
|
|
|
|
- fprintf(stderr, "#--\n");
|
|
|
|
- fprintf(stderr, "Data access stats\n");
|
|
|
|
- fprintf(stderr, "/!\\ Work Underway\n");
|
|
|
|
- for (node = 0; node < STARPU_MAXNODES; node++)
|
|
|
|
- {
|
|
|
|
- if (handle->stats_direct_access[node]+handle->stats_loaded_shared[node]
|
|
|
|
- +handle->stats_invalidated[node]+handle->stats_loaded_owner[node])
|
|
|
|
- {
|
|
|
|
- fprintf(stderr, "Node #%d\n", node);
|
|
|
|
- fprintf(stderr, "\tDirect access : %d\n", handle->stats_direct_access[node]);
|
|
|
|
- /* XXX Not Working yet. */
|
|
|
|
- if (handle->stats_shared_to_owner[node])
|
|
|
|
- fprintf(stderr, "\t\tShared to Owner : %d\n", handle->stats_shared_to_owner[node]);
|
|
|
|
- fprintf(stderr, "\tLoaded (Owner) : %d\n", handle->stats_loaded_owner[node]);
|
|
|
|
- fprintf(stderr, "\tLoaded (Shared) : %d\n", handle->stats_loaded_shared[node]);
|
|
|
|
- fprintf(stderr, "\tInvalidated (was Owner) : %d\n\n", handle->stats_invalidated[node]);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-void _starpu_handle_stats_cache_hit(starpu_data_handle_t handle, unsigned node)
|
|
|
|
-{
|
|
|
|
- handle->stats_direct_access[node]++;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-void _starpu_handle_stats_loaded_shared(starpu_data_handle_t handle, unsigned node)
|
|
|
|
-{
|
|
|
|
- handle->stats_loaded_shared[node]++;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-void _starpu_handle_stats_loaded_owner(starpu_data_handle_t handle, unsigned node)
|
|
|
|
-{
|
|
|
|
- handle->stats_loaded_owner[node]++;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-void _starpu_handle_stats_shared_to_owner(starpu_data_handle_t handle, unsigned node)
|
|
|
|
-{
|
|
|
|
- handle->stats_shared_to_owner[node]++;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-void _starpu_handle_stats_invalidated(starpu_data_handle_t handle, unsigned node)
|
|
|
|
-{
|
|
|
|
- handle->stats_invalidated[node]++;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-#endif
|
|
|