diff options
author | Mike Travis <travis@sgi.com> | 2008-04-28 05:14:15 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:31 -0400 |
commit | 608dfddd845da5ab6accef70154c8910529699f7 (patch) | |
tree | 6480216e8248d79f2e69d3edd4658a99eaf0be13 /drivers/oprofile/oprofile_stats.c | |
parent | 7ae9392c0a3bc01562361bb21e23dfb2e5c81c5a (diff) |
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>
Diffstat (limited to 'drivers/oprofile/oprofile_stats.c')
-rw-r--r-- | drivers/oprofile/oprofile_stats.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/oprofile/oprofile_stats.c b/drivers/oprofile/oprofile_stats.c index d1f6d776e9e4..f99b28e7b79a 100644 --- a/drivers/oprofile/oprofile_stats.c +++ b/drivers/oprofile/oprofile_stats.c | |||
@@ -23,7 +23,7 @@ void oprofile_reset_stats(void) | |||
23 | int i; | 23 | int i; |
24 | 24 | ||
25 | for_each_possible_cpu(i) { | 25 | for_each_possible_cpu(i) { |
26 | cpu_buf = &cpu_buffer[i]; | 26 | cpu_buf = &per_cpu(cpu_buffer, i); |
27 | cpu_buf->sample_received = 0; | 27 | cpu_buf->sample_received = 0; |
28 | cpu_buf->sample_lost_overflow = 0; | 28 | cpu_buf->sample_lost_overflow = 0; |
29 | cpu_buf->backtrace_aborted = 0; | 29 | cpu_buf->backtrace_aborted = 0; |
@@ -49,7 +49,7 @@ void oprofile_create_stats_files(struct super_block * sb, struct dentry * root) | |||
49 | return; | 49 | return; |
50 | 50 | ||
51 | for_each_possible_cpu(i) { | 51 | for_each_possible_cpu(i) { |
52 | cpu_buf = &cpu_buffer[i]; | 52 | cpu_buf = &per_cpu(cpu_buffer, i); |
53 | snprintf(buf, 10, "cpu%d", i); | 53 | snprintf(buf, 10, "cpu%d", i); |
54 | cpudir = oprofilefs_mkdir(sb, dir, buf); | 54 | cpudir = oprofilefs_mkdir(sb, dir, buf); |
55 | 55 | ||