A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[trace] encapsulating the open/close of the trace file
[simgrid.git]
/
src
/
instr
/
instr_paje.c
diff --git
a/src/instr/instr_paje.c
b/src/instr/instr_paje.c
index
098440e
..
ad83fd1
100644
(file)
--- a/
src/instr/instr_paje.c
+++ b/
src/instr/instr_paje.c
@@
-41,17
+41,21
@@
static int pajeNewEventId = 27;
#define TRACE_LINE_SIZE 1000
#define TRACE_LINE_SIZE 1000
-void TRACE_paje_start(
FILE * file
)
+void TRACE_paje_start(
void
)
{
{
- tracing_file = file;
+ char *filename = TRACE_get_filename();
+ tracing_file = fopen(filename, "w");
+ if (!tracing_file) {
+ THROW1(tracing_error, TRACE_ERROR_FILE_OPEN,
+ "Tracefile %s could not be opened for writing.", filename);
+ }
}
}
-
FILE *
TRACE_paje_end(void)
+
void
TRACE_paje_end(void)
{
{
-
return tracing_file
;
+
fclose(tracing_file)
;
}
}
-
void TRACE_paje_create_header(void)
{
if (!TRACE_is_active())
void TRACE_paje_create_header(void)
{
if (!TRACE_is_active())