Loading drivers/oprofile/buffer_sync.c +57 −54 Original line number Diff line number Diff line Loading @@ -48,7 +48,8 @@ static void process_task_mortuary(void); * Can be invoked from softirq via RCU callback due to * call_rcu() of the task struct, hence the _irqsave. */ static int task_free_notify(struct notifier_block * self, unsigned long val, void * data) static int task_free_notify(struct notifier_block *self, unsigned long val, void *data) { unsigned long flags; struct task_struct *task = data; Loading @@ -62,7 +63,8 @@ static int task_free_notify(struct notifier_block * self, unsigned long val, voi /* The task is on its way out. A sync of the buffer means we can catch * any remaining samples for this task. */ static int task_exit_notify(struct notifier_block * self, unsigned long val, void * data) static int task_exit_notify(struct notifier_block *self, unsigned long val, void *data) { /* To avoid latency problems, we only process the current CPU, * hoping that most samples for the task are on this CPU Loading @@ -77,7 +79,8 @@ static int task_exit_notify(struct notifier_block * self, unsigned long val, voi * we don't lose any. This does not have to be exact, it's a QoI issue * only. */ static int munmap_notify(struct notifier_block * self, unsigned long val, void * data) static int munmap_notify(struct notifier_block *self, unsigned long val, void *data) { unsigned long addr = (unsigned long)data; struct mm_struct *mm = current->mm; Loading @@ -103,7 +106,8 @@ static int munmap_notify(struct notifier_block * self, unsigned long val, void * /* We need to be told about new modules so we don't attribute to a previously * loaded module, or drop the samples on the floor. */ static int module_load_notify(struct notifier_block * self, unsigned long val, void * data) static int module_load_notify(struct notifier_block *self, unsigned long val, void *data) { #ifdef CONFIG_MODULES if (val != MODULE_STATE_COMING) Loading Loading @@ -235,7 +239,8 @@ static unsigned long get_exec_dcookie(struct mm_struct * mm) * sure to do this lookup before a mm->mmap modification happens so * we don't lose track. */ static unsigned long lookup_dcookie(struct mm_struct * mm, unsigned long addr, off_t * offset) static unsigned long lookup_dcookie(struct mm_struct *mm, unsigned long addr, off_t *offset) { unsigned long cookie = NO_COOKIE; struct vm_area_struct *vma; Loading Loading @@ -533,15 +538,13 @@ void sync_buffer(int cpu) cookie = get_exec_dcookie(mm); add_user_ctx_switch(new, cookie); } } else { if (state >= sb_bt_start && } else if (state >= sb_bt_start && !add_sample(mm, s, in_kernel)) { if (state == sb_bt_start) { state = sb_bt_ignore; atomic_inc(&oprofile_stats.bt_lost_no_mapping); } } } increment_tail(cpu_buf); } Loading Loading
drivers/oprofile/buffer_sync.c +57 −54 Original line number Diff line number Diff line Loading @@ -48,7 +48,8 @@ static void process_task_mortuary(void); * Can be invoked from softirq via RCU callback due to * call_rcu() of the task struct, hence the _irqsave. */ static int task_free_notify(struct notifier_block * self, unsigned long val, void * data) static int task_free_notify(struct notifier_block *self, unsigned long val, void *data) { unsigned long flags; struct task_struct *task = data; Loading @@ -62,7 +63,8 @@ static int task_free_notify(struct notifier_block * self, unsigned long val, voi /* The task is on its way out. A sync of the buffer means we can catch * any remaining samples for this task. */ static int task_exit_notify(struct notifier_block * self, unsigned long val, void * data) static int task_exit_notify(struct notifier_block *self, unsigned long val, void *data) { /* To avoid latency problems, we only process the current CPU, * hoping that most samples for the task are on this CPU Loading @@ -77,7 +79,8 @@ static int task_exit_notify(struct notifier_block * self, unsigned long val, voi * we don't lose any. This does not have to be exact, it's a QoI issue * only. */ static int munmap_notify(struct notifier_block * self, unsigned long val, void * data) static int munmap_notify(struct notifier_block *self, unsigned long val, void *data) { unsigned long addr = (unsigned long)data; struct mm_struct *mm = current->mm; Loading @@ -103,7 +106,8 @@ static int munmap_notify(struct notifier_block * self, unsigned long val, void * /* We need to be told about new modules so we don't attribute to a previously * loaded module, or drop the samples on the floor. */ static int module_load_notify(struct notifier_block * self, unsigned long val, void * data) static int module_load_notify(struct notifier_block *self, unsigned long val, void *data) { #ifdef CONFIG_MODULES if (val != MODULE_STATE_COMING) Loading Loading @@ -235,7 +239,8 @@ static unsigned long get_exec_dcookie(struct mm_struct * mm) * sure to do this lookup before a mm->mmap modification happens so * we don't lose track. */ static unsigned long lookup_dcookie(struct mm_struct * mm, unsigned long addr, off_t * offset) static unsigned long lookup_dcookie(struct mm_struct *mm, unsigned long addr, off_t *offset) { unsigned long cookie = NO_COOKIE; struct vm_area_struct *vma; Loading Loading @@ -533,15 +538,13 @@ void sync_buffer(int cpu) cookie = get_exec_dcookie(mm); add_user_ctx_switch(new, cookie); } } else { if (state >= sb_bt_start && } else if (state >= sb_bt_start && !add_sample(mm, s, in_kernel)) { if (state == sb_bt_start) { state = sb_bt_ignore; atomic_inc(&oprofile_stats.bt_lost_no_mapping); } } } increment_tail(cpu_buf); } Loading