Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 146037
b: refs/heads/master
c: f3b9aae
h: refs/heads/master
i:
  146035: 87b586c
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Apr 20, 2009
1 parent 6d7271e commit a25d87a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e057a5e5647a1c9d0d0054fbd298bfa04b3d1cb4
refs/heads/master: f3b9aae16219aaeca2dd5a9ca69f7a10faa063df
18 changes: 13 additions & 5 deletions trunk/kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1642,6 +1642,14 @@ int ring_buffer_unlock_commit(struct ring_buffer *buffer,
}
EXPORT_SYMBOL_GPL(ring_buffer_unlock_commit);

static inline void rb_event_discard(struct ring_buffer_event *event)
{
event->type = RINGBUF_TYPE_PADDING;
/* time delta must be non zero */
if (!event->time_delta)
event->time_delta = 1;
}

/**
* ring_buffer_event_discard - discard any event in the ring buffer
* @event: the event to discard
Expand All @@ -1656,10 +1664,8 @@ EXPORT_SYMBOL_GPL(ring_buffer_unlock_commit);
*/
void ring_buffer_event_discard(struct ring_buffer_event *event)
{
event->type = RINGBUF_TYPE_PADDING;
/* time delta must be non zero */
if (!event->time_delta)
event->time_delta = 1;
rb_event_discard(event);
trace_recursive_unlock();
}
EXPORT_SYMBOL_GPL(ring_buffer_event_discard);

Expand Down Expand Up @@ -1690,7 +1696,7 @@ void ring_buffer_discard_commit(struct ring_buffer *buffer,
int cpu;

/* The event is discarded regardless */
ring_buffer_event_discard(event);
rb_event_discard(event);

/*
* This must only be called if the event has not been
Expand Down Expand Up @@ -1735,6 +1741,8 @@ void ring_buffer_discard_commit(struct ring_buffer *buffer,
if (rb_is_commit(cpu_buffer, event))
rb_set_commit_to_write(cpu_buffer);

trace_recursive_unlock();

/*
* Only the last preempt count needs to restore preemption.
*/
Expand Down

0 comments on commit a25d87a

Please sign in to comment.