c99b38
/* Example tapset file.
c99b38
 *
c99b38
 * You can execute the tapset using following command (please adjust the path
c99b38
 * prior running the command, if needed):
c99b38
 * 
c99b38
 * stap /usr/share/doc/ruby-2.0.0.0/ruby-exercise.stp -c "ruby -e \"puts 'test'\""
c99b38
 */
c99b38
c99b38
probe ruby.cmethod.entry {
c99b38
  printf("%d -> %s::%s %s:%d\n", tid(), classname, methodname, file, line);
c99b38
}
c99b38
c99b38
probe ruby.cmethod.return {
c99b38
  printf("%d <- %s::%s %s:%d\n", tid(), classname, methodname, file, line);
c99b38
}
c99b38
c99b38
probe ruby.method.entry {
c99b38
  printf("%d -> %s::%s %s:%d\n", tid(), classname, methodname, file, line);
c99b38
}
c99b38
c99b38
probe ruby.method.return {
c99b38
  printf("%d <- %s::%s %s:%d\n", tid(), classname, methodname, file, line);
c99b38
}
c99b38
c99b38
probe ruby.gc.mark.begin { printf("%d gc.mark.begin\n", tid()); }
c99b38
c99b38
probe ruby.gc.mark.end { printf("%d gc.mark.end\n", tid()); }
c99b38
c99b38
probe ruby.gc.sweep.begin { printf("%d gc.sweep.begin\n", tid()); }
c99b38
c99b38
probe ruby.gc.sweep.end { printf("%d gc.sweep.end\n", tid()); }
c99b38
c99b38
probe ruby.object.create{
c99b38
  printf("%d obj.create %s %s:%d\n", tid(), classname, file, line);
c99b38
}
c99b38
c99b38
probe ruby.raise {
c99b38
  printf("%d raise %s %s:%d\n", tid(), classname, file, line);
c99b38
}