问题
We would like to extend Mono's VM to generate information that can be consumed by DTrace and instruments.
I am looking at making changes to the Mono runtime to have it register or notify the code that it has dynamically generated so DTrace can produce useful information for those blocks of code.
回答1:
What kind of information do you want to include?
The main example of doing this is ustack helpers, which convey from a VM to DTrace how to translate stack frames into human-readable frames. These have existed for Python, Java, and Node.js.
Here's a "hello world" ustack helper: https://github.com/davepacheco/ustack
and here's the one for Node.js: https://github.com/joyent/node/blob/master/src/v8ustack.d
来源:https://stackoverflow.com/questions/9214948/is-it-possible-to-notify-dtrace-on-mac-os-x-of-dynamically-generated-code