X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/24a9a43343e8bb1e6ae073d8a480de24ffcf4d2f..07cb624ebe709aab0a3bf9a8a360d6d50cfd4dee:/src/instr/instr_interface.c diff --git a/src/instr/instr_interface.c b/src/instr/instr_interface.c index 1c5f19ed5b..7ed97ced11 100644 --- a/src/instr/instr_interface.c +++ b/src/instr/instr_interface.c @@ -25,26 +25,11 @@ int TRACE_start() } /* open the trace file */ - char *filename = TRACE_get_filename(); - if (!filename) { - THROW0(tracing_error, TRACE_ERROR_START, - "Trace filename is not initialized."); - return 0; - } - FILE *file = fopen(filename, "w"); - if (!file) { - THROW1(tracing_error, TRACE_ERROR_START, - "Tracefile %s could not be opened for writing.", filename); - } else { - TRACE_paje_start(file); - } + TRACE_paje_start(); /* activate trace */ TRACE_activate (); - /* output header */ - TRACE_paje_create_header(); - /* define paje hierarchy for tracing */ pajeDefineContainerType("PLATFORM", "0", "platform"); pajeDefineContainerType("HOST", "PLATFORM", "HOST"); @@ -113,9 +98,11 @@ int TRACE_end() { if (!TRACE_is_active()) return 1; - FILE *file = TRACE_paje_end(); - fclose(file); + /* close the trace file */ + TRACE_paje_end(); + + /* activate trace */ TRACE_desactivate (); return 0; }