Calling get_perf_callchain() on perf_events from PEBS entries may cause unwinder errors. To fix this issue, the callchain is fetched early. Such perf_events are marked with __PERF_SAMPLE_CALLCHAIN_EARLY. Similarly, calling bpf_get_[stack|stackid] on perf_events from PEBS may also cause unwinder errors. To fix this, add separate version of these two helpers, bpf_get_[stack|stackid]_pe. These two hepers use callchain in bpf_perf_event_data_kern->data->callchain.
Showing the changes to include/linux (1 of 3 files). Show all
Unified · Split
| @@ -1675,6 +1675,8 @@ extern const struct bpf_func_proto bpf_get_current_comm_proto; · 1674 unmodified lines | |||
| 1675 | extern const struct bpf_func_proto bpf_get_stackid_proto; | 1675 | extern const struct bpf_func_proto bpf_get_stackid_proto; |
| 1676 | extern const struct bpf_func_proto bpf_get_stack_proto; | 1676 | extern const struct bpf_func_proto bpf_get_stack_proto; |
| 1677 | extern const struct bpf_func_proto bpf_get_task_stack_proto; | 1677 | extern const struct bpf_func_proto bpf_get_task_stack_proto; |
| 1678 | extern const struct bpf_func_proto bpf_get_stackid_proto_pe; | ||
| 1679 | extern const struct bpf_func_proto bpf_get_stack_proto_pe; | ||
| 1678 | extern const struct bpf_func_proto bpf_sock_map_update_proto; | 1680 | extern const struct bpf_func_proto bpf_sock_map_update_proto; |
| 1679 | extern const struct bpf_func_proto bpf_sock_hash_update_proto; | 1681 | extern const struct bpf_func_proto bpf_sock_hash_update_proto; |
| 1680 | extern const struct bpf_func_proto bpf_get_current_cgroup_id_proto; | 1682 | extern const struct bpf_func_proto bpf_get_current_cgroup_id_proto; |