projects
/
lttv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't calculate statistic again if it is already done
[lttv.git]
/
ltt
/
branches
/
poly
/
lttv
/
stats.c
diff --git
a/ltt/branches/poly/lttv/stats.c
b/ltt/branches/poly/lttv/stats.c
index 311658c1141443ee5823016940e956a42e2ce393..eaa2041ceb5485cf969581f14161584d5578d971 100644
(file)
--- a/
ltt/branches/poly/lttv/stats.c
+++ b/
ltt/branches/poly/lttv/stats.c
@@
-327,9
+327,9
@@
static void mode_change(LttvTracefileStats *tfcs)
lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_CPU_TIME,
LTTV_TIME, &cpu_time);
lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_CPU_TIME,
LTTV_TIME, &cpu_time);
-
TimeSub(delta,
tfcs->parent.parent.timestamp,
+
delta = ltt_time_sub(
tfcs->parent.parent.timestamp,
tfcs->parent.process->state->change);
tfcs->parent.process->state->change);
-
TimeAdd(*(cpu_time.v_time),
*(cpu_time.v_time), delta);
+
*(cpu_time.v_time) = ltt_time_add(
*(cpu_time.v_time), delta);
}
}
@@
-341,15
+341,15
@@
static void mode_end(LttvTracefileStats *tfcs)
lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_ELAPSED_TIME,
LTTV_TIME, &elapsed_time);
lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_ELAPSED_TIME,
LTTV_TIME, &elapsed_time);
-
TimeSub(delta,
tfcs->parent.parent.timestamp,
+
delta = ltt_time_sub(
tfcs->parent.parent.timestamp,
tfcs->parent.process->state->entry);
tfcs->parent.process->state->entry);
-
TimeAdd(*(elapsed_time.v_time),
*(elapsed_time.v_time), delta);
+
*(elapsed_time.v_time) = ltt_time_add(
*(elapsed_time.v_time), delta);
lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_CPU_TIME,
LTTV_TIME, &cpu_time);
lttv_attribute_find(tfcs->current_events_tree, LTTV_STATS_CPU_TIME,
LTTV_TIME, &cpu_time);
-
TimeSub(delta,
tfcs->parent.parent.timestamp,
+
delta = ltt_time_sub(
tfcs->parent.parent.timestamp,
tfcs->parent.process->state->change);
tfcs->parent.process->state->change);
-
TimeAdd(*(cpu_time.v_time),
*(cpu_time.v_time), delta);
+
*(cpu_time.v_time) = ltt_time_add(
*(cpu_time.v_time), delta);
}
}
This page took
0.022811 seconds
and
4
git commands to generate.