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