Skip to content

Commit

Permalink
oprofile: remove backtrace code for ibs
Browse files Browse the repository at this point in the history
This code is broken since a TRACE_BEGIN_CODE is never sent to the
daemon. The data becomes corrupt since the backtrace is interpreted as
ibs sample.

Signed-off-by: Robert Richter <robert.richter@amd.com>
  • Loading branch information
Robert Richter committed Jan 7, 2009
1 parent f4ff236 commit 8350c78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 0 additions & 2 deletions drivers/oprofile/buffer_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,11 +557,9 @@ void sync_buffer(int cpu)
break;
#ifdef CONFIG_OPROFILE_IBS
case IBS_FETCH_BEGIN:
state = sb_bt_start;
add_ibs_begin(cpu, IBS_FETCH_CODE, mm);
break;
case IBS_OP_BEGIN:
state = sb_bt_start;
add_ibs_begin(cpu, IBS_OP_CODE, mm);
break;
#endif
Expand Down
10 changes: 2 additions & 8 deletions drivers/oprofile/cpu_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,17 +347,11 @@ void oprofile_add_ibs_sample(struct pt_regs * const regs,
fail = fail || add_sample(cpu_buf, ibs_sample[10], ibs_sample[11]);
}

if (fail)
goto fail;

if (oprofile_backtrace_depth)
oprofile_ops.backtrace(regs, oprofile_backtrace_depth);

return;
if (!fail)
return;

fail:
cpu_buf->sample_lost_overflow++;
return;
}

#endif
Expand Down

0 comments on commit 8350c78

Please sign in to comment.