summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/cbmem/cbmem.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/cbmem/cbmem.c b/util/cbmem/cbmem.c
index eef68a0772..0fd69d6e06 100644
--- a/util/cbmem/cbmem.c
+++ b/util/cbmem/cbmem.c
@@ -642,9 +642,12 @@ static void dump_timestamps(int mach_readable)
* If there are negative timestamp entries, rebase all of the
* timestamps to the lowest one in the list.
*/
- if (sorted_tst_p->entries[0].entry_stamp < 0)
+ if (sorted_tst_p->entries[0].entry_stamp < 0) {
sorted_tst_p->base_time = -sorted_tst_p->entries[0].entry_stamp;
- prev_stamp = 0;
+ prev_stamp = 0;
+ } else {
+ prev_stamp = tst_p->base_time;
+ }
total_time = 0;
for (uint32_t i = 0; i < sorted_tst_p->num_entries; i++) {