Browse Source

simplify the code again, using a local variable to contain the current timestamp (now)

Lucas Schnorr 8 years ago
parent
commit
1c1abe5128
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/debug/traces/starpu_fxt.c

+ 4 - 3
src/debug/traces/starpu_fxt.c

@@ -1665,6 +1665,7 @@ static void handle_user_event(struct fxt_ev_64 *ev, struct starpu_fxt_options *o
 #endif
 #endif
 
 
 	char *prefix = options->file_prefix;
 	char *prefix = options->file_prefix;
+	double now = get_event_time_stamp(ev, options);
 
 
 	worker = find_worker_id(ev->param[1]);
 	worker = find_worker_id(ev->param[1]);
 	if (worker < 0)
 	if (worker < 0)
@@ -1673,7 +1674,7 @@ static void handle_user_event(struct fxt_ev_64 *ev, struct starpu_fxt_options *o
 #ifdef STARPU_HAVE_POTI
 #ifdef STARPU_HAVE_POTI
 			program_container_alias (container, STARPU_POTI_STR_LEN, prefix);
 			program_container_alias (container, STARPU_POTI_STR_LEN, prefix);
 #else
 #else
-			fprintf(out_paje_file, "9	%.9f	user_user_event	%sp	%lu\n", get_event_time_stamp(ev, options), prefix, code);
+			fprintf(out_paje_file, "9	%.9f	user_user_event	%sp	%lu\n", now, prefix, code);
 #endif
 #endif
 	}
 	}
 	else
 	else
@@ -1682,12 +1683,12 @@ static void handle_user_event(struct fxt_ev_64 *ev, struct starpu_fxt_options *o
 #ifdef STARPU_HAVE_POTI
 #ifdef STARPU_HAVE_POTI
 			thread_container_alias (container, STARPU_POTI_STR_LEN, prefix, ev->param[1]);
 			thread_container_alias (container, STARPU_POTI_STR_LEN, prefix, ev->param[1]);
 #else
 #else
-			fprintf(out_paje_file, "9	%.9f	user_event	%st%"PRIu64"	%lu\n", get_event_time_stamp(ev, options), prefix, ev->param[1], code);
+			fprintf(out_paje_file, "9	%.9f	user_event	%st%"PRIu64"	%lu\n", now, prefix, ev->param[1], code);
 #endif
 #endif
 	}
 	}
 #ifdef STARPU_HAVE_POTI
 #ifdef STARPU_HAVE_POTI
 	if (out_paje_file)
 	if (out_paje_file)
-		poti_NewEvent(get_event_time_stamp(ev, options), container, "user_event", paje_value);
+		poti_NewEvent(now, container, "user_event", paje_value);
 #endif
 #endif
 }
 }