Lines Matching refs:cpu

62 static struct bp_cpuinfo *get_bp_info(int cpu, enum bp_type_idx type)  in get_bp_info()  argument
64 return per_cpu_ptr(bp_cpuinfo + type, cpu); in get_bp_info()
199 int i, cpu, err_cpu; in init_breakpoint_slots() local
204 for_each_possible_cpu(cpu) { in init_breakpoint_slots()
206 struct bp_cpuinfo *info = get_bp_info(cpu, i); in init_breakpoint_slots()
224 if (err_cpu == cpu) in init_breakpoint_slots()
302 static unsigned int max_task_bp_pinned(int cpu, enum bp_type_idx type) in max_task_bp_pinned() argument
304 struct bp_slots_histogram *tsk_pinned = &get_bp_info(cpu, type)->tsk_pinned; in max_task_bp_pinned()
322 static int task_bp_pinned(int cpu, struct perf_event *bp, enum bp_type_idx type) in task_bp_pinned() argument
342 if (iter->cpu >= 0) { in task_bp_pinned()
343 if (cpu == -1) { in task_bp_pinned()
346 } else if (cpu != iter->cpu) in task_bp_pinned()
360 if (bp->cpu >= 0) in cpumask_of_bp()
361 return cpumask_of(bp->cpu); in cpumask_of_bp()
374 int cpu; in max_bp_pinned_slots() local
376 if (bp->hw.target && bp->cpu < 0) { in max_bp_pinned_slots()
389 for_each_cpu(cpu, cpumask) { in max_bp_pinned_slots()
390 struct bp_cpuinfo *info = get_bp_info(cpu, type); in max_bp_pinned_slots()
395 nr += max_task_bp_pinned(cpu, type); in max_bp_pinned_slots()
397 nr += task_bp_pinned(cpu, bp, type); in max_bp_pinned_slots()
411 int cpu, next_tsk_pinned; in toggle_bp_slot() local
421 struct bp_cpuinfo *info = get_bp_info(bp->cpu, type); in toggle_bp_slot()
475 if (bp->cpu < 0) { /* Case 1: fast path */ in toggle_bp_slot()
481 for_each_possible_cpu(cpu) { in toggle_bp_slot()
482 bp_slots_histogram_add(&get_bp_info(cpu, type)->tsk_pinned, in toggle_bp_slot()
486 bp_slots_histogram_add(&get_bp_info(bp->cpu, type)->tsk_pinned, in toggle_bp_slot()
493 bp_slots_histogram_add(&get_bp_info(bp->cpu, type)->tsk_pinned, in toggle_bp_slot()
496 for_each_possible_cpu(cpu) { in toggle_bp_slot()
497 bp_slots_histogram_add(&get_bp_info(cpu, type)->tsk_pinned, in toggle_bp_slot()
506 for_each_cpu(cpu, cpumask) { in toggle_bp_slot()
507 next_tsk_pinned = task_bp_pinned(cpu, bp, type); in toggle_bp_slot()
510 bp_slots_histogram_add(&get_bp_info(cpu, type)->tsk_pinned, in toggle_bp_slot()
848 int cpu; in register_wide_hw_breakpoint() local
855 for_each_online_cpu(cpu) { in register_wide_hw_breakpoint()
856 bp = perf_event_create_kernel_counter(attr, cpu, NULL, in register_wide_hw_breakpoint()
863 per_cpu(*cpu_events, cpu) = bp; in register_wide_hw_breakpoint()
881 int cpu; in unregister_wide_hw_breakpoint() local
883 for_each_possible_cpu(cpu) in unregister_wide_hw_breakpoint()
884 unregister_hw_breakpoint(per_cpu(*cpu_events, cpu)); in unregister_wide_hw_breakpoint()
897 int cpu; in hw_breakpoint_is_used() local
902 for_each_possible_cpu(cpu) { in hw_breakpoint_is_used()
904 struct bp_cpuinfo *info = get_bp_info(cpu, type); in hw_breakpoint_is_used()