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

Extend bcc_proc API. Allow to limit search to specific pid. #5014

Merged
merged 5 commits into from
Jul 28, 2024

Conversation

gukoff
Copy link
Contributor

@gukoff gukoff commented May 23, 2024

Fixes #5013

  • Extend bcc_proc API. Allow to limit search to specific pid.
  • Also extend the Python binding with the same goal.
  • The API changes are backwards-compatible.
  • Also added a couple of boundary checks for memcpy

- Also extend the Python binding with the same goal.
- The API changes are backwards-compatible.
- Also added a couple of boundary checks for `memcpy`
@gukoff
Copy link
Contributor Author

gukoff commented May 30, 2024

The failed test seems unrelated to this change; please retry?

lib.bcc_procutils_which_so_in_process.restype = ct.POINTER(ct.c_char)
lib.bcc_procutils_which_so_in_process.argtypes = [ct.c_char_p, ct.c_int]
lib.bcc_procutils_which_so_in_ldconfig_cache.restype = ct.POINTER(ct.c_char)
lib.bcc_procutils_which_so_in_ldconfig_cache.argtypes = [ct.c_char_p]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are the above lib.bcc_procutils_which_so_in_ldconfig_cache necessary or not? find_library(libname, 0) should cover this.

Copy link
Contributor Author

@gukoff gukoff Jul 25, 2024

Choose a reason for hiding this comment

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

Fair enough! No need to expose this function. Removed it.

Copy link
Collaborator

@yonghong-song yonghong-song left a comment

Choose a reason for hiding this comment

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

Agree that we do not want to break backward compatibility. So add a new parameter to find_library looks good to me.

@yonghong-song yonghong-song merged commit d40b3d5 into iovisor:master Jul 28, 2024
12 checks passed
@gukoff gukoff deleted the extend-bcc-proc branch July 29, 2024 12:39
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.

bcc_procutils_which_so(libname, pid) finds library unused by the process
2 participants