|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 6 of 8] xenalyze: Eliminate unnecessary cycles_to_time calculation
The time elements are only really accessed in dump mode, but they
cost a significant amount to calculate per record. Only calculate
them if we're in dump mode.
Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxxxxx>
diff -r 4b3639bd3255 -r 108d02354403 xenalyze.c
--- a/xenalyze.c Thu Jan 26 17:17:19 2012 +0000
+++ b/xenalyze.c Thu Jan 26 17:17:53 2012 +0000
@@ -8601,9 +8601,6 @@ void process_record_tsc(tsc_t order_tsc,
P.now = tsc;
}
-
- /* Convert to s/ns once for convenience */
- abs_cycles_to_time(ri->tsc, &ri->t);
}
/* Standardized part of dump output */
@@ -8615,6 +8612,8 @@ void create_dump_header(struct record_in
len = DUMP_HEADER_MAX;
c = ri->dump_header;
+ abs_cycles_to_time(ri->tsc, &ri->t);
+
if ( ri->t.time )
{
r=snprintf(c, len, "%3u.%09u", ri->t.s, ri->t.ns);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |