Procházet zdrojové kódy

only set (again?) the gf variable if the last_end_codelet_time is different of zero

Lucas Schnorr před 8 roky
rodič
revize
063aaf82dd
1 změnil soubory, kde provedl 11 přidání a 5 odebrání
  1. 11 5
      src/debug/traces/starpu_fxt.c

+ 11 - 5
src/debug/traces/starpu_fxt.c

@@ -1545,13 +1545,19 @@ static void handle_end_codelet_body(struct fxt_ev_64 *ev, struct starpu_fxt_opti
 #ifdef STARPU_HAVE_POTI
 		char container[STARPU_POTI_STR_LEN];
 		worker_container_alias(container, STARPU_POTI_STR_LEN, prefix, worker);
-		if (gflops_start != last_end_codelet_time)
-			poti_SetVariable(last_end_codelet_time, container, "gf", 0.);
+		if (gflops_start != last_end_codelet_time){
+			if (last_end_codelet_time != 0){
+				poti_SetVariable(last_end_codelet_time, container, "gf", 0.);
+			}
+		}
 		poti_SetVariable(gflops_start, container, "gf", gflops);
 #else
-		if (gflops_start != last_end_codelet_time)
-			fprintf(out_paje_file, "13	%.9f	%sw%d	gf	%f\n",
-					last_end_codelet_time, prefix, worker, 0.);
+		if (gflops_start != last_end_codelet_time){
+			if (last_end_codelet_time != 0){
+				fprintf(out_paje_file, "13	%.9f	%sw%d	gf	%f\n",
+						last_end_codelet_time, prefix, worker, 0.);
+			}
+		}
 		fprintf(out_paje_file, "13	%.9f	%sw%d	gf	%f\n",
 				gflops_start, prefix, worker, gflops);
 #endif