Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211934
b: refs/heads/master
c: c530ccd
h: refs/heads/master
v: v3
  • Loading branch information
Stephane Eranian authored and Ingo Molnar committed Oct 18, 2010
1 parent 1127c6e commit d0ef5c7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 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: f92f6e6ee35d2779aa62e70f78ad8e1cd417eb52
refs/heads/master: c530ccd9a1864a44a7ff35826681229ce9f2357a
8 changes: 7 additions & 1 deletion trunk/kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,13 @@ static u64 perf_event_read(struct perf_event *event)
unsigned long flags;

raw_spin_lock_irqsave(&ctx->lock, flags);
update_context_time(ctx);
/*
* may read while context is not active
* (e.g., thread is blocked), in that case
* we cannot update context time
*/
if (ctx->is_active)
update_context_time(ctx);
update_event_times(event);
raw_spin_unlock_irqrestore(&ctx->lock, flags);
}
Expand Down

0 comments on commit d0ef5c7

Please sign in to comment.