Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reduce the amount of implicit include directories
[simgrid.git] / src / instr / instr_TI_trace.c
index 2975472..3a1ee51 100644 (file)
@@ -1,10 +1,10 @@
-/* Copyright (c) 2010-2014. The SimGrid Team.
+/* Copyright (c) 2010-2015. 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/instr_private.h"
+#include "src/instr/instr_private.h"
 #include "xbt/virtu.h" /* sg_cmdline */
 #include "xbt/xbt_os_time.h"
 #include "simgrid/sg_config.h"
 #include <string.h>
 #include <sys/stat.h>
 
+#ifdef WIN32
+#include <direct.h> // _mkdir
+#endif
+
 XBT_LOG_NEW_DEFAULT_SUBCATEGORY(instr_TI_trace, instr_trace, "tracing event system");
 
 extern FILE *tracing_file;
@@ -73,7 +77,7 @@ void print_TICreateContainer(paje_event_t event)
     char *filename = bprintf("%s/%f_%s.txt", folder_name, prefix,
                              ((createContainer_t) event->data)->container->name);
 #ifdef WIN32
-    mkdir(folder_name);
+    _mkdir(folder_name);
 #else
     mkdir(folder_name, S_IRWXU | S_IRWXG | S_IRWXO);
 #endif
@@ -149,6 +153,9 @@ void print_TIPushState(paje_event_t event)
     fprintf(trace_file, "%s irecv %d %d %s\n", process_id, extra->src,
             extra->send_size, extra->datatype1);
     break;
+  case TRACING_TEST:
+    fprintf(trace_file, "%s test\n", process_id);
+    break;
   case TRACING_WAIT:
     fprintf(trace_file, "%s wait\n", process_id);
     break;
@@ -209,6 +216,9 @@ void print_TIPushState(paje_event_t event)
   case TRACING_COMPUTING:
     fprintf(trace_file, "%s compute %f\n", process_id, extra->comp_size);
     break;
+  case TRACING_SLEEPING:
+    fprintf(trace_file, "%s sleep %f\n", process_id, extra->sleep_duration);
+    break;
   case TRACING_GATHERV: // rank gatherv send_size [recvcounts] root (sendtype) (recvtype)
     fprintf(trace_file, "%s gatherv %d ", process_id, extra->send_size);
     for (i = 0; i < extra->num_processes; i++)