Is it possible to notify DTrace on Mac OS X of dynamically generated code?

有些话、适合烂在心里 提交于 2019-12-12 13:17:45

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!