Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146161
b: refs/heads/master
c: d988ff9
h: refs/heads/master
i:
  146159: 481e1bf
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed May 11, 2009
1 parent 0441990 commit 9b3b41d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5a772b2b3c68e7e0b503c5a48469113bb0634314
refs/heads/master: d988ff94c1074c4c914235c8591bcceafb585ecf
6 changes: 6 additions & 0 deletions trunk/kernel/trace/ring_buffer_benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,12 @@ static void ring_buffer_producer(void)

pr_info("Total iterations per millisec: %ld\n", hit + missed);

/* it is possible that hit + missed will overflow and be zero */
if (!(hit + missed)) {
pr_info("hit + missed overflowed and totalled zero!\n");
hit--; /* make it non zero */
}

/* Caculate the average time in nanosecs */
avg = NSEC_PER_MSEC / (hit + missed);
pr_info("%ld ns per entry\n", avg);
Expand Down

0 comments on commit 9b3b41d

Please sign in to comment.