diff options
author | Robert Richter <robert.richter@amd.com> | 2008-12-16 10:19:54 -0500 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2008-12-16 11:52:49 -0500 |
commit | bd2172f58094b3f8afa017e68f3f0b57577824e1 (patch) | |
tree | a5a0c5aad2bb04567622a5259164a30e7ba80fb4 /drivers/oprofile | |
parent | d69d59f49763e6bd047c591c6c1f84c8e13da931 (diff) |
oprofile: rename kernel-wide identifiers
This patch renames kernel-wide identifiers to something more oprofile
specific names.
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'drivers/oprofile')
-rw-r--r-- | drivers/oprofile/cpu_buffer.c | 12 | ||||
-rw-r--r-- | drivers/oprofile/event_buffer.c | 4 | ||||
-rw-r--r-- | drivers/oprofile/oprof.c | 4 | ||||
-rw-r--r-- | drivers/oprofile/oprof.h | 8 | ||||
-rw-r--r-- | drivers/oprofile/oprofile_files.c | 27 |
5 files changed, 28 insertions, 27 deletions
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index 61090969158f..fcf96f608d86 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c | |||
@@ -66,7 +66,7 @@ void free_cpu_buffers(void) | |||
66 | 66 | ||
67 | unsigned long oprofile_get_cpu_buffer_size(void) | 67 | unsigned long oprofile_get_cpu_buffer_size(void) |
68 | { | 68 | { |
69 | return fs_cpu_buffer_size; | 69 | return oprofile_cpu_buffer_size; |
70 | } | 70 | } |
71 | 71 | ||
72 | void oprofile_cpu_buffer_inc_smpl_lost(void) | 72 | void oprofile_cpu_buffer_inc_smpl_lost(void) |
@@ -81,7 +81,7 @@ int alloc_cpu_buffers(void) | |||
81 | { | 81 | { |
82 | int i; | 82 | int i; |
83 | 83 | ||
84 | unsigned long buffer_size = fs_cpu_buffer_size; | 84 | unsigned long buffer_size = oprofile_cpu_buffer_size; |
85 | 85 | ||
86 | op_ring_buffer_read = ring_buffer_alloc(buffer_size, OP_BUFFER_FLAGS); | 86 | op_ring_buffer_read = ring_buffer_alloc(buffer_size, OP_BUFFER_FLAGS); |
87 | if (!op_ring_buffer_read) | 87 | if (!op_ring_buffer_read) |
@@ -238,7 +238,7 @@ void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs, | |||
238 | { | 238 | { |
239 | struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(cpu_buffer); | 239 | struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(cpu_buffer); |
240 | 240 | ||
241 | if (!backtrace_depth) { | 241 | if (!oprofile_backtrace_depth) { |
242 | log_sample(cpu_buf, pc, is_kernel, event); | 242 | log_sample(cpu_buf, pc, is_kernel, event); |
243 | return; | 243 | return; |
244 | } | 244 | } |
@@ -251,7 +251,7 @@ void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs, | |||
251 | * source of this event | 251 | * source of this event |
252 | */ | 252 | */ |
253 | if (log_sample(cpu_buf, pc, is_kernel, event)) | 253 | if (log_sample(cpu_buf, pc, is_kernel, event)) |
254 | oprofile_ops.backtrace(regs, backtrace_depth); | 254 | oprofile_ops.backtrace(regs, oprofile_backtrace_depth); |
255 | oprofile_end_trace(cpu_buf); | 255 | oprofile_end_trace(cpu_buf); |
256 | } | 256 | } |
257 | 257 | ||
@@ -308,8 +308,8 @@ void oprofile_add_ibs_sample(struct pt_regs * const regs, | |||
308 | if (fail) | 308 | if (fail) |
309 | goto fail; | 309 | goto fail; |
310 | 310 | ||
311 | if (backtrace_depth) | 311 | if (oprofile_backtrace_depth) |
312 | oprofile_ops.backtrace(regs, backtrace_depth); | 312 | oprofile_ops.backtrace(regs, oprofile_backtrace_depth); |
313 | 313 | ||
314 | return; | 314 | return; |
315 | 315 | ||
diff --git a/drivers/oprofile/event_buffer.c b/drivers/oprofile/event_buffer.c index 191a3202cecc..2b7ae366ceb1 100644 --- a/drivers/oprofile/event_buffer.c +++ b/drivers/oprofile/event_buffer.c | |||
@@ -73,8 +73,8 @@ int alloc_event_buffer(void) | |||
73 | unsigned long flags; | 73 | unsigned long flags; |
74 | 74 | ||
75 | spin_lock_irqsave(&oprofilefs_lock, flags); | 75 | spin_lock_irqsave(&oprofilefs_lock, flags); |
76 | buffer_size = fs_buffer_size; | 76 | buffer_size = oprofile_buffer_size; |
77 | buffer_watershed = fs_buffer_watershed; | 77 | buffer_watershed = oprofile_buffer_watershed; |
78 | spin_unlock_irqrestore(&oprofilefs_lock, flags); | 78 | spin_unlock_irqrestore(&oprofilefs_lock, flags); |
79 | 79 | ||
80 | if (buffer_watershed >= buffer_size) | 80 | if (buffer_watershed >= buffer_size) |
diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c index cd375907f26f..3cffce90f82a 100644 --- a/drivers/oprofile/oprof.c +++ b/drivers/oprofile/oprof.c | |||
@@ -23,7 +23,7 @@ | |||
23 | struct oprofile_operations oprofile_ops; | 23 | struct oprofile_operations oprofile_ops; |
24 | 24 | ||
25 | unsigned long oprofile_started; | 25 | unsigned long oprofile_started; |
26 | unsigned long backtrace_depth; | 26 | unsigned long oprofile_backtrace_depth; |
27 | static unsigned long is_setup; | 27 | static unsigned long is_setup; |
28 | static DEFINE_MUTEX(start_mutex); | 28 | static DEFINE_MUTEX(start_mutex); |
29 | 29 | ||
@@ -172,7 +172,7 @@ int oprofile_set_backtrace(unsigned long val) | |||
172 | goto out; | 172 | goto out; |
173 | } | 173 | } |
174 | 174 | ||
175 | backtrace_depth = val; | 175 | oprofile_backtrace_depth = val; |
176 | 176 | ||
177 | out: | 177 | out: |
178 | mutex_unlock(&start_mutex); | 178 | mutex_unlock(&start_mutex); |
diff --git a/drivers/oprofile/oprof.h b/drivers/oprofile/oprof.h index 5df0c21a608f..c288d3c24b50 100644 --- a/drivers/oprofile/oprof.h +++ b/drivers/oprofile/oprof.h | |||
@@ -21,12 +21,12 @@ void oprofile_stop(void); | |||
21 | 21 | ||
22 | struct oprofile_operations; | 22 | struct oprofile_operations; |
23 | 23 | ||
24 | extern unsigned long fs_buffer_size; | 24 | extern unsigned long oprofile_buffer_size; |
25 | extern unsigned long fs_cpu_buffer_size; | 25 | extern unsigned long oprofile_cpu_buffer_size; |
26 | extern unsigned long fs_buffer_watershed; | 26 | extern unsigned long oprofile_buffer_watershed; |
27 | extern struct oprofile_operations oprofile_ops; | 27 | extern struct oprofile_operations oprofile_ops; |
28 | extern unsigned long oprofile_started; | 28 | extern unsigned long oprofile_started; |
29 | extern unsigned long backtrace_depth; | 29 | extern unsigned long oprofile_backtrace_depth; |
30 | 30 | ||
31 | struct super_block; | 31 | struct super_block; |
32 | struct dentry; | 32 | struct dentry; |
diff --git a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c index d8201998b0b7..5d36ffc30dd5 100644 --- a/drivers/oprofile/oprofile_files.c +++ b/drivers/oprofile/oprofile_files.c | |||
@@ -14,17 +14,18 @@ | |||
14 | #include "oprofile_stats.h" | 14 | #include "oprofile_stats.h" |
15 | #include "oprof.h" | 15 | #include "oprof.h" |
16 | 16 | ||
17 | #define FS_BUFFER_SIZE_DEFAULT 131072 | 17 | #define BUFFER_SIZE_DEFAULT 131072 |
18 | #define FS_CPU_BUFFER_SIZE_DEFAULT 8192 | 18 | #define CPU_BUFFER_SIZE_DEFAULT 8192 |
19 | #define FS_BUFFER_WATERSHED_DEFAULT 32768 /* FIXME: tune */ | 19 | #define BUFFER_WATERSHED_DEFAULT 32768 /* FIXME: tune */ |
20 | 20 | ||
21 | unsigned long fs_buffer_size; | 21 | unsigned long oprofile_buffer_size; |
22 | unsigned long fs_cpu_buffer_size; | 22 | unsigned long oprofile_cpu_buffer_size; |
23 | unsigned long fs_buffer_watershed; | 23 | unsigned long oprofile_buffer_watershed; |
24 | 24 | ||
25 | static ssize_t depth_read(struct file *file, char __user *buf, size_t count, loff_t *offset) | 25 | static ssize_t depth_read(struct file *file, char __user *buf, size_t count, loff_t *offset) |
26 | { | 26 | { |
27 | return oprofilefs_ulong_to_user(backtrace_depth, buf, count, offset); | 27 | return oprofilefs_ulong_to_user(oprofile_backtrace_depth, buf, count, |
28 | offset); | ||
28 | } | 29 | } |
29 | 30 | ||
30 | 31 | ||
@@ -125,16 +126,16 @@ static const struct file_operations dump_fops = { | |||
125 | void oprofile_create_files(struct super_block *sb, struct dentry *root) | 126 | void oprofile_create_files(struct super_block *sb, struct dentry *root) |
126 | { | 127 | { |
127 | /* reinitialize default values */ | 128 | /* reinitialize default values */ |
128 | fs_buffer_size = FS_BUFFER_SIZE_DEFAULT; | 129 | oprofile_buffer_size = BUFFER_SIZE_DEFAULT; |
129 | fs_cpu_buffer_size = FS_CPU_BUFFER_SIZE_DEFAULT; | 130 | oprofile_cpu_buffer_size = CPU_BUFFER_SIZE_DEFAULT; |
130 | fs_buffer_watershed = FS_BUFFER_WATERSHED_DEFAULT; | 131 | oprofile_buffer_watershed = BUFFER_WATERSHED_DEFAULT; |
131 | 132 | ||
132 | oprofilefs_create_file(sb, root, "enable", &enable_fops); | 133 | oprofilefs_create_file(sb, root, "enable", &enable_fops); |
133 | oprofilefs_create_file_perm(sb, root, "dump", &dump_fops, 0666); | 134 | oprofilefs_create_file_perm(sb, root, "dump", &dump_fops, 0666); |
134 | oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops); | 135 | oprofilefs_create_file(sb, root, "buffer", &event_buffer_fops); |
135 | oprofilefs_create_ulong(sb, root, "buffer_size", &fs_buffer_size); | 136 | oprofilefs_create_ulong(sb, root, "buffer_size", &oprofile_buffer_size); |
136 | oprofilefs_create_ulong(sb, root, "buffer_watershed", &fs_buffer_watershed); | 137 | oprofilefs_create_ulong(sb, root, "buffer_watershed", &oprofile_buffer_watershed); |
137 | oprofilefs_create_ulong(sb, root, "cpu_buffer_size", &fs_cpu_buffer_size); | 138 | oprofilefs_create_ulong(sb, root, "cpu_buffer_size", &oprofile_cpu_buffer_size); |
138 | oprofilefs_create_file(sb, root, "cpu_type", &cpu_type_fops); | 139 | oprofilefs_create_file(sb, root, "cpu_type", &cpu_type_fops); |
139 | oprofilefs_create_file(sb, root, "backtrace_depth", &depth_fops); | 140 | oprofilefs_create_file(sb, root, "backtrace_depth", &depth_fops); |
140 | oprofilefs_create_file(sb, root, "pointer_size", &pointer_size_fops); | 141 | oprofilefs_create_file(sb, root, "pointer_size", &pointer_size_fops); |