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

Support attaching uprobe to offset #2585

Merged
merged 3 commits into from
Nov 8, 2019

Conversation

mmisono
Copy link
Contributor

@mmisono mmisono commented Nov 4, 2019

This enables to attach uprobe to offset (similar to bpftrace/bpftrace#803.)
attach_kprobe() already supported it withevent_off.

This does not check an offset, e.g., whether the offset is the middle of the instruction or not. Currently attach_kprobe() also does not perform any check.
It is nice if we can integrate bpftrace's offset check (what above PR does) with bcc, but I think it will be separate PR.

@yonghong-song
Copy link
Collaborator

[buildbot, test this please]

@yonghong-song
Copy link
Collaborator

The change looks good. Could you also uprobe offset support to C++ API? This will make uprobe offset support in all user APIs. thanks!

The document is taken from src/python/bcc/__init__.py:attach_upobe()
@mmisono
Copy link
Contributor Author

mmisono commented Nov 6, 2019

I missed that. I added it and also updated the document.
Could you take a look? @yonghong-song

@yonghong-song
Copy link
Collaborator

[buildbot, test this please]

@yonghong-song
Copy link
Collaborator

LGTM. Thanks!

@yonghong-song yonghong-song merged commit 0429040 into iovisor:master Nov 8, 2019
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.

None yet

2 participants