Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
graph of platform is always traced if tracing is enabled
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Nov 2010 07:55:57 +0000 (07:55 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 25 Nov 2010 07:55:57 +0000 (07:55 +0000)
details:
- tracing/platform:1 now only traces the categorized resource utilization

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@8644 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/instr/interface.c
src/instr/surf_instr.c

index feab87e..f08e3ad 100644 (file)
@@ -52,17 +52,17 @@ int TRACE_start()
   pajeDefineContainerType("PLATFORM", "0", "platform");
   pajeDefineContainerType("HOST", "PLATFORM", "HOST");
   pajeDefineContainerType("LINK", "PLATFORM", "LINK");
   pajeDefineContainerType("PLATFORM", "0", "platform");
   pajeDefineContainerType("HOST", "PLATFORM", "HOST");
   pajeDefineContainerType("LINK", "PLATFORM", "LINK");
+  pajeDefineVariableType("power", "HOST", "power");
+  pajeDefineVariableType("bandwidth", "LINK", "bandwidth");
+  pajeDefineVariableType("latency", "LINK", "latency");
+  pajeDefineEventType("source", "LINK", "source");
+  pajeDefineEventType("destination", "LINK", "destination");
 
   if (IS_TRACING_PLATFORM) {
 
   if (IS_TRACING_PLATFORM) {
-    pajeDefineVariableType("power", "HOST", "power");
     if (TRACE_uncategorized()){
       pajeDefineVariableType("power_used", "HOST", "power_used");
       pajeDefineVariableType("bandwidth_used", "LINK", "bandwidth_used");
     }
     if (TRACE_uncategorized()){
       pajeDefineVariableType("power_used", "HOST", "power_used");
       pajeDefineVariableType("bandwidth_used", "LINK", "bandwidth_used");
     }
-    pajeDefineVariableType("bandwidth", "LINK", "bandwidth");
-    pajeDefineVariableType("latency", "LINK", "latency");
-    pajeDefineEventType("source", "LINK", "source");
-    pajeDefineEventType("destination", "LINK", "destination");
   }
 
   if (IS_TRACING_PROCESSES || IS_TRACING_VOLUME) {
   }
 
   if (IS_TRACING_PROCESSES || IS_TRACING_VOLUME) {
index 7c642c0..bbc10f4 100644 (file)
@@ -65,8 +65,7 @@ static void TRACE_surf_set_resource_variable(double date,
       return;
     }
   }
       return;
     }
   }
-  if (IS_TRACING_PLATFORM)
-    pajeSetVariable(date, variable, resource, aux);
+  pajeSetVariable(date, variable, resource, aux);
   xbt_dict_set(resource_variables, xbt_strdup(key), xbt_strdup(aux),
                xbt_free);
 }
   xbt_dict_set(resource_variables, xbt_strdup(key), xbt_strdup(aux),
                xbt_free);
 }
@@ -123,12 +122,16 @@ void TRACE_surf_host_declaration(const char *name, double power)
 void TRACE_surf_host_set_power(double date, const char *resource,
                                double power)
 {
 void TRACE_surf_host_set_power(double date, const char *resource,
                                double power)
 {
+  if (!IS_TRACING)
+    return;
   TRACE_surf_set_resource_variable(date, "power", resource, power);
 }
 
 void TRACE_surf_link_set_bandwidth(double date, void *link,
                                    double bandwidth)
 {
   TRACE_surf_set_resource_variable(date, "power", resource, power);
 }
 
 void TRACE_surf_link_set_bandwidth(double date, void *link,
                                    double bandwidth)
 {
+  if (!IS_TRACING)
+    return;
   if (!TRACE_surf_link_is_traced(link))
     return;
 
   if (!TRACE_surf_link_is_traced(link))
     return;
 
@@ -139,6 +142,8 @@ void TRACE_surf_link_set_bandwidth(double date, void *link,
 
 void TRACE_surf_link_set_latency(double date, void *link, double latency)
 {
 
 void TRACE_surf_link_set_latency(double date, void *link, double latency)
 {
+  if (!IS_TRACING)
+    return;
   if (!TRACE_surf_link_is_traced(link))
     return;
 
   if (!TRACE_surf_link_is_traced(link))
     return;