|
|
dd2565 |
/* SystemTap tapset to make it easier to trace Ruby 2.0
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* All probes provided by Ruby can be listed using following command
|
|
|
dd2565 |
* (the path to the library must be adjuste appropriately):
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* stap -L 'process("@LIBRARY_PATH@").mark("*")'
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.array.create - Allocation of new array.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @size: Number of elements (an int)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.array.create =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("array__create")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
size = $arg1
|
|
|
dd2565 |
file = user_string($arg2)
|
|
|
dd2565 |
line = $arg3
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.cmethod.entry - Fired just before a method implemented in C is entered.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @classname: Name of the class (string)
|
|
|
dd2565 |
* @methodname: The method about bo be executed (string)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.cmethod.entry =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("cmethod__entry")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
classname = user_string($arg1)
|
|
|
dd2565 |
methodname = user_string($arg2)
|
|
|
dd2565 |
file = user_string($arg3)
|
|
|
dd2565 |
line = $arg4
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.cmethod.return - Fired just after a method implemented in C has returned.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @classname: Name of the class (string)
|
|
|
dd2565 |
* @methodname: The executed method (string)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.cmethod.return =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("cmethod__return")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
classname = user_string($arg1)
|
|
|
dd2565 |
methodname = user_string($arg2)
|
|
|
dd2565 |
file = user_string($arg3)
|
|
|
dd2565 |
line = $arg4
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.find.require.entry - Fired when require starts to search load
|
|
|
dd2565 |
* path for suitable file to require.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @requiredfile: The name of the file to be required (string)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.find.require.entry =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("find__require__entry")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
requiredfile = user_string($arg1)
|
|
|
dd2565 |
file = user_string($arg2)
|
|
|
dd2565 |
line = $arg3
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.find.require.return - Fired just after require has finished
|
|
|
dd2565 |
* search of load path for suitable file to require.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @requiredfile: The name of the file to be required (string)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.find.require.return =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("find__require__return")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
requiredfile = user_string($arg1)
|
|
|
dd2565 |
file = user_string($arg2)
|
|
|
dd2565 |
line = $arg3
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.gc.mark.begin - Fired when a GC mark phase is about to start.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* It takes no arguments.
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.gc.mark.begin =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("gc__mark__begin")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.gc.mark.end - Fired when a GC mark phase has ended.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* It takes no arguments.
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.gc.mark.end =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("gc__mark__end")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.gc.sweep.begin - Fired when a GC sweep phase is about to start.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* It takes no arguments.
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.gc.sweep.begin =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("gc__sweep__begin")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.gc.sweep.end - Fired when a GC sweep phase has ended.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* It takes no arguments.
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.gc.sweep.end =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("gc__sweep__end")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.hash.create - Allocation of new hash.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @size: Number of elements (int)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.hash.create =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("hash__create")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
size = $arg1
|
|
|
dd2565 |
file = user_string($arg2)
|
|
|
dd2565 |
line = $arg3
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.load.entry - Fired when calls to "load" are made.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @loadedfile: The name of the file to be loaded (string)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.load.entry =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("load__entry")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
loadedfile = user_string($arg1)
|
|
|
dd2565 |
file = user_string($arg2)
|
|
|
dd2565 |
line = $arg3
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.load.return - Fired just after require has finished
|
|
|
dd2565 |
* search of load path for suitable file to require.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @loadedfile: The name of the file that was loaded (string)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.load.return =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("load__return")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
loadedfile = user_string($arg1)
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.method.entry - Fired just before a method implemented in Ruby is entered.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @classname: Name of the class (string)
|
|
|
dd2565 |
* @methodname: The method about bo be executed (string)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.method.entry =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("method__entry")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
classname = user_string($arg1)
|
|
|
dd2565 |
methodname = user_string($arg2)
|
|
|
dd2565 |
file = user_string($arg3)
|
|
|
dd2565 |
line = $arg4
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.method.return - Fired just after a method implemented in Ruby has returned.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @classname: Name of the class (string)
|
|
|
dd2565 |
* @methodname: The executed method (string)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.method.return =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("method__return")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
classname = user_string($arg1)
|
|
|
dd2565 |
methodname = user_string($arg2)
|
|
|
dd2565 |
file = user_string($arg3)
|
|
|
dd2565 |
line = $arg4
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.object.create - Allocation of new object.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @classname: Name of the class (string)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.object.create =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("object__create")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
classname = user_string($arg1)
|
|
|
dd2565 |
file = user_string($arg2)
|
|
|
dd2565 |
line = $arg3
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.parse.begin - Fired just before a Ruby source file is parsed.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @parsedfile: The name of the file to be parsed (string)
|
|
|
dd2565 |
* @parsedline: The line number of beginning of parsing (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.parse.begin =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("parse__begin")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
parsedfile = user_string($arg1)
|
|
|
dd2565 |
parsedline = $arg2
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.parse.end - Fired just after a Ruby source file was parsed.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @parsedfile: The name of parsed the file (string)
|
|
|
dd2565 |
* @parsedline: The line number of beginning of parsing (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.parse.end =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("parse__end")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
parsedfile = user_string($arg1)
|
|
|
dd2565 |
parsedline = $arg2
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.raise - Fired when an exception is raised.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @classname: The class name of the raised exception (string)
|
|
|
dd2565 |
* @file: The name of the file where the exception was raised (string)
|
|
|
dd2565 |
* @line: The line number in the file where the exception was raised (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.raise =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("raise")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
classname = user_string($arg1)
|
|
|
dd2565 |
file = user_string($arg2)
|
|
|
dd2565 |
line = $arg3
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.require.entry - Fired on calls to rb_require_safe (when a file
|
|
|
dd2565 |
* is required).
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @requiredfile: The name of the file to be required (string)
|
|
|
dd2565 |
* @file: The file that called "require" (string)
|
|
|
dd2565 |
* @line: The line number where the call to require was made(int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.require.entry =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("require__entry")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
requiredfile = user_string($arg1)
|
|
|
dd2565 |
file = user_string($arg2)
|
|
|
dd2565 |
line = $arg3
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.require.return - Fired just after require has finished
|
|
|
dd2565 |
* search of load path for suitable file to require.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @requiredfile: The file that was required (string)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.require.return =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("require__return")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
requiredfile = user_string($arg1)
|
|
|
dd2565 |
}
|
|
|
dd2565 |
|
|
|
dd2565 |
/**
|
|
|
dd2565 |
* probe ruby.string.create - Allocation of new string.
|
|
|
dd2565 |
*
|
|
|
dd2565 |
* @size: Number of elements (an int)
|
|
|
dd2565 |
* @file: The file name where the method is being called (string)
|
|
|
dd2565 |
* @line: The line number where the method is being called (int)
|
|
|
dd2565 |
*/
|
|
|
dd2565 |
probe ruby.string.create =
|
|
|
dd2565 |
process("@LIBRARY_PATH@").mark("string__create")
|
|
|
dd2565 |
{
|
|
|
dd2565 |
size = $arg1
|
|
|
dd2565 |
file = user_string($arg2)
|
|
|
dd2565 |
line = $arg3
|
|
|
dd2565 |
}
|