darwinkit
darwinkit copied to clipboard
Darwin scripts toolbox
darwinkit
Darwin scripts toolbox: DTrace and GDB scripts, housekeeping. See lxperf for Linux.
OSX DTrace gotchas
- there is no
progenyof--mach_trace.dhas to track its children manually - unordered events due to DTrace having per-cpu buffers and threads migrating between cores;
-
OSX has no core affinity API
-
no
-x temporaltoo (what is temporal) -
workaround for
machtrace.d:# column 2 should print the elapsed execution time dtrace -x evaltime=exec -Cs sys/machtrace.d -c ./a.out | sort -n -k2
-
launchd stuff
- insecure.shell -- helps you learn how screwed your launchd daemon/agent environment is
- run client:
socat tcp-connect:localhost:12345 readline - make sure you have
socatinstalled at/usr/local/bin! (use homebrew)
- run client: