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 b66ec4c037f6d2efefbf3549ea8630a1a2ce96b0..132869db1f8643f01eb43d553a38f3ce0994ee0b 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 0e7e3f9cebe683fd38f9b9850c0418a2365fd001..85651974e94f0193d19dab7ab9733c6cdc75989c 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 f1e37b227399015e3f0f081ac9e14614448b64c5..be11384ddd5b316486583ad7df757286a3414054 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 4a783d87a96320fa1c860a46c3e24c4e1ada582c..cc42af4e7707b6f545fdaf0ace79168753432da3 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 f08e3ad361c6892e34b44c195a7f0daa8d8f36d7..fbf8457d78c3e5879f3856b568615cf1cc3013be 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 d09b8f2a90e54dc06464aa16e1ecebb93cce5a8b..164548ad4fbe47c15b1c7fe5d7a03c92131d5ac4 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 09e217a3a6c134cef472e3be7eb0324336b2ac8c..f73f3610cc0d0c8e1bf5d5b76fe11530d946fbb8 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 91a52acbe0f755f5189148c02f2eca1467a56d34..97b23315a6b959dba4318c89ee782b1336983d07 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 d2d211cd1c769d4910ffa3cc6be02f0e6465e52b..d617480ada48d0280c276297520b808d18906bf7 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 4f9b99ddca0199576d0c53887f53fd802a37fec9..f6942c9c668625371ad13aa5f5b54a7f0a30c379 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 8b1e7ba047b6d332490fcccd982a713570f3f8cd..87e93bbd345d87ba707e05fa11c8fe41dc51da4f 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 535834d47cbaf753c3b9a1b362dd701bdc33b8c6..741ef8d897c231a6979b2d9db61e34936fcc9313 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 07d8cc12e81fba44c7a55b9ee4eaee409d1e3ed1..0e247c72226b5e230ab2b54ab6504dea673f1445 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 69242845a0ab5ab4b84949b3566ddb936e3f587d..afd8a041540b0515ea9c26b040cadeb25ef098d4 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 f73e28095f5c2953c78f90fa8d24a7ac59313162..235a890edecf0cb7f2883e7378bd80327b55d3d1 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 303eadaf8a8ce547d15ad753c43146c322be65b2..40dfcf084f8ff1717e556791bdf2c31726a26cb0 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 3c19b3a9d4be41a5cb46e721fabba30e8577b939..6c6f6e81df3942313ce35a3cbdbae1333e070e6d 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 71eb57a97ff31d5a30a9e20453091b4bb4a6051d..c24ce295be47e043de3874edfec247664316baeb 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 9d6affe5094846731dd5e26399b87e24b3263b77..105ac01ef59a25d3fd269635312611b31f90c375 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 c62284d6d4188e6bc7be00660b72822ae45e6e74..9095077e3c97488a2088dae1178fd480807f2940 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 aea894b4c7f048983125d6ffde6de54d15318433..fe280e69896a748af77c6b28eec1b97549845cce 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 77d50344c0f041a76f3fae5df93ea87d6c54aede..03a70abdc1723bc8bc6372fe7b1d7e11192f2a8b 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