aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2008-12-16 06:00:10 -0500
committerRobert Richter <robert.richter@amd.com>2008-12-29 12:51:39 -0500
commitd45d23bed4bf7b25b7dcc336552a251db1aa1279 (patch)
tree849a03c1264bc1ecb99fa2a9a65c3d4b58c7fafc /drivers
parent300157768f050dabc73a99d958b504282088a132 (diff)
oprofile: add inline function __oprofile_add_ext_sample()
This patch adds the inline function __oprofile_add_ext_sample() to cpu_buffer.c and thus reduces overhead when calling oprofile_add_sample(). Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/oprofile/cpu_buffer.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
index b353b19bd786..9e66c384e016 100644
--- a/drivers/oprofile/cpu_buffer.c
+++ b/drivers/oprofile/cpu_buffer.c
@@ -277,8 +277,9 @@ static void oprofile_end_trace(struct oprofile_cpu_buffer *cpu_buf)
277 cpu_buf->tracing = 0; 277 cpu_buf->tracing = 0;
278} 278}
279 279
280void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs, 280static inline void
281 unsigned long event, int is_kernel) 281__oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
282 unsigned long event, int is_kernel)
282{ 283{
283 struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(cpu_buffer); 284 struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(cpu_buffer);
284 285
@@ -299,12 +300,18 @@ void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
299 oprofile_end_trace(cpu_buf); 300 oprofile_end_trace(cpu_buf);
300} 301}
301 302
303void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
304 unsigned long event, int is_kernel)
305{
306 __oprofile_add_ext_sample(pc, regs, event, is_kernel);
307}
308
302void oprofile_add_sample(struct pt_regs * const regs, unsigned long event) 309void oprofile_add_sample(struct pt_regs * const regs, unsigned long event)
303{ 310{
304 int is_kernel = !user_mode(regs); 311 int is_kernel = !user_mode(regs);
305 unsigned long pc = profile_pc(regs); 312 unsigned long pc = profile_pc(regs);
306 313
307 oprofile_add_ext_sample(pc, regs, event, is_kernel); 314 __oprofile_add_ext_sample(pc, regs, event, is_kernel);
308} 315}
309 316
310#ifdef CONFIG_OPROFILE_IBS 317#ifdef CONFIG_OPROFILE_IBS