Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 May 2011 04:20:48 +0000 (21:20 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 24 May 2011 04:20:48 +0000 (21:20 -0700)
* '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()

kernel/profile.c
tools/perf/util/event.c

index 66f841b..14c9f87 100644 (file)
@@ -126,11 +126,9 @@ int __ref profile_init(void)
        if (prof_buffer)
                return 0;
 
-       prof_buffer = vmalloc(buffer_bytes);
-       if (prof_buffer) {
-               memset(prof_buffer, 0, buffer_bytes);
+       prof_buffer = vzalloc(buffer_bytes);
+       if (prof_buffer)
                return 0;
-       }
 
        free_cpumask_var(prof_cpu_mask);
        return -ENOMEM;
index 252b72a..6635fcd 100644 (file)
@@ -42,7 +42,7 @@ int perf_sample_size(u64 sample_type)
        int i;
 
        for (i = 0; i < 64; i++) {
-               if (mask & (1UL << i))
+               if (mask & (1ULL << i))
                        size++;
        }