于 2015/7/23 10:22, Alexei Starovoitov 写道:
> On 7/22/15 7:12 PM, xiakaixu wrote:
>> So you mean like this?
>>
>> u64 bpf_perf_event_read(u64 r1, u64 index,...)
>> {
>>struct bpf_perf_event_array *array = (void *) (long) r1;
>>struct perf_event *event;
>>...
>>event = array->events[in
On 7/22/15 7:12 PM, xiakaixu wrote:
So you mean like this?
u64 bpf_perf_event_read(u64 r1, u64 index,...)
{
struct bpf_perf_event_array *array = (void *) (long) r1;
struct perf_event *event;
...
event = array->events[index];
...
}
yes. the only thing needed is to add:
if (index
于 2015/7/23 9:14, Alexei Starovoitov 写道:
> On 7/22/15 1:09 AM, Kaixu Xia wrote:
>> According to the perf_event_map_fd and key, the function
>> bpf_perf_event_read() can convert the corresponding map
>> value to the pointer to struct perf_event and return the
>> Hardware PMU counter value.
>>
>> The
On 7/22/15 1:09 AM, Kaixu Xia wrote:
According to the perf_event_map_fd and key, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
The key can't be passed to bpf_perf_event_read() directly
bec
According to the perf_event_map_fd and key, the function
bpf_perf_event_read() can convert the corresponding map
value to the pointer to struct perf_event and return the
Hardware PMU counter value.
The key can't be passed to bpf_perf_event_read() directly
because the function argument constraint i
5 matches
Mail list logo