Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128204
b: refs/heads/master
c: 6352d92
h: refs/heads/master
v: v3
  • Loading branch information
Robert Richter committed Dec 29, 2008
1 parent a6d87b6 commit ec58417
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 317f33bce6d43367a2fd170bc87ba18a88d2621d
refs/heads/master: 6352d92dec0c4b833c12a169e86762c05d0396f3
9 changes: 4 additions & 5 deletions trunk/drivers/oprofile/cpu_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,13 @@ static int log_sample(struct oprofile_cpu_buffer *cpu_buf, unsigned long pc,
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);
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;
}
Expand All @@ -288,15 +287,15 @@ __oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,
return;
}

if (!oprofile_begin_trace(cpu_buf))
return;
oprofile_begin_trace(cpu_buf);

/*
* if log_sample() fail we can't backtrace since we lost the
* source of this event
*/
if (log_sample(cpu_buf, pc, is_kernel, event))
oprofile_ops.backtrace(regs, oprofile_backtrace_depth);

oprofile_end_trace(cpu_buf);
}

Expand Down

0 comments on commit ec58417

Please sign in to comment.