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

mutex_lock detect #105

Open
Jiehon opened this issue Apr 27, 2021 · 2 comments
Open

mutex_lock detect #105

Jiehon opened this issue Apr 27, 2021 · 2 comments

Comments

@Jiehon
Copy link

Jiehon commented Apr 27, 2021

mutex_lock dectect mechanism uses new_mutex_lock function by replaced orignal mutex_lock。I wan to why it is accomplished with replace。if it uses kprobe mechsnism, it will cause very mucha overhead?

@git-baoyou
Copy link
Collaborator

使用kprobe机制不易于在lock函数的末尾添加探针,这里显然不建议将探针放在函数开始处。另外,使用new_mutex_lock的开销和kprobe并没有显著区别。

@Jiehon
Copy link
Author

Jiehon commented Jun 8, 2021

感谢您的答复。当前我们用epbf在做resource qos monitor,想了解kprobe机制的不足,其中的问题:
"使用kprobe机制不易于在lock函数的末尾添加探针,这里显然不建议将探针放在函数开始处" : 当前实现在mutex_lock hook中只是记录了时间戳,及更新radix tree,但没有获取上下文栈信息,kretprobe的弹床函数也对当前实现没有影响吧,kretprobe具体影响是哪里?这里面有什么具体考虑么?

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

No branches or pull requests

2 participants