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

feat: add ebpf plugins #2049

Open
wants to merge 87 commits into
base: dev/ebpf_observe
Choose a base branch
from

Conversation

KayzzzZ
Copy link
Collaborator

@KayzzzZ KayzzzZ commented Jan 19, 2025

  1. 引入 coolbpf 子模块,作为 bpf 底座
  2. 新增 ebpf driver 目录,作为 coolbpf 的驱动
  3. AbstractManager 将负责管理每个 eBPF 插件,所有的 AbstractManagers 由 eBPFServer 管理
  4. SourceManager 仍然负责与 ebpf driver 交互,不过 eBPF Server 不再直接调用 SourceManager,转而由 AbstractManager 来调用
  5. 整体包括三组线程:Poller 线程负责拉取 eBPF PerfBuffer;Handler 线程负责处理 eBPF 事件;Scheduler 线程负责定时将聚合后的数据写入到 ProcessQueue 中

LOG_ERROR(sLogger, ("user thread, proc is null", ""));
return 1;
}
event->msg->common.size = MSG_UNIX_SIZE + proc->psize + proc->size;
Copy link
Collaborator

Choose a reason for hiding this comment

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

proc->psize 和 proc->size从未赋值

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

看了下代码,我们的逻辑里面,对于 /proc 目录读取的进程,这个参数没有用到,可以删掉这个赋值。
对于内核里面 poll 到的event,我们需要common.size 来判断 args 里面到底有多少数据。

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