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