]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: use BUF_PAGE_HDR_SIZE in calculating index
authorSteven Rostedt <srostedt@redhat.com>
Thu, 11 Jun 2009 13:29:58 +0000 (09:29 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 17 Jun 2009 01:19:23 +0000 (21:19 -0400)
commit2349dd6a84fc08f0b7eac4a917ec098c04c7a0ab
tree3186ae50783f1795307055d48a583e23e2e21ad2
parent51499464c2cfe6cde3de8be7a92b504fa8f65b31
ring-buffer: use BUF_PAGE_HDR_SIZE in calculating index

The index of the event is found by masking PAGE_MASK to it and
subtracting the header size. Currently the header size is calculate
by PAGE_SIZE - BUF_PAGE_SIZE, when we already have a macro
BUF_PAGE_HDR_SIZE to define it.

If we want to change BUF_PAGE_SIZE to something less than filling
the rest of the page (this is done for debugging), then we break
the algorithm to find the index.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ring_buffer.c