Support multi-matched globbed target files for uprobe and usdt #1499
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The change is pretty straightforward, it's mostly achieved by changing the form of strings returned by
find_wildcard_matches
for these probe types (the new form istarget:function
for uprobe andtarget:namespace:probename
for usdt) and handling the new form where needed.A noticeable behavior is for usdt probes when a process PID is specified. By default, all binaries and libraries executed by the process are searched for usdt probes. If a target path is specified along with a PID, only the binaries/libraries matching the path are searched. I wonder if this information should be put into the Reference Guide.
Resolves #1113.
Note: this change introduces usage of
std::filesystem
. This requires some changes, in particular adding the-lstdc++fs
linker flag for some compiler versions and using GCC version 8 in Docker images (since GCC 7 does not supportstd::filesystem
). These changes will probably be needed for #1263, too.Checklist
docs/reference_guide.md
CHANGELOG.md