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