Commit 5214638384a968574a5ea3df1d3b3194da32a496

Authored by Linus Torvalds

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kerne…

…l/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()

Showing 2 changed files Side-by-side Diff

... ... @@ -126,11 +126,9 @@
126 126 if (prof_buffer)
127 127 return 0;
128 128  
129   - prof_buffer = vmalloc(buffer_bytes);
130   - if (prof_buffer) {
131   - memset(prof_buffer, 0, buffer_bytes);
  129 + prof_buffer = vzalloc(buffer_bytes);
  130 + if (prof_buffer)
132 131 return 0;
133   - }
134 132  
135 133 free_cpumask_var(prof_cpu_mask);
136 134 return -ENOMEM;
tools/perf/util/event.c
... ... @@ -42,7 +42,7 @@
42 42 int i;
43 43  
44 44 for (i = 0; i < 64; i++) {
45   - if (mask & (1UL << i))
  45 + if (mask & (1ULL << i))
46 46 size++;
47 47 }
48 48