aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-24 00:20:48 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-24 00:20:48 -0400
commit5214638384a968574a5ea3df1d3b3194da32a496 (patch)
treef0defc396d154c35cd57692c33e7596cd314a93b
parentdf462b3dbeeaae7141f1b63cbfcc1e1bae6a85fc (diff)
parent0f61f3e4db71946292ef8d6d6df74b8fcf001646 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: perf tools: Fix sample type size calculation in 32 bits archs profile: Use vzalloc() rather than vmalloc() & memset()
-rw-r--r--kernel/profile.c6
-rw-r--r--tools/perf/util/event.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/kernel/profile.c b/kernel/profile.c
index 66f841b7fbd3..14c9f87b9fc9 100644
--- a/kernel/profile.c
+++ b/kernel/profile.c
@@ -126,11 +126,9 @@ int __ref profile_init(void)
126 if (prof_buffer) 126 if (prof_buffer)
127 return 0; 127 return 0;
128 128
129 prof_buffer = vmalloc(buffer_bytes); 129 prof_buffer = vzalloc(buffer_bytes);
130 if (prof_buffer) { 130 if (prof_buffer)
131 memset(prof_buffer, 0, buffer_bytes);
132 return 0; 131 return 0;
133 }
134 132
135 free_cpumask_var(prof_cpu_mask); 133 free_cpumask_var(prof_cpu_mask);
136 return -ENOMEM; 134 return -ENOMEM;
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 252b72a5e59e..6635fcd11ca5 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -42,7 +42,7 @@ int perf_sample_size(u64 sample_type)
42 int i; 42 int i;
43 43
44 for (i = 0; i < 64; i++) { 44 for (i = 0; i < 64; i++) {
45 if (mask & (1UL << i)) 45 if (mask & (1ULL << i))
46 size++; 46 size++;
47 } 47 }
48 48