On Sun, Feb 16, 2020 at 5:09 PM Hayden Livingston
wrote:
>
> Thanks. I had to re-read your reply and the kernel code multiple
> times, but I think I get it now. Please confirm.
>
> It is this call is made by user mode code:
>
> fd = bpf_create_map(BPF_MAP_TYPE_PERF_EVENT_ARRAY, /*key_size*/
>
Thanks. I had to re-read your reply and the kernel code multiple
times, but I think I get it now. Please confirm.
It is this call is made by user mode code:
fd = bpf_create_map(BPF_MAP_TYPE_PERF_EVENT_ARRAY, /*key_size*/
sizeof(int), /*value_size*/ sizeof(int), NUM_POSSIBLE_CPUS, 0);
key is
PERF_EVENT_OUTPUT map is to hold per cpu ring buffers created by
perf_event_open.
That is why its typical size is the number of cpus on the host.
On Sun, Feb 16, 2020 at 1:52 AM Hayden Livingston
wrote:
>
> I'm very confused why BCC creates a map of number of processors for
> the perf_events