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