2007-07-11  Roland McGrath  <roland@redhat.com>

	* count.c (call_summary_pers): Use tv_float conversion for output of
	cumulative time, in case it is negative from bogus -O value.
	From Lai JiangShan <laijs@cn.fujitsu.com>.
diff --git a/count.c b/count.c
index 5c285fb..493fea1 100644
--- a/count.c
+++ b/count.c
@@ -205,9 +205,8 @@
 				error_str[0] = '\0';
 			percent = (100.0 * tv_float(&counts[j].time)
 				   / tv_float(&tv_cum));
-			fprintf(outf, "%6.2f %4ld.%06ld %11ld %9d %9.9s %s\n",
-				percent, (long) counts[j].time.tv_sec,
-				(long) counts[j].time.tv_usec,
+			fprintf(outf, "%6.2f %11.6f %11ld %9d %9.9s %s\n",
+				percent, tv_float(&counts[j].time),
 				(long) 1000000 * dtv.tv_sec + dtv.tv_usec,
 				counts[j].calls,
 				error_str, sysent[j].sys_name);
@@ -221,8 +220,8 @@
 		sprintf(error_str, "%d", error_cum);
 	else
 		error_str[0] = '\0';
-	fprintf(outf, "%6.6s %4ld.%06ld %11.11s %9d %9.9s %s\n",
-		"100.00", (long) tv_cum.tv_sec, (long) tv_cum.tv_usec, "",
+	fprintf(outf, "%6.6s %11.6f %11.11s %9d %9.9s %s\n",
+		"100.00", tv_float(&tv_cum), "",
 		call_cum, error_str, "total");
 }