-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
Conversation
- Also extend the Python binding with the same goal. - The API changes are backwards-compatible. - Also added a couple of boundary checks for `memcpy`
The failed test seems unrelated to this change; please retry? |
src/python/bcc/libbcc.py
Outdated
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] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
…can be replaced with bcc_procutils_which_so with pid=0
Fixes #5013
bcc_proc
API. Allow to limit search to specific pid.memcpy