Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support BCC perf maps #102

Merged
merged 2 commits into from
Sep 6, 2021
Merged

Support BCC perf maps #102

merged 2 commits into from
Sep 6, 2021

Conversation

zuzzas
Copy link
Contributor

@zuzzas zuzzas commented May 11, 2021

  1. New configuration parameter for counters: PerfMap. You can reference it via BPF_PERF_OUTPUT and perf_submit in the C code.
  2. An oom kill example which utilizes perf maps to push OOM events.

@zuzzas zuzzas force-pushed the perf-map-support branch 2 times, most recently from d83d984 to 5ab5698 Compare May 11, 2021 15:35
@zuzzas
Copy link
Contributor Author

zuzzas commented May 13, 2021

Now that I think of it, there are other counting programs, such as cgroup.yaml, that can benefit from it. This approach removes the unbounded growth of BPF_HASHes.

Copy link
Contributor

@bobrik bobrik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intention looks good (if I understand it correctly), but some changes and docs are needed.

exporter/perf_map.go Outdated Show resolved Hide resolved
exporter/perf_map.go Outdated Show resolved Hide resolved
exporter/perf_map.go Show resolved Hide resolved
exporter/perf_map.go Show resolved Hide resolved
examples/oomkill.yaml Show resolved Hide resolved
config/config.go Outdated Show resolved Hide resolved
examples/oomkill.yaml Outdated Show resolved Hide resolved
decoder/cgroup.go Outdated Show resolved Hide resolved
@zuzzas zuzzas force-pushed the perf-map-support branch 3 times, most recently from 996d087 to d2d9709 Compare September 1, 2021 10:11
@zuzzas zuzzas requested a review from bobrik September 1, 2021 10:19
examples/oomkill.yaml Outdated Show resolved Hide resolved
@zuzzas
Copy link
Contributor Author

zuzzas commented Sep 6, 2021

In addition to your latest comment, I think I'll add an OOM example with tracepoints. I believe it could be useful to illustrate both approaches to this problem in the examples. That's why I'll do it in a follow-up PR.

@bobrik bobrik merged commit 3828623 into cloudflare:master Sep 6, 2021
@bobrik
Copy link
Contributor

bobrik commented Sep 6, 2021

Thanks!

@zuzzas zuzzas deleted the perf-map-support branch September 7, 2021 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants