Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 151475
b: refs/heads/master
c: 1744a21
h: refs/heads/master
i:
  151473: 6561f4c
  151471: 31dfed8
v: v3
  • Loading branch information
Vegard Nossum committed Jun 15, 2009
1 parent 5e36848 commit c677924
Show file tree
Hide file tree
Showing 3 changed files with 8 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: a98b65a3ad71e702e760bc63f57684301628e837
refs/heads/master: 1744a21d57d9c60136461adb6afa85e51b3e94d9
4 changes: 4 additions & 0 deletions trunk/include/linux/ring_buffer.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef _LINUX_RING_BUFFER_H
#define _LINUX_RING_BUFFER_H

#include <linux/kmemcheck.h>
#include <linux/mm.h>
#include <linux/seq_file.h>

Expand All @@ -11,7 +12,10 @@ struct ring_buffer_iter;
* Don't refer to this struct directly, use functions below.
*/
struct ring_buffer_event {
kmemcheck_bitfield_begin(bitfield);
u32 type_len:5, time_delta:27;
kmemcheck_bitfield_end(bitfield);

u32 array[];
};

Expand Down
3 changes: 3 additions & 0 deletions trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <linux/debugfs.h>
#include <linux/uaccess.h>
#include <linux/hardirq.h>
#include <linux/kmemcheck.h>
#include <linux/module.h>
#include <linux/percpu.h>
#include <linux/mutex.h>
Expand Down Expand Up @@ -1270,6 +1271,7 @@ rb_move_tail(struct ring_buffer_per_cpu *cpu_buffer,
if (tail < BUF_PAGE_SIZE) {
/* Mark the rest of the page with padding */
event = __rb_page_index(tail_page, tail);
kmemcheck_annotate_bitfield(event, bitfield);
rb_event_set_padding(event);
}

Expand Down Expand Up @@ -1327,6 +1329,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer,
return NULL;

event = __rb_page_index(tail_page, tail);
kmemcheck_annotate_bitfield(event, bitfield);
rb_update_event(event, type, length);

/* The passed in type is zero for DATA */
Expand Down

0 comments on commit c677924

Please sign in to comment.