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.) 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