/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | get_stackid_cannot_attach.c | 30 bpf_program__set_perf_event(skel->progs.oncpu); in test_get_stackid_cannot_attach() 49 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach() 51 CHECK(!IS_ERR(skel->links.oncpu), "attach_perf_event_no_callchain", in test_get_stackid_cannot_attach() 66 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach() 68 CHECK(IS_ERR(skel->links.oncpu), "attach_perf_event_callchain", in test_get_stackid_cannot_attach() 69 "err: %ld\n", PTR_ERR(skel->links.oncpu)); in test_get_stackid_cannot_attach() 83 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach() [all...] |
H A D | stacktrace_build_id_nmi.c | 45 bpf_program__set_perf_event(skel->progs.oncpu); in test_stacktrace_build_id_nmi() 63 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_stacktrace_build_id_nmi() 65 if (CHECK(IS_ERR(skel->links.oncpu), "attach_perf_event", in test_stacktrace_build_id_nmi() 66 "err %ld\n", PTR_ERR(skel->links.oncpu))) { in test_stacktrace_build_id_nmi()
|
H A D | perf_event_stackmap.c | 98 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_perf_event_stackmap() 100 if (CHECK(IS_ERR(skel->links.oncpu), "attach_perf_event", in test_perf_event_stackmap() 101 "err %ld\n", PTR_ERR(skel->links.oncpu))) { in test_perf_event_stackmap()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | get_stackid_cannot_attach.c | 30 bpf_program__set_type(skel->progs.oncpu, BPF_PROG_TYPE_PERF_EVENT); in test_get_stackid_cannot_attach() 49 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach() 51 ASSERT_ERR_PTR(skel->links.oncpu, "attach_perf_event_no_callchain"); in test_get_stackid_cannot_attach() 65 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach() 67 ASSERT_OK_PTR(skel->links.oncpu, "attach_perf_event_callchain"); in test_get_stackid_cannot_attach() 68 bpf_link__destroy(skel->links.oncpu); in test_get_stackid_cannot_attach() 82 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_get_stackid_cannot_attach() [all...] |
H A D | stacktrace_build_id_nmi.c | 29 bpf_program__set_type(skel->progs.oncpu, BPF_PROG_TYPE_PERF_EVENT); in test_stacktrace_build_id_nmi() 47 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_stacktrace_build_id_nmi() 49 if (!ASSERT_OK_PTR(skel->links.oncpu, "attach_perf_event")) { in test_stacktrace_build_id_nmi()
|
H A D | perf_event_stackmap.c | 99 skel->links.oncpu = bpf_program__attach_perf_event(skel->progs.oncpu, in test_perf_event_stackmap() 101 if (!ASSERT_OK_PTR(skel->links.oncpu, "attach_perf_event")) { in test_perf_event_stackmap()
|
/kernel/linux/linux-6.6/samples/bpf/ |
H A D | offwaketime.bpf.c | 108 int oncpu(struct trace_event_raw_sched_switch *ctx) function 114 int oncpu(struct pt_regs *ctx) function
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | test_tracepoint.c | 20 int oncpu(struct sched_switch_args *ctx) in oncpu() function
|
H A D | perf_event_stackmap.c | 31 int oncpu(void *ctx) in oncpu() function
|
H A D | test_stacktrace_map.c | 54 int oncpu(struct sched_switch_args *ctx) in oncpu() function
|
H A D | test_stacktrace_build_id.c | 51 int oncpu(struct random_urandom_args *args) in oncpu() function
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | test_tracepoint.c | 20 int oncpu(struct sched_switch_args *ctx) in oncpu() function
|
H A D | perf_event_stackmap.c | 31 int oncpu(void *ctx) in oncpu() function
|
H A D | stacktrace_map_skip.c | 36 int oncpu(struct trace_event_raw_sched_switch *ctx) in oncpu() function
|
H A D | test_stacktrace_map.c | 54 int oncpu(struct sched_switch_args *ctx) in oncpu() function
|
H A D | test_stacktrace_build_id.c | 43 int oncpu(struct pt_regs *args) in oncpu() function
|
/kernel/linux/linux-5.10/samples/bpf/ |
H A D | offwaketime_kern.c | 124 int oncpu(struct sched_switch_args *ctx) function 130 int oncpu(struct pt_regs *ctx) function
|
/kernel/linux/linux-6.6/kernel/sched/ |
H A D | psi.c | 44 * CPU, productive means an oncpu task. 221 static bool test_state(unsigned int *tasks, enum psi_states state, bool oncpu) in test_state() argument 234 return unlikely(tasks[NR_RUNNING] > oncpu); in test_state() 236 return unlikely(tasks[NR_RUNNING] && !oncpu); in test_state()
|
/kernel/linux/linux-6.6/kernel/events/ |
H A D | core.c | 2278 event->oncpu = -1; in event_sched_out() 2529 WRITE_ONCE(event->oncpu, smp_processor_id()); in event_sched_in() 2531 * Order event::oncpu write to happen before the ACTIVE state is in event_sched_in() 2533 * ->oncpu if it sees ACTIVE. in event_sched_in() 2554 event->oncpu = -1; in event_sched_in() 3057 if (READ_ONCE(event->oncpu) != smp_processor_id()) in __perf_event_stop() 3094 * inactive here (event->oncpu==-1), there's nothing more to do; in perf_event_stop() 3097 ret = cpu_function_call(READ_ONCE(event->oncpu), in perf_event_stop() 4594 if (event->attr.pinned && event->oncpu != smp_processor_id()) { in perf_event_read_local() 4602 * oncpu in perf_event_read_local() [all...] |
/kernel/linux/linux-5.10/kernel/events/ |
H A D | core.c | 2377 event->oncpu = -1; in event_sched_out() 2595 WRITE_ONCE(event->oncpu, smp_processor_id()); in event_sched_in() 2597 * Order event::oncpu write to happen before the ACTIVE state is in event_sched_in() 2599 * ->oncpu if it sees ACTIVE. in event_sched_in() 2620 event->oncpu = -1; in event_sched_in() 3125 if (READ_ONCE(event->oncpu) != smp_processor_id()) in __perf_event_stop() 3162 * inactive here (event->oncpu==-1), there's nothing more to do; in perf_event_stop() 3165 ret = cpu_function_call(READ_ONCE(event->oncpu), in perf_event_stop() 4468 if (event->attr.pinned && event->oncpu != smp_processor_id()) { in perf_event_read_local() 4476 * oncpu in perf_event_read_local() [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | perf_event.h | 705 int oncpu; member
|
/kernel/linux/linux-6.6/include/linux/ |
H A D | perf_event.h | 761 int oncpu; member
|
/kernel/linux/linux-5.10/kernel/trace/ |
H A D | bpf_trace.c | 900 if (unlikely(event->oncpu != cpu)) in __bpf_perf_event_output()
|
/kernel/linux/linux-6.6/kernel/trace/ |
H A D | bpf_trace.c | 641 if (unlikely(event->oncpu != cpu)) in __bpf_perf_event_output()
|