Explorar o código

The STARPU_FXT_PREFIX environment variable permits to specify where the FxT
traces should be put and their name.

Cédric Augonnet %!s(int64=15) %!d(string=hai) anos
pai
achega
66730fef6c
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/common/fxt.c

+ 6 - 1
src/common/fxt.c

@@ -54,7 +54,12 @@ void start_fxt_profiling(void)
 
 	if (!fxt_started) {
 		fxt_started = 1;
-		profile_set_tracefile("/tmp/prof_file");
+
+		char *fxt_prefix = getenv("STARPU_FXT_PREFIX");
+		if (!fxt_prefix)
+			fxt_prefix = "/tmp/prof_file";
+
+		profile_set_tracefile(fxt_prefix);
 	}
 
 	threadid = syscall(SYS_gettid);