Created
December 21, 2018 01:37
-
-
Save Watson1978/b3fea89be86b48a78e46c41337b6c055 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
ruby$target:::method-entry | |
{ | |
printf("method: %s#%s\n", copyinstr(arg0), copyinstr(arg1)); | |
} |
This file contains hidden or 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
class Foo | |
def hello | |
puts 1 + 2 | |
end | |
end | |
Foo.new.hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
macOS に標準でインストールされている Ruby 2.3 は DTrace が有効になっており、
method-entry
で Ruby で書いたメソッドの呼び出しを捕捉できる。