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
regex is slowing startup #526
Labels
enhancement
New feature or request, changes on existing features
Milestone
Comments
mmarchini
added
the
enhancement
New feature or request, changes on existing features
label
Apr 15, 2019
mmarchini
added a commit
that referenced
this issue
Apr 18, 2019
mmarchini
added a commit
to mmarchini/bpftrace
that referenced
this issue
Apr 18, 2019
Improved speed by not performing wildcard match on probes without a wildcard. Speedup of complex scripts (especially those using tracepoints with arguments) will be much faster now. As an example from our toos: Before: # time bpftrace -d statsnoop.bt ... bpftrace -d statsnoop.bt 1.67s user 0.06s system 99% cpu 1.748 total After: # time bpftrace -d statsnoop.bt ... bpftrace -d statsnoop.bt 0.06s user 0.02s system 80% cpu 0.098 total Ref: bpftrace#526
mmarchini
added a commit
that referenced
this issue
Apr 18, 2019
mmarchini
added a commit
that referenced
this issue
Apr 23, 2019
mmarchini
added a commit
that referenced
this issue
Apr 23, 2019
mmarchini
added a commit
that referenced
this issue
Apr 23, 2019
mmarchini
added a commit
that referenced
this issue
Apr 23, 2019
mmarchini
added a commit
that referenced
this issue
Apr 25, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a more complex example that takes a few seconds for bpftrace to start, which turns out to be in regex for tracepoint arguments. Here is a simple (and faster) example:
Here is a CPU flamegraph where I've searched for regex:
87.4% of CPU time is in regex. You can see the codepaths: it's in sementic_analyser.cpp here:
In this case, I'm not even using a wildcard -- I'm matching syscalls:sys_enter_execve.
Could someone please fix this, eg:
The text was updated successfully, but these errors were encountered: