Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189431
b: refs/heads/master
c: 8bb39f9
h: refs/heads/master
i:
  189429: b85731d
  189427: a501001
  189423: 18a714c
v: v3
  • Loading branch information
Mike Galbraith authored and Ingo Molnar committed Apr 2, 2010
1 parent dcc4424 commit 809c104
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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: 257ef9d21f1b008a6c7425544b36641c4325a922
refs/heads/master: 8bb39f9aa068262732fe44b965d7a6eb5a5a7d67
15 changes: 12 additions & 3 deletions trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -3376,15 +3376,23 @@ static void perf_event_task_output(struct perf_event *event,
struct perf_task_event *task_event)
{
struct perf_output_handle handle;
int size;
struct task_struct *task = task_event->task;
int ret;
unsigned long flags;
int size, ret;

/*
* If this CPU attempts to acquire an rq lock held by a CPU spinning
* in perf_output_lock() from interrupt context, it's game over.
*/
local_irq_save(flags);

size = task_event->event_id.header.size;
ret = perf_output_begin(&handle, event, size, 0, 0);

if (ret)
if (ret) {
local_irq_restore(flags);
return;
}

task_event->event_id.pid = perf_event_pid(event, task);
task_event->event_id.ppid = perf_event_pid(event, current);
Expand All @@ -3395,6 +3403,7 @@ static void perf_event_task_output(struct perf_event *event,
perf_output_put(&handle, task_event->event_id);

perf_output_end(&handle);
local_irq_restore(flags);
}

static int perf_event_task_match(struct perf_event *event)
Expand Down

0 comments on commit 809c104

Please sign in to comment.