Skip to content

fix(ebpf): make kallsyms lazy #2245

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

Merged
merged 1 commit into from
Aug 14, 2023
Merged

fix(ebpf): make kallsyms lazy #2245

merged 1 commit into from
Aug 14, 2023

Conversation

korniltsev
Copy link
Collaborator

This will save couple of megabytes when CollectKernel=false ( /proc/kallsyms is 2M on our dev nodes and 16M on my machine)

Copy link
Contributor

@simonswine simonswine left a comment

Choose a reason for hiding this comment

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

LGTM

sc.kallsyms, err = NewKallsyms()
if err != nil {
level.Error(sc.logger).Log("msg", "kallsyms init fail", "err", err)
sc.kallsyms = NewSymbolTab(nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Unsure if you want to return here right away, as I guess the errors are not necessarily related?

Suggested change
sc.kallsyms = NewSymbolTab(nil)
sc.kallsyms = NewSymbolTab(nil)
return

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I did not return on purpose to emit second error message with hints how to try to bypass permission errors

@simonswine simonswine merged commit 9462e90 into next Aug 14, 2023
@simonswine simonswine deleted the ebpf/lazy_kallsyms branch August 14, 2023 16:01
@simonswine
Copy link
Contributor

Sorry I wanted to click "resolve conversation" instead of "rebase and merge"

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