Last active
March 7, 2018 02:30
-
-
Save d/212c1ad1840c26aabbec097c3d8248ab to your computer and use it in GitHub Desktop.
instrumenting
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
# wait for gporca_test to launch | |
dtrace -xmangled -n 'pid$target::__ZN4gpos9CRefCount6AddRefEv:entry { @["AddRef"]=count(); }' -W gporca_test | |
# list all probes | |
dtrace -xmangled -l -n 'pid$target:gporca_test::' -n 'pid$target:libgpopt.3.dylib::' -n 'pid$target:libnaucrates.3.dylib::' -n 'pid$target:libgpdbcost.3.dylib::' -n 'pid$target:libgpos.3.dylib::' -p (pgrep gporca_test) > /tmp/gporca_test_probes.txt | |
# dynamically trace an already running orca process | |
dtrace -xmangled -n 'pid$target::__ZN4gpos9CRefCount6AddRefEv:return { @["AddRef"]=count(); }' -p (pgrep gporca_test) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment