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
Initial try for .eh_frame/.debug_frame based stack unwinding using eBPF #346
Conversation
I have re-created the previous #150 PR by squashing the previous commits. To make the rebase easier and cleaner. I'll extract certain features from this before rebasing. |
pkg/agent/profile.go
Outdated
|
||
p.loopReport(t, err) | ||
} | ||
} | ||
|
||
func (p *CgroupProfiler) profileLoop(ctx context.Context, now time.Time, counts, stackTraces *bpf.BPFMap) error { | ||
func (p *CgroupProfiler) initAndLoadBPFModule() (*bpf.Module, error) { | ||
btfSupported, err := p.isBTFSupported() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kakkoyun Separate as another PR
53c2303
to
05c9565
Compare
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> Split simple cpu profiling and cpu profiling with unwinding Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> Fix communication issues with kernel space Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> Send eh_frame of all mappings Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> Add debug prints back Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> Remove build id flag Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com> Use fork of delve, rather than vendoring a single package Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
dff0bee
to
89d3996
Compare
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
89d3996
to
2e8c890
Compare
Superseded by #600 |
u64 res = 0; | ||
switch (ins->op) { | ||
case 1: // OpUndefined: Undefined register. | ||
if (bpf_probe_read(&addr, 8, &unsafe_ptr) == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Kemal Akkoyun kakkoyun@gmail.com
blocked by xref: aquasecurity/libbpfgo#93
Fixes #293
Implement BPF map of maps after we have the support in libbpf-go:Utilize New CreateMap API implementing bpf_map_create, Type/name accessors aquasecurity/libbpfgo#138