Skip to content

Commit

Permalink
oprofile: remove #ifdef CONFIG_OPROFILE_IBS in non-ibs code
Browse files Browse the repository at this point in the history
The ifdefs can be removed since the code is no longer ibs specific and
can be used for other purposes as well. IBS specific code is only in
op_model_amd.c.

Signed-off-by: Robert Richter <robert.richter@amd.com>
  • Loading branch information
Robert Richter committed Jan 7, 2009
1 parent 465634a commit ebf8d97
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
6 changes: 0 additions & 6 deletions drivers/oprofile/buffer_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,6 @@ static void add_trace_begin(void)
add_event_entry(TRACE_BEGIN_CODE);
}

#ifdef CONFIG_OPROFILE_IBS

static void add_data(struct op_entry *entry, struct mm_struct *mm)
{
unsigned long code, pc, val;
Expand Down Expand Up @@ -355,8 +353,6 @@ static void add_data(struct op_entry *entry, struct mm_struct *mm)
add_event_entry(val);
}

#endif

static inline void add_sample_entry(unsigned long offset, unsigned long event)
{
add_event_entry(offset);
Expand Down Expand Up @@ -544,10 +540,8 @@ void sync_buffer(int cpu)
cookie = get_exec_dcookie(mm);
add_user_ctx_switch(new, cookie);
}
#ifdef CONFIG_OPROFILE_IBS
if (op_cpu_buffer_get_size(&entry))
add_data(&entry, mm);
#endif
continue;
}

Expand Down
4 changes: 0 additions & 4 deletions drivers/oprofile/cpu_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,6 @@ void oprofile_add_sample(struct pt_regs * const regs, unsigned long event)
__oprofile_add_ext_sample(pc, regs, event, is_kernel);
}

#ifdef CONFIG_OPROFILE_IBS

/*
* Add samples with data to the ring buffer.
*
Expand Down Expand Up @@ -397,8 +395,6 @@ void oprofile_add_data(struct op_entry *entry, struct pt_regs * const regs,
cpu_buf->sample_lost_overflow++;
}

#endif

void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event)
{
struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(cpu_buffer);
Expand Down

0 comments on commit ebf8d97

Please sign in to comment.