aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/oprofile/buffer_sync.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
index 33bfa60b0c66..6c0c92a745dd 100644
--- a/drivers/oprofile/buffer_sync.c
+++ b/drivers/oprofile/buffer_sync.c
@@ -564,9 +564,11 @@ void sync_buffer(int cpu)
564 struct task_struct *new; 564 struct task_struct *new;
565 unsigned long cookie = 0; 565 unsigned long cookie = 0;
566 int in_kernel = 1; 566 int in_kernel = 1;
567 unsigned int i;
568 sync_buffer_state state = sb_buffer_start; 567 sync_buffer_state state = sb_buffer_start;
568#ifndef CONFIG_OPROFILE_IBS
569 unsigned int i;
569 unsigned long available; 570 unsigned long available;
571#endif
570 572
571 mutex_lock(&buffer_mutex); 573 mutex_lock(&buffer_mutex);
572 574
@@ -574,9 +576,13 @@ void sync_buffer(int cpu)
574 576
575 /* Remember, only we can modify tail_pos */ 577 /* Remember, only we can modify tail_pos */
576 578
579#ifndef CONFIG_OPROFILE_IBS
577 available = get_slots(cpu_buf); 580 available = get_slots(cpu_buf);
578 581
579 for (i = 0; i < available; ++i) { 582 for (i = 0; i < available; ++i) {
583#else
584 while (get_slots(cpu_buf)) {
585#endif
580 struct op_sample *s = &cpu_buf->buffer[cpu_buf->tail_pos]; 586 struct op_sample *s = &cpu_buf->buffer[cpu_buf->tail_pos];
581 587
582 if (is_code(s->eip)) { 588 if (is_code(s->eip)) {