diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-19 22:17:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-19 22:17:35 -0500 |
commit | da935c66bacb3ed9ada984b053297f87c2dff63a (patch) | |
tree | 46278da2b312c73f1375b830d7e5912bf23abd78 /kernel/perf_event.c | |
parent | 9435eb1cf0b76b323019cebf8d16762a50a12a19 (diff) | |
parent | 2205a6ea93fea76f88b43727fea53f3ce3790d6f (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
Documentation/feature-removal-schedule.txt
drivers/net/e1000e/netdev.c
net/xfrm/xfrm_policy.c
Diffstat (limited to 'kernel/perf_event.c')
-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) | |||
1901 | return; | 1901 | return; |
1902 | 1902 | ||
1903 | raw_spin_lock(&ctx->lock); | 1903 | raw_spin_lock(&ctx->lock); |
1904 | update_context_time(ctx); | 1904 | if (ctx->is_active) |
1905 | update_context_time(ctx); | ||
1905 | update_event_times(event); | 1906 | update_event_times(event); |
1907 | if (event->state == PERF_EVENT_STATE_ACTIVE) | ||
1908 | event->pmu->read(event); | ||
1906 | raw_spin_unlock(&ctx->lock); | 1909 | raw_spin_unlock(&ctx->lock); |
1907 | |||
1908 | event->pmu->read(event); | ||
1909 | } | 1910 | } |
1910 | 1911 | ||
1911 | static inline u64 perf_event_count(struct perf_event *event) | 1912 | static inline u64 perf_event_count(struct perf_event *event) |
@@ -1999,8 +2000,7 @@ static int alloc_callchain_buffers(void) | |||
1999 | * accessed from NMI. Use a temporary manual per cpu allocation | 2000 | * accessed from NMI. Use a temporary manual per cpu allocation |
2000 | * until that gets sorted out. | 2001 | * until that gets sorted out. |
2001 | */ | 2002 | */ |
2002 | size = sizeof(*entries) + sizeof(struct perf_callchain_entry *) * | 2003 | size = offsetof(struct callchain_cpus_entries, cpu_entries[nr_cpu_ids]); |
2003 | num_possible_cpus(); | ||
2004 | 2004 | ||
2005 | entries = kzalloc(size, GFP_KERNEL); | 2005 | entries = kzalloc(size, GFP_KERNEL); |
2006 | if (!entries) | 2006 | if (!entries) |