Skip to content

Commit

Permalink
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…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()
  • Loading branch information
torvalds committed May 24, 2011
2 parents df462b3 + 0f61f3e commit 5214638
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions kernel/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/util/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}

Expand Down

0 comments on commit 5214638

Please sign in to comment.