提交 6352d92d 编写于 作者: R Robert Richter

oprofile: simplify oprofile_begin_trace()

This patch removes the unused return parameter in
oprofile_begin_trace(). Also, oprofile_begin_trace() and
oprofile_end_trace() are inline now.
Signed-off-by: NRobert Richter <robert.richter@amd.com>
上级 317f33bc
...@@ -265,14 +265,13 @@ static int log_sample(struct oprofile_cpu_buffer *cpu_buf, unsigned long pc, ...@@ -265,14 +265,13 @@ static int log_sample(struct oprofile_cpu_buffer *cpu_buf, unsigned long pc,
return 0; return 0;
} }
static int oprofile_begin_trace(struct oprofile_cpu_buffer *cpu_buf) static inline void oprofile_begin_trace(struct oprofile_cpu_buffer *cpu_buf)
{ {
add_code(cpu_buf, CPU_TRACE_BEGIN); add_code(cpu_buf, CPU_TRACE_BEGIN);
cpu_buf->tracing = 1; cpu_buf->tracing = 1;
return 1;
} }
static void oprofile_end_trace(struct oprofile_cpu_buffer *cpu_buf) static inline void oprofile_end_trace(struct oprofile_cpu_buffer *cpu_buf)
{ {
cpu_buf->tracing = 0; cpu_buf->tracing = 0;
} }
...@@ -288,8 +287,7 @@ __oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs, ...@@ -288,8 +287,7 @@ __oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
return; return;
} }
if (!oprofile_begin_trace(cpu_buf)) oprofile_begin_trace(cpu_buf);
return;
/* /*
* if log_sample() fail we can't backtrace since we lost the * 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,6 +295,7 @@ __oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
*/ */
if (log_sample(cpu_buf, pc, is_kernel, event)) if (log_sample(cpu_buf, pc, is_kernel, event))
oprofile_ops.backtrace(regs, oprofile_backtrace_depth); oprofile_ops.backtrace(regs, oprofile_backtrace_depth);
oprofile_end_trace(cpu_buf); oprofile_end_trace(cpu_buf);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册