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 tracepoint prototype #1088

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Godones
Copy link
Contributor

@Godones Godones commented Jan 26, 2025

使用方法:

  • 使用define_event_trace定义跟踪点名称和回调函数原型,以及默认的打印方法
  • 用户态在/sys/kernel/debug/tracing/events/进入对应子系统下查看存在的跟踪点
  • echo 1 > enable开启
  • echo 0 > enable关闭
  • 查看/sys/kernel/debug/tracing/trace_pipe获取输出

@github-actions github-actions bot added the enhancement New feature or request label Jan 26, 2025
@Godones Godones requested review from fslongjin and chiichen January 26, 2025 15:14
Copy link
Member

@chiichen chiichen left a comment

Choose a reason for hiding this comment

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

有测试用例吗,比如调用了某个系统调用之后在fs里读到 event 信息?

@@ -68,7 +68,7 @@ lru = "0.12.3"
rbpf = { path = "crates/rbpf" }
printf-compat = { version = "0.1.1", default-features = false }

static-keys = "=0.6.1"
static-keys = { git = "https://github.com/Godones/static-keys", branch = "ext" }
Copy link
Member

Choose a reason for hiding this comment

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

这个在 Dragonos 社区里开仓库维护比较好?或者我看你也在上游仓库有贡献,看能不能合进去?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

这个后面我会尝试合并到上游,这里暂时先用着,因为代码可能还需要改

@Godones
Copy link
Contributor Author

Godones commented Jan 31, 2025

有测试用例吗,比如调用了某个系统调用之后在fs里读到 event 信息?

我在mkdir的实现中插入了一个用例,可以用这个测试测试输出,不过当前的实现比较简单,我是直接输出到屏幕还没有写入到文件中

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants