iovisor / iovisor/bcc

use perf_event in XDP program

Open
#4,847 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

hello everyone,
I am trying to retrieve some information from hardware registers such as the number of cpu cycles (cache misses and others) of a portion of XDP code.

The goal I would like to achieve is similar to this:

```
/* of the code */

START TRACING
/* code to be traced */
STOP TRACING.

/*other code*/
```

But my problem is how to retrieve the data I need.

I have seen various examples and tests using BPF_PERF_ARRAY, but what I understand is that it cannot be used in XDP, right?

I saw from the ebpf documentation some useful helpers for my purpose but I wouldn't know how to use them in BCC considering that they take a map as parameter.

Any advice would be really appreciated!
Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.