Skip to content

Commit ebf8d97

Browse files
author
Robert Richter
committed
oprofile: remove #ifdef CONFIG_OPROFILE_IBS in non-ibs code
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>
1 parent 465634a commit ebf8d97

2 files changed

Lines changed: 0 additions & 10 deletions

File tree

‎drivers/oprofile/buffer_sync.c‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,8 +316,6 @@ static void add_trace_begin(void)
316316
add_event_entry(TRACE_BEGIN_CODE);
317317
}
318318

319-
#ifdef CONFIG_OPROFILE_IBS
320-
321319
static void add_data(struct op_entry *entry, struct mm_struct *mm)
322320
{
323321
unsigned long code, pc, val;
@@ -355,8 +353,6 @@ static void add_data(struct op_entry *entry, struct mm_struct *mm)
355353
add_event_entry(val);
356354
}
357355

358-
#endif
359-
360356
static inline void add_sample_entry(unsigned long offset, unsigned long event)
361357
{
362358
add_event_entry(offset);
@@ -544,10 +540,8 @@ void sync_buffer(int cpu)
544540
cookie = get_exec_dcookie(mm);
545541
add_user_ctx_switch(new, cookie);
546542
}
547-
#ifdef CONFIG_OPROFILE_IBS
548543
if (op_cpu_buffer_get_size(&entry))
549544
add_data(&entry, mm);
550-
#endif
551545
continue;
552546
}
553547

‎drivers/oprofile/cpu_buffer.c‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,6 @@ void oprofile_add_sample(struct pt_regs * const regs, unsigned long event)
361361
__oprofile_add_ext_sample(pc, regs, event, is_kernel);
362362
}
363363

364-
#ifdef CONFIG_OPROFILE_IBS
365-
366364
/*
367365
* Add samples with data to the ring buffer.
368366
*
@@ -397,8 +395,6 @@ void oprofile_add_data(struct op_entry *entry, struct pt_regs * const regs,
397395
cpu_buf->sample_lost_overflow++;
398396
}
399397

400-
#endif
401-
402398
void oprofile_add_pc(unsigned long pc, int is_kernel, unsigned long event)
403399
{
404400
struct oprofile_cpu_buffer *cpu_buf = &__get_cpu_var(cpu_buffer);

0 commit comments

Comments
 (0)