-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dtrace provider: add a predicate against the current tgid
If we don't put a predicate on, BEGIN/END probes fire in every running dtrace at the same time, messing up the activity state of all but the one it was meant to fire in and often causing the others to fail to exit on exit() (they hang until ended by some other means, like an interrupt or -c termination). Thankfully the -xcpu run-BEGIN/END-in-a-thread complexities can be ignored because we can match on DTrace's tgid instead of its PID (thread ID), which will always catch exactly our BEGIN/END firings and no-one else's. (In theory this might cause trouble if you run multiple consumers in different threads in the same process, but that's not going to work as it is, and has never been considered a sane thing to do.) One test is perturbed by the new changing-every-invocation value this adds to the BEGIN prologue, and is suitably adjusted. Signed-off-by: Nick Alcock <nick.alcock@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com> Reviewed-by: Eugene Loh <eugene.loh@oracle.com>
- Loading branch information
1 parent
ccd6059
commit ae8e471
Showing
2 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters