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