OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0162d62
)
ring-buffer: Use rb_page_size() instead of open coded head_page size
author
Steven Rostedt (Red Hat)
<rostedt@goodmis.org>
Wed, 23 Jul 2014 23:45:12 +0000
(19:45 -0400)
committer
Steven Rostedt
<rostedt@goodmis.org>
Wed, 23 Jul 2014 23:45:12 +0000
(19:45 -0400)
There's a helper function to get a ring buffer page size (the number
of bytes of data recorded on the page), called rb_page_size().
Use that instead of open coding it.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c
patch
|
blob
|
history
diff --git
a/kernel/trace/ring_buffer.c
b/kernel/trace/ring_buffer.c
index
35825a8
..
d8c267e
100644
(file)
--- a/
kernel/trace/ring_buffer.c
+++ b/
kernel/trace/ring_buffer.c
@@
-3763,7
+3763,7
@@
rb_iter_peek(struct ring_buffer_iter *iter, u64 *ts)
if (rb_per_cpu_empty(cpu_buffer))
return NULL;
- if (iter->head >=
local_read(&iter->head_page->page->commit
)) {
+ if (iter->head >=
rb_page_size(iter->head_page
)) {
rb_inc_iter(iter);
goto again;
}