mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
OProfile: moving increment_tail() in buffer_sync.c
Signed-off-by: Robert Richter <[email protected]> Cc: oprofile-list <[email protected]> Cc: Barry Kasindorf <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
73185e0a5d
commit
5e11f98dce
1 changed files with 11 additions and 13 deletions
|
|
@ -268,6 +268,17 @@ lookup_dcookie(struct mm_struct *mm, unsigned long addr, off_t *offset)
|
|||
return cookie;
|
||||
}
|
||||
|
||||
static void increment_tail(struct oprofile_cpu_buffer *b)
|
||||
{
|
||||
unsigned long new_tail = b->tail_pos + 1;
|
||||
|
||||
rmb();
|
||||
|
||||
if (new_tail < b->buffer_size)
|
||||
b->tail_pos = new_tail;
|
||||
else
|
||||
b->tail_pos = 0;
|
||||
}
|
||||
|
||||
static unsigned long last_cookie = INVALID_COOKIE;
|
||||
|
||||
|
|
@ -417,19 +428,6 @@ static unsigned long get_slots(struct oprofile_cpu_buffer *b)
|
|||
}
|
||||
|
||||
|
||||
static void increment_tail(struct oprofile_cpu_buffer *b)
|
||||
{
|
||||
unsigned long new_tail = b->tail_pos + 1;
|
||||
|
||||
rmb();
|
||||
|
||||
if (new_tail < b->buffer_size)
|
||||
b->tail_pos = new_tail;
|
||||
else
|
||||
b->tail_pos = 0;
|
||||
}
|
||||
|
||||
|
||||
/* Move tasks along towards death. Any tasks on dead_tasks
|
||||
* will definitely have no remaining references in any
|
||||
* CPU buffers at this point, because we use two lists,
|
||||
|
|
|
|||
Loading…
Reference in a new issue