Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[trace] renaming almost all tracing files in src/instr
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 2 Dec 2010 22:38:33 +0000 (22:38 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 2 Dec 2010 22:38:33 +0000 (22:38 +0000)
details:
- this is just an ongoing code re-organization
- it serves as a preparation for jedule code in src/instr

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

23 files changed:
buildtools/Cmake/DefinePackages.cmake
examples/msg/actions/actions.c
src/instr/general.c [deleted file]
src/instr/instr_categories.c [moved from src/instr/categories.c with 97% similarity]
src/instr/instr_config.c
src/instr/instr_interface.c [moved from src/instr/interface.c with 99% similarity]
src/instr/instr_msg_process.c [moved from src/instr/msg_process_instr.c with 90% similarity]
src/instr/instr_msg_task.c [moved from src/instr/msg_task_instr.c with 87% similarity]
src/instr/instr_msg_volume.c [moved from src/instr/msg_volume.c with 98% similarity]
src/instr/instr_paje.c [moved from src/instr/paje.c with 99% similarity]
src/instr/instr_private.h [moved from src/instr/private.h with 97% similarity]
src/instr/instr_resource_utilization.c [moved from src/instr/resource_utilization.c with 99% similarity]
src/instr/instr_simdag.c [moved from src/instr/sd_instr.c with 95% similarity]
src/instr/instr_smpi.c [moved from src/instr/smpi_instr.c with 99% similarity]
src/instr/instr_smx.c [moved from src/instr/smx_instr.c with 97% similarity]
src/instr/instr_surf.c [moved from src/instr/surf_instr.c with 99% similarity]
src/instr/instr_variables.c [moved from src/instr/variables_instr.c with 98% similarity]
src/msg/private.h
src/simdag/sd_global.c
src/simdag/sd_task.c
src/simix/private.h
src/smpi/private.h
src/surf/surf_private.h

index b66ec4c..132869d 100644 (file)
@@ -299,20 +299,19 @@ set(LUA_SRC
 
 set(TRACING_SRC
        src/instr/instr_config.c
 
 set(TRACING_SRC
        src/instr/instr_config.c
-       src/instr/categories.c
-       src/instr/interface.c
-       src/instr/general.c
-       src/instr/paje.c
-       src/instr/msg_task_instr.c
-       src/instr/msg_process_instr.c
-       src/instr/msg_volume.c
-       src/instr/smx_instr.c
-       src/instr/surf_instr.c
-       src/instr/smpi_instr.c
-       src/instr/sd_instr.c
-       src/instr/variables_instr.c
-       src/instr/resource_utilization.c
-       src/instr/private.h
+       src/instr/instr_categories.c
+       src/instr/instr_interface.c
+       src/instr/instr_paje.c
+       src/instr/instr_msg_task.c
+       src/instr/instr_msg_process.c
+       src/instr/instr_msg_volume.c
+       src/instr/instr_smx.c
+       src/instr/instr_surf.c
+       src/instr/instr_smpi.c
+       src/instr/instr_simdag.c
+       src/instr/instr_variables.c
+       src/instr/instr_resource_utilization.c
+       src/instr/instr_private.h
 )
 
 set(RUBY_SRC
 )
 
 set(RUBY_SRC
index 0e7e3f9..8565197 100644 (file)
@@ -10,7 +10,7 @@
 #include "simix/simix.h"        /* semaphores for the barrier */
 #include "xbt.h"                /* calloc, printf */
 #include "simgrid_config.h"     /* getline */
 #include "simix/simix.h"        /* semaphores for the barrier */
 #include "xbt.h"                /* calloc, printf */
 #include "simgrid_config.h"     /* getline */
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(actions,
                              "Messages specific for this msg example");
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(actions,
                              "Messages specific for this msg example");
diff --git a/src/instr/general.c b/src/instr/general.c
deleted file mode 100644 (file)
index fd65abe..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-/* Copyright (c) 2010. The SimGrid Team.
- * All rights reserved.                                                     */
-
-/* This program is free software; you can redistribute it and/or modify it
-  * under the terms of the license (GNU LGPL) which comes with this package. */
-
-#include "instr/private.h"
-
-
-#ifdef HAVE_TRACING
-
-char *TRACE_host_container(m_host_t host, char *output, int len)
-{
-  if (output) {
-    snprintf(output, len, "%s", MSG_host_get_name(host));
-    return output;
-  } else {
-    return NULL;
-  }
-}
-
-char *TRACE_task_container(m_task_t task, char *output, int len)
-{
-  if (output) {
-    snprintf(output, len, "%p-%lld", task, task->counter);
-    return output;
-  } else {
-    return NULL;
-  }
-}
-
-char *TRACE_process_container(m_process_t process, char *output, int len)
-{
-  if (output) {
-    snprintf(output, len, "%s-%p", MSG_process_get_name(process), process);
-    return output;
-  } else {
-    return NULL;
-  }
-}
-
-char *TRACE_process_alias_container(m_process_t process, m_host_t host,
-                                    char *output, int len)
-{
-  if (output) {
-    snprintf(output, len, "%p-%p", process, host);
-    return output;
-  } else {
-    return NULL;
-  }
-}
-
-char *TRACE_task_alias_container(m_task_t task, m_process_t process,
-                                 m_host_t host, char *output, int len)
-{
-  if (output) {
-    snprintf(output, len, "%p-%lld-%p-%p", task, task->counter, process,
-             host);
-    return output;
-  } else {
-    return NULL;
-  }
-}
-
-#endif
similarity index 97%
rename from src/instr/categories.c
rename to src/instr/instr_categories.c
index f1e37b2..be11384 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #ifdef HAVE_TRACING
 
 
 #ifdef HAVE_TRACING
 
index 4a783d8..cc42af4 100644 (file)
@@ -5,7 +5,7 @@
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #ifdef HAVE_TRACING
 
 
 #ifdef HAVE_TRACING
 
similarity index 99%
rename from src/instr/interface.c
rename to src/instr/instr_interface.c
index f08e3ad..fbf8457 100644 (file)
@@ -8,7 +8,7 @@
 
 #ifdef HAVE_TRACING
 
 
 #ifdef HAVE_TRACING
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(tracing, "Tracing Interface");
 
 
 XBT_LOG_NEW_DEFAULT_CATEGORY(tracing, "Tracing Interface");
 
similarity index 90%
rename from src/instr/msg_process_instr.c
rename to src/instr/instr_msg_process.c
index d09b8f2..164548a 100644 (file)
@@ -4,12 +4,33 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #ifdef HAVE_TRACING
 
 static xbt_dict_t process_containers = NULL;
 
 
 #ifdef HAVE_TRACING
 
 static xbt_dict_t process_containers = NULL;
 
+char *TRACE_process_alias_container(m_process_t process, m_host_t host,
+                                    char *output, int len)
+{
+  if (output) {
+    snprintf(output, len, "%p-%p", process, host);
+    return output;
+  } else {
+    return NULL;
+  }
+}
+
+char *TRACE_process_container(m_process_t process, char *output, int len)
+{
+  if (output) {
+    snprintf(output, len, "%s-%p", MSG_process_get_name(process), process);
+    return output;
+  } else {
+    return NULL;
+  }
+}
+
 void TRACE_msg_process_alloc(void)
 {
   process_containers = xbt_dict_new();
 void TRACE_msg_process_alloc(void)
 {
   process_containers = xbt_dict_new();
similarity index 87%
rename from src/instr/msg_task_instr.c
rename to src/instr/instr_msg_task.c
index 09e217a..f73f361 100644 (file)
@@ -4,12 +4,44 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #ifdef HAVE_TRACING
 
 static xbt_dict_t task_containers = NULL;
 
 
 #ifdef HAVE_TRACING
 
 static xbt_dict_t task_containers = NULL;
 
+static char *TRACE_task_alias_container(m_task_t task, m_process_t process,
+                                 m_host_t host, char *output, int len)
+{
+  if (output) {
+    snprintf(output, len, "%p-%lld-%p-%p", task, task->counter, process,
+             host);
+    return output;
+  } else {
+    return NULL;
+  }
+}
+
+static char *TRACE_host_container(m_host_t host, char *output, int len)
+{
+  if (output) {
+    snprintf(output, len, "%s", MSG_host_get_name(host));
+    return output;
+  } else {
+    return NULL;
+  }
+}
+
+char *TRACE_task_container(m_task_t task, char *output, int len)
+{
+  if (output) {
+    snprintf(output, len, "%p-%lld", task, task->counter);
+    return output;
+  } else {
+    return NULL;
+  }
+}
+
 void TRACE_msg_task_alloc(void)
 {
   task_containers = xbt_dict_new();
 void TRACE_msg_task_alloc(void)
 {
   task_containers = xbt_dict_new();
similarity index 98%
rename from src/instr/msg_volume.c
rename to src/instr/instr_msg_volume.c
index 91a52ac..97b2331 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #ifdef HAVE_TRACING
 
 
 #ifdef HAVE_TRACING
 
similarity index 99%
rename from src/instr/paje.c
rename to src/instr/instr_paje.c
index d2d211c..d617480 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #ifdef HAVE_TRACING
 
 
 #ifdef HAVE_TRACING
 
similarity index 97%
rename from src/instr/private.h
rename to src/instr/instr_private.h
index 4f9b99d..f6942c9 100644 (file)
@@ -74,15 +74,6 @@ void pajeSubVariable(double time, const char *entityType,
 void pajeNewEvent(double time, const char *entityType,
                   const char *container, const char *value);
 
 void pajeNewEvent(double time, const char *entityType,
                   const char *container, const char *value);
 
-/* from general.c */
-char *TRACE_host_container(m_host_t host, char *output, int len);
-char *TRACE_task_container(m_task_t task, char *output, int len);
-char *TRACE_process_container(m_process_t process, char *output, int len);
-char *TRACE_process_alias_container(m_process_t process, m_host_t host,
-                                    char *output, int len);
-char *TRACE_task_alias_container(m_task_t task, m_process_t process,
-                                 m_host_t host, char *output, int len);
-
 /* from categories.c */
 void TRACE_category_alloc(void);
 void TRACE_category_release(void);
 /* from categories.c */
 void TRACE_category_alloc(void);
 void TRACE_category_release(void);
@@ -92,6 +83,7 @@ void TRACE_category_unset(smx_process_t proc);
 void TRACE_msg_category_set(smx_process_t proc, m_task_t task);
 
 /* declaration of instrumentation functions from msg_task_instr.c */
 void TRACE_msg_category_set(smx_process_t proc, m_task_t task);
 
 /* declaration of instrumentation functions from msg_task_instr.c */
+char *TRACE_task_container(m_task_t task, char *output, int len);
 void TRACE_msg_task_alloc(void);
 void TRACE_msg_task_release(void);
 void TRACE_msg_task_create(m_task_t task);
 void TRACE_msg_task_alloc(void);
 void TRACE_msg_task_release(void);
 void TRACE_msg_task_create(m_task_t task);
@@ -104,6 +96,9 @@ int TRACE_msg_task_put_start(m_task_t task);    //returns TRUE if the task_put_e
 void TRACE_msg_task_put_end(void);
 
 /* declaration of instrumentation functions from msg_process_instr.c */
 void TRACE_msg_task_put_end(void);
 
 /* declaration of instrumentation functions from msg_process_instr.c */
+char *TRACE_process_alias_container(m_process_t process, m_host_t host,
+                                    char *output, int len);
+char *TRACE_process_container(m_process_t process, char *output, int len);
 void TRACE_msg_process_alloc(void);
 void TRACE_msg_process_release(void);
 void TRACE_msg_process_change_host(m_process_t process, m_host_t old_host,
 void TRACE_msg_process_alloc(void);
 void TRACE_msg_process_release(void);
 void TRACE_msg_process_change_host(m_process_t process, m_host_t old_host,
similarity index 99%
rename from src/instr/resource_utilization.c
rename to src/instr/instr_resource_utilization.c
index 8b1e7ba..87e93bb 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #ifdef HAVE_TRACING
 
 
 #ifdef HAVE_TRACING
 
similarity index 95%
rename from src/instr/sd_instr.c
rename to src/instr/instr_simdag.c
index 535834d..741ef8d 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #ifdef HAVE_TRACING
 
 
 #ifdef HAVE_TRACING
 
similarity index 99%
rename from src/instr/smpi_instr.c
rename to src/instr/instr_smpi.c
index 07d8cc1..0e247c7 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #ifdef HAVE_TRACING
 
 
 #ifdef HAVE_TRACING
 
similarity index 97%
rename from src/instr/smx_instr.c
rename to src/instr/instr_smx.c
index 6924284..afd8a04 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #ifdef HAVE_TRACING
 
 
 #ifdef HAVE_TRACING
 
similarity index 99%
rename from src/instr/surf_instr.c
rename to src/instr/instr_surf.c
index f73e280..235a890 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 #include "surf/surf_private.h"
 
 #ifdef HAVE_TRACING
 #include "surf/surf_private.h"
 
 #ifdef HAVE_TRACING
similarity index 98%
rename from src/instr/variables_instr.c
rename to src/instr/instr_variables.c
index 303eada..40dfcf0 100644 (file)
@@ -4,7 +4,7 @@
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
 /* This program is free software; you can redistribute it and/or modify it
   * under the terms of the license (GNU LGPL) which comes with this package. */
 
-#include "instr/private.h"
+#include "instr/instr_private.h"
 #include "surf/surf_private.h"
 #include "surf/network_private.h"
 
 #include "surf/surf_private.h"
 #include "surf/network_private.h"
 
index 3c19b3a..6c6f6e8 100644 (file)
@@ -15,7 +15,7 @@
 #include "xbt/swag.h"
 #include "xbt/dict.h"
 #include "xbt/config.h"
 #include "xbt/swag.h"
 #include "xbt/dict.h"
 #include "xbt/config.h"
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 SG_BEGIN_DECL()
 
 
 SG_BEGIN_DECL()
 
index 71eb57a..c24ce29 100644 (file)
@@ -12,7 +12,7 @@
 #include "xbt/log.h"
 #include "xbt/str.h"
 #include "xbt/config.h"
 #include "xbt/log.h"
 #include "xbt/str.h"
 #include "xbt/config.h"
-#include "instr/private.h"
+#include "instr/instr_private.h"
 #ifdef HAVE_LUA
 #include <lua.h>
 #include <lauxlib.h>
 #ifdef HAVE_LUA
 #include <lua.h>
 #include <lauxlib.h>
index 9d6affe..105ac01 100644 (file)
@@ -8,7 +8,7 @@
 #include "simdag/simdag.h"
 #include "xbt/sysdep.h"
 #include "xbt/dynar.h"
 #include "simdag/simdag.h"
 #include "xbt/sysdep.h"
 #include "xbt/dynar.h"
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_task, sd,
                                 "Logging specific to SimDag (task)");
 
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(sd_task, sd,
                                 "Logging specific to SimDag (task)");
index c62284d..9095077 100644 (file)
@@ -15,7 +15,7 @@
 #include "xbt/config.h"
 #include "xbt/function_types.h"
 #include "xbt/ex_interface.h"
 #include "xbt/config.h"
 #include "xbt/function_types.h"
 #include "xbt/ex_interface.h"
-#include "instr/private.h"
+#include "instr/instr_private.h"
 #include "process_private.h"
 #include "host_private.h"
 #include "network_private.h"
 #include "process_private.h"
 #include "host_private.h"
 #include "network_private.h"
index aea894b..fe280e6 100644 (file)
@@ -12,7 +12,7 @@
 #include "simix/simix.h"
 #include "smpi/smpi.h"
 #include "smpi/smpif.h"
 #include "simix/simix.h"
 #include "smpi/smpi.h"
 #include "smpi/smpif.h"
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 struct s_smpi_process_data;
 typedef struct s_smpi_process_data *smpi_process_data_t;
 
 struct s_smpi_process_data;
 typedef struct s_smpi_process_data *smpi_process_data_t;
index 77d5034..03a70ab 100644 (file)
@@ -12,7 +12,7 @@
 #include "xbt/log.h"
 #include "surf/surfxml_parse_private.h"
 #include "surf/random_mgr.h"
 #include "xbt/log.h"
 #include "surf/surfxml_parse_private.h"
 #include "surf/random_mgr.h"
-#include "instr/private.h"
+#include "instr/instr_private.h"
 
 #define NO_MAX_DURATION -1.0
 
 
 #define NO_MAX_DURATION -1.0