vondruch / rpms / ruby

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