• Home
  • Raw
  • Download

Lines Matching +full:cpu +full:- +full:offset

4  * @remark Copyright 2002-2009 OProfile authors
12 * CPU buffer is processed and entered into the
17 * transitory EIP value into a persistent dentry/offset
20 * See fs/dcookies.c for a description of the dentry/offset
62 list_add(&task->tasks, &dying_tasks); in task_free_notify()
74 /* To avoid latency problems, we only process the current CPU, in task_exit_notify()
75 * hoping that most samples for the task are on this CPU in task_exit_notify()
91 struct mm_struct *mm = current->mm; in munmap_notify()
97 if (mpnt && mpnt->vm_file && (mpnt->vm_flags & VM_EXEC)) { in munmap_notify()
99 /* To avoid latency problems, we only process the current CPU, in munmap_notify()
100 * hoping that most samples for the task are on this CPU in munmap_notify()
121 /* FIXME: should we process all CPU buffers ? */ in module_load_notify()
159 return -ENOMEM; in sync_start()
215 if (path->dentry->d_flags & DCACHE_COOKIE) in fast_get_dcookie()
216 return (unsigned long)path->dentry; in fast_get_dcookie()
222 /* Look up the dcookie for the task's mm->exe_file,
225 * shared-library samples with particular applications
239 cookie = fast_get_dcookie(&exe_file->f_path); in get_exec_dcookie()
246 /* Convert the EIP value of a sample into a persistent dentry/offset
248 * sure to do this lookup before a mm->mmap modification happens so
254 lookup_dcookie(struct mm_struct *mm, unsigned long addr, off_t *offset) in lookup_dcookie() argument
260 for (vma = find_vma(mm, addr); vma; vma = vma->vm_next) { in lookup_dcookie()
262 if (addr < vma->vm_start || addr >= vma->vm_end) in lookup_dcookie()
265 if (vma->vm_file) { in lookup_dcookie()
266 cookie = fast_get_dcookie(&vma->vm_file->f_path); in lookup_dcookie()
267 *offset = (vma->vm_pgoff << PAGE_SHIFT) + addr - in lookup_dcookie()
268 vma->vm_start; in lookup_dcookie()
271 *offset = addr; in lookup_dcookie()
308 add_event_entry(task->pid); in add_user_ctx_switch()
310 /* Another code for daemon back-compat */ in add_user_ctx_switch()
313 add_event_entry(task->tgid); in add_user_ctx_switch()
335 off_t offset; in add_data() local
345 cookie = lookup_dcookie(mm, pc, &offset); in add_data()
348 offset = pc; in add_data()
351 offset = pc; in add_data()
358 offset = pc; in add_data()
362 add_event_entry(offset); /* Offset from Dcookie */ in add_data()
368 static inline void add_sample_entry(unsigned long offset, unsigned long event) in add_sample_entry() argument
370 add_event_entry(offset); in add_sample_entry()
377 * sample is converted into a persistent dentry/offset pair
384 off_t offset; in add_sample() local
387 add_sample_entry(s->eip, s->event); in add_sample()
398 cookie = lookup_dcookie(mm, s->eip, &offset); in add_sample()
410 add_sample_entry(offset, s->event); in add_sample()
431 * CPU buffers at this point, because we use two lists,
450 list_del(&task->tasks); in process_task_mortuary()
456 static void mark_done(int cpu) in mark_done() argument
460 cpumask_set_cpu(cpu, marked_cpus); in mark_done()
481 sb_bt_ignore = -2,
487 /* Sync one of the CPU's buffers into the global event buffer.
490 * lookup in task->mm->mmap to convert EIP into dcookie/offset
493 void sync_buffer(int cpu) in sync_buffer() argument
510 add_cpu_switch(cpu); in sync_buffer()
512 op_cpu_buffer_reset(cpu); in sync_buffer()
513 available = op_cpu_buffer_entries(cpu); in sync_buffer()
516 sample = op_cpu_buffer_read_entry(&entry, cpu); in sync_buffer()
520 if (is_code(sample->eip)) { in sync_buffer()
521 flags = sample->event; in sync_buffer()
564 mark_done(cpu); in sync_buffer()