oprofile: change cpu_buffer from array to per_cpu variable
Change cpu_buffer from array to per_cpu variable in oprofile functions. [akpm@linux-foundation.org: coding-style fixes] Cc: Philippe Elie <phil.el@wanadoo.fr> Signed-off-by: Mike Travis <travis@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
7ae9392c0a
commit
608dfddd84
@@ -23,7 +23,7 @@ void oprofile_reset_stats(void)
|
||||
int i;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
cpu_buf = &cpu_buffer[i];
|
||||
cpu_buf = &per_cpu(cpu_buffer, i);
|
||||
cpu_buf->sample_received = 0;
|
||||
cpu_buf->sample_lost_overflow = 0;
|
||||
cpu_buf->backtrace_aborted = 0;
|
||||
@@ -49,7 +49,7 @@ void oprofile_create_stats_files(struct super_block * sb, struct dentry * root)
|
||||
return;
|
||||
|
||||
for_each_possible_cpu(i) {
|
||||
cpu_buf = &cpu_buffer[i];
|
||||
cpu_buf = &per_cpu(cpu_buffer, i);
|
||||
snprintf(buf, 10, "cpu%d", i);
|
||||
cpudir = oprofilefs_mkdir(sb, dir, buf);
|
||||
|
||||
|
Reference in New Issue
Block a user