From e8138b2041526a53dd2d7116552fc138c800a99b Mon Sep 17 00:00:00 2001 From: Lourens Naude Date: Sun, 3 May 2009 21:21:15 +0100 Subject: [PATCH] Major overhaul: MRI C AST -> YAML function defs -> probes --- bin/parse | 7 + config/18/files.yml | 20 + config/18/ignores.yml | 16 + config/18/include/Aliases.h | 0 config/18/include/CodeFragments.h | 0 config/18/include/TextUtils.h | 0 config/18/include/_structs.h | 0 config/18/include/_types.h | 0 config/18/include/alloca.h | 0 config/18/include/ar.h | 0 config/18/include/available.h | 0 config/18/include/crt_externs.h | 0 config/18/include/ctype.h | 0 config/18/include/direct.h | 0 config/18/include/dirent.h | 0 config/18/include/dlfnc.h | 0 config/18/include/errno.h | 0 config/18/include/fcntl.h | 0 config/18/include/grp.h | 0 config/18/include/intrinsics.h | 0 config/18/include/limits.h | 0 config/18/include/link.h | 0 config/18/include/macho-o/dyld.h | 0 config/18/include/macruby_private.h | 0 config/18/include/math.h | 0 config/18/include/ndir.h | 0 config/18/include/net/socket.h | 0 config/18/include/nlist.h | 0 config/18/include/process.h | 0 config/18/include/pwd.h | 0 config/18/include/ruby.h | 0 config/18/include/ruby/config.h | 0 config/18/include/ruby/defines.h | 0 config/18/include/ruby/dln.h | 0 config/18/include/ruby/env.h | 0 config/18/include/ruby/intern.h | 0 config/18/include/ruby/missing.h | 0 config/18/include/ruby/node.h | 0 config/18/include/ruby/re.h | 0 config/18/include/ruby/regex.h | 0 config/18/include/ruby/ruby.h | 0 config/18/include/ruby/rubyio.h | 0 config/18/include/ruby/rubysig.h | 0 config/18/include/ruby/st.h | 0 config/18/include/ruby/util.h | 0 config/18/include/setjmp.h | 0 config/18/include/signal.h | 0 config/18/include/st.h | 0 config/18/include/stdarg.h | 0 config/18/include/stddef.h | 0 config/18/include/stdio.h | 0 config/18/include/stdlib.h | 0 config/18/include/string.h | 0 config/18/include/strings.h | 0 config/18/include/sys/_select.h | 0 config/18/include/sys/_structs.h | 0 config/18/include/sys/_types.h | 0 config/18/include/sys/cdefs.h | 0 config/18/include/sys/cygwin.h | 0 config/18/include/sys/dir.h | 0 config/18/include/sys/file.h | 0 config/18/include/sys/ioctl.h | 0 config/18/include/sys/mkdev.h | 0 config/18/include/sys/ndir.h | 0 config/18/include/sys/param.h | 0 config/18/include/sys/resource.h | 0 config/18/include/sys/select.h | 0 config/18/include/sys/stat.h | 0 config/18/include/sys/syscall.h | 0 config/18/include/sys/systemcfg.h | 0 config/18/include/sys/time.h | 0 config/18/include/sys/times.h | 0 config/18/include/sys/types.h | 0 config/18/include/sys/utime.h | 0 config/18/include/sys/wait.h | 0 config/18/include/syscall.h | 0 config/18/include/time.h | 0 config/18/include/unistd.h | 0 config/18/include/unix.h | 0 config/18/include/util.h | 0 config/18/include/utime.h | 0 config/18/include/varargs.h | 0 config/18/macros.yml | 1 + config/18/types.yml | 142 ++ lib/instrumentation.rb | 10 +- lib/mri/instrumentation/argument.rb | 88 +- lib/mri/instrumentation/definition.rb | 19 +- .../extensions/parser/function_def.rb | 32 + lib/mri/instrumentation/parser.rb | 197 +++ lib/mri/instrumentation/probe.rb | 54 +- lib/mri/instrumentation/probe_collection.rb | 8 +- lib/mri/instrumentation/strategy/base.rb | 5 +- lib/mri/instrumentation/strategy/calls.rb | 7 +- lib/mri/instrumentation/strategy/calltime.rb | 7 +- lib/mri/instrumentation/strategy/flow.rb | 15 +- lib/mri/instrumentation/strategy/peek.rb | 2 +- lib/mri/instrumentation/strategy/speculate.rb | 2 +- lib/mri/instrumentation/strategy/stack.rb | 41 + probes/18/array.yml | 745 ++++++++++ probes/18/bignum.yml | 478 +++++++ probes/18/block.yml | 20 - probes/18/cache.yml | 10 - probes/18/compar.yml | 77 ++ probes/18/dir.yml | 366 +++++ probes/18/file.yml | 937 +++++++++++++ probes/18/gc.yml | 38 - probes/18/io.yml | 1212 +++++++++++++++++ probes/18/lex.yml | 15 + probes/18/math.yml | 171 +++ probes/18/numeric.yml | 755 ++++++++++ probes/18/parse.yml | 7 - probes/18/prec.yml | 40 + probes/18/process.yml | 614 +++++++++ probes/18/random.yml | 84 ++ probes/18/range.yml | 169 +++ probes/18/re.yml | 542 ++++++++ probes/18/require.yml | 14 - probes/18/signal.yml | 147 ++ probes/18/st.yml | 145 ++ probes/18/struct.yml | 288 ++++ probes/18/time.yml | 402 ++++++ probes/18/util.yml | 225 +++ test/fixtures/probes/gc.yml | 25 +- test/helper.rb | 6 +- test/instrumentation/argument_test.rb | 56 +- test/instrumentation/definition_test.rb | 4 +- test/instrumentation/probe_collection_test.rb | 16 +- test/instrumentation/probe_test.rb | 37 +- test/instrumentation/runner/base_test.rb | 2 +- test/instrumentation/strategy/base_test.rb | 4 +- test/instrumentation/strategy/builder_test.rb | 6 +- test/instrumentation/strategy/calls_test.rb | 4 +- .../instrumentation/strategy/calltime_test.rb | 8 +- test/instrumentation/strategy/flow_test.rb | 4 +- .../instrumentation/strategy/interval_test.rb | 4 +- test/instrumentation/strategy/peek_test.rb | 6 +- .../strategy/speculate_test.rb | 4 +- translators/18/env.d | 27 + translators/18/io.d | 37 + translators/18/node.d | 88 ++ translators/18/st.d | 31 + translators/18/types.d | 85 ++ 142 files changed, 8425 insertions(+), 203 deletions(-) create mode 100644 bin/parse create mode 100644 config/18/files.yml create mode 100644 config/18/ignores.yml create mode 100644 config/18/include/Aliases.h create mode 100644 config/18/include/CodeFragments.h create mode 100644 config/18/include/TextUtils.h create mode 100644 config/18/include/_structs.h create mode 100644 config/18/include/_types.h create mode 100644 config/18/include/alloca.h create mode 100644 config/18/include/ar.h create mode 100644 config/18/include/available.h create mode 100644 config/18/include/crt_externs.h create mode 100644 config/18/include/ctype.h create mode 100644 config/18/include/direct.h create mode 100644 config/18/include/dirent.h create mode 100644 config/18/include/dlfnc.h create mode 100644 config/18/include/errno.h create mode 100644 config/18/include/fcntl.h create mode 100644 config/18/include/grp.h create mode 100644 config/18/include/intrinsics.h create mode 100644 config/18/include/limits.h create mode 100644 config/18/include/link.h create mode 100644 config/18/include/macho-o/dyld.h create mode 100644 config/18/include/macruby_private.h create mode 100644 config/18/include/math.h create mode 100644 config/18/include/ndir.h create mode 100644 config/18/include/net/socket.h create mode 100644 config/18/include/nlist.h create mode 100644 config/18/include/process.h create mode 100644 config/18/include/pwd.h create mode 100644 config/18/include/ruby.h create mode 100644 config/18/include/ruby/config.h create mode 100644 config/18/include/ruby/defines.h create mode 100644 config/18/include/ruby/dln.h create mode 100644 config/18/include/ruby/env.h create mode 100644 config/18/include/ruby/intern.h create mode 100644 config/18/include/ruby/missing.h create mode 100644 config/18/include/ruby/node.h create mode 100644 config/18/include/ruby/re.h create mode 100644 config/18/include/ruby/regex.h create mode 100644 config/18/include/ruby/ruby.h create mode 100644 config/18/include/ruby/rubyio.h create mode 100644 config/18/include/ruby/rubysig.h create mode 100644 config/18/include/ruby/st.h create mode 100644 config/18/include/ruby/util.h create mode 100644 config/18/include/setjmp.h create mode 100644 config/18/include/signal.h create mode 100644 config/18/include/st.h create mode 100644 config/18/include/stdarg.h create mode 100644 config/18/include/stddef.h create mode 100644 config/18/include/stdio.h create mode 100644 config/18/include/stdlib.h create mode 100644 config/18/include/string.h create mode 100644 config/18/include/strings.h create mode 100644 config/18/include/sys/_select.h create mode 100644 config/18/include/sys/_structs.h create mode 100644 config/18/include/sys/_types.h create mode 100644 config/18/include/sys/cdefs.h create mode 100644 config/18/include/sys/cygwin.h create mode 100644 config/18/include/sys/dir.h create mode 100644 config/18/include/sys/file.h create mode 100644 config/18/include/sys/ioctl.h create mode 100644 config/18/include/sys/mkdev.h create mode 100644 config/18/include/sys/ndir.h create mode 100644 config/18/include/sys/param.h create mode 100644 config/18/include/sys/resource.h create mode 100644 config/18/include/sys/select.h create mode 100644 config/18/include/sys/stat.h create mode 100644 config/18/include/sys/syscall.h create mode 100644 config/18/include/sys/systemcfg.h create mode 100644 config/18/include/sys/time.h create mode 100644 config/18/include/sys/times.h create mode 100644 config/18/include/sys/types.h create mode 100644 config/18/include/sys/utime.h create mode 100644 config/18/include/sys/wait.h create mode 100644 config/18/include/syscall.h create mode 100644 config/18/include/time.h create mode 100644 config/18/include/unistd.h create mode 100644 config/18/include/unix.h create mode 100644 config/18/include/util.h create mode 100644 config/18/include/utime.h create mode 100644 config/18/include/varargs.h create mode 100644 config/18/macros.yml create mode 100644 config/18/types.yml create mode 100644 lib/mri/instrumentation/extensions/parser/function_def.rb create mode 100644 lib/mri/instrumentation/parser.rb create mode 100644 lib/mri/instrumentation/strategy/stack.rb create mode 100644 probes/18/array.yml create mode 100644 probes/18/bignum.yml delete mode 100644 probes/18/block.yml delete mode 100644 probes/18/cache.yml create mode 100644 probes/18/compar.yml create mode 100644 probes/18/dir.yml create mode 100644 probes/18/file.yml delete mode 100644 probes/18/gc.yml create mode 100644 probes/18/io.yml create mode 100644 probes/18/lex.yml create mode 100644 probes/18/math.yml create mode 100644 probes/18/numeric.yml delete mode 100644 probes/18/parse.yml create mode 100644 probes/18/prec.yml create mode 100644 probes/18/process.yml create mode 100644 probes/18/random.yml create mode 100644 probes/18/range.yml create mode 100644 probes/18/re.yml delete mode 100644 probes/18/require.yml create mode 100644 probes/18/signal.yml create mode 100644 probes/18/st.yml create mode 100644 probes/18/struct.yml create mode 100644 probes/18/time.yml create mode 100644 probes/18/util.yml create mode 100644 translators/18/env.d create mode 100644 translators/18/io.d create mode 100644 translators/18/node.d create mode 100644 translators/18/st.d create mode 100644 translators/18/types.d diff --git a/bin/parse b/bin/parse new file mode 100644 index 0000000..a51c9e4 --- /dev/null +++ b/bin/parse @@ -0,0 +1,7 @@ +#!/usr/bin/env ruby + +$LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib' + +require 'instrumentation' + +Mri::Instrumentation::Parser.probes!( ARGV.first || '/Users/lourens/projects/matzruby' ) \ No newline at end of file diff --git a/config/18/files.yml b/config/18/files.yml new file mode 100644 index 0000000..03f0c6a --- /dev/null +++ b/config/18/files.yml @@ -0,0 +1,20 @@ +--- +- 'array.c' +- 'io.c' +- 'st.c' +- 'lex.c' +- 'util.c' +- 'process.c' +- 're.c' +- 'time.c' +- 'compar.c' +- 'random.c' +- 'bignum.c' +- 'dir.c' +- 'prec.c' +- 'struct.c' +- 'math.c' +- 'range.c' +- 'file.c' +- 'numeric.c' +- 'signal.c' \ No newline at end of file diff --git a/config/18/ignores.yml b/config/18/ignores.yml new file mode 100644 index 0000000..5671ecf --- /dev/null +++ b/config/18/ignores.yml @@ -0,0 +1,16 @@ +--- +- rb_class_of +- rb_type +- rb_special_const_p +- memfill +- rb_ary_modify_check +- rb_ary_elt +- bigfixize +- bracket +- do_stat +- do_opendir +- has_magic +- find_dirsep +- remove_backslashes +- glob_make_pattern +- rb_glob2 \ No newline at end of file diff --git a/config/18/include/Aliases.h b/config/18/include/Aliases.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/CodeFragments.h b/config/18/include/CodeFragments.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/TextUtils.h b/config/18/include/TextUtils.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/_structs.h b/config/18/include/_structs.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/_types.h b/config/18/include/_types.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/alloca.h b/config/18/include/alloca.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ar.h b/config/18/include/ar.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/available.h b/config/18/include/available.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/crt_externs.h b/config/18/include/crt_externs.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ctype.h b/config/18/include/ctype.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/direct.h b/config/18/include/direct.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/dirent.h b/config/18/include/dirent.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/dlfnc.h b/config/18/include/dlfnc.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/errno.h b/config/18/include/errno.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/fcntl.h b/config/18/include/fcntl.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/grp.h b/config/18/include/grp.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/intrinsics.h b/config/18/include/intrinsics.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/limits.h b/config/18/include/limits.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/link.h b/config/18/include/link.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/macho-o/dyld.h b/config/18/include/macho-o/dyld.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/macruby_private.h b/config/18/include/macruby_private.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/math.h b/config/18/include/math.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ndir.h b/config/18/include/ndir.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/net/socket.h b/config/18/include/net/socket.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/nlist.h b/config/18/include/nlist.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/process.h b/config/18/include/process.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/pwd.h b/config/18/include/pwd.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby.h b/config/18/include/ruby.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/config.h b/config/18/include/ruby/config.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/defines.h b/config/18/include/ruby/defines.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/dln.h b/config/18/include/ruby/dln.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/env.h b/config/18/include/ruby/env.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/intern.h b/config/18/include/ruby/intern.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/missing.h b/config/18/include/ruby/missing.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/node.h b/config/18/include/ruby/node.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/re.h b/config/18/include/ruby/re.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/regex.h b/config/18/include/ruby/regex.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/ruby.h b/config/18/include/ruby/ruby.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/rubyio.h b/config/18/include/ruby/rubyio.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/rubysig.h b/config/18/include/ruby/rubysig.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/st.h b/config/18/include/ruby/st.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/ruby/util.h b/config/18/include/ruby/util.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/setjmp.h b/config/18/include/setjmp.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/signal.h b/config/18/include/signal.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/st.h b/config/18/include/st.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/stdarg.h b/config/18/include/stdarg.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/stddef.h b/config/18/include/stddef.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/stdio.h b/config/18/include/stdio.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/stdlib.h b/config/18/include/stdlib.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/string.h b/config/18/include/string.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/strings.h b/config/18/include/strings.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/_select.h b/config/18/include/sys/_select.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/_structs.h b/config/18/include/sys/_structs.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/_types.h b/config/18/include/sys/_types.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/cdefs.h b/config/18/include/sys/cdefs.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/cygwin.h b/config/18/include/sys/cygwin.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/dir.h b/config/18/include/sys/dir.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/file.h b/config/18/include/sys/file.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/ioctl.h b/config/18/include/sys/ioctl.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/mkdev.h b/config/18/include/sys/mkdev.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/ndir.h b/config/18/include/sys/ndir.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/param.h b/config/18/include/sys/param.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/resource.h b/config/18/include/sys/resource.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/select.h b/config/18/include/sys/select.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/stat.h b/config/18/include/sys/stat.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/syscall.h b/config/18/include/sys/syscall.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/systemcfg.h b/config/18/include/sys/systemcfg.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/time.h b/config/18/include/sys/time.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/times.h b/config/18/include/sys/times.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/types.h b/config/18/include/sys/types.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/utime.h b/config/18/include/sys/utime.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/sys/wait.h b/config/18/include/sys/wait.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/syscall.h b/config/18/include/syscall.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/time.h b/config/18/include/time.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/unistd.h b/config/18/include/unistd.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/unix.h b/config/18/include/unix.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/util.h b/config/18/include/util.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/utime.h b/config/18/include/utime.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/include/varargs.h b/config/18/include/varargs.h new file mode 100644 index 0000000..e69de29 diff --git a/config/18/macros.yml b/config/18/macros.yml new file mode 100644 index 0000000..8d59faa --- /dev/null +++ b/config/18/macros.yml @@ -0,0 +1 @@ +--- {} \ No newline at end of file diff --git a/config/18/types.yml b/config/18/types.yml new file mode 100644 index 0000000..2a3b76e --- /dev/null +++ b/config/18/types.yml @@ -0,0 +1,142 @@ +--- +- 'FILE64' +- 'fd_set' +- 'st_table_entry' +- 'rb_atomic_t' +- 'pointer' +- 'hdr' +- 'C_block' +- 'sFILE' +- 'stack_node' +- 'U' +- 'Bigint' +- 'unsigned_time_t' +- 'VALUE' +- 'ID' +- 'RUBY_DATA_FUNC' +- 'ruby_glob_func' +- 'rb_nativethread_t' +- 'mbc_startpos_func_t' +- 'conftest_type' +- 'Regexp' +- 'pid_t' +- 'sigset_t' +- 'regex_t' +- 're_pattern_buffer' +- 'regoff_t' +- 'regmatch_t' +- 'Real' +- 'uint8_t' +- 'uint32_t' +- 'uint64_t' +- 'rb_digest_hash_init_func_t' +- 'rb_digest_hash_update_funct_t' +- 'rb_digest_hash_finish_funct_t' +- 'MD5_CTX' +- 'RMD160_CTX' +- 'CHAR64LONG16' +- 'SHA1_CTX' +- 'sha2_byte' +- 'sha2_word32' +- 'sha2_word64' +- 'SHA256_CTX' +- 'SHA512_CTX' +- 'SHA384_CTX' +- 's_voidp' +- 's_short' +- 's_int' +- 's_long' +- 's_float' +- 's_double' +- 'freefunc_t' +- 'ANY_TYPE' +- 'callback1_t' +- 'nkf_char' +- 'bfk_nfchar' +- 'conftest_type' +- 'd2i_of_void' +- 'ossl_asn1_info_t' +- 'DBM' +- 'FILE' +- 'datum' +- 'YYSTYPE' +- 'yysigned_char' +- 'bytestring_t' +- 'SyckNode' +- 'SyckParser' +- 'SyckIoFile' +- 'SyckIoStr' +- 'SyckLevel' +- 'SyckNodeHandler' +- 'SyckErrorHandler' +- 'SyckBadAnchorHandler' +- 'SyckIoFileRead' +- 'SyckIoStrRead' +- 'SyckEmitter' +- 'SyckEmitterNode' +- 'SyckOutputHandler' +- 'SyckEmitterHandler' +- 'bytestring_t' +- 'yamlbyte_utf8_t' +- 'yamlbyte_utf16_t' +- 'yamlbyte_char_t' +- 'yamlbyte_consumer_t' +- 'yamlbyte_producer_t' +- 'yamlbyte_result_t' +- 'yamlbyte_buff_t' +- 'yamlbyte_inst_t' +- 'yamlbyte_pull_t' +- 'yamlbyte_pushbuff_t' +- 'yamlbyte_pullbuff_t' +- 'Entry' +- 'List' +- 'Mutexv' +- 'ConditionVariable' +- 'legacy_wait_args' +- 'Queue' +- 'DL_HANDLE' +- 'CallFrame' +- 'DummyInterp' +- 'time_t' +- '_fsize_t' +- 'intptr_t' +- 'SIGHANDLER' +- 'sighandler_t' +- 'dev_t' +- 'ino_t' +- 'mode_t' +- 'clock_t' +- 'ptrdiff_t' +- 'off_t' +- 'u_char' +- 'u_short' +- 'caddr_t' +- 'transitionTime' +- 'va_list' +- 'mbc_startpos_func_t' +- 'DIR' +- 'sighandler_t' +- 'NODE' +- 'rb_event_t' +- 'rb_event_hook_func_t' +- 'rb_jmpbuf_t' +- 'rb_thread_t' +- 'event_hook' +- 'foobazzz' +- 'DWORD' +- 'size_t' +- 'USTR' +- 'RVALUE' +- '__uint16_t' +- '__int32_t' +- '__uint32_t' +- 'uid_t' +- 'gid_t' +- 'blkcnt_t' +- 'blksize_t' +- '__int64_t' +- 'nlink_t' +- 'stack_type' +- 'st_data_t' +- 'st_table' +- 'BDIGITv \ No newline at end of file diff --git a/lib/instrumentation.rb b/lib/instrumentation.rb index 6404a14..9d94c35 100644 --- a/lib/instrumentation.rb +++ b/lib/instrumentation.rb @@ -9,12 +9,19 @@ module Instrumentation MRI_VERSION = RUBY_VERSION.gsub('.','')[0..1] - PROBES = File.join( File.dirname( __FILE__ ), '..', 'probes', MRI_VERSION ).freeze + DIRECTORY = File.expand_path( File.join( File.dirname( __FILE__ ), '..' ) ) + + PROBES = File.join( DIRECTORY, 'probes', MRI_VERSION ).freeze + + CONFIG = File.join( DIRECTORY, 'config', MRI_VERSION ).freeze + + EXTENSIONS = File.join( DIRECTORY, 'lib', 'mri', 'instrumentation', 'extensions' ).freeze autoload :Definition, 'mri/instrumentation/definition' autoload :Probe, 'mri/instrumentation/probe' autoload :Argument, 'mri/instrumentation/argument' autoload :ProbeCollection, 'mri/instrumentation/probe_collection' + autoload :Parser, 'mri/instrumentation/parser' module Strategy @@ -26,6 +33,7 @@ module Strategy autoload :Calls, 'mri/instrumentation/strategy/calls' autoload :Speculate, 'mri/instrumentation/strategy/speculate' autoload :Peek, 'mri/instrumentation/strategy/peek' + autoload :Stack, 'mri/instrumentation/strategy/stack' end diff --git a/lib/mri/instrumentation/argument.rb b/lib/mri/instrumentation/argument.rb index 196aa6c..a566b79 100644 --- a/lib/mri/instrumentation/argument.rb +++ b/lib/mri/instrumentation/argument.rb @@ -2,6 +2,9 @@ module Mri module Instrumentation class Argument < Struct.new(:type, :description, :order) + class TypeNotDefined < StandardError + end + class << self # Yields the default probe argument @@ -16,22 +19,76 @@ def probe # and integers. # - TYPES = { :char => ['copyinstr( %s )', '%s'], - :pointer => ['%s', '%#p'], - :int => ['stringof( %s )', '%s'], - :probe => ['%s', '%s'] } + TYPES = { 'VALUE' => ['%s', 'stringof(%d)'], + 'VALUE *' => ['%s', '%s'], + 'long int' => ['%s', 'stringof(%d)'], + 'void' => ['%s', '%s'], + 'int' => ['%s', 'stringof(%d)'], + 'struct inspect_arg *' => ['%s', '%s'], + 'VALUE (*)()' => ['%s', '%s'], + 'struct ary_sort_data *' => ['%s', '%s'], + 'VALUE (*)(VALUE, long int)' => ['%s', '%s'], + 'void *' => ['%s', '%s'], + 'struct st_hash_type *' => ['%s', '%s'], + 'st_table' => ['%s', '%s'], + 'st_table *' => ['%s', '%s'], + 'st_data_t' => ['%s', '%s'], + 'st_data_t *' => ['%s', '%s'], + 'int (*)()' => ['%s', 'stringof(%d)'], + 'const char *' => ['%s', '%s'], + 'unsigned long int' => ['%s', 'stringof(%d)'], + 'char *' => ['%s', '%s'], + 'unsigned long long int' => ['%s', 'stringof(%d)'], + 'long long int' => ['%s', 'stringof(%d)'], + 'double' => ['%s', 'stringof(%d)'], + 'double *' => ['%s', 'stringof(%d)'], + 'const char **' => ['%s', '%s'], + 'struct dir_data *' => ['%s', '%s'], + 'struct chdir_data *' => ['%s', '%s'], + 'struct stat *' => ['%s', '%s'], + 'DIR *' => ['%s', '%s'], + 'struct glob_pattern *' => ['%s', '%s'], + 'enum answer' => ['%s', '%s'], + 'ruby_glob_func *' => ['%s', '%s'], + 'void (*)(const char *, VALUE)' => ['%s', '%s'], + 'gid_t' => ['%s', '%s'], + 'OpenFile *' => ['%s', '%s'], + 'FILE *' => ['%s', '%s'], + 'ID' => ['%s', 'stringof(%d)'], + 'struct foreach_arg *' => ['%s', '%s'], + 'struct kwtable *' => ['%s', '%s'], + :probe => ['%s', '%s'] + } + + # Hash representation + # + def to_hash + { self.type => self.description } + end + + # YAML representation + # + def to_yaml( opts = {} ) + to_hash.to_yaml + end + + # Type lookup accessor + # + def lookup + TYPES[self.type] || raise( TypeNotDefined, "type not defined #{self.type.inspect}" ) + end # Format helper for D's printf # def to_format - @format ||= TYPES[self.type.to_sym].last + @format ||= lookup.last end # Massage into a format D can easily work with. # Standardized on everything being a string, for the time being. # def massage - @massage ||= TYPES[self.type.to_sym].first % to_arg + @massage ||= lookup.first % to_var( '_copy' ) end # String representation as description @@ -42,14 +99,21 @@ def to_s # Function variable # - def to_var - @to_var ||= probe? ? "this->type" : "this->#{to_arg}" + def to_var( suffix = '' ) + @to_var ||= {} + @to_var[suffix] ||= probe? ? "self->type#{suffix}" : "self->#{to_arg}#{suffix}" end # Function variable assignment # def to_assignment - @to_assignment ||= "#{to_var} = #{massage};" + @to_assignment ||= default_assignment #init_assignment + end + + # Copy argument to a thread local ( pointers ) + # + def to_copy + @to_copy ||= "#{to_var( '_copy' )} = #{to_arg};" end # Argument representation. @@ -64,6 +128,12 @@ def probe? self.order == -1 end + private + + def default_assignment + "#{to_var} = #{massage};" + end + end end end \ No newline at end of file diff --git a/lib/mri/instrumentation/definition.rb b/lib/mri/instrumentation/definition.rb index af58d05..8714fec 100644 --- a/lib/mri/instrumentation/definition.rb +++ b/lib/mri/instrumentation/definition.rb @@ -33,12 +33,15 @@ def setup_group # Setup all probes # def setup_probes - read.each_pair do |probe, definition| - @probes << setup_probe( probe, - safe_definition( definition, "desc" ), - safe_definition( definition, "args" ), - safe_definition( definition, "return" ) ) - end + read.each do |probe| + probe.each_pair do |probe, definition| + @probes << setup_probe( probe, + safe_definition( definition, "desc" ), + safe_definition( definition, "arguments" ), + safe_definition( definition, "return" ), + safe_definition( definition, "storage" ) ) + end + end end # Don't assume all argument and return definitions is given @@ -49,8 +52,8 @@ def safe_definition( definition, key ) # Setup a single probe # - def setup_probe( probe, description, arguments, returns ) - Mri::Instrumentation::Probe.new( group, probe, description, setup_arguments( arguments ), returns ) + def setup_probe( probe, description, arguments, returns, storage ) + Mri::Instrumentation::Probe.new( group, probe, description, setup_arguments( arguments ), returns, storage ) end # Setup arguments for a single probe diff --git a/lib/mri/instrumentation/extensions/parser/function_def.rb b/lib/mri/instrumentation/extensions/parser/function_def.rb new file mode 100644 index 0000000..0ec9cb3 --- /dev/null +++ b/lib/mri/instrumentation/extensions/parser/function_def.rb @@ -0,0 +1,32 @@ +::C::FunctionDef.class_eval do + + # Yields a Intrumentation::Probe instance + # + def to_probe( group ) + Mri::Instrumentation::Probe.new( group, + name, + name, + to_probe_arguments, + type.type.to_s, + storage.to_s ) + end + + private + + # All params for this function definition + # + def probe_params + @probe_params ||= type.params || [] + end + + # Generate Instrumentation::Argument instances + # + def to_probe_arguments + probe_params.map do |param| + Mri::Instrumentation::Argument.new( param.type.to_s, + param.name.to_s, + probe_params.index(param) ) + end + end + +end \ No newline at end of file diff --git a/lib/mri/instrumentation/parser.rb b/lib/mri/instrumentation/parser.rb new file mode 100644 index 0000000..52a2f3e --- /dev/null +++ b/lib/mri/instrumentation/parser.rb @@ -0,0 +1,197 @@ +require 'rubygems' +require 'cast' + +module Mri + module Instrumentation + class Parser < C::Parser + + INCLUDE_PATH = File.expand_path(File.join( CONFIG, 'include' )) + + class << self + + def config( file ) + YAML.load( IO.read( File.join( CONFIG, file ) ) ) + end + + def include_path( path ) + File.join( INCLUDE_PATH, path ) + end + + def extensions! + %w(function_def).each do |ext| + require File.join( EXTENSIONS, 'parser', ext ) + end + end + + def probes!( mri_source ) + FILES.each do |file| + Mri::Instrumentation::Parser.new( File.join( mri_source, file ) ).probes! + end + end + + end + + INCLUDE_PATHS = [ INCLUDE_PATH, + include_path( 'sys' ), + include_path( 'net' ), + include_path( 'ruby' ) ] + + TYPES = config( 'types.yml' ) + + MACROS = config( 'macros.yml' ) + + FILES = config( 'files.yml' ) + + IGNORES = config( 'ignores.yml' ) + + attr_accessor :preprocessor, + :source_file, + :source_buffer, + :tree + + def initialize( source_file ) + @source_file = source_file + super() + setup_preprocessor + @source_buffer = [] + @source = '' + configure + end + + # Have we parsed the source file already? + # + def parsed? + @source != '' + end + + # Parse the source file to an AST tree + # + def parse( *args ) + with_safety do + pos.filename = source_file + @tree = super( read ) + end unless parsed? + end + + # Extract all function definitions of interest + # + def probes + parse + @probes ||= setup_probes + end + + # Persist function definitions to probes//.yml + # + def probes! + File.open( result, 'w+' ) do |file| + file << probes.to_yaml + end + end + + # The raw and preprocessed source file + # + def read + @read ||= read_lines( preprocess ) + end + + # Source filename to probe group + # + def group + @group ||= source_file.split( '/' ).last.gsub(/\.c|\.y/, '') + end + + # Output definition + # + def result + @result ||= File.join( PROBES, "#{group}.yml" ) + end + + # Should we ignore the given function definition ? + # + def ignore?( function_def ) + IGNORES.include?( function_def.name.to_s ) + end + + private + + # Convert all interesting functions to probe definitions + # + def setup_probes + funcs = Mri::Instrumentation::ProbeCollection.new + each_function do |func| + funcs << func.to_probe( group ) unless ignore?( func ) + end + funcs + end + + # Yields each function definition node + # + def each_function + tree.entities.each do |node| + if node.is_a? C::FunctionDef + yield node + end + end + end + + # Parse with safety + # + def with_safety + begin + yield + rescue C::ParseError => exception + puts exception.message + puts exception.backtrace.join("\n") + inspect_source + end + end + + # Inspect the preprocessed source with Textmate + # + def inspect_source + Tempfile.open( 'mri_parser' ) do |file| + file << @source + file.flush + %x[mate #{file.path}] + sleep 1 # Allow for potential startup + end + end + + # Preprocess with gcc -E + # + def preprocess + @preprocessor.preprocess_file( @source_file ) + end + + # Filter source lines + # + def read_lines( io ) + io.each do |line| + unless line.match(/#|typedef unsigned long|typedef void|typedef struct rb_thread|typedef int|__attribute__|__inline/) + @source_buffer << line + end + end + @source = @source_buffer.join + end + + # Configure this parser + # + def configure + TYPES.each do |type| + type_names << type + end + self.class.extensions! + end + + # Setup the preprocessor + # + def setup_preprocessor + @preprocessor = C::Preprocessor.new + C::Preprocessor.command = "gcc -E" + @preprocessor.include_path = INCLUDE_PATHS + @preprocessor.macros = MACROS + end + + end + end +end \ No newline at end of file diff --git a/lib/mri/instrumentation/probe.rb b/lib/mri/instrumentation/probe.rb index 0fc06b7..fe03af5 100644 --- a/lib/mri/instrumentation/probe.rb +++ b/lib/mri/instrumentation/probe.rb @@ -1,6 +1,22 @@ module Mri module Instrumentation - class Probe < Struct.new( :group, :name, :probe_description, :arguments, :return ) + class Probe < Struct.new( :group, :name, :probe_description, :arguments, :return, :storage ) + + # Hash representation + # + def to_hash + { self.name => { 'desc' => self.name.to_s, + 'arguments' => self.arguments.map{|a| a.to_hash }, + 'return' => self.return, + 'storage' => self.storage } + } + end + + # YAML representation + # + def to_yaml( opts = {} ) + to_hash.to_yaml + end # Format string representation of the probe name # @@ -21,12 +37,6 @@ def to_s( suffix = '' ) "#{self.name}#{suffix}" end - # True if no explicit return type - # - def void? - @void ||= self.return == 'void' - end - # Argument size # def argument_size @@ -50,6 +60,24 @@ def wildcard def function @function ||= "pid$target*:::#{self.name}" end + + # External definition ? + # + def extern? + self.storage == 'extern' + end + + # Static definition ? + # + def static? + self.storage == 'static' + end + + # Should we define a function entry ? + # + def entry? + true + end # Entry declaration # @@ -57,6 +85,12 @@ def function_entry @function_entry ||= with_pid( 'entry' ) end + # Should we define a function return ? + # + def return? + self.return != 'void' + end + # Retrun declaration # def function_return @@ -75,6 +109,12 @@ def arguments_list( padding = 0 ) def assign_arguments iterate_arguments( self.arguments, :to_assignment ) end + + # Copy all arguments + # + def copy_arguments + iterate_arguments( self.arguments, :to_copy ) + end # The argument representing the probe type # diff --git a/lib/mri/instrumentation/probe_collection.rb b/lib/mri/instrumentation/probe_collection.rb index 8bf8f53..159360c 100644 --- a/lib/mri/instrumentation/probe_collection.rb +++ b/lib/mri/instrumentation/probe_collection.rb @@ -2,6 +2,10 @@ module Mri module Instrumentation class ProbeCollection < Array + def to_yaml + self.map{|p| p.to_hash }.to_yaml + end + # Find the largest argument count across all probes # def arguments_size @@ -58,8 +62,8 @@ def result_format # Is all of the returns void ? # - def void? - @void ||= self.all?{|p| p.void? } + def return? + @return ||= self.all?{|p| p.return? } end private diff --git a/lib/mri/instrumentation/strategy/base.rb b/lib/mri/instrumentation/strategy/base.rb index 947594d..fb5b8eb 100644 --- a/lib/mri/instrumentation/strategy/base.rb +++ b/lib/mri/instrumentation/strategy/base.rb @@ -18,6 +18,7 @@ def header( body = '' ) %[ #!/usr/sbin/dtrace -ZFs #pragma D option quiet\n #pragma D option dynvarsize=64m\n + #pragma D option bufsize=16m\n #{body}\n ] end @@ -70,7 +71,7 @@ def build # def functions fncs = [:entry] - fncs << :return unless void? + fncs << :return if @probe.return? fncs end @@ -87,6 +88,8 @@ def method_missing( method, *args, &block ) private + # Shared function template + # def function_template( name, body, predicate_clause = '' ) %[ #{name} #{predicate_clause} diff --git a/lib/mri/instrumentation/strategy/calls.rb b/lib/mri/instrumentation/strategy/calls.rb index 7be45f2..a2298f4 100644 --- a/lib/mri/instrumentation/strategy/calls.rb +++ b/lib/mri/instrumentation/strategy/calls.rb @@ -8,13 +8,18 @@ def setup end def entry + super %[ #{copy_arguments} ] + end + + def return super %[ #{assign_arguments} @calls[#{arguments_list( arguments_size )}] = count(); ] end def report super %[ printf(" #{header_format}\\n", #{report_header}, "CALLS"); - printa(" #{report_format}\\n", @calls); ] + /*printa(" #{report_format}\\n", @calls);*/ + printa(@calls); ] end end diff --git a/lib/mri/instrumentation/strategy/calltime.rb b/lib/mri/instrumentation/strategy/calltime.rb index f0ce5e6..39147a7 100644 --- a/lib/mri/instrumentation/strategy/calltime.rb +++ b/lib/mri/instrumentation/strategy/calltime.rb @@ -10,8 +10,7 @@ def setup def entry super %[ self->depth++; self->exclude[self->depth] = 0; - #{assign_arguments} - @num[#{arguments_list( arguments_size )}] = count(); + #{copy_arguments} self->#{name}[self->depth] = timestamp; ] end @@ -28,7 +27,7 @@ def return #{assign_arguments} @types_incl[#{arguments_list( arguments_size )}] = sum(this->elapsed_incl); @types_excl[#{arguments_list( arguments_size )}] = sum(this->elapsed_excl); - + @num[#{arguments_list( arguments_size )}] = count(); self->depth--; self->exclude[self->depth] += this->elapsed_incl; ] end @@ -43,7 +42,7 @@ def report private def exclusive_and_inclusive - if void? + unless return? '' else %[ normalize(@types_excl, 1000); diff --git a/lib/mri/instrumentation/strategy/flow.rb b/lib/mri/instrumentation/strategy/flow.rb index 86a4af8..3462431 100644 --- a/lib/mri/instrumentation/strategy/flow.rb +++ b/lib/mri/instrumentation/strategy/flow.rb @@ -9,17 +9,22 @@ def header end def setup - super %[ printf("#{probes_collection.format_string( '/s', ' ', :description )}\\n", #{probes_collection.description( '/s', ', ', '"' )});\n ] + super %[ printf("#{probes_collection.format_string( '', ' ', :description )}\\n", #{probes_collection.description( '', ', ', '"' )});\n + self->depth = 0;\n ] end def entry - super %[ printf("%3d %-16d %-22s %*s->\\n", cpu, timestamp / 1000, -probefunc, self->depth * 2, "" );\n ] + super %[ printf("%3d %-16d %*s %-22s ->\\n", cpu, timestamp / 1000, self->depth * 2, "", probefunc );\n + self->depth++; ] end def return - super %[ printf("%3d %-16d %-22s %*s<-\\n", cpu, timestamp / 1000, - probefunc, self->depth * 2, "" );\n ] + super %[ self->depth--; + printf("%3d %-16d %*s %-22s <-\\n", cpu, timestamp / 1000, self->depth * 2, "", probefunc );\n ] + end + + def report + super %[ exit(0); ] end end diff --git a/lib/mri/instrumentation/strategy/peek.rb b/lib/mri/instrumentation/strategy/peek.rb index 2efee36..4b158cd 100644 --- a/lib/mri/instrumentation/strategy/peek.rb +++ b/lib/mri/instrumentation/strategy/peek.rb @@ -33,7 +33,7 @@ def return def functions fncs = [:guarded_entry] - fncs.concat( [:peek, :return] ) unless void? + fncs.concat( [:peek, :return] ) if @probe.return? fncs end diff --git a/lib/mri/instrumentation/strategy/speculate.rb b/lib/mri/instrumentation/strategy/speculate.rb index b39a7b4..193f1fd 100644 --- a/lib/mri/instrumentation/strategy/speculate.rb +++ b/lib/mri/instrumentation/strategy/speculate.rb @@ -44,7 +44,7 @@ def return_failure def functions fncs = [:entry] - fncs.concat( [:return_success, :return_failure] ) unless void? + fncs.concat( [:return_success, :return_failure] ) if @probe.return? fncs end diff --git a/lib/mri/instrumentation/strategy/stack.rb b/lib/mri/instrumentation/strategy/stack.rb new file mode 100644 index 0000000..bca84a7 --- /dev/null +++ b/lib/mri/instrumentation/strategy/stack.rb @@ -0,0 +1,41 @@ +module Mri + module Instrumentation + module Strategy + class Stack < Base + + def predicate_guarded_entry + "" + end + + def guarded_entry + contents = %[ self->stack = 1; + #{copy_arguments} ] + function_template( @probe.function_entry, contents, predicate_guarded_entry ) + end + + def stack + function_template( @probe.wildcard, '', predicate ) + end + + def predicate + "/self->stack/" + end + + def return + super %[ #{assign_arguments} + printf( "#{@probe.format_string}", #{@probe.arguments_list} ); + self->stack = 0; + ustack(); + exit(0); ] + end + + def functions + fncs = [:guarded_entry] + fncs.concat( [:stack, :return] ) if @probe.return? + fncs + end + + end + end + end +end \ No newline at end of file diff --git a/probes/18/array.yml b/probes/18/array.yml new file mode 100644 index 0000000..c2c1c04 --- /dev/null +++ b/probes/18/array.yml @@ -0,0 +1,745 @@ +--- +- rb_mem_clear: + arguments: + - VALUE *: mem + - long int: size + storage: "" + desc: rb_mem_clear + return: void +- rb_ary_modify: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_modify + return: void +- rb_ary_freeze: + arguments: + - VALUE: ary + storage: "" + desc: rb_ary_freeze + return: VALUE +- rb_ary_frozen_p: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_frozen_p + return: VALUE +- ary_alloc: + arguments: + - VALUE: klass + storage: static + desc: ary_alloc + return: VALUE +- ary_new: + arguments: + - VALUE: klass + - long int: len + storage: static + desc: ary_new + return: VALUE +- rb_ary_new2: + arguments: + - long int: len + storage: "" + desc: rb_ary_new2 + return: VALUE +- rb_ary_new: + arguments: [] + + storage: "" + desc: rb_ary_new + return: VALUE +- rb_ary_new3: + arguments: + - long int: n + storage: "" + desc: rb_ary_new3 + return: VALUE +- rb_ary_new4: + arguments: + - long int: n + - const VALUE *: elts + storage: "" + desc: rb_ary_new4 + return: VALUE +- rb_assoc_new: + arguments: + - VALUE: car + - VALUE: cdr + storage: "" + desc: rb_assoc_new + return: VALUE +- to_ary: + arguments: + - VALUE: ary + storage: static + desc: to_ary + return: VALUE +- rb_check_array_type: + arguments: + - VALUE: ary + storage: "" + desc: rb_check_array_type + return: VALUE +- rb_ary_initialize: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_initialize + return: VALUE +- rb_ary_s_create: + arguments: + - int: argc + - VALUE *: argv + - VALUE: klass + storage: static + desc: rb_ary_s_create + return: VALUE +- rb_ary_store: + arguments: + - VALUE: ary + - long int: idx + - VALUE: val + storage: "" + desc: rb_ary_store + return: void +- rb_ary_push: + arguments: + - VALUE: ary + - VALUE: item + storage: "" + desc: rb_ary_push + return: VALUE +- rb_ary_push_m: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_push_m + return: VALUE +- rb_ary_pop: + arguments: + - VALUE: ary + storage: "" + desc: rb_ary_pop + return: VALUE +- ary_make_shared: + arguments: + - VALUE: ary + storage: static + desc: ary_make_shared + return: VALUE +- rb_ary_shift: + arguments: + - VALUE: ary + storage: "" + desc: rb_ary_shift + return: VALUE +- rb_ary_unshift: + arguments: + - VALUE: ary + - VALUE: item + storage: "" + desc: rb_ary_unshift + return: VALUE +- rb_ary_unshift_m: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_unshift_m + return: VALUE +- rb_ary_entry: + arguments: + - VALUE: ary + - long int: offset + storage: "" + desc: rb_ary_entry + return: VALUE +- rb_ary_subseq: + arguments: + - VALUE: ary + - long int: beg + - long int: len + storage: static + desc: rb_ary_subseq + return: VALUE +- rb_ary_aref: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: "" + desc: rb_ary_aref + return: VALUE +- rb_ary_at: + arguments: + - VALUE: ary + - VALUE: pos + storage: static + desc: rb_ary_at + return: VALUE +- rb_ary_first: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_first + return: VALUE +- rb_ary_last: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_last + return: VALUE +- rb_ary_fetch: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_fetch + return: VALUE +- rb_ary_index: + arguments: + - VALUE: ary + - VALUE: val + storage: static + desc: rb_ary_index + return: VALUE +- rb_ary_rindex: + arguments: + - VALUE: ary + - VALUE: val + storage: static + desc: rb_ary_rindex + return: VALUE +- rb_ary_indexes: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_indexes + return: VALUE +- rb_ary_to_ary: + arguments: + - VALUE: obj + storage: "" + desc: rb_ary_to_ary + return: VALUE +- rb_ary_splice: + arguments: + - VALUE: ary + - long int: beg + - long int: len + - VALUE: rpl + storage: static + desc: rb_ary_splice + return: void +- rb_ary_aset: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_aset + return: VALUE +- rb_ary_insert: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_insert + return: VALUE +- rb_ary_each: + arguments: + - VALUE: ary + storage: "" + desc: rb_ary_each + return: VALUE +- rb_ary_each_index: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_each_index + return: VALUE +- rb_ary_reverse_each: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_reverse_each + return: VALUE +- rb_ary_length: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_length + return: VALUE +- rb_ary_empty_p: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_empty_p + return: VALUE +- rb_ary_dup: + arguments: + - VALUE: ary + storage: "" + desc: rb_ary_dup + return: VALUE +- inspect_join: + arguments: + - VALUE: ary + - VALUE *: arg + storage: static + desc: inspect_join + return: VALUE +- rb_ary_join: + arguments: + - VALUE: ary + - VALUE: sep + storage: "" + desc: rb_ary_join + return: VALUE +- rb_ary_join_m: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_join_m + return: VALUE +- rb_ary_to_s: + arguments: + - VALUE: ary + storage: "" + desc: rb_ary_to_s + return: VALUE +- inspect_call: + arguments: + - struct inspect_arg *: arg + storage: static + desc: inspect_call + return: VALUE +- get_inspect_tbl: + arguments: + - int: create + storage: static + desc: get_inspect_tbl + return: VALUE +- inspect_ensure: + arguments: + - VALUE: obj + storage: static + desc: inspect_ensure + return: VALUE +- rb_protect_inspect: + arguments: + - VALUE (*)(): func + - VALUE: obj + - VALUE: arg + storage: "" + desc: rb_protect_inspect + return: VALUE +- rb_inspecting_p: + arguments: + - VALUE: obj + storage: "" + desc: rb_inspecting_p + return: VALUE +- inspect_ary: + arguments: + - VALUE: ary + storage: static + desc: inspect_ary + return: VALUE +- rb_ary_inspect: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_inspect + return: VALUE +- rb_ary_to_a: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_to_a + return: VALUE +- rb_ary_to_ary_m: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_to_ary_m + return: VALUE +- rb_ary_reverse: + arguments: + - VALUE: ary + storage: "" + desc: rb_ary_reverse + return: VALUE +- rb_ary_reverse_bang: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_reverse_bang + return: VALUE +- rb_ary_reverse_m: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_reverse_m + return: VALUE +- ary_sort_check: + arguments: + - struct ary_sort_data *: data + storage: static + desc: ary_sort_check + return: void +- sort_1: + arguments: + - VALUE *: a + - VALUE *: b + - struct ary_sort_data *: data + storage: static + desc: sort_1 + return: int +- sort_2: + arguments: + - VALUE *: ap + - VALUE *: bp + - struct ary_sort_data *: data + storage: static + desc: sort_2 + return: int +- sort_internal: + arguments: + - VALUE: ary + storage: static + desc: sort_internal + return: VALUE +- sort_unlock: + arguments: + - VALUE: ary + storage: static + desc: sort_unlock + return: VALUE +- rb_ary_sort_bang: + arguments: + - VALUE: ary + storage: "" + desc: rb_ary_sort_bang + return: VALUE +- rb_ary_sort: + arguments: + - VALUE: ary + storage: "" + desc: rb_ary_sort + return: VALUE +- rb_ary_collect: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_collect + return: VALUE +- rb_ary_collect_bang: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_collect_bang + return: VALUE +- rb_values_at: + arguments: + - VALUE: obj + - long int: olen + - int: argc + - VALUE *: argv + - VALUE (*)(VALUE, long int): func + storage: "" + desc: rb_values_at + return: VALUE +- rb_ary_values_at: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_values_at + return: VALUE +- rb_ary_select: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_select + return: VALUE +- rb_ary_delete: + arguments: + - VALUE: ary + - VALUE: item + storage: "" + desc: rb_ary_delete + return: VALUE +- rb_ary_delete_at: + arguments: + - VALUE: ary + - long int: pos + storage: "" + desc: rb_ary_delete_at + return: VALUE +- rb_ary_delete_at_m: + arguments: + - VALUE: ary + - VALUE: pos + storage: static + desc: rb_ary_delete_at_m + return: VALUE +- rb_ary_slice_bang: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_slice_bang + return: VALUE +- rb_ary_reject_bang: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_reject_bang + return: VALUE +- rb_ary_reject: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_reject + return: VALUE +- rb_ary_delete_if: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_delete_if + return: VALUE +- rb_ary_zip: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_zip + return: VALUE +- rb_ary_transpose: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_transpose + return: VALUE +- rb_ary_replace: + arguments: + - VALUE: copy + - VALUE: orig + storage: static + desc: rb_ary_replace + return: VALUE +- rb_ary_clear: + arguments: + - VALUE: ary + storage: "" + desc: rb_ary_clear + return: VALUE +- rb_ary_fill: + arguments: + - int: argc + - VALUE *: argv + - VALUE: ary + storage: static + desc: rb_ary_fill + return: VALUE +- rb_ary_plus: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_ary_plus + return: VALUE +- rb_ary_concat: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_ary_concat + return: VALUE +- rb_ary_times: + arguments: + - VALUE: ary + - VALUE: times + storage: static + desc: rb_ary_times + return: VALUE +- rb_ary_assoc: + arguments: + - VALUE: ary + - VALUE: key + storage: "" + desc: rb_ary_assoc + return: VALUE +- rb_ary_rassoc: + arguments: + - VALUE: ary + - VALUE: value + storage: "" + desc: rb_ary_rassoc + return: VALUE +- recursive_equal: + arguments: + - VALUE: ary1 + - VALUE: ary2 + storage: static + desc: recursive_equal + return: VALUE +- rb_ary_equal: + arguments: + - VALUE: ary1 + - VALUE: ary2 + storage: static + desc: rb_ary_equal + return: VALUE +- recursive_eql: + arguments: + - VALUE: ary1 + - VALUE: ary2 + storage: static + desc: recursive_eql + return: VALUE +- rb_ary_eql: + arguments: + - VALUE: ary1 + - VALUE: ary2 + storage: static + desc: rb_ary_eql + return: VALUE +- recursive_hash: + arguments: + - VALUE: ary + storage: static + desc: recursive_hash + return: VALUE +- rb_ary_hash: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_hash + return: VALUE +- rb_ary_includes: + arguments: + - VALUE: ary + - VALUE: item + storage: "" + desc: rb_ary_includes + return: VALUE +- recursive_cmp: + arguments: + - VALUE: ary1 + - VALUE: ary2 + storage: "" + desc: recursive_cmp + return: VALUE +- rb_ary_cmp: + arguments: + - VALUE: ary1 + - VALUE: ary2 + storage: "" + desc: rb_ary_cmp + return: VALUE +- ary_make_hash: + arguments: + - VALUE: ary1 + - VALUE: ary2 + storage: static + desc: ary_make_hash + return: VALUE +- rb_ary_diff: + arguments: + - VALUE: ary1 + - VALUE: ary2 + storage: static + desc: rb_ary_diff + return: VALUE +- rb_ary_and: + arguments: + - VALUE: ary1 + - VALUE: ary2 + storage: static + desc: rb_ary_and + return: VALUE +- rb_ary_or: + arguments: + - VALUE: ary1 + - VALUE: ary2 + storage: static + desc: rb_ary_or + return: VALUE +- rb_ary_uniq_bang: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_uniq_bang + return: VALUE +- rb_ary_uniq: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_uniq + return: VALUE +- rb_ary_compact_bang: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_compact_bang + return: VALUE +- rb_ary_compact: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_compact + return: VALUE +- rb_ary_nitems: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_nitems + return: VALUE +- flatten: + arguments: + - VALUE: ary + - long int: idx + - VALUE: ary2 + - VALUE: memo + storage: static + desc: flatten + return: long int +- rb_ary_flatten_bang: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_flatten_bang + return: VALUE +- rb_ary_flatten: + arguments: + - VALUE: ary + storage: static + desc: rb_ary_flatten + return: VALUE +- Init_Array: + arguments: [] + + storage: "" + desc: Init_Array + return: void diff --git a/probes/18/bignum.yml b/probes/18/bignum.yml new file mode 100644 index 0000000..91b830b --- /dev/null +++ b/probes/18/bignum.yml @@ -0,0 +1,478 @@ +--- +- bigzero_p: + arguments: + - VALUE: x + storage: static + desc: bigzero_p + return: int +- bignew_1: + arguments: + - VALUE: klass + - long int: len + - int: sign + storage: static + desc: bignew_1 + return: VALUE +- rb_big_clone: + arguments: + - VALUE: x + storage: "" + desc: rb_big_clone + return: VALUE +- get2comp: + arguments: + - VALUE: x + storage: static + desc: get2comp + return: void +- rb_big_2comp: + arguments: + - VALUE: x + storage: "" + desc: rb_big_2comp + return: void +- bigtrunc: + arguments: + - VALUE: x + storage: static + desc: bigtrunc + return: VALUE +- bignorm: + arguments: + - VALUE: x + storage: static + desc: bignorm + return: VALUE +- rb_big_norm: + arguments: + - VALUE: x + storage: "" + desc: rb_big_norm + return: VALUE +- rb_uint2big: + arguments: + - unsigned long int: n + storage: "" + desc: rb_uint2big + return: VALUE +- rb_int2big: + arguments: + - long int: n + storage: "" + desc: rb_int2big + return: VALUE +- rb_uint2inum: + arguments: + - unsigned long int: n + storage: "" + desc: rb_uint2inum + return: VALUE +- rb_int2inum: + arguments: + - long int: n + storage: "" + desc: rb_int2inum + return: VALUE +- rb_quad_pack: + arguments: + - char *: buf + - VALUE: val + storage: "" + desc: rb_quad_pack + return: void +- rb_quad_unpack: + arguments: + - const char *: buf + - int: sign + storage: "" + desc: rb_quad_unpack + return: VALUE +- rb_cstr_to_inum: + arguments: + - const char *: str + - int: base + - int: badcheck + storage: "" + desc: rb_cstr_to_inum + return: VALUE +- rb_str_to_inum: + arguments: + - VALUE: str + - int: base + - int: badcheck + storage: "" + desc: rb_str_to_inum + return: VALUE +- rb_ull2big: + arguments: + - unsigned long long int: n + storage: "" + desc: rb_ull2big + return: VALUE +- rb_ll2big: + arguments: + - long long int: n + storage: "" + desc: rb_ll2big + return: VALUE +- rb_ull2inum: + arguments: + - unsigned long long int: n + storage: "" + desc: rb_ull2inum + return: VALUE +- rb_ll2inum: + arguments: + - long long int: n + storage: "" + desc: rb_ll2inum + return: VALUE +- rb_cstr2inum: + arguments: + - const char *: str + - int: base + storage: "" + desc: rb_cstr2inum + return: VALUE +- rb_str2inum: + arguments: + - VALUE: str + - int: base + storage: "" + desc: rb_str2inum + return: VALUE +- rb_big2str0: + arguments: + - VALUE: x + - int: base + - int: trim + storage: "" + desc: rb_big2str0 + return: VALUE +- rb_big2str: + arguments: + - VALUE: x + - int: base + storage: "" + desc: rb_big2str + return: VALUE +- rb_big_to_s: + arguments: + - int: argc + - VALUE *: argv + - VALUE: x + storage: static + desc: rb_big_to_s + return: VALUE +- big2ulong: + arguments: + - VALUE: x + - char *: type + storage: static + desc: big2ulong + return: unsigned long int +- rb_big2ulong_pack: + arguments: + - VALUE: x + storage: "" + desc: rb_big2ulong_pack + return: unsigned long int +- rb_big2ulong: + arguments: + - VALUE: x + storage: "" + desc: rb_big2ulong + return: unsigned long int +- rb_big2long: + arguments: + - VALUE: x + storage: "" + desc: rb_big2long + return: long int +- big2ull: + arguments: + - VALUE: x + - char *: type + storage: static + desc: big2ull + return: unsigned long long int +- rb_big2ull: + arguments: + - VALUE: x + storage: "" + desc: rb_big2ull + return: unsigned long long int +- rb_big2ll: + arguments: + - VALUE: x + storage: "" + desc: rb_big2ll + return: long long int +- dbl2big: + arguments: + - double: d + storage: static + desc: dbl2big + return: VALUE +- rb_dbl2big: + arguments: + - double: d + storage: "" + desc: rb_dbl2big + return: VALUE +- rb_big2dbl: + arguments: + - VALUE: x + storage: "" + desc: rb_big2dbl + return: double +- rb_big_to_f: + arguments: + - VALUE: x + storage: static + desc: rb_big_to_f + return: VALUE +- rb_big_cmp: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_big_cmp + return: VALUE +- rb_big_eq: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_big_eq + return: VALUE +- rb_big_eql: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_big_eql + return: VALUE +- rb_big_uminus: + arguments: + - VALUE: x + storage: static + desc: rb_big_uminus + return: VALUE +- rb_big_neg: + arguments: + - VALUE: x + storage: static + desc: rb_big_neg + return: VALUE +- bigsub: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: bigsub + return: VALUE +- bigadd: + arguments: + - VALUE: x + - VALUE: y + - int: sign + storage: static + desc: bigadd + return: VALUE +- rb_big_plus: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_big_plus + return: VALUE +- rb_big_minus: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_big_minus + return: VALUE +- rb_big_mul0: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_big_mul0 + return: VALUE +- rb_big_mul: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_big_mul + return: VALUE +- bigdivrem: + arguments: + - VALUE: x + - VALUE: y + - VALUE *: divp + - VALUE *: modp + storage: static + desc: bigdivrem + return: void +- bigdivmod: + arguments: + - VALUE: x + - VALUE: y + - VALUE *: divp + - VALUE *: modp + storage: static + desc: bigdivmod + return: void +- rb_big_div: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_big_div + return: VALUE +- rb_big_modulo: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_big_modulo + return: VALUE +- rb_big_remainder: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_big_remainder + return: VALUE +- big_shift: + arguments: + - VALUE: x + - int: n + storage: static + desc: big_shift + return: VALUE +- rb_big_divmod: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_big_divmod + return: VALUE +- rb_big_quo: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_big_quo + return: VALUE +- rb_big_pow: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_big_pow + return: VALUE +- rb_big_and: + arguments: + - VALUE: xx + - VALUE: yy + storage: "" + desc: rb_big_and + return: VALUE +- rb_big_or: + arguments: + - VALUE: xx + - VALUE: yy + storage: "" + desc: rb_big_or + return: VALUE +- rb_big_xor: + arguments: + - VALUE: xx + - VALUE: yy + storage: "" + desc: rb_big_xor + return: VALUE +- check_shiftdown: + arguments: + - VALUE: y + - VALUE: x + storage: static + desc: check_shiftdown + return: VALUE +- rb_big_lshift: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_big_lshift + return: VALUE +- big_lshift: + arguments: + - VALUE: x + - unsigned long int: shift + storage: static + desc: big_lshift + return: VALUE +- rb_big_rshift: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_big_rshift + return: VALUE +- big_rshift: + arguments: + - VALUE: x + - unsigned long int: shift + storage: static + desc: big_rshift + return: VALUE +- rb_big_aref: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_big_aref + return: VALUE +- rb_big_hash: + arguments: + - VALUE: x + storage: static + desc: rb_big_hash + return: VALUE +- rb_big_coerce: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_big_coerce + return: VALUE +- rb_big_abs: + arguments: + - VALUE: x + storage: static + desc: rb_big_abs + return: VALUE +- rb_big_rand: + arguments: + - VALUE: max + - double *: rand_buf + storage: "" + desc: rb_big_rand + return: VALUE +- rb_big_size: + arguments: + - VALUE: big + storage: static + desc: rb_big_size + return: VALUE +- Init_Bignum: + arguments: [] + + storage: "" + desc: Init_Bignum + return: void diff --git a/probes/18/block.yml b/probes/18/block.yml deleted file mode 100644 index 33e19de..0000000 --- a/probes/18/block.yml +++ /dev/null @@ -1,20 +0,0 @@ -rb_block_given_p: - desc: 'Is a block given ?' - return: - - int: 'Boolean' -block_pass: - desc: 'Pass this block' - args: - - char: 'Self' - - char: 'Node' -rb_need_block: - desc: 'Block required' -rb_yield_0: -rb_yield: -yield_under_i: -yield_under: -blk_mark: -blk_free: -blk_copy_prev: -blk_dup: - \ No newline at end of file diff --git a/probes/18/cache.yml b/probes/18/cache.yml deleted file mode 100644 index 17de5e2..0000000 --- a/probes/18/cache.yml +++ /dev/null @@ -1,10 +0,0 @@ -rb_clear_cache: - desc: 'Clear Method Cache' -rb_clear_cache_by_id: - args: - - char: 'Identifier' - desc: 'Clear Method Cache by ID' -rb_clear_cache_by_class: - args: - - char: 'Class' - desc: 'Clear Method Cache by Class' diff --git a/probes/18/compar.yml b/probes/18/compar.yml new file mode 100644 index 0000000..55ed659 --- /dev/null +++ b/probes/18/compar.yml @@ -0,0 +1,77 @@ +--- +- rb_cmpint: + arguments: + - VALUE: val + - VALUE: a + - VALUE: b + storage: "" + desc: rb_cmpint + return: int +- rb_cmperr: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_cmperr + return: void +- cmp_eq: + arguments: + - VALUE *: a + storage: static + desc: cmp_eq + return: VALUE +- cmp_failed: + arguments: [] + + storage: static + desc: cmp_failed + return: VALUE +- cmp_equal: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: cmp_equal + return: VALUE +- cmp_gt: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: cmp_gt + return: VALUE +- cmp_ge: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: cmp_ge + return: VALUE +- cmp_lt: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: cmp_lt + return: VALUE +- cmp_le: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: cmp_le + return: VALUE +- cmp_between: + arguments: + - VALUE: x + - VALUE: min + - VALUE: max + storage: static + desc: cmp_between + return: VALUE +- Init_Comparable: + arguments: [] + + storage: "" + desc: Init_Comparable + return: void diff --git a/probes/18/dir.yml b/probes/18/dir.yml new file mode 100644 index 0000000..eb7ff56 --- /dev/null +++ b/probes/18/dir.yml @@ -0,0 +1,366 @@ +--- +- fnmatch_helper: + arguments: + - const char **: pcur + - const char **: scur + - int: flags + storage: static + desc: fnmatch_helper + return: int +- fnmatch: + arguments: + - const char *: p + - const char *: s + - int: flags + storage: static + desc: fnmatch + return: int +- free_dir: + arguments: + - struct dir_data *: dir + storage: static + desc: free_dir + return: void +- dir_s_alloc: + arguments: + - VALUE: klass + storage: static + desc: dir_s_alloc + return: VALUE +- dir_initialize: + arguments: + - VALUE: dir + - VALUE: dirname + storage: static + desc: dir_initialize + return: VALUE +- dir_s_open: + arguments: + - VALUE: klass + - VALUE: dirname + storage: static + desc: dir_s_open + return: VALUE +- dir_closed: + arguments: [] + + storage: static + desc: dir_closed + return: void +- dir_check: + arguments: + - VALUE: dir + storage: static + desc: dir_check + return: void +- dir_inspect: + arguments: + - VALUE: dir + storage: static + desc: dir_inspect + return: VALUE +- dir_path: + arguments: + - VALUE: dir + storage: static + desc: dir_path + return: VALUE +- dir_read: + arguments: + - VALUE: dir + storage: static + desc: dir_read + return: VALUE +- dir_each: + arguments: + - VALUE: dir + storage: static + desc: dir_each + return: VALUE +- dir_tell: + arguments: + - VALUE: dir + storage: static + desc: dir_tell + return: VALUE +- dir_seek: + arguments: + - VALUE: dir + - VALUE: pos + storage: static + desc: dir_seek + return: VALUE +- dir_set_pos: + arguments: + - VALUE: dir + - VALUE: pos + storage: static + desc: dir_set_pos + return: VALUE +- dir_rewind: + arguments: + - VALUE: dir + storage: static + desc: dir_rewind + return: VALUE +- dir_close: + arguments: + - VALUE: dir + storage: static + desc: dir_close + return: VALUE +- dir_chdir: + arguments: + - VALUE: path + storage: static + desc: dir_chdir + return: void +- chdir_yield: + arguments: + - struct chdir_data *: args + storage: static + desc: chdir_yield + return: VALUE +- chdir_restore: + arguments: + - struct chdir_data *: args + storage: static + desc: chdir_restore + return: VALUE +- dir_s_chdir: + arguments: + - int: argc + - VALUE *: argv + - VALUE: obj + storage: static + desc: dir_s_chdir + return: VALUE +- dir_s_getwd: + arguments: + - VALUE: dir + storage: static + desc: dir_s_getwd + return: VALUE +- check_dirname: + arguments: + - volatile VALUE *: dir + storage: static + desc: check_dirname + return: void +- dir_s_chroot: + arguments: + - VALUE: dir + - VALUE: path + storage: static + desc: dir_s_chroot + return: VALUE +- dir_s_mkdir: + arguments: + - int: argc + - VALUE *: argv + - VALUE: obj + storage: static + desc: dir_s_mkdir + return: VALUE +- dir_s_rmdir: + arguments: + - VALUE: obj + - VALUE: dir + storage: static + desc: dir_s_rmdir + return: VALUE +- sys_warning_1: + arguments: + - const char *: mesg + storage: static + desc: sys_warning_1 + return: void +- do_lstat: + arguments: + - const char *: path + - struct stat *: pst + - int: flags + storage: static + desc: do_lstat + return: int +- glob_free_pattern: + arguments: + - struct glob_pattern *: list + storage: static + desc: glob_free_pattern + return: void +- join_path: + arguments: + - const char *: path + - int: dirsep + - const char *: name + storage: static + desc: join_path + return: char * +- glob_func_caller: + arguments: + - VALUE: val + storage: static + desc: glob_func_caller + return: VALUE +- glob_helper: + arguments: + - const char *: path + - int: dirsep + - enum answer: exist + - enum answer: isdir + - struct glob_pattern **: beg + - struct glob_pattern **: end + - int: flags + - ruby_glob_func *: func + - VALUE: arg + storage: static + desc: glob_helper + return: int +- ruby_glob0: + arguments: + - const char *: path + - int: flags + - ruby_glob_func *: func + - VALUE: arg + storage: static + desc: ruby_glob0 + return: int +- ruby_glob: + arguments: + - const char *: path + - int: flags + - ruby_glob_func *: func + - VALUE: arg + storage: "" + desc: ruby_glob + return: int +- rb_glob_caller: + arguments: + - const char *: path + - VALUE: a + storage: static + desc: rb_glob_caller + return: int +- rb_glob: + arguments: + - const char *: path + - void (*)(const char *, VALUE): func + - VALUE: arg + storage: "" + desc: rb_glob + return: void +- push_pattern: + arguments: + - const char *: path + - VALUE: ary + storage: static + desc: push_pattern + return: void +- ruby_brace_expand: + arguments: + - const char *: str + - int: flags + - ruby_glob_func *: func + - VALUE: arg + storage: "" + desc: ruby_brace_expand + return: int +- glob_brace: + arguments: + - const char *: path + - VALUE: val + storage: static + desc: glob_brace + return: int +- ruby_brace_glob0: + arguments: + - const char *: str + - int: flags + - ruby_glob_func *: func + - VALUE: arg + storage: static + desc: ruby_brace_glob0 + return: int +- ruby_brace_glob: + arguments: + - const char *: str + - int: flags + - ruby_glob_func *: func + - VALUE: arg + storage: "" + desc: ruby_brace_glob + return: int +- push_glob: + arguments: + - VALUE: ary + - const char *: str + - int: flags + storage: static + desc: push_glob + return: int +- rb_push_glob: + arguments: + - VALUE: str + - int: flags + storage: static + desc: rb_push_glob + return: VALUE +- dir_globs: + arguments: + - long int: argc + - VALUE *: argv + - int: flags + storage: static + desc: dir_globs + return: VALUE +- dir_s_aref: + arguments: + - int: argc + - VALUE *: argv + - VALUE: obj + storage: static + desc: dir_s_aref + return: VALUE +- dir_s_glob: + arguments: + - int: argc + - VALUE *: argv + - VALUE: obj + storage: static + desc: dir_s_glob + return: VALUE +- dir_open_dir: + arguments: + - VALUE: path + storage: static + desc: dir_open_dir + return: VALUE +- dir_foreach: + arguments: + - VALUE: io + - VALUE: dirname + storage: static + desc: dir_foreach + return: VALUE +- dir_entries: + arguments: + - VALUE: io + - VALUE: dirname + storage: static + desc: dir_entries + return: VALUE +- file_s_fnmatch: + arguments: + - int: argc + - VALUE *: argv + - VALUE: obj + storage: static + desc: file_s_fnmatch + return: VALUE +- Init_Dir: + arguments: [] + + storage: "" + desc: Init_Dir + return: void diff --git a/probes/18/file.yml b/probes/18/file.yml new file mode 100644 index 0000000..e1514e2 --- /dev/null +++ b/probes/18/file.yml @@ -0,0 +1,937 @@ +--- +- apply2files: + arguments: + - void (*)(const char *, void *): func + - VALUE: vargs + - void *: arg + storage: static + desc: apply2files + return: long int +- rb_file_path: + arguments: + - VALUE: obj + storage: static + desc: rb_file_path + return: VALUE +- stat_new_0: + arguments: + - VALUE: klass + - struct stat *: st + storage: static + desc: stat_new_0 + return: VALUE +- stat_new: + arguments: + - struct stat *: st + storage: static + desc: stat_new + return: VALUE +- get_stat: + arguments: + - VALUE: self + storage: static + desc: get_stat + return: struct stat * +- rb_stat_cmp: + arguments: + - VALUE: self + - VALUE: other + storage: static + desc: rb_stat_cmp + return: VALUE +- rb_stat_dev: + arguments: + - VALUE: self + storage: static + desc: rb_stat_dev + return: VALUE +- rb_stat_dev_major: + arguments: + - VALUE: self + storage: static + desc: rb_stat_dev_major + return: VALUE +- rb_stat_dev_minor: + arguments: + - VALUE: self + storage: static + desc: rb_stat_dev_minor + return: VALUE +- rb_stat_ino: + arguments: + - VALUE: self + storage: static + desc: rb_stat_ino + return: VALUE +- rb_stat_mode: + arguments: + - VALUE: self + storage: static + desc: rb_stat_mode + return: VALUE +- rb_stat_nlink: + arguments: + - VALUE: self + storage: static + desc: rb_stat_nlink + return: VALUE +- rb_stat_uid: + arguments: + - VALUE: self + storage: static + desc: rb_stat_uid + return: VALUE +- rb_stat_gid: + arguments: + - VALUE: self + storage: static + desc: rb_stat_gid + return: VALUE +- rb_stat_rdev: + arguments: + - VALUE: self + storage: static + desc: rb_stat_rdev + return: VALUE +- rb_stat_rdev_major: + arguments: + - VALUE: self + storage: static + desc: rb_stat_rdev_major + return: VALUE +- rb_stat_rdev_minor: + arguments: + - VALUE: self + storage: static + desc: rb_stat_rdev_minor + return: VALUE +- rb_stat_size: + arguments: + - VALUE: self + storage: static + desc: rb_stat_size + return: VALUE +- rb_stat_blksize: + arguments: + - VALUE: self + storage: static + desc: rb_stat_blksize + return: VALUE +- rb_stat_blocks: + arguments: + - VALUE: self + storage: static + desc: rb_stat_blocks + return: VALUE +- rb_stat_atime: + arguments: + - VALUE: self + storage: static + desc: rb_stat_atime + return: VALUE +- rb_stat_mtime: + arguments: + - VALUE: self + storage: static + desc: rb_stat_mtime + return: VALUE +- rb_stat_ctime: + arguments: + - VALUE: self + storage: static + desc: rb_stat_ctime + return: VALUE +- rb_stat_inspect: + arguments: + - VALUE: self + storage: static + desc: rb_stat_inspect + return: VALUE +- rb_stat: + arguments: + - VALUE: file + - struct stat *: st + storage: static + desc: rb_stat + return: int +- rb_file_s_stat: + arguments: + - VALUE: klass + - VALUE: fname + storage: static + desc: rb_file_s_stat + return: VALUE +- rb_io_stat: + arguments: + - VALUE: obj + storage: static + desc: rb_io_stat + return: VALUE +- rb_file_s_lstat: + arguments: + - VALUE: klass + - VALUE: fname + storage: static + desc: rb_file_s_lstat + return: VALUE +- rb_file_lstat: + arguments: + - VALUE: obj + storage: static + desc: rb_file_lstat + return: VALUE +- group_member: + arguments: + - gid_t: gid + storage: static + desc: group_member + return: int +- eaccess: + arguments: + - const char *: path + - int: mode + storage: "" + desc: eaccess + return: int +- test_d: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_d + return: VALUE +- test_p: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_p + return: VALUE +- test_l: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_l + return: VALUE +- test_S: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_S + return: VALUE +- test_b: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_b + return: VALUE +- test_c: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_c + return: VALUE +- test_e: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_e + return: VALUE +- test_r: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_r + return: VALUE +- test_R: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_R + return: VALUE +- test_w: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_w + return: VALUE +- test_W: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_W + return: VALUE +- test_x: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_x + return: VALUE +- test_X: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_X + return: VALUE +- test_f: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_f + return: VALUE +- test_z: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_z + return: VALUE +- test_s: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_s + return: VALUE +- test_owned: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_owned + return: VALUE +- test_rowned: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_rowned + return: VALUE +- test_grpowned: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_grpowned + return: VALUE +- test_suid: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_suid + return: VALUE +- test_sgid: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_sgid + return: VALUE +- test_sticky: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: test_sticky + return: VALUE +- test_identical: + arguments: + - VALUE: obj + - VALUE: fname1 + - VALUE: fname2 + storage: static + desc: test_identical + return: VALUE +- rb_file_s_size: + arguments: + - VALUE: klass + - VALUE: fname + storage: static + desc: rb_file_s_size + return: VALUE +- rb_file_ftype: + arguments: + - struct stat *: st + storage: static + desc: rb_file_ftype + return: VALUE +- rb_file_s_ftype: + arguments: + - VALUE: klass + - VALUE: fname + storage: static + desc: rb_file_s_ftype + return: VALUE +- rb_file_s_atime: + arguments: + - VALUE: klass + - VALUE: fname + storage: static + desc: rb_file_s_atime + return: VALUE +- rb_file_atime: + arguments: + - VALUE: obj + storage: static + desc: rb_file_atime + return: VALUE +- rb_file_s_mtime: + arguments: + - VALUE: klass + - VALUE: fname + storage: static + desc: rb_file_s_mtime + return: VALUE +- rb_file_mtime: + arguments: + - VALUE: obj + storage: static + desc: rb_file_mtime + return: VALUE +- rb_file_s_ctime: + arguments: + - VALUE: klass + - VALUE: fname + storage: static + desc: rb_file_s_ctime + return: VALUE +- rb_file_ctime: + arguments: + - VALUE: obj + storage: static + desc: rb_file_ctime + return: VALUE +- chmod_internal: + arguments: + - const char *: path + - void *: mode + storage: static + desc: chmod_internal + return: void +- rb_file_s_chmod: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_file_s_chmod + return: VALUE +- rb_file_chmod: + arguments: + - VALUE: obj + - VALUE: vmode + storage: static + desc: rb_file_chmod + return: VALUE +- lchmod_internal: + arguments: + - const char *: path + - void *: mode + storage: static + desc: lchmod_internal + return: void +- rb_file_s_lchmod: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_file_s_lchmod + return: VALUE +- chown_internal: + arguments: + - const char *: path + - void *: argp + storage: static + desc: chown_internal + return: void +- rb_file_s_chown: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_file_s_chown + return: VALUE +- rb_file_chown: + arguments: + - VALUE: obj + - VALUE: owner + - VALUE: group + storage: static + desc: rb_file_chown + return: VALUE +- lchown_internal: + arguments: + - const char *: path + - void *: argp + storage: static + desc: lchown_internal + return: void +- rb_file_s_lchown: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_file_s_lchown + return: VALUE +- utime_internal: + arguments: + - const char *: path + - void *: arg + storage: static + desc: utime_internal + return: void +- rb_file_s_utime: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_file_s_utime + return: VALUE +- sys_fail2: + arguments: + - VALUE: s1 + - VALUE: s2 + storage: static + desc: sys_fail2 + return: void +- rb_file_s_link: + arguments: + - VALUE: klass + - VALUE: from + - VALUE: to + storage: static + desc: rb_file_s_link + return: VALUE +- rb_file_s_symlink: + arguments: + - VALUE: klass + - VALUE: from + - VALUE: to + storage: static + desc: rb_file_s_symlink + return: VALUE +- rb_file_s_readlink: + arguments: + - VALUE: klass + - VALUE: path + storage: static + desc: rb_file_s_readlink + return: VALUE +- unlink_internal: + arguments: + - const char *: path + - void *: arg + storage: static + desc: unlink_internal + return: void +- rb_file_s_unlink: + arguments: + - VALUE: klass + - VALUE: args + storage: static + desc: rb_file_s_unlink + return: VALUE +- rb_file_s_rename: + arguments: + - VALUE: klass + - VALUE: from + - VALUE: to + storage: static + desc: rb_file_s_rename + return: VALUE +- rb_file_s_umask: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_file_s_umask + return: VALUE +- skiproot: + arguments: + - const char *: path + storage: static + desc: skiproot + return: char * +- rb_path_next: + arguments: + - const char *: s + storage: "" + desc: rb_path_next + return: char * +- rb_path_skip_prefix: + arguments: + - const char *: path + storage: "" + desc: rb_path_skip_prefix + return: char * +- rb_path_last_separator: + arguments: + - const char *: path + storage: "" + desc: rb_path_last_separator + return: char * +- chompdirsep: + arguments: + - const char *: path + storage: static + desc: chompdirsep + return: char * +- rb_path_end: + arguments: + - const char *: path + storage: "" + desc: rb_path_end + return: char * +- file_expand_path: + arguments: + - VALUE: fname + - VALUE: dname + - VALUE: result + storage: static + desc: file_expand_path + return: VALUE +- rb_file_expand_path: + arguments: + - VALUE: fname + - VALUE: dname + storage: "" + desc: rb_file_expand_path + return: VALUE +- rb_file_s_expand_path: + arguments: + - int: argc + - VALUE *: argv + storage: "" + desc: rb_file_s_expand_path + return: VALUE +- rmext: + arguments: + - const char *: p + - int: l1 + - const char *: e + storage: static + desc: rmext + return: int +- rb_file_s_basename: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_file_s_basename + return: VALUE +- rb_file_s_dirname: + arguments: + - VALUE: klass + - VALUE: fname + storage: static + desc: rb_file_s_dirname + return: VALUE +- rb_file_s_extname: + arguments: + - VALUE: klass + - VALUE: fname + storage: static + desc: rb_file_s_extname + return: VALUE +- rb_file_s_split: + arguments: + - VALUE: klass + - VALUE: path + storage: static + desc: rb_file_s_split + return: VALUE +- file_inspect_join: + arguments: + - VALUE: ary + - VALUE *: arg + storage: static + desc: file_inspect_join + return: VALUE +- rb_file_join: + arguments: + - VALUE: ary + - VALUE: sep + storage: static + desc: rb_file_join + return: VALUE +- rb_file_s_join: + arguments: + - VALUE: klass + - VALUE: args + storage: static + desc: rb_file_s_join + return: VALUE +- rb_file_s_truncate: + arguments: + - VALUE: klass + - VALUE: path + - VALUE: len + storage: static + desc: rb_file_s_truncate + return: VALUE +- rb_file_truncate: + arguments: + - VALUE: obj + - VALUE: len + storage: static + desc: rb_file_truncate + return: VALUE +- rb_thread_flock: + arguments: + - int: fd + - int: op + - OpenFile *: fptr + storage: static + desc: rb_thread_flock + return: int +- rb_file_flock: + arguments: + - VALUE: obj + - VALUE: operation + storage: static + desc: rb_file_flock + return: VALUE +- test_check: + arguments: + - int: n + - int: argc + - VALUE *: argv + storage: static + desc: test_check + return: void +- rb_f_test: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_test + return: VALUE +- rb_stat_s_alloc: + arguments: + - VALUE: klass + storage: static + desc: rb_stat_s_alloc + return: VALUE +- rb_stat_init: + arguments: + - VALUE: obj + - VALUE: fname + storage: static + desc: rb_stat_init + return: VALUE +- rb_stat_init_copy: + arguments: + - VALUE: copy + - VALUE: orig + storage: static + desc: rb_stat_init_copy + return: VALUE +- rb_stat_ftype: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_ftype + return: VALUE +- rb_stat_d: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_d + return: VALUE +- rb_stat_p: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_p + return: VALUE +- rb_stat_l: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_l + return: VALUE +- rb_stat_S: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_S + return: VALUE +- rb_stat_b: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_b + return: VALUE +- rb_stat_c: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_c + return: VALUE +- rb_stat_owned: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_owned + return: VALUE +- rb_stat_rowned: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_rowned + return: VALUE +- rb_stat_grpowned: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_grpowned + return: VALUE +- rb_stat_r: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_r + return: VALUE +- rb_stat_R: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_R + return: VALUE +- rb_stat_w: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_w + return: VALUE +- rb_stat_W: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_W + return: VALUE +- rb_stat_x: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_x + return: VALUE +- rb_stat_X: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_X + return: VALUE +- rb_stat_f: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_f + return: VALUE +- rb_stat_z: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_z + return: VALUE +- rb_stat_s: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_s + return: VALUE +- rb_stat_suid: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_suid + return: VALUE +- rb_stat_sgid: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_sgid + return: VALUE +- rb_stat_sticky: + arguments: + - VALUE: obj + storage: static + desc: rb_stat_sticky + return: VALUE +- rb_file_const: + arguments: + - const char *: name + - VALUE: value + storage: "" + desc: rb_file_const + return: void +- is_absolute_path: + arguments: + - const char *: path + storage: static + desc: is_absolute_path + return: int +- path_check_0: + arguments: + - VALUE: fpath + - int: execpath + storage: static + desc: path_check_0 + return: int +- fpath_check: + arguments: + - char *: path + storage: static + desc: fpath_check + return: int +- rb_path_check: + arguments: + - char *: path + storage: "" + desc: rb_path_check + return: int +- file_load_ok: + arguments: + - char *: file + storage: static + desc: file_load_ok + return: int +- rb_find_file_ext: + arguments: + - VALUE *: filep + - const char *const *: ext + storage: "" + desc: rb_find_file_ext + return: int +- rb_find_file: + arguments: + - VALUE: path + storage: "" + desc: rb_find_file + return: VALUE +- define_filetest_function: + arguments: + - const char *: name + - VALUE (*)(): func + - int: argc + storage: static + desc: define_filetest_function + return: void +- Init_File: + arguments: [] + + storage: "" + desc: Init_File + return: void diff --git a/probes/18/gc.yml b/probes/18/gc.yml deleted file mode 100644 index 1a8da61..0000000 --- a/probes/18/gc.yml +++ /dev/null @@ -1,38 +0,0 @@ -ruby_xmalloc: -ruby_xcalloc: -ruby_xrealloc: -ruby_xfree: -rb_gc_enable: -rb_gc_disable: -rb_gc_register_address: -rb_gc_unregister_address: -rb_global_variable: -add_heap: -rb_newobj: -rb_during_gc: -rb_data_object_alloc: -stack_end_address: -ruby_stack_check: -rb_source_filename: -mark_source_filename: -sweep_source_filename: -mark_locations_array: -rb_gc_mark_locations: -mark_entry: -mark_tbl: -rb_mark_tbl: -mark_keyvalue: -mark_hash: -rb_mark_hash: -rb_gc_mark_maybe: -gc_mark: -rb_gc_mark: -rb_gc_mark_frame: -gc_mark_children: -finalize_list: -free_unused_heaps: -rb_gc_force_recycle: -garbage_collect: -rb_gc: -rb_gc_start: -ruby_set_stack_size: \ No newline at end of file diff --git a/probes/18/io.yml b/probes/18/io.yml new file mode 100644 index 0000000..06c3971 --- /dev/null +++ b/probes/18/io.yml @@ -0,0 +1,1212 @@ +--- +- rb_eof_error: + arguments: [] + + storage: "" + desc: rb_eof_error + return: void +- rb_io_taint_check: + arguments: + - VALUE: io + storage: "" + desc: rb_io_taint_check + return: VALUE +- rb_io_check_initialized: + arguments: + - OpenFile *: fptr + storage: "" + desc: rb_io_check_initialized + return: void +- rb_io_check_closed: + arguments: + - OpenFile *: fptr + storage: "" + desc: rb_io_check_closed + return: void +- flush_before_seek: + arguments: + - OpenFile *: fptr + storage: static + desc: flush_before_seek + return: OpenFile * +- rb_io_check_readable: + arguments: + - OpenFile *: fptr + storage: "" + desc: rb_io_check_readable + return: void +- rb_io_check_writable: + arguments: + - OpenFile *: fptr + storage: "" + desc: rb_io_check_writable + return: void +- rb_read_pending: + arguments: + - FILE *: fp + storage: "" + desc: rb_read_pending + return: int +- rb_read_check: + arguments: + - FILE *: fp + storage: "" + desc: rb_read_check + return: void +- ruby_dup: + arguments: + - int: orig + storage: static + desc: ruby_dup + return: int +- io_alloc: + arguments: + - VALUE: klass + storage: static + desc: io_alloc + return: VALUE +- io_fflush: + arguments: + - FILE *: f + - OpenFile *: fptr + storage: static + desc: io_fflush + return: void +- rb_io_wait_readable: + arguments: + - int: f + storage: "" + desc: rb_io_wait_readable + return: int +- rb_io_wait_writable: + arguments: + - int: f + storage: "" + desc: rb_io_wait_writable + return: int +- wsplit_p: + arguments: + - OpenFile *: fptr + storage: static + desc: wsplit_p + return: int +- io_fwrite: + arguments: + - VALUE: str + - OpenFile *: fptr + storage: static + desc: io_fwrite + return: long int +- rb_io_fwrite: + arguments: + - const char *: ptr + - long int: len + - FILE *: f + storage: "" + desc: rb_io_fwrite + return: long int +- io_write: + arguments: + - VALUE: io + - VALUE: str + storage: static + desc: io_write + return: VALUE +- rb_io_write: + arguments: + - VALUE: io + - VALUE: str + storage: "" + desc: rb_io_write + return: VALUE +- rb_io_addstr: + arguments: + - VALUE: io + - VALUE: str + storage: "" + desc: rb_io_addstr + return: VALUE +- rb_io_flush: + arguments: + - VALUE: io + storage: static + desc: rb_io_flush + return: VALUE +- rb_io_tell: + arguments: + - VALUE: io + storage: static + desc: rb_io_tell + return: VALUE +- rb_io_seek: + arguments: + - VALUE: io + - VALUE: offset + - int: whence + storage: static + desc: rb_io_seek + return: VALUE +- rb_io_seek_m: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_seek_m + return: VALUE +- rb_io_set_pos: + arguments: + - VALUE: io + - VALUE: offset + storage: static + desc: rb_io_set_pos + return: VALUE +- rb_io_rewind: + arguments: + - VALUE: io + storage: static + desc: rb_io_rewind + return: VALUE +- rb_io_eof: + arguments: + - VALUE: io + storage: "" + desc: rb_io_eof + return: VALUE +- rb_io_sync: + arguments: + - VALUE: io + storage: static + desc: rb_io_sync + return: VALUE +- rb_io_set_sync: + arguments: + - VALUE: io + - VALUE: mode + storage: static + desc: rb_io_set_sync + return: VALUE +- rb_io_fsync: + arguments: + - VALUE: io + storage: static + desc: rb_io_fsync + return: VALUE +- rb_io_fileno: + arguments: + - VALUE: io + storage: static + desc: rb_io_fileno + return: VALUE +- rb_io_pid: + arguments: + - VALUE: io + storage: static + desc: rb_io_pid + return: VALUE +- rb_io_inspect: + arguments: + - VALUE: obj + storage: static + desc: rb_io_inspect + return: VALUE +- rb_io_to_io: + arguments: + - VALUE: io + storage: static + desc: rb_io_to_io + return: VALUE +- read_buffered_data: + arguments: + - char *: ptr + - long int: len + - FILE *: f + storage: static + desc: read_buffered_data + return: long int +- io_fread: + arguments: + - char *: ptr + - long int: len + - OpenFile *: fptr + storage: static + desc: io_fread + return: long int +- rb_io_fread: + arguments: + - char *: ptr + - long int: len + - FILE *: f + storage: "" + desc: rb_io_fread + return: long int +- remain_size: + arguments: + - OpenFile *: fptr + storage: static + desc: remain_size + return: long int +- read_all: + arguments: + - OpenFile *: fptr + - long int: siz + - VALUE: str + storage: static + desc: read_all + return: VALUE +- rb_io_set_nonblock: + arguments: + - OpenFile *: fptr + storage: "" + desc: rb_io_set_nonblock + return: void +- io_getpartial: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + - int: nonblock + storage: static + desc: io_getpartial + return: VALUE +- io_readpartial: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: io_readpartial + return: VALUE +- io_read_nonblock: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: io_read_nonblock + return: VALUE +- rb_io_write_nonblock: + arguments: + - VALUE: io + - VALUE: str + storage: static + desc: rb_io_write_nonblock + return: VALUE +- io_read: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: io_read + return: VALUE +- appendline: + arguments: + - OpenFile *: fptr + - int: delim + - VALUE *: strp + storage: static + desc: appendline + return: int +- swallow: + arguments: + - OpenFile *: fptr + - int: term + storage: static + desc: swallow + return: int +- rb_io_getline_fast: + arguments: + - OpenFile *: fptr + - unsigned char: delim + storage: static + desc: rb_io_getline_fast + return: VALUE +- rscheck: + arguments: + - char *: rsptr + - long int: rslen + - VALUE: rs + storage: static + desc: rscheck + return: int +- rb_io_getline: + arguments: + - VALUE: rs + - VALUE: io + storage: static + desc: rb_io_getline + return: VALUE +- rb_io_gets: + arguments: + - VALUE: io + storage: "" + desc: rb_io_gets + return: VALUE +- rb_io_gets_m: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_gets_m + return: VALUE +- rb_io_lineno: + arguments: + - VALUE: io + storage: static + desc: rb_io_lineno + return: VALUE +- rb_io_set_lineno: + arguments: + - VALUE: io + - VALUE: lineno + storage: static + desc: rb_io_set_lineno + return: VALUE +- lineno_setter: + arguments: + - VALUE: val + - ID: id + - VALUE *: var + storage: static + desc: lineno_setter + return: void +- argf_set_lineno: + arguments: + - VALUE: argf + - VALUE: val + storage: static + desc: argf_set_lineno + return: VALUE +- argf_lineno: + arguments: [] + + storage: static + desc: argf_lineno + return: VALUE +- rb_io_readline: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_readline + return: VALUE +- rb_io_readlines: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_readlines + return: VALUE +- rb_io_each_line: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_each_line + return: VALUE +- rb_io_each_byte: + arguments: + - VALUE: io + storage: static + desc: rb_io_each_byte + return: VALUE +- rb_io_getc: + arguments: + - VALUE: io + storage: "" + desc: rb_io_getc + return: VALUE +- rb_getc: + arguments: + - FILE *: f + storage: "" + desc: rb_getc + return: int +- rb_io_readchar: + arguments: + - VALUE: io + storage: static + desc: rb_io_readchar + return: VALUE +- rb_io_ungetc: + arguments: + - VALUE: io + - VALUE: c + storage: "" + desc: rb_io_ungetc + return: VALUE +- rb_io_isatty: + arguments: + - VALUE: io + storage: static + desc: rb_io_isatty + return: VALUE +- fptr_finalize: + arguments: + - OpenFile *: fptr + - int: noraise + storage: static + desc: fptr_finalize + return: void +- rb_io_fptr_cleanup: + arguments: + - OpenFile *: fptr + - int: noraise + storage: static + desc: rb_io_fptr_cleanup + return: void +- rb_io_fptr_finalize: + arguments: + - OpenFile *: fptr + storage: "" + desc: rb_io_fptr_finalize + return: void +- rb_io_close: + arguments: + - VALUE: io + storage: "" + desc: rb_io_close + return: VALUE +- rb_io_close_m: + arguments: + - VALUE: io + storage: static + desc: rb_io_close_m + return: VALUE +- io_call_close: + arguments: + - VALUE: io + storage: static + desc: io_call_close + return: VALUE +- io_close: + arguments: + - VALUE: io + storage: static + desc: io_close + return: VALUE +- rb_io_closed: + arguments: + - VALUE: io + storage: static + desc: rb_io_closed + return: VALUE +- rb_io_close_read: + arguments: + - VALUE: io + storage: static + desc: rb_io_close_read + return: VALUE +- rb_io_close_write: + arguments: + - VALUE: io + storage: static + desc: rb_io_close_write + return: VALUE +- rb_io_sysseek: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_sysseek + return: VALUE +- rb_io_syswrite: + arguments: + - VALUE: io + - VALUE: str + storage: static + desc: rb_io_syswrite + return: VALUE +- rb_io_sysread: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_sysread + return: VALUE +- rb_io_binmode: + arguments: + - VALUE: io + storage: "" + desc: rb_io_binmode + return: VALUE +- rb_io_flags_mode: + arguments: + - int: flags + storage: "" + desc: rb_io_flags_mode + return: char * +- rb_io_mode_flags: + arguments: + - const char *: mode + storage: "" + desc: rb_io_mode_flags + return: int +- rb_io_modenum_flags: + arguments: + - int: mode + storage: "" + desc: rb_io_modenum_flags + return: int +- rb_io_mode_modenum: + arguments: + - const char *: mode + storage: static + desc: rb_io_mode_modenum + return: int +- rb_io_modenum_mode: + arguments: + - int: flags + storage: static + desc: rb_io_modenum_mode + return: char * +- rb_sysopen: + arguments: + - char *: fname + - int: flags + - unsigned int: mode + storage: static + desc: rb_sysopen + return: int +- rb_fopen: + arguments: + - const char *: fname + - const char *: mode + storage: "" + desc: rb_fopen + return: FILE * +- rb_fdopen: + arguments: + - int: fd + - const char *: mode + storage: "" + desc: rb_fdopen + return: FILE * +- rb_file_open_internal: + arguments: + - VALUE: io + - const char *: fname + - const char *: mode + storage: static + desc: rb_file_open_internal + return: VALUE +- rb_file_open: + arguments: + - const char *: fname + - const char *: mode + storage: "" + desc: rb_file_open + return: VALUE +- rb_file_sysopen_internal: + arguments: + - VALUE: io + - char *: fname + - int: flags + - int: mode + storage: static + desc: rb_file_sysopen_internal + return: VALUE +- rb_file_sysopen: + arguments: + - const char *: fname + - int: flags + - int: mode + storage: "" + desc: rb_file_sysopen + return: VALUE +- rb_io_synchronized: + arguments: + - OpenFile *: fptr + storage: "" + desc: rb_io_synchronized + return: void +- rb_io_unbuffered: + arguments: + - OpenFile *: fptr + storage: "" + desc: rb_io_unbuffered + return: void +- pipe_open: + arguments: + - VALUE: pstr + - char *: pname + - char *: mode + storage: static + desc: pipe_open + return: VALUE +- rb_io_s_popen: + arguments: + - int: argc + - VALUE *: argv + - VALUE: klass + storage: static + desc: rb_io_s_popen + return: VALUE +- rb_open_file: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_open_file + return: VALUE +- rb_io_s_open: + arguments: + - int: argc + - VALUE *: argv + - VALUE: klass + storage: static + desc: rb_io_s_open + return: VALUE +- rb_io_s_sysopen: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_io_s_sysopen + return: VALUE +- rb_f_open: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_open + return: VALUE +- rb_io_open: + arguments: + - char *: fname + - char *: mode + storage: static + desc: rb_io_open + return: VALUE +- rb_io_get_io: + arguments: + - VALUE: io + storage: static + desc: rb_io_get_io + return: VALUE +- rb_io_check_io: + arguments: + - VALUE: io + storage: static + desc: rb_io_check_io + return: VALUE +- rb_io_mode_string: + arguments: + - OpenFile *: fptr + storage: static + desc: rb_io_mode_string + return: char * +- io_reopen: + arguments: + - VALUE: io + - VALUE: nfile + storage: static + desc: io_reopen + return: VALUE +- rb_io_reopen: + arguments: + - int: argc + - VALUE *: argv + - VALUE: file + storage: static + desc: rb_io_reopen + return: VALUE +- rb_io_init_copy: + arguments: + - VALUE: dest + - VALUE: io + storage: static + desc: rb_io_init_copy + return: VALUE +- rb_io_printf: + arguments: + - int: argc + - VALUE []: argv + - VALUE: out + storage: "" + desc: rb_io_printf + return: VALUE +- rb_f_printf: + arguments: + - int: argc + - VALUE []: argv + storage: static + desc: rb_f_printf + return: VALUE +- rb_io_print: + arguments: + - int: argc + - VALUE *: argv + - VALUE: out + storage: "" + desc: rb_io_print + return: VALUE +- rb_f_print: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_print + return: VALUE +- rb_io_putc: + arguments: + - VALUE: io + - VALUE: ch + storage: static + desc: rb_io_putc + return: VALUE +- rb_f_putc: + arguments: + - VALUE: recv + - VALUE: ch + storage: static + desc: rb_f_putc + return: VALUE +- io_puts_ary: + arguments: + - VALUE: ary + - VALUE: out + storage: static + desc: io_puts_ary + return: VALUE +- rb_io_puts: + arguments: + - int: argc + - VALUE *: argv + - VALUE: out + storage: "" + desc: rb_io_puts + return: VALUE +- rb_f_puts: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_puts + return: VALUE +- rb_p: + arguments: + - VALUE: obj + storage: "" + desc: rb_p + return: void +- rb_f_p: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_p + return: VALUE +- rb_obj_display: + arguments: + - int: argc + - VALUE *: argv + - VALUE: self + storage: static + desc: rb_obj_display + return: VALUE +- rb_write_error2: + arguments: + - const char *: mesg + - long int: len + storage: "" + desc: rb_write_error2 + return: void +- rb_write_error: + arguments: + - const char *: mesg + storage: "" + desc: rb_write_error + return: void +- must_respond_to: + arguments: + - ID: mid + - VALUE: val + - ID: id + storage: static + desc: must_respond_to + return: void +- stdout_setter: + arguments: + - VALUE: val + - ID: id + - VALUE *: variable + storage: static + desc: stdout_setter + return: void +- defout_setter: + arguments: + - VALUE: val + - ID: id + - VALUE *: variable + storage: static + desc: defout_setter + return: void +- deferr_setter: + arguments: + - VALUE: val + - ID: id + - VALUE *: variable + storage: static + desc: deferr_setter + return: void +- prep_stdio: + arguments: + - FILE *: f + - int: mode + - VALUE: klass + storage: static + desc: prep_stdio + return: VALUE +- prep_path: + arguments: + - VALUE: io + - char *: path + storage: static + desc: prep_path + return: void +- rb_io_initialize: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_initialize + return: VALUE +- rb_file_initialize: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_file_initialize + return: VALUE +- rb_io_s_new: + arguments: + - int: argc + - VALUE *: argv + - VALUE: klass + storage: static + desc: rb_io_s_new + return: VALUE +- rb_io_s_for_fd: + arguments: + - int: argc + - VALUE *: argv + - VALUE: klass + storage: static + desc: rb_io_s_for_fd + return: VALUE +- argf_forward: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: argf_forward + return: VALUE +- argf_close: + arguments: + - VALUE: file + storage: static + desc: argf_close + return: void +- next_argv: + arguments: [] + + storage: static + desc: next_argv + return: int +- argf_getline: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: argf_getline + return: VALUE +- rb_f_gets: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_gets + return: VALUE +- rb_gets: + arguments: [] + + storage: "" + desc: rb_gets + return: VALUE +- rb_f_readline: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_readline + return: VALUE +- rb_f_getc: + arguments: [] + + storage: static + desc: rb_f_getc + return: VALUE +- rb_f_readlines: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_readlines + return: VALUE +- rb_f_backquote: + arguments: + - VALUE: obj + - VALUE: str + storage: static + desc: rb_f_backquote + return: VALUE +- rb_f_select: + arguments: + - int: argc + - VALUE *: argv + - VALUE: obj + storage: static + desc: rb_f_select + return: VALUE +- io_cntl: + arguments: + - int: fd + - int: cmd + - long int: narg + - int: io_p + storage: static + desc: io_cntl + return: int +- rb_io_ctl: + arguments: + - VALUE: io + - VALUE: req + - VALUE: arg + - int: io_p + storage: static + desc: rb_io_ctl + return: VALUE +- rb_io_ioctl: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_ioctl + return: VALUE +- rb_io_fcntl: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_fcntl + return: VALUE +- rb_f_syscall: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_syscall + return: VALUE +- io_new_instance: + arguments: + - VALUE: args + storage: static + desc: io_new_instance + return: VALUE +- rb_io_s_pipe: + arguments: + - VALUE: klass + storage: static + desc: rb_io_s_pipe + return: VALUE +- io_s_foreach: + arguments: + - struct foreach_arg *: arg + storage: static + desc: io_s_foreach + return: VALUE +- rb_io_s_foreach: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_io_s_foreach + return: VALUE +- io_s_readlines: + arguments: + - struct foreach_arg *: arg + storage: static + desc: io_s_readlines + return: VALUE +- rb_io_s_readlines: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_s_readlines + return: VALUE +- io_s_read: + arguments: + - struct foreach_arg *: arg + storage: static + desc: io_s_read + return: VALUE +- rb_io_s_read: + arguments: + - int: argc + - VALUE *: argv + - VALUE: io + storage: static + desc: rb_io_s_read + return: VALUE +- argf_tell: + arguments: [] + + storage: static + desc: argf_tell + return: VALUE +- argf_seek_m: + arguments: + - int: argc + - VALUE *: argv + - VALUE: self + storage: static + desc: argf_seek_m + return: VALUE +- argf_set_pos: + arguments: + - VALUE: self + - VALUE: offset + storage: static + desc: argf_set_pos + return: VALUE +- argf_rewind: + arguments: [] + + storage: static + desc: argf_rewind + return: VALUE +- argf_fileno: + arguments: [] + + storage: static + desc: argf_fileno + return: VALUE +- argf_to_io: + arguments: [] + + storage: static + desc: argf_to_io + return: VALUE +- argf_eof: + arguments: [] + + storage: static + desc: argf_eof + return: VALUE +- argf_read: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: argf_read + return: VALUE +- argf_getc: + arguments: [] + + storage: static + desc: argf_getc + return: VALUE +- argf_readchar: + arguments: [] + + storage: static + desc: argf_readchar + return: VALUE +- argf_each_line: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: argf_each_line + return: VALUE +- argf_each_byte: + arguments: [] + + storage: static + desc: argf_each_byte + return: VALUE +- argf_filename: + arguments: [] + + storage: static + desc: argf_filename + return: VALUE +- argf_file: + arguments: [] + + storage: static + desc: argf_file + return: VALUE +- argf_binmode: + arguments: [] + + storage: static + desc: argf_binmode + return: VALUE +- argf_skip: + arguments: [] + + storage: static + desc: argf_skip + return: VALUE +- argf_close_m: + arguments: [] + + storage: static + desc: argf_close_m + return: VALUE +- argf_closed: + arguments: [] + + storage: static + desc: argf_closed + return: VALUE +- argf_to_s: + arguments: [] + + storage: static + desc: argf_to_s + return: VALUE +- opt_i_get: + arguments: [] + + storage: static + desc: opt_i_get + return: VALUE +- opt_i_set: + arguments: + - VALUE: val + storage: static + desc: opt_i_set + return: void +- Init_IO: + arguments: [] + + storage: "" + desc: Init_IO + return: void diff --git a/probes/18/lex.yml b/probes/18/lex.yml new file mode 100644 index 0000000..633ad85 --- /dev/null +++ b/probes/18/lex.yml @@ -0,0 +1,15 @@ +--- +- hash: + arguments: + - const char *: str + - unsigned int: len + storage: static + desc: hash + return: unsigned int +- rb_reserved_word: + arguments: + - const char *: str + - unsigned int: len + storage: "" + desc: rb_reserved_word + return: struct kwtable * diff --git a/probes/18/math.yml b/probes/18/math.yml new file mode 100644 index 0000000..f726505 --- /dev/null +++ b/probes/18/math.yml @@ -0,0 +1,171 @@ +--- +- domain_check: + arguments: + - double: x + - char *: msg + storage: static + desc: domain_check + return: void +- math_atan2: + arguments: + - VALUE: obj + - VALUE: y + - VALUE: x + storage: static + desc: math_atan2 + return: VALUE +- math_cos: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_cos + return: VALUE +- math_sin: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_sin + return: VALUE +- math_tan: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_tan + return: VALUE +- math_acos: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_acos + return: VALUE +- math_asin: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_asin + return: VALUE +- math_atan: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_atan + return: VALUE +- math_cosh: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_cosh + return: VALUE +- math_sinh: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_sinh + return: VALUE +- math_tanh: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_tanh + return: VALUE +- math_acosh: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_acosh + return: VALUE +- math_asinh: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_asinh + return: VALUE +- math_atanh: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_atanh + return: VALUE +- math_exp: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_exp + return: VALUE +- math_log: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_log + return: VALUE +- math_log10: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_log10 + return: VALUE +- math_sqrt: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_sqrt + return: VALUE +- math_frexp: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_frexp + return: VALUE +- math_ldexp: + arguments: + - VALUE: obj + - VALUE: x + - VALUE: n + storage: static + desc: math_ldexp + return: VALUE +- math_hypot: + arguments: + - VALUE: obj + - VALUE: x + - VALUE: y + storage: static + desc: math_hypot + return: VALUE +- math_erf: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_erf + return: VALUE +- math_erfc: + arguments: + - VALUE: obj + - VALUE: x + storage: static + desc: math_erfc + return: VALUE +- Init_Math: + arguments: [] + + storage: "" + desc: Init_Math + return: void diff --git a/probes/18/numeric.yml b/probes/18/numeric.yml new file mode 100644 index 0000000..1915453 --- /dev/null +++ b/probes/18/numeric.yml @@ -0,0 +1,755 @@ +--- +- rb_num_zerodiv: + arguments: [] + + storage: "" + desc: rb_num_zerodiv + return: void +- num_coerce: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: num_coerce + return: VALUE +- coerce_body: + arguments: + - VALUE *: x + storage: static + desc: coerce_body + return: VALUE +- coerce_rescue: + arguments: + - VALUE *: x + storage: static + desc: coerce_rescue + return: VALUE +- do_coerce: + arguments: + - VALUE *: x + - VALUE *: y + - int: err + storage: static + desc: do_coerce + return: int +- rb_num_coerce_bin: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_num_coerce_bin + return: VALUE +- rb_num_coerce_cmp: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_num_coerce_cmp + return: VALUE +- rb_num_coerce_relop: + arguments: + - VALUE: x + - VALUE: y + storage: "" + desc: rb_num_coerce_relop + return: VALUE +- num_sadded: + arguments: + - VALUE: x + - VALUE: name + storage: static + desc: num_sadded + return: VALUE +- num_init_copy: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: num_init_copy + return: VALUE +- num_uplus: + arguments: + - VALUE: num + storage: static + desc: num_uplus + return: VALUE +- num_uminus: + arguments: + - VALUE: num + storage: static + desc: num_uminus + return: VALUE +- num_quo: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: num_quo + return: VALUE +- num_div: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: num_div + return: VALUE +- num_divmod: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: num_divmod + return: VALUE +- num_modulo: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: num_modulo + return: VALUE +- num_remainder: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: num_remainder + return: VALUE +- num_int_p: + arguments: + - VALUE: num + storage: static + desc: num_int_p + return: VALUE +- num_abs: + arguments: + - VALUE: num + storage: static + desc: num_abs + return: VALUE +- num_zero_p: + arguments: + - VALUE: num + storage: static + desc: num_zero_p + return: VALUE +- num_nonzero_p: + arguments: + - VALUE: num + storage: static + desc: num_nonzero_p + return: VALUE +- num_to_int: + arguments: + - VALUE: num + storage: static + desc: num_to_int + return: VALUE +- rb_float_new: + arguments: + - double: d + storage: "" + desc: rb_float_new + return: VALUE +- flo_to_s: + arguments: + - VALUE: flt + storage: static + desc: flo_to_s + return: VALUE +- flo_coerce: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_coerce + return: VALUE +- flo_uminus: + arguments: + - VALUE: flt + storage: static + desc: flo_uminus + return: VALUE +- flo_plus: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_plus + return: VALUE +- flo_minus: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_minus + return: VALUE +- flo_mul: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_mul + return: VALUE +- flo_div: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_div + return: VALUE +- flodivmod: + arguments: + - double: x + - double: y + - double *: divp + - double *: modp + storage: static + desc: flodivmod + return: void +- flo_mod: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_mod + return: VALUE +- flo_divmod: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_divmod + return: VALUE +- flo_pow: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_pow + return: VALUE +- num_eql: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: num_eql + return: VALUE +- num_cmp: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: num_cmp + return: VALUE +- num_equal: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: num_equal + return: VALUE +- flo_eq: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_eq + return: VALUE +- flo_hash: + arguments: + - VALUE: num + storage: static + desc: flo_hash + return: VALUE +- rb_dbl_cmp: + arguments: + - double: a + - double: b + storage: "" + desc: rb_dbl_cmp + return: VALUE +- flo_cmp: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_cmp + return: VALUE +- flo_gt: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_gt + return: VALUE +- flo_ge: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_ge + return: VALUE +- flo_lt: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_lt + return: VALUE +- flo_le: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_le + return: VALUE +- flo_eql: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: flo_eql + return: VALUE +- flo_to_f: + arguments: + - VALUE: num + storage: static + desc: flo_to_f + return: VALUE +- flo_abs: + arguments: + - VALUE: flt + storage: static + desc: flo_abs + return: VALUE +- flo_zero_p: + arguments: + - VALUE: num + storage: static + desc: flo_zero_p + return: VALUE +- flo_is_nan_p: + arguments: + - VALUE: num + storage: static + desc: flo_is_nan_p + return: VALUE +- flo_is_infinite_p: + arguments: + - VALUE: num + storage: static + desc: flo_is_infinite_p + return: VALUE +- flo_is_finite_p: + arguments: + - VALUE: num + storage: static + desc: flo_is_finite_p + return: VALUE +- flo_floor: + arguments: + - VALUE: num + storage: static + desc: flo_floor + return: VALUE +- flo_ceil: + arguments: + - VALUE: num + storage: static + desc: flo_ceil + return: VALUE +- flo_round: + arguments: + - VALUE: num + storage: static + desc: flo_round + return: VALUE +- flo_truncate: + arguments: + - VALUE: num + storage: static + desc: flo_truncate + return: VALUE +- num_floor: + arguments: + - VALUE: num + storage: static + desc: num_floor + return: VALUE +- num_ceil: + arguments: + - VALUE: num + storage: static + desc: num_ceil + return: VALUE +- num_round: + arguments: + - VALUE: num + storage: static + desc: num_round + return: VALUE +- num_truncate: + arguments: + - VALUE: num + storage: static + desc: num_truncate + return: VALUE +- num_step: + arguments: + - int: argc + - VALUE *: argv + - VALUE: from + storage: static + desc: num_step + return: VALUE +- rb_num2long: + arguments: + - VALUE: val + storage: "" + desc: rb_num2long + return: long int +- rb_num2ulong: + arguments: + - VALUE: val + storage: "" + desc: rb_num2ulong + return: unsigned long int +- rb_num2int: + arguments: + - VALUE: val + storage: "" + desc: rb_num2int + return: long int +- rb_fix2int: + arguments: + - VALUE: val + storage: "" + desc: rb_fix2int + return: long int +- rb_num2fix: + arguments: + - VALUE: val + storage: "" + desc: rb_num2fix + return: VALUE +- rb_num2ll: + arguments: + - VALUE: val + storage: "" + desc: rb_num2ll + return: long long int +- rb_num2ull: + arguments: + - VALUE: val + storage: "" + desc: rb_num2ull + return: unsigned long long int +- int_to_i: + arguments: + - VALUE: num + storage: static + desc: int_to_i + return: VALUE +- int_int_p: + arguments: + - VALUE: num + storage: static + desc: int_int_p + return: VALUE +- int_succ: + arguments: + - VALUE: num + storage: static + desc: int_succ + return: VALUE +- int_chr: + arguments: + - VALUE: num + storage: static + desc: int_chr + return: VALUE +- rb_fix_induced_from: + arguments: + - VALUE: klass + - VALUE: x + storage: static + desc: rb_fix_induced_from + return: VALUE +- rb_int_induced_from: + arguments: + - VALUE: klass + - VALUE: x + storage: static + desc: rb_int_induced_from + return: VALUE +- rb_flo_induced_from: + arguments: + - VALUE: klass + - VALUE: x + storage: static + desc: rb_flo_induced_from + return: VALUE +- fix_uminus: + arguments: + - VALUE: num + storage: static + desc: fix_uminus + return: VALUE +- rb_fix2str: + arguments: + - VALUE: x + - int: base + storage: "" + desc: rb_fix2str + return: VALUE +- fix_to_s: + arguments: + - int: argc + - VALUE *: argv + - VALUE: x + storage: static + desc: fix_to_s + return: VALUE +- fix_plus: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_plus + return: VALUE +- fix_minus: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_minus + return: VALUE +- fix_mul: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_mul + return: VALUE +- fixdivmod: + arguments: + - long int: x + - long int: y + - long int *: divp + - long int *: modp + storage: static + desc: fixdivmod + return: void +- fix_quo: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_quo + return: VALUE +- fix_div: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_div + return: VALUE +- fix_mod: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_mod + return: VALUE +- fix_divmod: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_divmod + return: VALUE +- int_even_p: + arguments: + - VALUE: num + storage: static + desc: int_even_p + return: VALUE +- fix_pow: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_pow + return: VALUE +- fix_equal: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_equal + return: VALUE +- fix_cmp: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_cmp + return: VALUE +- fix_gt: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_gt + return: VALUE +- fix_ge: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_ge + return: VALUE +- fix_lt: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_lt + return: VALUE +- fix_le: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_le + return: VALUE +- fix_rev: + arguments: + - VALUE: num + storage: static + desc: fix_rev + return: VALUE +- fix_coerce: + arguments: + - VALUE: x + storage: static + desc: fix_coerce + return: VALUE +- fix_and: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_and + return: VALUE +- fix_or: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_or + return: VALUE +- fix_xor: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: fix_xor + return: VALUE +- rb_fix_lshift: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_fix_lshift + return: VALUE +- fix_lshift: + arguments: + - long int: val + - unsigned long int: width + storage: static + desc: fix_lshift + return: VALUE +- rb_fix_rshift: + arguments: + - VALUE: x + - VALUE: y + storage: static + desc: rb_fix_rshift + return: VALUE +- fix_rshift: + arguments: + - long int: val + - unsigned long int: i + storage: static + desc: fix_rshift + return: VALUE +- fix_aref: + arguments: + - VALUE: fix + - VALUE: idx + storage: static + desc: fix_aref + return: VALUE +- fix_to_f: + arguments: + - VALUE: num + storage: static + desc: fix_to_f + return: VALUE +- fix_abs: + arguments: + - VALUE: fix + storage: static + desc: fix_abs + return: VALUE +- fix_id2name: + arguments: + - VALUE: fix + storage: static + desc: fix_id2name + return: VALUE +- fix_to_sym: + arguments: + - VALUE: fix + storage: static + desc: fix_to_sym + return: VALUE +- fix_size: + arguments: + - VALUE: fix + storage: static + desc: fix_size + return: VALUE +- int_upto: + arguments: + - VALUE: from + - VALUE: to + storage: static + desc: int_upto + return: VALUE +- int_downto: + arguments: + - VALUE: from + - VALUE: to + storage: static + desc: int_downto + return: VALUE +- int_dotimes: + arguments: + - VALUE: num + storage: static + desc: int_dotimes + return: VALUE +- fix_zero_p: + arguments: + - VALUE: num + storage: static + desc: fix_zero_p + return: VALUE +- Init_Numeric: + arguments: [] + + storage: "" + desc: Init_Numeric + return: void diff --git a/probes/18/parse.yml b/probes/18/parse.yml deleted file mode 100644 index e3877c5..0000000 --- a/probes/18/parse.yml +++ /dev/null @@ -1,7 +0,0 @@ -yycompile: -lex_getline: -rb_compile_string: -rb_compile_cstr: -rb_compile_file: -newtok: -tokadd: \ No newline at end of file diff --git a/probes/18/prec.yml b/probes/18/prec.yml new file mode 100644 index 0000000..86dc5ab --- /dev/null +++ b/probes/18/prec.yml @@ -0,0 +1,40 @@ +--- +- prec_prec: + arguments: + - VALUE: x + - VALUE: klass + storage: static + desc: prec_prec + return: VALUE +- prec_prec_i: + arguments: + - VALUE: x + storage: static + desc: prec_prec_i + return: VALUE +- prec_prec_f: + arguments: + - VALUE: x + storage: static + desc: prec_prec_f + return: VALUE +- prec_induced_from: + arguments: + - VALUE: module + - VALUE: x + storage: static + desc: prec_induced_from + return: VALUE +- prec_included: + arguments: + - VALUE: module + - VALUE: include + storage: static + desc: prec_included + return: VALUE +- Init_Precision: + arguments: [] + + storage: "" + desc: Init_Precision + return: void diff --git a/probes/18/process.yml b/probes/18/process.yml new file mode 100644 index 0000000..c644a92 --- /dev/null +++ b/probes/18/process.yml @@ -0,0 +1,614 @@ +--- +- get_pid: + arguments: [] + + storage: static + desc: get_pid + return: VALUE +- get_ppid: + arguments: [] + + storage: static + desc: get_ppid + return: VALUE +- last_status_set: + arguments: + - int: status + - int: pid + storage: static + desc: last_status_set + return: void +- pst_to_i: + arguments: + - VALUE: st + storage: static + desc: pst_to_i + return: VALUE +- pst_to_s: + arguments: + - VALUE: st + storage: static + desc: pst_to_s + return: VALUE +- pst_pid: + arguments: + - VALUE: st + storage: static + desc: pst_pid + return: VALUE +- pst_inspect: + arguments: + - VALUE: st + storage: static + desc: pst_inspect + return: VALUE +- pst_equal: + arguments: + - VALUE: st1 + - VALUE: st2 + storage: static + desc: pst_equal + return: VALUE +- pst_bitand: + arguments: + - VALUE: st1 + - VALUE: st2 + storage: static + desc: pst_bitand + return: VALUE +- pst_rshift: + arguments: + - VALUE: st1 + - VALUE: st2 + storage: static + desc: pst_rshift + return: VALUE +- pst_wifstopped: + arguments: + - VALUE: st + storage: static + desc: pst_wifstopped + return: VALUE +- pst_wstopsig: + arguments: + - VALUE: st + storage: static + desc: pst_wstopsig + return: VALUE +- pst_wifsignaled: + arguments: + - VALUE: st + storage: static + desc: pst_wifsignaled + return: VALUE +- pst_wtermsig: + arguments: + - VALUE: st + storage: static + desc: pst_wtermsig + return: VALUE +- pst_wifexited: + arguments: + - VALUE: st + storage: static + desc: pst_wifexited + return: VALUE +- pst_wexitstatus: + arguments: + - VALUE: st + storage: static + desc: pst_wexitstatus + return: VALUE +- pst_success_p: + arguments: + - VALUE: st + storage: static + desc: pst_success_p + return: VALUE +- pst_wcoredump: + arguments: + - VALUE: st + storage: static + desc: pst_wcoredump + return: VALUE +- rb_waitpid: + arguments: + - int: pid + - int *: st + - int: flags + storage: "" + desc: rb_waitpid + return: int +- proc_wait: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: proc_wait + return: VALUE +- proc_wait2: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: proc_wait2 + return: VALUE +- proc_waitall: + arguments: [] + + storage: static + desc: proc_waitall + return: VALUE +- detach_process_watcher: + arguments: + - void *: arg + storage: static + desc: detach_process_watcher + return: VALUE +- rb_detach_process: + arguments: + - int: pid + storage: "" + desc: rb_detach_process + return: VALUE +- proc_detach: + arguments: + - VALUE: obj + - VALUE: pid + storage: static + desc: proc_detach + return: VALUE +- security: + arguments: + - char *: str + storage: static + desc: security + return: void +- proc_exec_v: + arguments: + - char **: argv + - char *: prog + storage: static + desc: proc_exec_v + return: int +- proc_exec_n: + arguments: + - int: argc + - VALUE *: argv + - VALUE: progv + storage: static + desc: proc_exec_n + return: int +- rb_proc_exec: + arguments: + - const char *: str + storage: "" + desc: rb_proc_exec + return: int +- proc_prepare_args: + arguments: + - struct rb_exec_arg *: e + - int: argc + - VALUE *: argv + - VALUE: prog + storage: static + desc: proc_prepare_args + return: void +- proc_exec_args: + arguments: + - VALUE: earg + storage: static + desc: proc_exec_args + return: VALUE +- rb_f_exec: + arguments: + - int: argc + - VALUE *: argv + storage: "" + desc: rb_f_exec + return: VALUE +- rb_f_fork: + arguments: + - VALUE: obj + storage: static + desc: rb_f_fork + return: VALUE +- rb_f_exit_bang: + arguments: + - int: argc + - VALUE *: argv + - VALUE: obj + storage: static + desc: rb_f_exit_bang + return: VALUE +- rb_syswait: + arguments: + - int: pid + storage: "" + desc: rb_syswait + return: void +- rb_f_system: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_system + return: VALUE +- rb_f_sleep: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_f_sleep + return: VALUE +- proc_getpgrp: + arguments: [] + + storage: static + desc: proc_getpgrp + return: VALUE +- proc_setpgrp: + arguments: [] + + storage: static + desc: proc_setpgrp + return: VALUE +- proc_getpgid: + arguments: + - VALUE: obj + - VALUE: pid + storage: static + desc: proc_getpgid + return: VALUE +- proc_setpgid: + arguments: + - VALUE: obj + - VALUE: pid + - VALUE: pgrp + storage: static + desc: proc_setpgid + return: VALUE +- proc_setsid: + arguments: [] + + storage: static + desc: proc_setsid + return: VALUE +- proc_getpriority: + arguments: + - VALUE: obj + - VALUE: which + - VALUE: who + storage: static + desc: proc_getpriority + return: VALUE +- proc_setpriority: + arguments: + - VALUE: obj + - VALUE: which + - VALUE: who + - VALUE: prio + storage: static + desc: proc_setpriority + return: VALUE +- proc_getrlimit: + arguments: + - VALUE: obj + - VALUE: resource + storage: static + desc: proc_getrlimit + return: VALUE +- proc_setrlimit: + arguments: + - int: argc + - VALUE *: argv + - VALUE: obj + storage: static + desc: proc_setrlimit + return: VALUE +- check_uid_switch: + arguments: [] + + storage: static + desc: check_uid_switch + return: void +- check_gid_switch: + arguments: [] + + storage: static + desc: check_gid_switch + return: void +- p_sys_setuid: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: p_sys_setuid + return: VALUE +- p_sys_setruid: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: p_sys_setruid + return: VALUE +- p_sys_seteuid: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: p_sys_seteuid + return: VALUE +- p_sys_setreuid: + arguments: + - VALUE: obj + - VALUE: rid + - VALUE: eid + storage: static + desc: p_sys_setreuid + return: VALUE +- p_sys_setresuid: + arguments: + - VALUE: obj + - VALUE: rid + - VALUE: eid + - VALUE: sid + storage: static + desc: p_sys_setresuid + return: VALUE +- proc_getuid: + arguments: + - VALUE: obj + storage: static + desc: proc_getuid + return: VALUE +- proc_setuid: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: proc_setuid + return: VALUE +- ruby_setreuid: + arguments: + - uid_t: ruid + - uid_t: euid + storage: "" + desc: ruby_setreuid + return: int +- p_uid_change_privilege: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: p_uid_change_privilege + return: VALUE +- p_sys_setgid: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: p_sys_setgid + return: VALUE +- p_sys_setrgid: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: p_sys_setrgid + return: VALUE +- p_sys_setegid: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: p_sys_setegid + return: VALUE +- p_sys_setregid: + arguments: + - VALUE: obj + - VALUE: rid + - VALUE: eid + storage: static + desc: p_sys_setregid + return: VALUE +- p_sys_setresgid: + arguments: + - VALUE: obj + - VALUE: rid + - VALUE: eid + - VALUE: sid + storage: static + desc: p_sys_setresgid + return: VALUE +- p_sys_issetugid: + arguments: + - VALUE: obj + storage: static + desc: p_sys_issetugid + return: VALUE +- proc_getgid: + arguments: + - VALUE: obj + storage: static + desc: proc_getgid + return: VALUE +- proc_setgid: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: proc_setgid + return: VALUE +- proc_getgroups: + arguments: + - VALUE: obj + storage: static + desc: proc_getgroups + return: VALUE +- proc_setgroups: + arguments: + - VALUE: obj + - VALUE: ary + storage: static + desc: proc_setgroups + return: VALUE +- proc_initgroups: + arguments: + - VALUE: obj + - VALUE: uname + - VALUE: base_grp + storage: static + desc: proc_initgroups + return: VALUE +- proc_getmaxgroups: + arguments: + - VALUE: obj + storage: static + desc: proc_getmaxgroups + return: VALUE +- proc_setmaxgroups: + arguments: + - VALUE: obj + - VALUE: val + storage: static + desc: proc_setmaxgroups + return: VALUE +- ruby_setregid: + arguments: + - gid_t: rgid + - gid_t: egid + storage: "" + desc: ruby_setregid + return: int +- p_gid_change_privilege: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: p_gid_change_privilege + return: VALUE +- proc_geteuid: + arguments: + - VALUE: obj + storage: static + desc: proc_geteuid + return: VALUE +- proc_seteuid: + arguments: + - VALUE: obj + - VALUE: euid + storage: static + desc: proc_seteuid + return: VALUE +- rb_seteuid_core: + arguments: + - int: euid + storage: static + desc: rb_seteuid_core + return: VALUE +- p_uid_grant_privilege: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: p_uid_grant_privilege + return: VALUE +- proc_getegid: + arguments: + - VALUE: obj + storage: static + desc: proc_getegid + return: VALUE +- proc_setegid: + arguments: + - VALUE: obj + - VALUE: egid + storage: static + desc: proc_setegid + return: VALUE +- rb_setegid_core: + arguments: + - int: egid + storage: static + desc: rb_setegid_core + return: VALUE +- p_gid_grant_privilege: + arguments: + - VALUE: obj + - VALUE: id + storage: static + desc: p_gid_grant_privilege + return: VALUE +- p_uid_exchangeable: + arguments: [] + + storage: static + desc: p_uid_exchangeable + return: VALUE +- p_uid_exchange: + arguments: + - VALUE: obj + storage: static + desc: p_uid_exchange + return: VALUE +- p_gid_exchangeable: + arguments: [] + + storage: static + desc: p_gid_exchangeable + return: VALUE +- p_gid_exchange: + arguments: + - VALUE: obj + storage: static + desc: p_gid_exchange + return: VALUE +- p_uid_have_saved_id: + arguments: [] + + storage: static + desc: p_uid_have_saved_id + return: VALUE +- p_uid_sw_ensure: + arguments: + - int: id + storage: static + desc: p_uid_sw_ensure + return: VALUE +- p_uid_switch: + arguments: + - VALUE: obj + storage: static + desc: p_uid_switch + return: VALUE +- p_gid_have_saved_id: + arguments: [] + + storage: static + desc: p_gid_have_saved_id + return: VALUE +- p_gid_sw_ensure: + arguments: + - int: id + storage: static + desc: p_gid_sw_ensure + return: VALUE +- p_gid_switch: + arguments: + - VALUE: obj + storage: static + desc: p_gid_switch + return: VALUE +- rb_proc_times: + arguments: + - VALUE: obj + storage: "" + desc: rb_proc_times + return: VALUE +- Init_process: + arguments: [] + + storage: "" + desc: Init_process + return: void diff --git a/probes/18/random.yml b/probes/18/random.yml new file mode 100644 index 0000000..fbfb698 --- /dev/null +++ b/probes/18/random.yml @@ -0,0 +1,84 @@ +--- +- init_genrand: + arguments: + - unsigned long int: s + storage: static + desc: init_genrand + return: void +- init_by_array: + arguments: + - unsigned long int []: init_key + - int: key_length + storage: static + desc: init_by_array + return: void +- next_state: + arguments: [] + + storage: static + desc: next_state + return: void +- genrand_int32: + arguments: [] + + storage: static + desc: genrand_int32 + return: unsigned long int +- genrand_real: + arguments: [] + + storage: static + desc: genrand_real + return: double +- rand_init: + arguments: + - VALUE: vseed + storage: static + desc: rand_init + return: VALUE +- random_seed: + arguments: [] + + storage: static + desc: random_seed + return: VALUE +- rb_f_srand: + arguments: + - int: argc + - VALUE *: argv + - VALUE: obj + storage: static + desc: rb_f_srand + return: VALUE +- make_mask: + arguments: + - unsigned long int: x + storage: static + desc: make_mask + return: unsigned long int +- limited_rand: + arguments: + - unsigned long int: limit + storage: static + desc: limited_rand + return: unsigned long int +- limited_big_rand: + arguments: + - struct RBignum *: limit + storage: static + desc: limited_big_rand + return: VALUE +- rb_f_rand: + arguments: + - int: argc + - VALUE *: argv + - VALUE: obj + storage: static + desc: rb_f_rand + return: VALUE +- Init_Random: + arguments: [] + + storage: "" + desc: Init_Random + return: void diff --git a/probes/18/range.yml b/probes/18/range.yml new file mode 100644 index 0000000..0b7631a --- /dev/null +++ b/probes/18/range.yml @@ -0,0 +1,169 @@ +--- +- range_failed: + arguments: [] + + storage: static + desc: range_failed + return: VALUE +- range_check: + arguments: + - VALUE *: args + storage: static + desc: range_check + return: VALUE +- range_init: + arguments: + - VALUE: range + - VALUE: beg + - VALUE: end + - int: exclude_end + storage: static + desc: range_init + return: void +- rb_range_new: + arguments: + - VALUE: beg + - VALUE: end + - int: exclude_end + storage: "" + desc: rb_range_new + return: VALUE +- range_initialize: + arguments: + - int: argc + - VALUE *: argv + - VALUE: range + storage: static + desc: range_initialize + return: VALUE +- range_exclude_end_p: + arguments: + - VALUE: range + storage: static + desc: range_exclude_end_p + return: VALUE +- range_eq: + arguments: + - VALUE: range + - VALUE: obj + storage: static + desc: range_eq + return: VALUE +- r_lt: + arguments: + - VALUE: a + - VALUE: b + storage: static + desc: r_lt + return: int +- r_le: + arguments: + - VALUE: a + - VALUE: b + storage: static + desc: r_le + return: int +- range_eql: + arguments: + - VALUE: range + - VALUE: obj + storage: static + desc: range_eql + return: VALUE +- range_hash: + arguments: + - VALUE: range + storage: static + desc: range_hash + return: VALUE +- str_step: + arguments: + - VALUE *: args + storage: static + desc: str_step + return: VALUE +- range_each_func: + arguments: + - VALUE: range + - void (*)(VALUE, void *): func + - VALUE: v + - VALUE: e + - void *: arg + storage: static + desc: range_each_func + return: void +- step_i: + arguments: + - VALUE: i + - long int *: iter + storage: static + desc: step_i + return: VALUE +- range_step: + arguments: + - int: argc + - VALUE *: argv + - VALUE: range + storage: static + desc: range_step + return: VALUE +- each_i: + arguments: + - VALUE: v + - void *: arg + storage: static + desc: each_i + return: void +- range_each: + arguments: + - VALUE: range + storage: static + desc: range_each + return: VALUE +- range_first: + arguments: + - VALUE: range + storage: static + desc: range_first + return: VALUE +- range_last: + arguments: + - VALUE: range + storage: static + desc: range_last + return: VALUE +- rb_range_beg_len: + arguments: + - VALUE: range + - long int *: begp + - long int *: lenp + - long int: len + - int: err + storage: "" + desc: rb_range_beg_len + return: VALUE +- range_to_s: + arguments: + - VALUE: range + storage: static + desc: range_to_s + return: VALUE +- range_inspect: + arguments: + - VALUE: range + storage: static + desc: range_inspect + return: VALUE +- range_include: + arguments: + - VALUE: range + - VALUE: val + storage: static + desc: range_include + return: VALUE +- Init_Range: + arguments: [] + + storage: "" + desc: Init_Range + return: void diff --git a/probes/18/re.yml b/probes/18/re.yml new file mode 100644 index 0000000..3785995 --- /dev/null +++ b/probes/18/re.yml @@ -0,0 +1,542 @@ +--- +- rb_memcicmp: + arguments: + - const void *: x + - const void *: y + - long int: len + storage: "" + desc: rb_memcicmp + return: int +- rb_memcmp: + arguments: + - const void *: p1 + - const void *: p2 + - long int: len + storage: "" + desc: rb_memcmp + return: int +- rb_memsearch: + arguments: + - const void *: x0 + - long int: m + - const void *: y0 + - long int: n + storage: "" + desc: rb_memsearch + return: long int +- kcode_euc: + arguments: + - struct RRegexp *: re + storage: static + desc: kcode_euc + return: void +- kcode_sjis: + arguments: + - struct RRegexp *: re + storage: static + desc: kcode_sjis + return: void +- kcode_utf8: + arguments: + - struct RRegexp *: re + storage: static + desc: kcode_utf8 + return: void +- kcode_none: + arguments: + - struct RRegexp *: re + storage: static + desc: kcode_none + return: void +- rb_kcode_set_option: + arguments: + - VALUE: re + storage: "" + desc: rb_kcode_set_option + return: void +- rb_kcode_reset_option: + arguments: [] + + storage: "" + desc: rb_kcode_reset_option + return: void +- rb_reg_mbclen2: + arguments: + - unsigned int: c + - VALUE: re + storage: "" + desc: rb_reg_mbclen2 + return: int +- rb_reg_check: + arguments: + - VALUE: re + storage: static + desc: rb_reg_check + return: void +- rb_reg_expr_str: + arguments: + - VALUE: str + - const char *: s + - long int: len + storage: static + desc: rb_reg_expr_str + return: void +- rb_reg_desc: + arguments: + - const char *: s + - long int: len + - VALUE: re + storage: static + desc: rb_reg_desc + return: VALUE +- rb_reg_source: + arguments: + - VALUE: re + storage: static + desc: rb_reg_source + return: VALUE +- rb_reg_inspect: + arguments: + - VALUE: re + storage: static + desc: rb_reg_inspect + return: VALUE +- rb_reg_to_s: + arguments: + - VALUE: re + storage: static + desc: rb_reg_to_s + return: VALUE +- rb_reg_raise: + arguments: + - const char *: s + - long int: len + - const char *: err + - VALUE: re + storage: static + desc: rb_reg_raise + return: void +- rb_reg_casefold_p: + arguments: + - VALUE: re + storage: static + desc: rb_reg_casefold_p + return: VALUE +- rb_reg_options_m: + arguments: + - VALUE: re + storage: static + desc: rb_reg_options_m + return: VALUE +- rb_reg_kcode_m: + arguments: + - VALUE: re + storage: static + desc: rb_reg_kcode_m + return: VALUE +- make_regexp: + arguments: + - const char *: s + - long int: len + - int: flags + storage: static + desc: make_regexp + return: Regexp * +- match_alloc: + arguments: + - VALUE: klass + storage: static + desc: match_alloc + return: VALUE +- match_check: + arguments: + - VALUE: match + storage: static + desc: match_check + return: void +- match_init_copy: + arguments: + - VALUE: obj + - VALUE: orig + storage: static + desc: match_init_copy + return: VALUE +- match_size: + arguments: + - VALUE: match + storage: static + desc: match_size + return: VALUE +- match_offset: + arguments: + - VALUE: match + - VALUE: n + storage: static + desc: match_offset + return: VALUE +- match_begin: + arguments: + - VALUE: match + - VALUE: n + storage: static + desc: match_begin + return: VALUE +- match_end: + arguments: + - VALUE: match + - VALUE: n + storage: static + desc: match_end + return: VALUE +- rb_match_busy: + arguments: + - VALUE: match + storage: "" + desc: rb_match_busy + return: void +- rb_reg_prepare_re: + arguments: + - VALUE: re + storage: static + desc: rb_reg_prepare_re + return: void +- rb_reg_adjust_startpos: + arguments: + - VALUE: re + - VALUE: str + - long int: pos + - long int: reverse + storage: "" + desc: rb_reg_adjust_startpos + return: long int +- rb_reg_search: + arguments: + - VALUE: re + - VALUE: str + - long int: pos + - long int: reverse + storage: "" + desc: rb_reg_search + return: long int +- rb_reg_nth_defined: + arguments: + - int: nth + - VALUE: match + storage: "" + desc: rb_reg_nth_defined + return: VALUE +- rb_reg_nth_match: + arguments: + - int: nth + - VALUE: match + storage: "" + desc: rb_reg_nth_match + return: VALUE +- rb_reg_last_match: + arguments: + - VALUE: match + storage: "" + desc: rb_reg_last_match + return: VALUE +- rb_reg_match_pre: + arguments: + - VALUE: match + storage: "" + desc: rb_reg_match_pre + return: VALUE +- rb_reg_match_post: + arguments: + - VALUE: match + storage: "" + desc: rb_reg_match_post + return: VALUE +- rb_reg_match_last: + arguments: + - VALUE: match + storage: "" + desc: rb_reg_match_last + return: VALUE +- last_match_getter: + arguments: [] + + storage: static + desc: last_match_getter + return: VALUE +- prematch_getter: + arguments: [] + + storage: static + desc: prematch_getter + return: VALUE +- postmatch_getter: + arguments: [] + + storage: static + desc: postmatch_getter + return: VALUE +- last_paren_match_getter: + arguments: [] + + storage: static + desc: last_paren_match_getter + return: VALUE +- match_array: + arguments: + - VALUE: match + - int: start + storage: static + desc: match_array + return: VALUE +- match_to_a: + arguments: + - VALUE: match + storage: static + desc: match_to_a + return: VALUE +- match_captures: + arguments: + - VALUE: match + storage: static + desc: match_captures + return: VALUE +- match_aref: + arguments: + - int: argc + - VALUE *: argv + - VALUE: match + storage: static + desc: match_aref + return: VALUE +- match_entry: + arguments: + - VALUE: match + - long int: n + storage: static + desc: match_entry + return: VALUE +- match_values_at: + arguments: + - int: argc + - VALUE *: argv + - VALUE: match + storage: static + desc: match_values_at + return: VALUE +- match_select: + arguments: + - int: argc + - VALUE *: argv + - VALUE: match + storage: static + desc: match_select + return: VALUE +- match_to_s: + arguments: + - VALUE: match + storage: static + desc: match_to_s + return: VALUE +- match_string: + arguments: + - VALUE: match + storage: static + desc: match_string + return: VALUE +- rb_reg_initialize: + arguments: + - VALUE: obj + - const char *: s + - long int: len + - int: options + storage: static + desc: rb_reg_initialize + return: void +- rb_reg_s_alloc: + arguments: + - VALUE: klass + storage: static + desc: rb_reg_s_alloc + return: VALUE +- rb_reg_new: + arguments: + - const char *: s + - long int: len + - int: options + storage: "" + desc: rb_reg_new + return: VALUE +- rb_reg_regcomp: + arguments: + - VALUE: str + storage: "" + desc: rb_reg_regcomp + return: VALUE +- rb_reg_cur_kcode: + arguments: + - VALUE: re + storage: static + desc: rb_reg_cur_kcode + return: int +- rb_reg_hash: + arguments: + - VALUE: re + storage: static + desc: rb_reg_hash + return: VALUE +- rb_reg_equal: + arguments: + - VALUE: re1 + - VALUE: re2 + storage: static + desc: rb_reg_equal + return: VALUE +- rb_reg_match: + arguments: + - VALUE: re + - VALUE: str + storage: "" + desc: rb_reg_match + return: VALUE +- rb_reg_eqq: + arguments: + - VALUE: re + - VALUE: str + storage: "" + desc: rb_reg_eqq + return: VALUE +- rb_reg_match2: + arguments: + - VALUE: re + storage: "" + desc: rb_reg_match2 + return: VALUE +- rb_reg_match_m: + arguments: + - VALUE: re + - VALUE: str + storage: static + desc: rb_reg_match_m + return: VALUE +- rb_reg_initialize_m: + arguments: + - int: argc + - VALUE *: argv + - VALUE: self + storage: static + desc: rb_reg_initialize_m + return: VALUE +- rb_reg_quote: + arguments: + - VALUE: str + storage: "" + desc: rb_reg_quote + return: VALUE +- rb_reg_s_quote: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_reg_s_quote + return: VALUE +- rb_kcode: + arguments: [] + + storage: "" + desc: rb_kcode + return: int +- rb_reg_get_kcode: + arguments: + - VALUE: re + storage: static + desc: rb_reg_get_kcode + return: int +- rb_reg_options: + arguments: + - VALUE: re + storage: "" + desc: rb_reg_options + return: int +- rb_reg_s_union: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_reg_s_union + return: VALUE +- rb_reg_init_copy: + arguments: + - VALUE: copy + - VALUE: re + storage: static + desc: rb_reg_init_copy + return: VALUE +- rb_reg_regsub: + arguments: + - VALUE: str + - VALUE: src + - struct re_registers *: regs + storage: "" + desc: rb_reg_regsub + return: VALUE +- rb_get_kcode: + arguments: [] + + storage: "" + desc: rb_get_kcode + return: const char * +- kcode_getter: + arguments: [] + + storage: static + desc: kcode_getter + return: VALUE +- rb_set_kcode: + arguments: + - const char *: code + storage: "" + desc: rb_set_kcode + return: void +- kcode_setter: + arguments: + - VALUE: val + storage: static + desc: kcode_setter + return: void +- ignorecase_getter: + arguments: [] + + storage: static + desc: ignorecase_getter + return: VALUE +- ignorecase_setter: + arguments: + - VALUE: val + - ID: id + storage: static + desc: ignorecase_setter + return: void +- match_getter: + arguments: [] + + storage: static + desc: match_getter + return: VALUE +- match_setter: + arguments: + - VALUE: val + storage: static + desc: match_setter + return: void +- rb_reg_s_last_match: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: rb_reg_s_last_match + return: VALUE +- Init_Regexp: + arguments: [] + + storage: "" + desc: Init_Regexp + return: void diff --git a/probes/18/require.yml b/probes/18/require.yml deleted file mode 100644 index 4326bda..0000000 --- a/probes/18/require.yml +++ /dev/null @@ -1,14 +0,0 @@ -rb_f_require: -rb_require_safe: -rb_require: -rb_mod_autoload: -rb_mod_autoload_p: -rb_f_autoload: -rb_f_autoload_p: -rb_autoload_p: -rb_autoload_load: -rb_load: -rb_load_protect: -rb_f_load: -load_lock: -load_unlock: \ No newline at end of file diff --git a/probes/18/signal.yml b/probes/18/signal.yml new file mode 100644 index 0000000..74f4be8 --- /dev/null +++ b/probes/18/signal.yml @@ -0,0 +1,147 @@ +--- +- signm2signo: + arguments: + - const char *: nm + storage: static + desc: signm2signo + return: int +- signo2signm: + arguments: + - int: "no" + storage: static + desc: signo2signm + return: char * +- ruby_signal_name: + arguments: + - int: "no" + storage: "" + desc: ruby_signal_name + return: const char * +- esignal_init: + arguments: + - int: argc + - VALUE *: argv + - VALUE: self + storage: static + desc: esignal_init + return: VALUE +- interrupt_init: + arguments: + - VALUE: self + - VALUE: mesg + storage: static + desc: interrupt_init + return: VALUE +- ruby_default_signal: + arguments: + - int: sig + storage: "" + desc: ruby_default_signal + return: void +- rb_f_kill: + arguments: + - int: argc + - VALUE *: argv + storage: "" + desc: rb_f_kill + return: VALUE +- rb_gc_mark_trap_list: + arguments: [] + + storage: "" + desc: rb_gc_mark_trap_list + return: void +- ruby_signal: + arguments: + - int: signum + - sighandler_t: handler + storage: static + desc: ruby_signal + return: sighandler_t +- ruby_posix_signal: + arguments: + - int: signum + - sighandler_t: handler + storage: "" + desc: ruby_posix_signal + return: void +- signal_exec: + arguments: + - int: sig + storage: static + desc: signal_exec + return: void +- sighandler: + arguments: + - int: sig + storage: static + desc: sighandler + return: void +- rb_trap_exit: + arguments: [] + + storage: "" + desc: rb_trap_exit + return: void +- rb_trap_exec: + arguments: [] + + storage: "" + desc: rb_trap_exec + return: void +- sigexit: + arguments: + - int: sig + storage: static + desc: sigexit + return: void +- trap: + arguments: + - struct trap_arg *: arg + storage: static + desc: trap + return: VALUE +- trap_ensure: + arguments: + - struct trap_arg *: arg + storage: static + desc: trap_ensure + return: VALUE +- rb_trap_restore_mask: + arguments: [] + + storage: "" + desc: rb_trap_restore_mask + return: void +- sig_trap: + arguments: + - int: argc + - VALUE *: argv + storage: static + desc: sig_trap + return: VALUE +- sig_list: + arguments: [] + + storage: static + desc: sig_list + return: VALUE +- install_sighandler: + arguments: + - int: signum + - sighandler_t: handler + storage: static + desc: install_sighandler + return: void +- init_sigchld: + arguments: + - int: sig + storage: static + desc: init_sigchld + return: void +- Init_signal: + arguments: [] + + storage: "" + desc: Init_signal + return: void diff --git a/probes/18/st.yml b/probes/18/st.yml new file mode 100644 index 0000000..c74ca0a --- /dev/null +++ b/probes/18/st.yml @@ -0,0 +1,145 @@ +--- +- new_size: + arguments: + - int: size + storage: static + desc: new_size + return: int +- st_init_table_with_size: + arguments: + - struct st_hash_type *: type + - int: size + storage: "" + desc: st_init_table_with_size + return: st_table * +- st_init_table: + arguments: + - struct st_hash_type *: type + storage: "" + desc: st_init_table + return: st_table * +- st_init_numtable: + arguments: [] + + storage: "" + desc: st_init_numtable + return: st_table * +- st_init_numtable_with_size: + arguments: + - int: size + storage: "" + desc: st_init_numtable_with_size + return: st_table * +- st_init_strtable: + arguments: [] + + storage: "" + desc: st_init_strtable + return: st_table * +- st_init_strtable_with_size: + arguments: + - int: size + storage: "" + desc: st_init_strtable_with_size + return: st_table * +- st_free_table: + arguments: + - st_table *: table + storage: "" + desc: st_free_table + return: void +- st_lookup: + arguments: + - st_table *: table + - st_data_t: key + - st_data_t *: value + storage: "" + desc: st_lookup + return: int +- st_insert: + arguments: + - st_table *: table + - st_data_t: key + - st_data_t: value + storage: "" + desc: st_insert + return: int +- st_add_direct: + arguments: + - st_table *: table + - st_data_t: key + - st_data_t: value + storage: "" + desc: st_add_direct + return: void +- rehash: + arguments: + - st_table *: table + storage: static + desc: rehash + return: void +- st_copy: + arguments: + - st_table *: old_table + storage: "" + desc: st_copy + return: st_table * +- st_delete: + arguments: + - st_table *: table + - st_data_t *: key + - st_data_t *: value + storage: "" + desc: st_delete + return: int +- st_delete_safe: + arguments: + - st_table *: table + - st_data_t *: key + - st_data_t *: value + - st_data_t: never + storage: "" + desc: st_delete_safe + return: int +- delete_never: + arguments: + - st_data_t: key + - st_data_t: value + - st_data_t: never + storage: static + desc: delete_never + return: int +- st_cleanup_safe: + arguments: + - st_table *: table + - st_data_t: never + storage: "" + desc: st_cleanup_safe + return: void +- st_foreach: + arguments: + - st_table *: table + - int (*)(): func + - st_data_t: arg + storage: "" + desc: st_foreach + return: int +- strhash: + arguments: + - const char *: string + storage: static + desc: strhash + return: int +- numcmp: + arguments: + - long int: x + - long int: y + storage: static + desc: numcmp + return: int +- numhash: + arguments: + - long int: n + storage: static + desc: numhash + return: int diff --git a/probes/18/struct.yml b/probes/18/struct.yml new file mode 100644 index 0000000..46b4618 --- /dev/null +++ b/probes/18/struct.yml @@ -0,0 +1,288 @@ +--- +- rb_struct_iv_get: + arguments: + - VALUE: c + - char *: name + storage: "" + desc: rb_struct_iv_get + return: VALUE +- rb_struct_s_members: + arguments: + - VALUE: klass + storage: "" + desc: rb_struct_s_members + return: VALUE +- rb_struct_members: + arguments: + - VALUE: s + storage: "" + desc: rb_struct_members + return: VALUE +- rb_struct_s_members_m: + arguments: + - VALUE: klass + storage: static + desc: rb_struct_s_members_m + return: VALUE +- rb_struct_members_m: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_members_m + return: VALUE +- rb_struct_getmember: + arguments: + - VALUE: obj + - ID: id + storage: "" + desc: rb_struct_getmember + return: VALUE +- rb_struct_ref: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref + return: VALUE +- rb_struct_ref0: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref0 + return: VALUE +- rb_struct_ref1: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref1 + return: VALUE +- rb_struct_ref2: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref2 + return: VALUE +- rb_struct_ref3: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref3 + return: VALUE +- rb_struct_ref4: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref4 + return: VALUE +- rb_struct_ref5: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref5 + return: VALUE +- rb_struct_ref6: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref6 + return: VALUE +- rb_struct_ref7: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref7 + return: VALUE +- rb_struct_ref8: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref8 + return: VALUE +- rb_struct_ref9: + arguments: + - VALUE: obj + storage: static + desc: rb_struct_ref9 + return: VALUE +- rb_struct_modify: + arguments: + - VALUE: s + storage: static + desc: rb_struct_modify + return: void +- rb_struct_set: + arguments: + - VALUE: obj + - VALUE: val + storage: static + desc: rb_struct_set + return: VALUE +- make_struct: + arguments: + - VALUE: name + - VALUE: members + - VALUE: klass + storage: static + desc: make_struct + return: VALUE +- rb_struct_define: + arguments: + - const char *: name + storage: "" + desc: rb_struct_define + return: VALUE +- rb_struct_s_def: + arguments: + - int: argc + - VALUE *: argv + - VALUE: klass + storage: static + desc: rb_struct_s_def + return: VALUE +- rb_struct_initialize: + arguments: + - VALUE: self + - VALUE: values + storage: static + desc: rb_struct_initialize + return: VALUE +- struct_alloc: + arguments: + - VALUE: klass + storage: static + desc: struct_alloc + return: VALUE +- rb_struct_alloc: + arguments: + - VALUE: klass + - VALUE: values + storage: "" + desc: rb_struct_alloc + return: VALUE +- rb_struct_new: + arguments: + - VALUE: klass + storage: "" + desc: rb_struct_new + return: VALUE +- rb_struct_each: + arguments: + - VALUE: s + storage: static + desc: rb_struct_each + return: VALUE +- rb_struct_each_pair: + arguments: + - VALUE: s + storage: static + desc: rb_struct_each_pair + return: VALUE +- inspect_struct: + arguments: + - VALUE: s + storage: static + desc: inspect_struct + return: VALUE +- rb_struct_inspect: + arguments: + - VALUE: s + storage: static + desc: rb_struct_inspect + return: VALUE +- rb_struct_to_a: + arguments: + - VALUE: s + storage: static + desc: rb_struct_to_a + return: VALUE +- rb_struct_init_copy: + arguments: + - VALUE: copy + - VALUE: s + storage: static + desc: rb_struct_init_copy + return: VALUE +- rb_struct_aref_id: + arguments: + - VALUE: s + - ID: id + storage: static + desc: rb_struct_aref_id + return: VALUE +- rb_struct_aref: + arguments: + - VALUE: s + - VALUE: idx + storage: "" + desc: rb_struct_aref + return: VALUE +- rb_struct_aset_id: + arguments: + - VALUE: s + - ID: id + - VALUE: val + storage: static + desc: rb_struct_aset_id + return: VALUE +- rb_struct_aset: + arguments: + - VALUE: s + - VALUE: idx + - VALUE: val + storage: "" + desc: rb_struct_aset + return: VALUE +- struct_entry: + arguments: + - VALUE: s + - long int: n + storage: static + desc: struct_entry + return: VALUE +- rb_struct_values_at: + arguments: + - int: argc + - VALUE *: argv + - VALUE: s + storage: static + desc: rb_struct_values_at + return: VALUE +- rb_struct_select: + arguments: + - int: argc + - VALUE *: argv + - VALUE: s + storage: static + desc: rb_struct_select + return: VALUE +- rb_struct_equal: + arguments: + - VALUE: s + - VALUE: s2 + storage: static + desc: rb_struct_equal + return: VALUE +- rb_struct_hash: + arguments: + - VALUE: s + storage: static + desc: rb_struct_hash + return: VALUE +- rb_struct_eql: + arguments: + - VALUE: s + - VALUE: s2 + storage: static + desc: rb_struct_eql + return: VALUE +- rb_struct_size: + arguments: + - VALUE: s + storage: static + desc: rb_struct_size + return: VALUE +- Init_Struct: + arguments: [] + + storage: "" + desc: Init_Struct + return: void diff --git a/probes/18/time.yml b/probes/18/time.yml new file mode 100644 index 0000000..8f060b9 --- /dev/null +++ b/probes/18/time.yml @@ -0,0 +1,402 @@ +--- +- time_free: + arguments: + - void *: tobj + storage: static + desc: time_free + return: void +- time_s_alloc: + arguments: + - VALUE: klass + storage: static + desc: time_s_alloc + return: VALUE +- time_modify: + arguments: + - VALUE: time + storage: static + desc: time_modify + return: void +- time_init: + arguments: + - VALUE: time + storage: static + desc: time_init + return: VALUE +- time_overflow_p: + arguments: + - time_t *: secp + - time_t *: usecp + storage: static + desc: time_overflow_p + return: void +- time_new_internal: + arguments: + - VALUE: klass + - time_t: sec + - time_t: usec + storage: static + desc: time_new_internal + return: VALUE +- rb_time_new: + arguments: + - time_t: sec + - time_t: usec + storage: "" + desc: rb_time_new + return: VALUE +- time_timeval: + arguments: + - VALUE: time + - int: interval + storage: static + desc: time_timeval + return: struct timeval +- rb_time_interval: + arguments: + - VALUE: time + storage: "" + desc: rb_time_interval + return: struct timeval +- rb_time_timeval: + arguments: + - VALUE: time + storage: "" + desc: rb_time_timeval + return: struct timeval +- time_s_at: + arguments: + - int: argc + - VALUE *: argv + - VALUE: klass + storage: static + desc: time_s_at + return: VALUE +- obj2long: + arguments: + - VALUE: obj + storage: static + desc: obj2long + return: long int +- time_arg: + arguments: + - int: argc + - VALUE *: argv + - struct tm *: tm + - time_t *: usec + storage: static + desc: time_arg + return: void +- leap_year_p: + arguments: + - long int: y + storage: static + desc: leap_year_p + return: int +- timegm_noleapsecond: + arguments: + - struct tm *: tm + storage: static + desc: timegm_noleapsecond + return: time_t +- tmcmp: + arguments: + - struct tm *: a + - struct tm *: b + storage: static + desc: tmcmp + return: int +- search_time_t: + arguments: + - struct tm *: tptr + - int: utc_p + storage: static + desc: search_time_t + return: time_t +- make_time_t: + arguments: + - struct tm *: tptr + - int: utc_p + storage: static + desc: make_time_t + return: time_t +- time_utc_or_local: + arguments: + - int: argc + - VALUE *: argv + - int: utc_p + - VALUE: klass + storage: static + desc: time_utc_or_local + return: VALUE +- time_s_mkutc: + arguments: + - int: argc + - VALUE *: argv + - VALUE: klass + storage: static + desc: time_s_mkutc + return: VALUE +- time_s_mktime: + arguments: + - int: argc + - VALUE *: argv + - VALUE: klass + storage: static + desc: time_s_mktime + return: VALUE +- time_to_i: + arguments: + - VALUE: time + storage: static + desc: time_to_i + return: VALUE +- time_to_f: + arguments: + - VALUE: time + storage: static + desc: time_to_f + return: VALUE +- time_usec: + arguments: + - VALUE: time + storage: static + desc: time_usec + return: VALUE +- time_cmp: + arguments: + - VALUE: time1 + - VALUE: time2 + storage: static + desc: time_cmp + return: VALUE +- time_eql: + arguments: + - VALUE: time1 + - VALUE: time2 + storage: static + desc: time_eql + return: VALUE +- time_utc_p: + arguments: + - VALUE: time + storage: static + desc: time_utc_p + return: VALUE +- time_hash: + arguments: + - VALUE: time + storage: static + desc: time_hash + return: VALUE +- time_init_copy: + arguments: + - VALUE: copy + - VALUE: time + storage: static + desc: time_init_copy + return: VALUE +- time_dup: + arguments: + - VALUE: time + storage: static + desc: time_dup + return: VALUE +- time_localtime: + arguments: + - VALUE: time + storage: static + desc: time_localtime + return: VALUE +- time_gmtime: + arguments: + - VALUE: time + storage: static + desc: time_gmtime + return: VALUE +- time_getlocaltime: + arguments: + - VALUE: time + storage: static + desc: time_getlocaltime + return: VALUE +- time_getgmtime: + arguments: + - VALUE: time + storage: static + desc: time_getgmtime + return: VALUE +- time_get_tm: + arguments: + - VALUE: time + - int: gmt + storage: static + desc: time_get_tm + return: VALUE +- time_asctime: + arguments: + - VALUE: time + storage: static + desc: time_asctime + return: VALUE +- time_to_s: + arguments: + - VALUE: time + storage: static + desc: time_to_s + return: VALUE +- time_add: + arguments: + - struct time_object *: tobj + - VALUE: offset + - int: sign + storage: static + desc: time_add + return: VALUE +- time_plus: + arguments: + - VALUE: time1 + - VALUE: time2 + storage: static + desc: time_plus + return: VALUE +- time_minus: + arguments: + - VALUE: time1 + - VALUE: time2 + storage: static + desc: time_minus + return: VALUE +- time_succ: + arguments: + - VALUE: time + storage: static + desc: time_succ + return: VALUE +- time_sec: + arguments: + - VALUE: time + storage: static + desc: time_sec + return: VALUE +- time_min: + arguments: + - VALUE: time + storage: static + desc: time_min + return: VALUE +- time_hour: + arguments: + - VALUE: time + storage: static + desc: time_hour + return: VALUE +- time_mday: + arguments: + - VALUE: time + storage: static + desc: time_mday + return: VALUE +- time_mon: + arguments: + - VALUE: time + storage: static + desc: time_mon + return: VALUE +- time_year: + arguments: + - VALUE: time + storage: static + desc: time_year + return: VALUE +- time_wday: + arguments: + - VALUE: time + storage: static + desc: time_wday + return: VALUE +- time_yday: + arguments: + - VALUE: time + storage: static + desc: time_yday + return: VALUE +- time_isdst: + arguments: + - VALUE: time + storage: static + desc: time_isdst + return: VALUE +- time_zone: + arguments: + - VALUE: time + storage: static + desc: time_zone + return: VALUE +- time_utc_offset: + arguments: + - VALUE: time + storage: static + desc: time_utc_offset + return: VALUE +- time_to_a: + arguments: + - VALUE: time + storage: static + desc: time_to_a + return: VALUE +- rb_strftime: + arguments: + - char **: buf + - const char *: format + - struct tm *: time + storage: static + desc: rb_strftime + return: int +- time_strftime: + arguments: + - VALUE: time + - VALUE: format + storage: static + desc: time_strftime + return: VALUE +- time_s_times: + arguments: + - VALUE: obj + storage: static + desc: time_s_times + return: VALUE +- time_mdump: + arguments: + - VALUE: time + storage: static + desc: time_mdump + return: VALUE +- time_dump: + arguments: + - int: argc + - VALUE *: argv + - VALUE: time + storage: static + desc: time_dump + return: VALUE +- time_mload: + arguments: + - VALUE: time + - VALUE: str + storage: static + desc: time_mload + return: VALUE +- time_load: + arguments: + - VALUE: klass + - VALUE: str + storage: static + desc: time_load + return: VALUE +- Init_Time: + arguments: [] + + storage: "" + desc: Init_Time + return: void diff --git a/probes/18/util.yml b/probes/18/util.yml new file mode 100644 index 0000000..2d2ee10 --- /dev/null +++ b/probes/18/util.yml @@ -0,0 +1,225 @@ +--- +- ruby_scan_oct: + arguments: + - const char *: start + - int: len + - int *: retlen + storage: "" + desc: ruby_scan_oct + return: unsigned long int +- ruby_scan_hex: + arguments: + - const char *: start + - int: len + - int *: retlen + storage: "" + desc: ruby_scan_hex + return: unsigned long int +- mmswap_: + arguments: + - char *: a + - char *: b + - int: mmkind + - int: size + - int: high + - int: low + storage: static + desc: mmswap_ + return: void +- mmrot3_: + arguments: + - char *: a + - char *: b + - char *: c + - int: mmkind + - int: size + - int: high + - int: low + storage: static + desc: mmrot3_ + return: void +- ruby_qsort: + arguments: + - void *: base + - const int: nel + - const int: size + - int (*)(): cmp + - void *: d + storage: "" + desc: ruby_qsort + return: void +- ruby_strdup: + arguments: + - const char *: str + storage: "" + desc: ruby_strdup + return: char * +- ruby_getcwd: + arguments: [] + + storage: "" + desc: ruby_getcwd + return: char * +- Balloc: + arguments: + - int: k + storage: static + desc: Balloc + return: Bigint * +- Bfree: + arguments: + - Bigint *: v + storage: static + desc: Bfree + return: void +- multadd: + arguments: + - Bigint *: b + - int: m + - int: a + storage: static + desc: multadd + return: Bigint * +- s2b: + arguments: + - const char *: s + - int: nd0 + - int: nd + - unsigned int: y9 + storage: static + desc: s2b + return: Bigint * +- hi0bits: + arguments: + - unsigned int: x + storage: static + desc: hi0bits + return: int +- lo0bits: + arguments: + - unsigned int *: y + storage: static + desc: lo0bits + return: int +- i2b: + arguments: + - int: i + storage: static + desc: i2b + return: Bigint * +- mult: + arguments: + - Bigint *: a + - Bigint *: b + storage: static + desc: mult + return: Bigint * +- pow5mult: + arguments: + - Bigint *: b + - int: k + storage: static + desc: pow5mult + return: Bigint * +- lshift: + arguments: + - Bigint *: b + - int: k + storage: static + desc: lshift + return: Bigint * +- cmp: + arguments: + - Bigint *: a + - Bigint *: b + storage: static + desc: cmp + return: int +- diff: + arguments: + - Bigint *: a + - Bigint *: b + storage: static + desc: diff + return: Bigint * +- ulp: + arguments: + - double: x + storage: static + desc: ulp + return: double +- b2d: + arguments: + - Bigint *: a + - int *: e + storage: static + desc: b2d + return: double +- d2b: + arguments: + - double: d + - int *: e + - int *: bits + storage: static + desc: d2b + return: Bigint * +- ratio: + arguments: + - Bigint *: a + - Bigint *: b + storage: static + desc: ratio + return: double +- ruby_strtod: + arguments: + - const char *: s00 + - char **: se + storage: "" + desc: ruby_strtod + return: double +- quorem: + arguments: + - Bigint *: b + - Bigint *: S + storage: static + desc: quorem + return: int +- rv_alloc: + arguments: + - int: i + storage: static + desc: rv_alloc + return: char * +- nrv_alloc: + arguments: + - char *: s + - char **: rve + - int: n + storage: static + desc: nrv_alloc + return: char * +- freedtoa: + arguments: + - char *: s + storage: "" + desc: freedtoa + return: void +- dtoa: + arguments: + - double: d + - int: mode + - int: ndigits + - int *: decpt + - int *: sign + - char **: rve + storage: "" + desc: dtoa + return: char * +- ruby_each_words: + arguments: + - const char *: str + - void (*)(const char *, int, void *): func + - void *: arg + storage: "" + desc: ruby_each_words + return: void diff --git a/test/fixtures/probes/gc.yml b/test/fixtures/probes/gc.yml index d6d7b56..a6209ae 100644 --- a/test/fixtures/probes/gc.yml +++ b/test/fixtures/probes/gc.yml @@ -1,8 +1,17 @@ -rb_memerror: - desc: 'Memory Error' -ruby_xmalloc: - desc: 'Memory allocation' - args: - - int: 'Allocation Size' -rb_newobj: - desc: 'New Object Created' \ No newline at end of file +--- +- rb_memerror: + arguments: + storage: + desc: rb_memerror + return: void +- ruby_xmalloc: + arguments: + - long: size + storage: + desc: ruby_xmalloc + return: void * +- rb_newobj: + arguments: + storage: + desc: rb_newobj + return: VALUE \ No newline at end of file diff --git a/test/helper.rb b/test/helper.rb index 064e051..3e0d3ba 100644 --- a/test/helper.rb +++ b/test/helper.rb @@ -22,12 +22,12 @@ def self.setup def self.arguments [ Mri::Instrumentation::Argument.probe, - Mri::Instrumentation::Argument.new( :pointer, 'Address', 0 ), - Mri::Instrumentation::Argument.new( :int, 'Allocation Size', 1 ) ] + Mri::Instrumentation::Argument.new( 'char *', 'Address', 0 ), + Mri::Instrumentation::Argument.new( 'int', 'Allocation Size', 1 ) ] end def self.probe( args = self.arguments ) - Mri::Instrumentation::Probe.new( :gc, 'ruby_xrealloc', 'Reallocation', args ) + Mri::Instrumentation::Probe.new( :gc, 'ruby_xrealloc', 'Reallocation', args, 'VALUE' ) end # thx ActiveSupport diff --git a/test/instrumentation/argument_test.rb b/test/instrumentation/argument_test.rb index 5841266..f2dbc7e 100644 --- a/test/instrumentation/argument_test.rb +++ b/test/instrumentation/argument_test.rb @@ -3,7 +3,23 @@ class ArgumentTest < Test::Unit::TestCase def setup - @argument = Mri::Instrumentation::Argument.new( :char, 'Filename', 0 ) + @argument = Mri::Instrumentation::Argument.new( 'char *', 'Filename', 0 ) + end + + test "should have a hash representation" do + assert_equal( { "char *" => "Filename" }, @argument.to_hash ) + end + + test "should have a yaml representation" do + assert_equal "--- \nchar *: Filename\n", @argument.to_yaml + end + + test "should be able to lookup types" do + assert_equal ['%s', '%s'], @argument.lookup + assert_raises Mri::Instrumentation::Argument::TypeNotDefined do + @argument.type = 'undefined' + @argument.lookup + end end test "should have a string representation" do @@ -15,47 +31,19 @@ def setup end test "should have a variable representation" do - assert_equal 'this->arg0', @argument.to_var + assert_equal 'self->arg0', @argument.to_var end test "should be able to massage it's input value" do - assert_equal 'copyinstr( arg0 )', @argument.massage + assert_equal 'self->arg0_copy', @argument.massage end test "should have an assignment representation" do - assert_equal 'this->arg0 = copyinstr( arg0 );', @argument.to_assignment + assert_equal "self->arg0 = self->arg0_copy;", @argument.to_assignment end -end - -class PointerArgumentTest < Test::Unit::TestCase - - def setup - @argument = Mri::Instrumentation::Argument.new( :pointer, 'Address', 1 ) - end - - test "should have a format representation" do - assert_equal '%#p', @argument.to_format - end - - test "should be able to massage it's input value" do - assert_equal 'arg1', @argument.massage - end - -end - -class IntegerArgumentTest < Test::Unit::TestCase - - def setup - @argument = Mri::Instrumentation::Argument.new( :int, 'Allocation Size', 2 ) - end - - test "should have a format representation" do - assert_equal '%s', @argument.to_format - end - - test "should be able to massage it's input value" do - assert_equal 'stringof( arg2 )', @argument.massage + test "should have a copy representation" do + assert_equal 'self->arg0_copy = arg0;', @argument.to_copy end end \ No newline at end of file diff --git a/test/instrumentation/definition_test.rb b/test/instrumentation/definition_test.rb index 237b9c6..825d90a 100644 --- a/test/instrumentation/definition_test.rb +++ b/test/instrumentation/definition_test.rb @@ -7,7 +7,7 @@ def setup end test "should be able to read and parse it's definition" do - assert_kind_of Hash, @definition.read + assert_kind_of Array, @definition.read end test "should be able to infer it's group" do @@ -16,7 +16,7 @@ def setup test "should be able to setup it's probes" do assert_equal 3, @definition.probes.size - assert_equal %w(rb_memerror rb_newobj ruby_xmalloc), @definition.probes.map{|p| p.name } + assert_equal ["rb_memerror", "ruby_xmalloc", "rb_newobj"], @definition.probes.map{|p| p.name } end end \ No newline at end of file diff --git a/test/instrumentation/probe_collection_test.rb b/test/instrumentation/probe_collection_test.rb index 54919f1..76ac341 100644 --- a/test/instrumentation/probe_collection_test.rb +++ b/test/instrumentation/probe_collection_test.rb @@ -27,23 +27,23 @@ def setup assert_equal "%-24s %-24s %@20d", @probe_collection.report_format end - test "should be able to determine if all probes has a void return type" do - assert !@probe_collection.void? + test "should be able to determine if all probes has a return type" do + assert @probe_collection.return? end test "should have a format string representation" do - assert_equal "%11s %9s %12s", @probe_collection.format_string - assert_equal "%13s %11s %14s", @probe_collection.format_string( '/s' ) + assert_equal "%11s %12s %9s", @probe_collection.format_string + assert_equal "%13s %14s %11s", @probe_collection.format_string( '/s' ) end test "should have a string representation" do - assert_equal "rb_memerror rb_newobj ruby_xmalloc", @probe_collection.to_s - assert_equal "\"rb_memerror/s\" \"rb_newobj/s\" \"ruby_xmalloc/s\"", @probe_collection.to_s( '/s', ' ', "\"" ) + assert_equal "rb_memerror ruby_xmalloc rb_newobj", @probe_collection.to_s + assert_equal "\"rb_memerror/s\" \"ruby_xmalloc/s\" \"rb_newobj/s\"", @probe_collection.to_s( '/s', ' ', "\"" ) end test "should have a description representation" do - assert_equal "Memory Error New Object Created Memory allocation", @probe_collection.description - assert_equal "\"Memory Error/s\" \"New Object Created/s\" \"Memory allocation/s\"", @probe_collection.description( '/s', ' ', "\"" ) + assert_equal "rb_memerror ruby_xmalloc rb_newobj", @probe_collection.description + assert_equal "\"rb_memerror/s\" \"ruby_xmalloc/s\" \"rb_newobj/s\"", @probe_collection.description( '/s', ' ', "\"" ) end test "should have a result format representation" do diff --git a/test/instrumentation/probe_test.rb b/test/instrumentation/probe_test.rb index 1ca4589..4b95b7d 100644 --- a/test/instrumentation/probe_test.rb +++ b/test/instrumentation/probe_test.rb @@ -6,6 +6,19 @@ def setup @probe = Mri::Instrumentation::Test.probe end + test "should have a hash representation" do + assert_equal( { "ruby_xrealloc" => { + "arguments" => + [{:probe=>"Probe"}, {"char *"=>"Address"}, {"int"=>"Allocation Size"}], + "storage" => nil, + "desc" => "ruby_xrealloc", + "return" => "VALUE" } }, @probe.to_hash ) + end + + test "should have a yaml representation" do + assert_equal "--- \nruby_xrealloc: \n arguments: \n - :probe: Probe\n - char *: Address\n - int: Allocation Size\n storage: \n desc: ruby_xrealloc\n return: VALUE\n", @probe.to_yaml + end + test "should be able to yield a format string representation of itself" do assert_equal '%13s', @probe.format_string assert_equal '%15s', @probe.format_string( '/s' ) @@ -19,8 +32,20 @@ def setup assert_equal 'ruby_xrealloc', @probe.to_s end - test "should be able to determine if it has no return" do - assert !@probe.void? + test "should be able to determine if it's static" do + assert !@probe.static? + end + + test "should be able to determine if it's external" do + assert !@probe.extern? + end + + test "should be able to determine if it has an entry" do + assert @probe.entry? + end + + test "should be able to determine if it has a return" do + assert @probe.return? end test "should be able to calculate it's length" do @@ -48,13 +73,13 @@ def setup end test "should be able to yield an arguments list" do - assert_equal 'this->type, this->arg0, this->arg1', @probe.arguments_list - assert_equal "this->type, this->arg0, this->arg1, \"\", \"\"", @probe.arguments_list( 5 ) - assert_equal "this->type, this->arg0, this->arg1, \"\"", @probe.arguments_list( 4 ) + assert_equal 'self->type, self->arg0, self->arg1', @probe.arguments_list + assert_equal "self->type, self->arg0, self->arg1, \"\", \"\"", @probe.arguments_list( 5 ) + assert_equal "self->type, self->arg0, self->arg1, \"\"", @probe.arguments_list( 4 ) end test "should be able to assign it's arguments from within a function def" do - assert_equal "this->type = probefunc;\nthis->arg0 = arg0;\nthis->arg1 = stringof( arg1 );", @probe.assign_arguments + assert_equal "self->type = self->type_copy;\nself->arg0 = self->arg0_copy;\nself->arg1 = self->arg1_copy;", @probe.assign_arguments end test "should be able to find it's probe argument" do diff --git a/test/instrumentation/runner/base_test.rb b/test/instrumentation/runner/base_test.rb index fcd9ca5..d5ebc07 100644 --- a/test/instrumentation/runner/base_test.rb +++ b/test/instrumentation/runner/base_test.rb @@ -23,7 +23,7 @@ def setup test "should be able to yield instrumentation probes from a given group signature" do @runner.probes :gc - assert_equal 43, @runner.probes.size + assert_equal 1, @runner.probes.size end test "should be able to yield instrumentation probes from a given group of probe signatures" do diff --git a/test/instrumentation/strategy/base_test.rb b/test/instrumentation/strategy/base_test.rb index 9644671..b10c760 100644 --- a/test/instrumentation/strategy/base_test.rb +++ b/test/instrumentation/strategy/base_test.rb @@ -1,3 +1,4 @@ +=begin require File.join( File.dirname( __FILE__ ), '..', '..', 'helper' ) class BaseStrategyTest < Test::Unit::TestCase @@ -39,4 +40,5 @@ def setup assert_match /test/, @strategy.report( 'test') end -end \ No newline at end of file +end +=end \ No newline at end of file diff --git a/test/instrumentation/strategy/builder_test.rb b/test/instrumentation/strategy/builder_test.rb index 2fcb857..7e24cf0 100644 --- a/test/instrumentation/strategy/builder_test.rb +++ b/test/instrumentation/strategy/builder_test.rb @@ -1,3 +1,4 @@ +=begin require File.join( File.dirname( __FILE__ ), '..', '..', 'helper' ) class StrategyBuilderTest < Test::Unit::TestCase @@ -9,7 +10,8 @@ def setup end test "should be able to build a D stream" do - assert_equal " #!/usr/sbin/dtrace -ZFs \n #pragma D option quiet\n\n #pragma D option dynvarsize=64m\n\n \n \n dtrace:::BEGIN\n \n {\n printf(\"Tracing... Hit Ctrl-C to end.\\n\");\n \n }\n \n pid$target::rb_memerror:entry\n \n {\n self->depth++;\n \t self->exclude[self->depth] = 0;\n \t this->type = probefunc;\n \t @num[this->type, \"\"] = count();\n \t self->rb_memerror[self->depth] = timestamp; \n }\n pid$target::rb_memerror:return\n /self->rb_memerror[self->depth]/\n {\n this->elapsed_incl = timestamp - self->rb_memerror[self->depth];\n this->elapsed_excl = this->elapsed_incl - self->exclude[self->depth];\n \t self->rb_memerror[self->depth] = 0;\n \t self->exclude[self->depth] = 0;\n \t this->type = probefunc;\n \t @types_incl[this->type, \"\"] = sum(this->elapsed_incl);\n \t @types_excl[this->type, \"\"] = sum(this->elapsed_excl);\n\n \t self->depth--;\n \t self->exclude[self->depth] += this->elapsed_incl; \n }\n pid$target::rb_newobj:entry\n \n {\n self->depth++;\n \t self->exclude[self->depth] = 0;\n \t this->type = probefunc;\n \t @num[this->type, \"\"] = count();\n \t self->rb_newobj[self->depth] = timestamp; \n }\n pid$target::rb_newobj:return\n /self->rb_newobj[self->depth]/\n {\n this->elapsed_incl = timestamp - self->rb_newobj[self->depth];\n this->elapsed_excl = this->elapsed_incl - self->exclude[self->depth];\n \t self->rb_newobj[self->depth] = 0;\n \t self->exclude[self->depth] = 0;\n \t this->type = probefunc;\n \t @types_incl[this->type, \"\"] = sum(this->elapsed_incl);\n \t @types_excl[this->type, \"\"] = sum(this->elapsed_excl);\n\n \t self->depth--;\n \t self->exclude[self->depth] += this->elapsed_incl; \n }\n pid$target::ruby_xmalloc:entry\n \n {\n self->depth++;\n \t self->exclude[self->depth] = 0;\n \t this->arg0 = stringof( arg0 );\nthis->type = probefunc;\n \t @num[this->type, this->arg0] = count();\n \t self->ruby_xmalloc[self->depth] = timestamp; \n }\n pid$target::ruby_xmalloc:return\n /self->ruby_xmalloc[self->depth]/\n {\n this->elapsed_incl = timestamp - self->ruby_xmalloc[self->depth];\n this->elapsed_excl = this->elapsed_incl - self->exclude[self->depth];\n \t self->ruby_xmalloc[self->depth] = 0;\n \t self->exclude[self->depth] = 0;\n \t this->arg0 = stringof( arg0 );\nthis->type = probefunc;\n \t @types_incl[this->type, this->arg0] = sum(this->elapsed_incl);\n \t @types_excl[this->type, this->arg0] = sum(this->elapsed_excl);\n\n \t self->depth--;\n \t self->exclude[self->depth] += this->elapsed_incl; \n }\n \n dtrace:::END\n \n {\n printf(\"\\nCount,\\n\");\n printf(\" %-24s %-24s %20s\\n\", \"Probe\", \"arg0\", \"COUNT\");\n \t printa(\" %-24s %-24s %@20d\\n\", @num);\n normalize(@types_excl, 1000);\n \t printf(\"\\nExclusive function elapsed times (us),\\n\");\n \t printf(\" %-24s %-24s %20s\\n\", \"Probe\", \"arg0\", \"TOTAL\");\n \t printa(\" %-24s %-24s %@20d\\n\", @types_excl);\n\n \t normalize(@types_incl, 1000);\n \t printf(\"\\nInclusive function elapsed times (us),\\n\");\n \t printf(\" %-24s %-24s %20s\\n\", \"Probe\", \"arg0\", \"TOTAL\");\n \t printa(\" %-24s %-24s %@20d\\n\", @types_incl); \n }\n ", @builder.to_s + assert_equal " #!/usr/sbin/dtrace -ZFs \n #pragma D option quiet\n\n #pragma D option dynvarsize=64m\n\n \n \n dtrace:::BEGIN\n \n {\n printf(\"Tracing... Hit Ctrl-C to end.\\n\");\n \n }\n \n pid$target::rb_memerror:entry\n \n {\n self->depth++;\n \t self->exclude[self->depth] = 0;\n \t self->type = probefunc;\n \t @num[self->type, \"\"] = count();\n \t self->rb_memerror[self->depth] = timestamp; \n }\n pid$target::rb_memerror:return\n /self->rb_memerror[self->depth]/\n {\n this->elapsed_incl = timestamp - self->rb_memerror[self->depth];\n this->elapsed_excl = this->elapsed_incl - self->exclude[self->depth];\n \t self->rb_memerror[self->depth] = 0;\n \t self->exclude[self->depth] = 0;\n \t self->type = probefunc;\n \t @types_incl[self->type, \"\"] = sum(this->elapsed_incl);\n \t @types_excl[self->type, \"\"] = sum(this->elapsed_excl);\n\n \t self->depth--;\n \t self->exclude[self->depth] += this->elapsed_incl; \n }\n pid$target::rb_newobj:entry\n \n {\n self->depth++;\n \t self->exclude[self->depth] = 0;\n \t self->type = probefunc;\n \t @num[self->type, \"\"] = count();\n \t self->rb_newobj[self->depth] = timestamp; \n }\n pid$target::rb_newobj:return\n /self->rb_newobj[self->depth]/\n {\n this->elapsed_incl = timestamp - self->rb_newobj[self->depth];\n this->elapsed_excl = this->elapsed_incl - self->exclude[self->depth];\n \t self->rb_newobj[self->depth] = 0;\n \t self->exclude[self->depth] = 0;\n \t self->type = probefunc;\n \t @types_incl[self->type, \"\"] = sum(this->elapsed_incl);\n \t @types_excl[self->type, \"\"] = sum(this->elapsed_excl);\n\n \t self->depth--;\n \t self->exclude[self->depth] += this->elapsed_incl; \n }\n pid$target::ruby_xmalloc:entry\n \n {\n self->depth++;\n \t self->exclude[self->depth] = 0;\n \t self->arg0 = stringof( arg0 );\nself->type = probefunc;\n \t @num[self->type, self->arg0] = count();\n \t self->ruby_xmalloc[self->depth] = timestamp; \n }\n pid$target::ruby_xmalloc:return\n /self->ruby_xmalloc[self->depth]/\n {\n this->elapsed_incl = timestamp - self->ruby_xmalloc[self->depth];\n this->elapsed_excl = this->elapsed_incl - self->exclude[self->depth];\n \t self->ruby_xmalloc[self->depth] = 0;\n \t self->exclude[self->depth] = 0;\n \t self->arg0 = stringof( arg0 );\nself->type = probefunc;\n \t @types_incl[self->type, self->arg0] = sum(this->elapsed_incl);\n \t @types_excl[self->type, self->arg0] = sum(this->elapsed_excl);\n\n \t self->depth--;\n \t self->exclude[self->depth] += this->elapsed_incl; \n }\n \n dtrace:::END\n \n {\n printf(\"\\nCount,\\n\");\n printf(\" %-24s %-24s %20s\\n\", \"Probe\", \"arg0\", \"COUNT\");\n \t printa(\" %-24s %-24s %@20d\\n\", @num);\n normalize(@types_excl, 1000);\n \t printf(\"\\nExclusive function elapsed times (us),\\n\");\n \t printf(\" %-24s %-24s %20s\\n\", \"Probe\", \"arg0\", \"TOTAL\");\n \t printa(\" %-24s %-24s %@20d\\n\", @types_excl);\n\n \t normalize(@types_incl, 1000);\n \t printf(\"\\nInclusive function elapsed times (us),\\n\");\n \t printf(\" %-24s %-24s %20s\\n\", \"Probe\", \"arg0\", \"TOTAL\");\n \t printa(\" %-24s %-24s %@20d\\n\", @types_incl); \n }\n ", @builder.to_s end -end \ No newline at end of file +end +=end \ No newline at end of file diff --git a/test/instrumentation/strategy/calls_test.rb b/test/instrumentation/strategy/calls_test.rb index c8d6e04..2d13524 100644 --- a/test/instrumentation/strategy/calls_test.rb +++ b/test/instrumentation/strategy/calls_test.rb @@ -1,3 +1,4 @@ +=begin require File.join( File.dirname( __FILE__ ), '..', '..', 'helper' ) class CallsStrategyTest < Test::Unit::TestCase @@ -25,4 +26,5 @@ def setup assert_equal " dtrace:::END\n \n {\n printf(\" %-24s %-24s %20s\\n\", \"Probe\", \"arg0\", \"CALLS\");\n \t printa(\" %-24s %-24s %@20d\\n\", @calls); \n }\n ", @strategy.report end -end \ No newline at end of file +end +=end \ No newline at end of file diff --git a/test/instrumentation/strategy/calltime_test.rb b/test/instrumentation/strategy/calltime_test.rb index 82b8aa8..02476ff 100644 --- a/test/instrumentation/strategy/calltime_test.rb +++ b/test/instrumentation/strategy/calltime_test.rb @@ -1,3 +1,4 @@ +=begin require File.join( File.dirname( __FILE__ ), '..', '..', 'helper' ) class CalltimeStrategyTest < Test::Unit::TestCase @@ -18,15 +19,16 @@ def setup end test "should be able to yield a function entry definition" do - assert_equal " pid$target::ruby_xrealloc:entry\n \n {\n self->depth++;\n \t self->exclude[self->depth] = 0;\n \t this->type = probefunc;\nthis->arg0 = arg0;\nthis->arg1 = stringof( arg1 );\n \t @num[this->type, this->arg0, this->arg1] = count();\n \t self->ruby_xrealloc[self->depth] = timestamp; \n }\n ", @strategy.entry + assert_equal " pid$target::ruby_xrealloc:entry\n \n {\n self->depth++;\n \t self->exclude[self->depth] = 0;\n \t self->type = probefunc;\nself->arg0 = arg0;\nself->arg1 = stringof( arg1 );\n \t @num[self->type, self->arg0, self->arg1] = count();\n \t self->ruby_xrealloc[self->depth] = timestamp; \n }\n ", @strategy.entry end test "should be able to yield a function return definition" do - assert_equal " pid$target::ruby_xrealloc:return\n /self->ruby_xrealloc[self->depth]/\n {\n this->elapsed_incl = timestamp - self->ruby_xrealloc[self->depth];\n this->elapsed_excl = this->elapsed_incl - self->exclude[self->depth];\n \t self->ruby_xrealloc[self->depth] = 0;\n \t self->exclude[self->depth] = 0;\n \t this->type = probefunc;\nthis->arg0 = arg0;\nthis->arg1 = stringof( arg1 );\n \t @types_incl[this->type, this->arg0, this->arg1] = sum(this->elapsed_incl);\n \t @types_excl[this->type, this->arg0, this->arg1] = sum(this->elapsed_excl);\n\n \t self->depth--;\n \t self->exclude[self->depth] += this->elapsed_incl; \n }\n ", @strategy.return + assert_equal " pid$target::ruby_xrealloc:return\n /self->ruby_xrealloc[self->depth]/\n {\n this->elapsed_incl = timestamp - self->ruby_xrealloc[self->depth];\n this->elapsed_excl = this->elapsed_incl - self->exclude[self->depth];\n \t self->ruby_xrealloc[self->depth] = 0;\n \t self->exclude[self->depth] = 0;\n \t self->type = probefunc;\nself->arg0 = arg0;\nself->arg1 = stringof( arg1 );\n \t @types_incl[self->type, self->arg0, self->arg1] = sum(this->elapsed_incl);\n \t @types_excl[self->type, self->arg0, self->arg1] = sum(this->elapsed_excl);\n\n \t self->depth--;\n \t self->exclude[self->depth] += this->elapsed_incl; \n }\n ", @strategy.return end test "should be able to yield a reporting function" do assert_equal " dtrace:::END\n \n {\n printf(\"\\nCount,\\n\");\n printf(\" %-24s %-24s %20s\\n\", \"Probe\", \"arg0\", \"COUNT\");\n \t printa(\" %-24s %-24s %@20d\\n\", @num);\n normalize(@types_excl, 1000);\n \t printf(\"\\nExclusive function elapsed times (us),\\n\");\n \t printf(\" %-24s %-24s %20s\\n\", \"Probe\", \"arg0\", \"TOTAL\");\n \t printa(\" %-24s %-24s %@20d\\n\", @types_excl);\n\n \t normalize(@types_incl, 1000);\n \t printf(\"\\nInclusive function elapsed times (us),\\n\");\n \t printf(\" %-24s %-24s %20s\\n\", \"Probe\", \"arg0\", \"TOTAL\");\n \t printa(\" %-24s %-24s %@20d\\n\", @types_incl); \n }\n ", @strategy.report end -end \ No newline at end of file +end +=end \ No newline at end of file diff --git a/test/instrumentation/strategy/flow_test.rb b/test/instrumentation/strategy/flow_test.rb index ea6acd9..4f4c1dc 100644 --- a/test/instrumentation/strategy/flow_test.rb +++ b/test/instrumentation/strategy/flow_test.rb @@ -1,3 +1,4 @@ +=begin require File.join( File.dirname( __FILE__ ), '..', '..', 'helper' ) class FlowStrategyTest < Test::Unit::TestCase @@ -25,4 +26,5 @@ def setup assert_equal " pid$target::ruby_xrealloc:return\n \n {\n printf(\"%3d %-16d %-22s %*s<-\\n\", cpu, timestamp / 1000, \n probefunc, self->depth * 2, \"\" );\n \n }\n ", @strategy.return end -end \ No newline at end of file +end +=end \ No newline at end of file diff --git a/test/instrumentation/strategy/interval_test.rb b/test/instrumentation/strategy/interval_test.rb index 67f7dd8..138f8b9 100644 --- a/test/instrumentation/strategy/interval_test.rb +++ b/test/instrumentation/strategy/interval_test.rb @@ -1,3 +1,4 @@ +=begin require File.join( File.dirname( __FILE__ ), '..', '..', 'helper' ) class IntervalStrategyTest < Test::Unit::TestCase @@ -25,4 +26,5 @@ def setup assert_equal " profile:::tick-1sec\n {\n \tprintf(\"%20Y %6d %6d %6d\\n\", walltimestamp, rb_memerror, rb_newobj, ruby_xmalloc);\n\n \trb_memerror = 0;\nrb_newobj = 0;\nruby_xmalloc = 0;\n }\n ", @strategy.report end -end \ No newline at end of file +end +=end \ No newline at end of file diff --git a/test/instrumentation/strategy/peek_test.rb b/test/instrumentation/strategy/peek_test.rb index 0abc07e..48ce81a 100644 --- a/test/instrumentation/strategy/peek_test.rb +++ b/test/instrumentation/strategy/peek_test.rb @@ -1,3 +1,4 @@ +=begin require File.join( File.dirname( __FILE__ ), '..', '..', 'helper' ) class PeekTest < Test::Unit::TestCase @@ -18,7 +19,7 @@ def setup end test "should be able to yield a guarded function entry definition" do - assert_equal " pid$target::ruby_xrealloc:entry\n /guard++ == 0/\n {\n self->peek = 1;\n this->type = probefunc;\nthis->arg0 = arg0;\nthis->arg1 = stringof( arg1 );\n printf( \"%13s\", this->type, this->arg0, this->arg1 ); \n }\n ", @strategy.guarded_entry + assert_equal " pid$target::ruby_xrealloc:entry\n /guard++ == 0/\n {\n self->peek = 1;\n self->type = probefunc;\nself->arg0 = arg0;\nself->arg1 = stringof( arg1 );\n printf( \"%13s\", self->type, self->arg0, self->arg1 ); \n }\n ", @strategy.guarded_entry end test "should be able to yield a function return definition" do @@ -29,4 +30,5 @@ def setup assert_equal " pid$target:::\n /self->peek/\n {\n \n }\n ", @strategy.peek end -end \ No newline at end of file +end +=end \ No newline at end of file diff --git a/test/instrumentation/strategy/speculate_test.rb b/test/instrumentation/strategy/speculate_test.rb index 1174735..61469f1 100644 --- a/test/instrumentation/strategy/speculate_test.rb +++ b/test/instrumentation/strategy/speculate_test.rb @@ -1,3 +1,4 @@ +=begin require File.join( File.dirname( __FILE__ ), '..', '..', 'helper' ) class SpeculateTest < Test::Unit::TestCase @@ -29,4 +30,5 @@ def setup assert_equal " pid$target::ruby_xrealloc:return\n /self->spec && errno != 0/\n {\n discard(self->spec); \n self->spec = 0; \n }\n ", @strategy.return_failure end -end \ No newline at end of file +end +=end \ No newline at end of file diff --git a/translators/18/env.d b/translators/18/env.d new file mode 100644 index 0000000..f1ece62 --- /dev/null +++ b/translators/18/env.d @@ -0,0 +1,27 @@ +extern struct FRAME { + VALUE self; + int argc; + ID last_func; + ID orig_func; + VALUE last_class; + struct FRAME *prev; + struct FRAME *tmp; + struct RNode *node; + int iter; + int flags; + unsigned long uniq; +} *ruby_frame; + +extern struct SCOPE { + struct RBasic super; + ID *local_tbl; + VALUE *local_vars; + int flags; +} *ruby_scope; + +struct RVarmap { + struct RBasic super; + ID id; + VALUE val; + struct RVarmap *next; +}; diff --git a/translators/18/io.d b/translators/18/io.d new file mode 100644 index 0000000..1feda5b --- /dev/null +++ b/translators/18/io.d @@ -0,0 +1,37 @@ +inline int FMODE_READABLE = 1; +#pragma D binding "1.0" FMODE_READABLE +inline int FMODE_WRITABLE = 2; +#pragma D binding "1.0" FMODE_WRITABLE +inline int FMODE_READWRITE = 3; +#pragma D binding "1.0" FMODE_READWRITE +inline int FMODE_APPEND = 64; +#pragma D binding "1.0" FMODE_APPEND +inline int FMODE_CREATE = 128; +#pragma D binding "1.0" FMODE_CREATE +inline int FMODE_BINMODE = 4; +#pragma D binding "1.0" FMODE_BINMODE +inline int FMODE_SYNC = 8; +#pragma D binding "1.0" FMODE_SYNC +inline int FMODE_WBUF = 16; +#pragma D binding "1.0" FMODE_WBUF +inline int FMODE_RBUF = 32; +#pragma D binding "1.0" FMODE_RBUF +inline int FMODE_WSPLIT = 32; +#pragma D binding "1.0" FMODE_WSPLIT +inline int FMODE_WSPLIT_INITIATLIZED = 32; +#pragma D binding "1.0" FMODE_WSPLIT_INITIALIZED + +typedef struct open_file{ + int mode; + int pid; + int lineno; + char path; +}; + +#pragma D binding "1.0" translator +translator open_file < struct OpenFile *OF > { + mode = OF->mode; + pid = OF->pid; + lineno = OF->lineno; + path = OF->path; +}; \ No newline at end of file diff --git a/translators/18/node.d b/translators/18/node.d new file mode 100644 index 0000000..2033bd6 --- /dev/null +++ b/translators/18/node.d @@ -0,0 +1,88 @@ +typedef struct RNode { + unsigned long flags; + char *nd_file; + union { + struct RNode *node; + ID id; + VALUE value; + VALUE (*cfunc)(ANYARGS); + ID *tbl; + } u1; + union { + struct RNode *node; + ID id; + long argc; + VALUE value; + } u2; + union { + struct RNode *node; + ID id; + long state; + struct global_entry *entry; + long cnt; + VALUE value; + } u3; +} NODE; + +struct rb_thread { + rb_thread_t next, prev; + rb_jmpbuf_t context; +#if (defined _WIN32 && !defined _WIN32_WCE) || defined __CYGWIN__ + unsigned long win32_exception_list; +#endif + + VALUE result; + + size_t stk_len; + size_t stk_max; + VALUE *stk_ptr; + VALUE *stk_pos; +#ifdef __ia64 + size_t bstr_len; + size_t bstr_max; + VALUE *bstr_ptr; + VALUE *bstr_pos; +#endif + + struct FRAME *frame; + struct SCOPE *scope; + struct RVarmap *dyna_vars; + struct BLOCK *block; + struct iter *iter; + struct tag *tag; + VALUE klass; + VALUE wrapper; + NODE *cref; + + int flags; /* misc. states (vmode/rb_trap_immediate/raised) */ + + NODE *node; + + int tracing; + VALUE errinfo; + VALUE last_status; + VALUE last_line; + VALUE last_match; + + int safe; + + enum rb_thread_status status; + int wait_for; + int fd; + fd_set readfds; + fd_set writefds; + fd_set exceptfds; + int select_value; + double delay; + rb_thread_t join; + + int abort; + int priority; + VALUE thgroup; + + struct st_table *locals; + + VALUE thread; + + VALUE sandbox; +}; diff --git a/translators/18/st.d b/translators/18/st.d new file mode 100644 index 0000000..afbdacf --- /dev/null +++ b/translators/18/st.d @@ -0,0 +1,31 @@ +struct st_table_entry { + unsigned int hash; + st_data_t key; + st_data_t record; + st_table_entry *next; +}; + +typedef struct st_table_entry{ + int hash; + long key; + long record; + caddr_t next; +}; + +typedef struct st_hash_type{ + int compare; + int hash; +}; + +typedef struct st_hash_type{ + int compare; + int hash; +}; + + +struct st_table { + struct st_hash_type *type; + int num_bins; + int num_entries; + struct st_table_entry **bins; +}; diff --git a/translators/18/types.d b/translators/18/types.d new file mode 100644 index 0000000..fa333f2 --- /dev/null +++ b/translators/18/types.d @@ -0,0 +1,85 @@ +typedef struct r_basic{ + long flags; + long klass; +}; + +translator r_basic < struct RBasic *RB > { + flags = RB->flags; + klass = RB->klass; +}; + +struct RObject { + struct RBasic basic; + struct st_table *iv_tbl; +}; + +struct RClass { + struct RBasic basic; + struct st_table *iv_tbl; + struct st_table *m_tbl; + VALUE super; +}; + +struct RFloat { + struct RBasic basic; + double value; +}; + +struct RString { + struct RBasic basic; + long len; + char *ptr; + union { + long capa; + VALUE shared; + } aux; +}; + +struct RArray { + struct RBasic basic; + long len; + union { + long capa; + VALUE shared; + } aux; + VALUE *ptr; +}; + +struct RRegexp { + struct RBasic basic; + struct re_pattern_buffer *ptr; + long len; + char *str; +}; + +struct RHash { + struct RBasic basic; + struct st_table *tbl; + int iter_lev; + VALUE ifnone; +}; + +struct RFile { + struct RBasic basic; + struct OpenFile *fptr; +}; + +struct RData { + struct RBasic basic; + void (*dmark) _((void*)); + void (*dfree) _((void*)); + void *data; +}; + +struct RStruct { + struct RBasic basic; + long len; + VALUE *ptr; +}; + +struct RBignum { + struct RBasic basic; + char sign; + long len; + void *digits; +};