Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141014
b: refs/heads/master
c: 07edf71
h: refs/heads/master
v: v3
  • Loading branch information
Frederic Weisbecker authored and Ingo Molnar committed Mar 23, 2009
1 parent 1012dbc commit 7a48689
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 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: 9bd7d099ab3f10dd666da399c064999bae427cd9
refs/heads/master: 07edf7121374609709ef1b0889f6e7b8d6a62ec1
26 changes: 21 additions & 5 deletions trunk/kernel/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,15 +860,25 @@ static void ftrace_trace_stack(struct trace_array *tr,
static void ftrace_trace_userstack(struct trace_array *tr,
unsigned long flags, int pc);

void trace_buffer_unlock_commit(struct trace_array *tr,
struct ring_buffer_event *event,
unsigned long flags, int pc)
static inline void __trace_buffer_unlock_commit(struct trace_array *tr,
struct ring_buffer_event *event,
unsigned long flags, int pc,
int wake)
{
ring_buffer_unlock_commit(tr->buffer, event);

ftrace_trace_stack(tr, flags, 6, pc);
ftrace_trace_userstack(tr, flags, pc);
trace_wake_up();

if (wake)
trace_wake_up();
}

void trace_buffer_unlock_commit(struct trace_array *tr,
struct ring_buffer_event *event,
unsigned long flags, int pc)
{
__trace_buffer_unlock_commit(tr, event, flags, pc, 1);
}

struct ring_buffer_event *
Expand All @@ -882,7 +892,13 @@ trace_current_buffer_lock_reserve(unsigned char type, unsigned long len,
void trace_current_buffer_unlock_commit(struct ring_buffer_event *event,
unsigned long flags, int pc)
{
return trace_buffer_unlock_commit(&global_trace, event, flags, pc);
return __trace_buffer_unlock_commit(&global_trace, event, flags, pc, 1);
}

void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event,
unsigned long flags, int pc)
{
return __trace_buffer_unlock_commit(&global_trace, event, flags, pc, 0);
}

void
Expand Down
2 changes: 2 additions & 0 deletions trunk/kernel/trace/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,8 @@ trace_current_buffer_lock_reserve(unsigned char type, unsigned long len,
unsigned long flags, int pc);
void trace_current_buffer_unlock_commit(struct ring_buffer_event *event,
unsigned long flags, int pc);
void trace_nowake_buffer_unlock_commit(struct ring_buffer_event *event,
unsigned long flags, int pc);

struct trace_entry *tracing_get_trace_entry(struct trace_array *tr,
struct trace_array_cpu *data);
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/trace/trace_events_stage_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ static void ftrace_raw_event_##call(proto) \
\
assign; \
\
trace_current_buffer_unlock_commit(event, irq_flags, pc); \
trace_nowake_buffer_unlock_commit(event, irq_flags, pc); \
\
if (call->preds && !filter_match_preds(call, entry)) \
ring_buffer_event_discard(event); \
Expand Down

0 comments on commit 7a48689

Please sign in to comment.