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