From ce1fa0238065108e0fd867bbebaaf0de9ba015b0 Mon Sep 17 00:00:00 2001 From: Barry Kasindorf Date: Tue, 15 Jul 2008 00:10:36 +0200 Subject: [PATCH] --- yaml --- r: 117113 b: refs/heads/master c: 9b1f261166f56d4b2c33fdf5aad64edd5e30b46f h: refs/heads/master i: 117111: fdbabe73932f07361276f6c3ae8ac818af7d140f v: v3 --- [refs] | 2 +- trunk/drivers/oprofile/buffer_sync.c | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 4b682114f837..19d807ddfcd4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4bd9b9dc97e344670e9e5762399a07dcd5f15311 +refs/heads/master: 9b1f261166f56d4b2c33fdf5aad64edd5e30b46f diff --git a/trunk/drivers/oprofile/buffer_sync.c b/trunk/drivers/oprofile/buffer_sync.c index 33bfa60b0c66..6c0c92a745dd 100644 --- a/trunk/drivers/oprofile/buffer_sync.c +++ b/trunk/drivers/oprofile/buffer_sync.c @@ -564,9 +564,11 @@ void sync_buffer(int cpu) struct task_struct *new; unsigned long cookie = 0; int in_kernel = 1; - unsigned int i; sync_buffer_state state = sb_buffer_start; +#ifndef CONFIG_OPROFILE_IBS + unsigned int i; unsigned long available; +#endif mutex_lock(&buffer_mutex); @@ -574,9 +576,13 @@ void sync_buffer(int cpu) /* Remember, only we can modify tail_pos */ +#ifndef CONFIG_OPROFILE_IBS available = get_slots(cpu_buf); for (i = 0; i < available; ++i) { +#else + while (get_slots(cpu_buf)) { +#endif struct op_sample *s = &cpu_buf->buffer[cpu_buf->tail_pos]; if (is_code(s->eip)) {