aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/oprofile
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/oprofile')
-rw-r--r--drivers/oprofile/cpu_buffer.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c
index 9e66c384e016..435bd6e08d5b 100644
--- a/drivers/oprofile/cpu_buffer.c
+++ b/drivers/oprofile/cpu_buffer.c
@@ -265,14 +265,13 @@ fail:
265 return 0; 265 return 0;
266} 266}
267 267
268static int oprofile_begin_trace(struct oprofile_cpu_buffer *cpu_buf) 268static inline void oprofile_begin_trace(struct oprofile_cpu_buffer *cpu_buf)
269{ 269{
270 add_code(cpu_buf, CPU_TRACE_BEGIN); 270 add_code(cpu_buf, CPU_TRACE_BEGIN);
271 cpu_buf->tracing = 1; 271 cpu_buf->tracing = 1;
272 return 1;
273} 272}
274 273
275static void oprofile_end_trace(struct oprofile_cpu_buffer *cpu_buf) 274static inline void oprofile_end_trace(struct oprofile_cpu_buffer *cpu_buf)
276{ 275{
277 cpu_buf->tracing = 0; 276 cpu_buf->tracing = 0;
278} 277}
@@ -288,8 +287,7 @@ __oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
288 return; 287 return;
289 } 288 }
290 289
291 if (!oprofile_begin_trace(cpu_buf)) 290 oprofile_begin_trace(cpu_buf);
292 return;
293 291
294 /* 292 /*
295 * if log_sample() fail we can't backtrace since we lost the 293 * if log_sample() fail we can't backtrace since we lost the
@@ -297,6 +295,7 @@ __oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
297 */ 295 */
298 if (log_sample(cpu_buf, pc, is_kernel, event)) 296 if (log_sample(cpu_buf, pc, is_kernel, event))
299 oprofile_ops.backtrace(regs, oprofile_backtrace_depth); 297 oprofile_ops.backtrace(regs, oprofile_backtrace_depth);
298
300 oprofile_end_trace(cpu_buf); 299 oprofile_end_trace(cpu_buf);
301} 300}
302 301