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

List and attach syntax are inconsistent #565

Closed
dalehamel opened this issue Apr 24, 2019 · 3 comments · Fixed by #1549
Closed

List and attach syntax are inconsistent #565

dalehamel opened this issue Apr 24, 2019 · 3 comments · Fixed by #1549
Labels
enhancement New feature or request, changes on existing features
Milestone

Comments

@dalehamel
Copy link
Contributor

We implement the parsing for matching probes in a list here:
https://github.com/iovisor/bpftrace/blob/master/src/list.cpp#L116-L139

And this logic is basically duplicated for filtering probes to attach:
https://github.com/iovisor/bpftrace/blob/master/src/bpftrace.cpp#L152

These should use the same syntax and provide the same filtering functionality.

#557 and #508 both touch this

@dalehamel
Copy link
Contributor Author

Things to consider:

  • Behavior for wildcards on paths, for uprobe/usdt
  • Consistently in syntax for filtering lists of probes, and wildcarding probes
  • Using the same, standardized filter function anywhere we try to filter probes (attach / list anyways)
  • Consistency with dtrace syntax / functionality (or at least compatibility)

@mmarchini mmarchini added the enhancement New feature or request, changes on existing features label Apr 25, 2019
@mmarchini mmarchini added this to the 1.0 milestone Apr 25, 2019
@mmarchini
Copy link
Contributor

Just hit one case where the filtering works for one but not for the other:

# bpftrace -e 'usdt:*usdt_test* { printf("here\n" ); exit(); }' -p $(pidof usdt_test)
No probes to attach

# bpftrace -l 'usdt:*usdt_test*' -p $(pidof usdt_test)
usdt:/home/mmarchini/workspace/iovisor/bpftrace/build/tests/testprogs/usdt_test:tracetest:testprobe
usdt:/home/mmarchini/workspace/iovisor/bpftrace/build/tests/testprogs/usdt_test:tracetest:testprobe2
usdt:/home/mmarchini/workspace/iovisor/bpftrace/build/tests/testprogs/usdt_test:tracetest2:testprobe2

@dalehamel
Copy link
Contributor Author

I need to catch up on the find_wildcard_matches refactor, it might also be related to another bug filed about usdt context being closed too soon that I need to check into.

I expect to have time for both tomorrow if no one gets to it before then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request, changes on existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants