-
Notifications
You must be signed in to change notification settings - Fork 50
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
added pid & tid filtering feature #1414
Conversation
977f2aa
to
7fd0c29
Compare
92332d7
to
59672a5
Compare
As syscall entry and exit hooks are hot code paths, thinking about performance impact. Checking whether current thread/process is whitelisted is a linear scan of array of ints. In the worst case this is a scan of 100 integers, which would span atleast 6 cache lines. An alternative is encoding the tid filter as a bit vector. The max number of threads we support is 1024, so that would be a bit vector atleast 128 bytes long. We could potentially also leverage the fact that our tid/pid generation algorithm starts from 101. So tid 101 could be the 1st bit of the bit vector and so on. Having said that, if memory is not the bottleneck then this optimization might not be as useful. |
59672a5
to
5f23c62
Compare
This PR adds the strace filter that let's you filter by thread ID or process ID (upto 10 at a time)
to make your output more relevant