diff options
| author | 2011-02-14 13:18:51 +0100 | |
|---|---|---|
| committer | 2011-02-14 13:18:56 +0100 | |
| commit | 91e04ec05838a5b2c790decf2a91af98cb1666e8 (patch) | |
| tree | ea7373bdfab118ab6312ed3fa1fc0694ccfb38db /kernel/perf_event.c | |
| parent | x86: Don't copy per_cpu cpuinfo for BSP two times (diff) | |
| parent | Linux 2.6.38-rc4 (diff) | |
| download | wireguard-linux-91e04ec05838a5b2c790decf2a91af98cb1666e8.tar.xz wireguard-linux-91e04ec05838a5b2c790decf2a91af98cb1666e8.zip | |
Merge commit 'v2.6.38-rc4' into x86/cpu
Merge reason: pick up the latest fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to '')
| -rw-r--r-- | kernel/perf_event.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index 126a302c481c..999835b6112b 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c @@ -1901,11 +1901,12 @@ static void __perf_event_read(void *info) return; raw_spin_lock(&ctx->lock); - update_context_time(ctx); + if (ctx->is_active) + update_context_time(ctx); update_event_times(event); + if (event->state == PERF_EVENT_STATE_ACTIVE) + event->pmu->read(event); raw_spin_unlock(&ctx->lock); - - event->pmu->read(event); } static inline u64 perf_event_count(struct perf_event *event) @@ -1999,8 +2000,7 @@ static int alloc_callchain_buffers(void) * accessed from NMI. Use a temporary manual per cpu allocation * until that gets sorted out. */ - size = sizeof(*entries) + sizeof(struct perf_callchain_entry *) * - num_possible_cpus(); + size = offsetof(struct callchain_cpus_entries, cpu_entries[nr_cpu_ids]); entries = kzalloc(size, GFP_KERNEL); if (!entries) |
