debase-ruby_core_source 0.10.10 → 0.10.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +6 -3
- data/debase-ruby_core_source.gemspec +4 -4
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/builtin.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/list/list.h +788 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/debug_counter.h +457 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/dln.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/eval_intern.h +323 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/gc.h +140 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/id.h +290 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/insns_info.inc +8983 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/array.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/bits.h +566 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/class.h +174 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compar.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compile.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/compilers.h +108 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/cont.h +25 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/dir.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enc.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/encoding.h +28 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enum.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/enumerator.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/error.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/eval.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/file.h +39 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/fixnum.h +185 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/gc.h +161 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/hash.h +241 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/inits.h +51 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/io.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/load.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/loadpath.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/math.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/missing.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/numeric.h +255 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/proc.h +33 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/process.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/random.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/range.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/rational.h +71 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/re.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/sanitizers.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/scheduler.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/serial.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/signal.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/static_assert.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/string.h +140 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/struct.h +154 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/symbol.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/thread.h +54 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/time.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/transcode.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/util.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/variable.h +84 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/vm.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal/warnings.h +17 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/internal.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/iseq.h +305 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/method.h +245 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/mjit.h +220 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/mjit_compile.inc +8240 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/node.h +484 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/node_name.inc +210 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/parse.h +211 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ractor_core.h +343 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regint.h +938 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_assert.h +15 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/thread_pthread.h +115 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/thread_win32.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/transient_heap.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/variable.h +22 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/version.h +89 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm.inc +5355 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_callinfo.h +456 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_core.h +2023 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_debug.h +116 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_exec.h +196 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_insnhelper.h +257 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vm_sync.h +136 -0
- data/lib/debase/ruby_core_source/ruby-3.0.0-p0/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/addr2line.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/builtin.h +84 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/build_assert/build_assert.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/check_type/check_type.h +63 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/container_of/container_of.h +142 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/list/list.h +788 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ccan/str/str.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/constant.h +55 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/darray.h +198 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/debug_counter.h +469 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/dln.h +31 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/encindex.h +70 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/eval_intern.h +335 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/gc.h +141 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/hrtime.h +168 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/id.h +293 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/id_table.h +36 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/insns.inc +249 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/insns_info.inc +9063 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/array.h +113 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/bignum.h +246 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/bits.h +565 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/class.h +196 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/compar.h +49 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/compile.h +35 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/compilers.h +107 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/complex.h +29 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/cont.h +24 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/dir.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/enc.h +19 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/encoding.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/enum.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/enumerator.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/error.h +191 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/eval.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/file.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/fixnum.h +184 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/gc.h +186 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/hash.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/imemo.h +243 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/inits.h +50 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/io.h +38 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/load.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/loadpath.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/math.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/missing.h +18 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/numeric.h +271 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/object.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/parse.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/proc.h +32 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/process.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/random.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/range.h +40 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/rational.h +72 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/re.h +30 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/sanitizers.h +190 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/serial.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/signal.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/static_assert.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/string.h +141 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/struct.h +153 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/symbol.h +41 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/thread.h +53 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/time.h +34 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/transcode.h +20 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/util.h +27 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/variable.h +83 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/vm.h +133 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal/warnings.h +16 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/internal.h +109 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/iseq.h +322 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/known_errors.inc +791 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/method.h +253 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/mjit.h +231 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/mjit_compile.inc +8322 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/node.h +510 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/node_name.inc +208 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/opt_sc.inc +109 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/optinsn.inc +128 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/optunifs.inc +43 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/parse.h +214 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/probes_helper.h +44 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ractor_core.h +346 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/regenc.h +254 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/regint.h +942 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/regparse.h +370 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/revision.h +2 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ruby_assert.h +14 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/ruby_atomic.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/siphash.h +48 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/symbol.h +119 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/thread_pthread.h +115 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/thread_win32.h +61 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/timev.h +57 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/transcode_data.h +138 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/transient_heap.h +65 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/variable.h +21 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/version.h +88 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm.inc +5470 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_call_iseq_optimized.inc +244 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_callinfo.h +487 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_core.h +2107 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_debug.h +124 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_exec.h +197 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_insnhelper.h +265 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_opts.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vm_sync.h +137 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/vmtc.inc +243 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/yjit.h +73 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/yjit_asm.h +408 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/yjit_codegen.h +23 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/yjit_core.h +307 -0
- data/lib/debase/ruby_core_source/ruby-3.1.0-p0/yjit_iface.h +38 -0
- data/lib/debase/ruby_core_source/version.rb +1 -1
- metadata +235 -14
@@ -0,0 +1,16 @@
|
|
1
|
+
/* CC0 (Public domain) - see ccan/licenses/CC0 file for details */
|
2
|
+
#ifndef CCAN_STR_H
|
3
|
+
#define CCAN_STR_H
|
4
|
+
/**
|
5
|
+
* stringify - Turn expression into a string literal
|
6
|
+
* @expr: any C expression
|
7
|
+
*
|
8
|
+
* Example:
|
9
|
+
* #define PRINT_COND_IF_FALSE(cond) \
|
10
|
+
* ((cond) || printf("%s is false!", stringify(cond)))
|
11
|
+
*/
|
12
|
+
#define stringify(expr) stringify_1(expr)
|
13
|
+
/* Double-indirection required to stringify expansions */
|
14
|
+
#define stringify_1(expr) #expr
|
15
|
+
|
16
|
+
#endif /* CCAN_STR_H */
|
@@ -0,0 +1,55 @@
|
|
1
|
+
#ifndef CONSTANT_H
|
2
|
+
#define CONSTANT_H
|
3
|
+
/**********************************************************************
|
4
|
+
|
5
|
+
constant.h -
|
6
|
+
|
7
|
+
$Author$
|
8
|
+
created at: Sun Nov 15 00:09:33 2009
|
9
|
+
|
10
|
+
Copyright (C) 2009 Yusuke Endoh
|
11
|
+
|
12
|
+
**********************************************************************/
|
13
|
+
#include "ruby/ruby.h"
|
14
|
+
#include "id_table.h"
|
15
|
+
|
16
|
+
typedef enum {
|
17
|
+
CONST_DEPRECATED = 0x100,
|
18
|
+
|
19
|
+
CONST_VISIBILITY_MASK = 0xff,
|
20
|
+
CONST_PUBLIC = 0x00,
|
21
|
+
CONST_PRIVATE,
|
22
|
+
CONST_VISIBILITY_MAX
|
23
|
+
} rb_const_flag_t;
|
24
|
+
|
25
|
+
#define RB_CONST_PRIVATE_P(ce) \
|
26
|
+
(((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE)
|
27
|
+
#define RB_CONST_PUBLIC_P(ce) \
|
28
|
+
(((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC)
|
29
|
+
|
30
|
+
#define RB_CONST_DEPRECATED_P(ce) \
|
31
|
+
((ce)->flag & CONST_DEPRECATED)
|
32
|
+
|
33
|
+
typedef struct rb_const_entry_struct {
|
34
|
+
rb_const_flag_t flag;
|
35
|
+
int line;
|
36
|
+
VALUE value; /* should be mark */
|
37
|
+
VALUE file; /* should be mark */
|
38
|
+
} rb_const_entry_t;
|
39
|
+
|
40
|
+
VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj);
|
41
|
+
VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj);
|
42
|
+
VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj);
|
43
|
+
void rb_free_const_table(struct rb_id_table *tbl);
|
44
|
+
VALUE rb_const_source_location(VALUE, ID);
|
45
|
+
|
46
|
+
MJIT_SYMBOL_EXPORT_BEGIN
|
47
|
+
int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag);
|
48
|
+
rb_const_entry_t *rb_const_lookup(VALUE klass, ID id);
|
49
|
+
VALUE rb_public_const_get_at(VALUE klass, ID id);
|
50
|
+
VALUE rb_public_const_get_from(VALUE klass, ID id);
|
51
|
+
int rb_public_const_defined_from(VALUE klass, ID id);
|
52
|
+
VALUE rb_const_source_location_at(VALUE, ID);
|
53
|
+
MJIT_SYMBOL_EXPORT_END
|
54
|
+
|
55
|
+
#endif /* CONSTANT_H */
|
@@ -0,0 +1,457 @@
|
|
1
|
+
/**********************************************************************
|
2
|
+
|
3
|
+
debug_counter.h -
|
4
|
+
|
5
|
+
created at: Tue Feb 21 16:51:18 2017
|
6
|
+
|
7
|
+
Copyright (C) 2017 Koichi Sasada
|
8
|
+
|
9
|
+
**********************************************************************/
|
10
|
+
|
11
|
+
#ifndef USE_DEBUG_COUNTER
|
12
|
+
#define USE_DEBUG_COUNTER 0
|
13
|
+
#endif
|
14
|
+
|
15
|
+
#ifdef RB_DEBUG_COUNTER
|
16
|
+
|
17
|
+
// method cache (IMC: inline method cache)
|
18
|
+
RB_DEBUG_COUNTER(mc_inline_hit) // IMC hit
|
19
|
+
RB_DEBUG_COUNTER(mc_inline_miss_klass) // IMC miss by different class
|
20
|
+
RB_DEBUG_COUNTER(mc_inline_miss_invalidated) // IMC miss by invalidated ME
|
21
|
+
RB_DEBUG_COUNTER(mc_inline_miss_empty) // IMC miss because prev is empty slot
|
22
|
+
RB_DEBUG_COUNTER(mc_inline_miss_same_cc) // IMC miss, but same CC
|
23
|
+
RB_DEBUG_COUNTER(mc_inline_miss_same_cme) // IMC miss, but same CME
|
24
|
+
RB_DEBUG_COUNTER(mc_inline_miss_same_def) // IMC miss, but same definition
|
25
|
+
RB_DEBUG_COUNTER(mc_inline_miss_diff) // IMC miss, different methods
|
26
|
+
|
27
|
+
RB_DEBUG_COUNTER(mc_cme_complement) // number of acquiring complement CME
|
28
|
+
RB_DEBUG_COUNTER(mc_cme_complement_hit) // number of cache hit for complemented CME
|
29
|
+
|
30
|
+
RB_DEBUG_COUNTER(mc_search) // count for method lookup in class tree
|
31
|
+
RB_DEBUG_COUNTER(mc_search_notfound) // method lookup, but not found
|
32
|
+
RB_DEBUG_COUNTER(mc_search_super) // total traversed classes
|
33
|
+
|
34
|
+
// callinfo
|
35
|
+
RB_DEBUG_COUNTER(ci_packed) // number of packed CI
|
36
|
+
RB_DEBUG_COUNTER(ci_kw) // non-packed CI w/ keywords
|
37
|
+
RB_DEBUG_COUNTER(ci_nokw) // non-packed CI w/o keywords
|
38
|
+
RB_DEBUG_COUNTER(ci_runtime) // creating temporary CI
|
39
|
+
|
40
|
+
// callcache
|
41
|
+
RB_DEBUG_COUNTER(cc_new) // number of CC
|
42
|
+
RB_DEBUG_COUNTER(cc_temp) // dummy CC (stack-allocated)
|
43
|
+
RB_DEBUG_COUNTER(cc_found_in_ccs) // count for CC lookup success in CCS
|
44
|
+
RB_DEBUG_COUNTER(cc_not_found_in_ccs) // count for CC lookup success in CCS
|
45
|
+
|
46
|
+
RB_DEBUG_COUNTER(cc_ent_invalidate) // count for invalidating cc (cc->klass = 0)
|
47
|
+
RB_DEBUG_COUNTER(cc_cme_invalidate) // count for invalidating CME
|
48
|
+
|
49
|
+
RB_DEBUG_COUNTER(cc_invalidate_leaf) // count for invalidating klass if klass has no-sublcasses
|
50
|
+
RB_DEBUG_COUNTER(cc_invalidate_leaf_ccs) // corresponding CCS
|
51
|
+
RB_DEBUG_COUNTER(cc_invalidate_leaf_callable) // complimented cache (no-subclasses)
|
52
|
+
RB_DEBUG_COUNTER(cc_invalidate_tree) // count for invalidating klass if klass has sublcasses
|
53
|
+
RB_DEBUG_COUNTER(cc_invalidate_tree_cme) // cme if cme is found in this class or superclasses
|
54
|
+
RB_DEBUG_COUNTER(cc_invalidate_tree_callable) // complimented cache (subclasses)
|
55
|
+
RB_DEBUG_COUNTER(cc_invalidate_negative) // count for invalidating negative cache
|
56
|
+
|
57
|
+
RB_DEBUG_COUNTER(ccs_free) // count for free'ing ccs
|
58
|
+
RB_DEBUG_COUNTER(ccs_maxlen) // maximum length of ccs
|
59
|
+
RB_DEBUG_COUNTER(ccs_found) // count for finding corresponding ccs on method lookup
|
60
|
+
RB_DEBUG_COUNTER(ccs_not_found) // count for not found corresponding ccs on method lookup
|
61
|
+
|
62
|
+
// vm_eval.c
|
63
|
+
RB_DEBUG_COUNTER(call0_public)
|
64
|
+
RB_DEBUG_COUNTER(call0_other)
|
65
|
+
|
66
|
+
// iseq
|
67
|
+
RB_DEBUG_COUNTER(iseq_num) // number of total created iseq
|
68
|
+
RB_DEBUG_COUNTER(iseq_cd_num) // number of total created cd (call_data)
|
69
|
+
|
70
|
+
/*
|
71
|
+
* call cache fastpath usage
|
72
|
+
*/
|
73
|
+
RB_DEBUG_COUNTER(ccf_general)
|
74
|
+
RB_DEBUG_COUNTER(ccf_iseq_setup)
|
75
|
+
RB_DEBUG_COUNTER(ccf_iseq_setup_0start)
|
76
|
+
RB_DEBUG_COUNTER(ccf_iseq_setup_tailcall_0start)
|
77
|
+
RB_DEBUG_COUNTER(ccf_iseq_fix) /* several functions created with tool/mk_call_iseq_optimized.rb */
|
78
|
+
RB_DEBUG_COUNTER(ccf_iseq_opt) /* has_opt == TRUE (has optional parameters), but other flags are FALSE */
|
79
|
+
RB_DEBUG_COUNTER(ccf_iseq_kw1) /* vm_call_iseq_setup_kwparm_kwarg() */
|
80
|
+
RB_DEBUG_COUNTER(ccf_iseq_kw2) /* vm_call_iseq_setup_kwparm_nokwarg() */
|
81
|
+
RB_DEBUG_COUNTER(ccf_cfunc)
|
82
|
+
RB_DEBUG_COUNTER(ccf_cfunc_with_frame)
|
83
|
+
RB_DEBUG_COUNTER(ccf_ivar) /* attr_reader */
|
84
|
+
RB_DEBUG_COUNTER(ccf_attrset) /* attr_writer */
|
85
|
+
RB_DEBUG_COUNTER(ccf_method_missing)
|
86
|
+
RB_DEBUG_COUNTER(ccf_zsuper)
|
87
|
+
RB_DEBUG_COUNTER(ccf_bmethod)
|
88
|
+
RB_DEBUG_COUNTER(ccf_opt_send)
|
89
|
+
RB_DEBUG_COUNTER(ccf_opt_call)
|
90
|
+
RB_DEBUG_COUNTER(ccf_opt_block_call)
|
91
|
+
RB_DEBUG_COUNTER(ccf_super_method)
|
92
|
+
|
93
|
+
/*
|
94
|
+
* control frame push counts.
|
95
|
+
*
|
96
|
+
* * frame_push: frame push counts.
|
97
|
+
* * frame_push_*: frame push counts per each type.
|
98
|
+
* * frame_R2R: Ruby frame to Ruby frame
|
99
|
+
* * frame_R2C: Ruby frame to C frame
|
100
|
+
* * frame_C2C: C frame to C frame
|
101
|
+
* * frame_C2R: C frame to Ruby frame
|
102
|
+
*/
|
103
|
+
RB_DEBUG_COUNTER(frame_push)
|
104
|
+
RB_DEBUG_COUNTER(frame_push_method)
|
105
|
+
RB_DEBUG_COUNTER(frame_push_block)
|
106
|
+
RB_DEBUG_COUNTER(frame_push_class)
|
107
|
+
RB_DEBUG_COUNTER(frame_push_top)
|
108
|
+
RB_DEBUG_COUNTER(frame_push_cfunc)
|
109
|
+
RB_DEBUG_COUNTER(frame_push_ifunc)
|
110
|
+
RB_DEBUG_COUNTER(frame_push_eval)
|
111
|
+
RB_DEBUG_COUNTER(frame_push_rescue)
|
112
|
+
RB_DEBUG_COUNTER(frame_push_dummy)
|
113
|
+
|
114
|
+
RB_DEBUG_COUNTER(frame_R2R)
|
115
|
+
RB_DEBUG_COUNTER(frame_R2C)
|
116
|
+
RB_DEBUG_COUNTER(frame_C2C)
|
117
|
+
RB_DEBUG_COUNTER(frame_C2R)
|
118
|
+
|
119
|
+
/* instance variable counts
|
120
|
+
*
|
121
|
+
* * ivar_get_ic_hit/miss: ivar_get inline cache (ic) hit/miss counts (VM insn)
|
122
|
+
* * ivar_get_ic_miss_serial: ivar_get ic miss reason by serial (VM insn)
|
123
|
+
* * ivar_get_ic_miss_unset: ... by unset (VM insn)
|
124
|
+
* * ivar_get_ic_miss_noobject: ... by "not T_OBJECT" (VM insn)
|
125
|
+
* * ivar_set_...: same counts with ivar_set (VM insn)
|
126
|
+
* * ivar_get/set_base: call counts of "rb_ivar_get/set()".
|
127
|
+
* because of (1) ic miss.
|
128
|
+
* (2) direct call by C extensions.
|
129
|
+
*/
|
130
|
+
RB_DEBUG_COUNTER(ivar_get_ic_hit)
|
131
|
+
RB_DEBUG_COUNTER(ivar_get_ic_miss)
|
132
|
+
RB_DEBUG_COUNTER(ivar_get_ic_miss_serial)
|
133
|
+
RB_DEBUG_COUNTER(ivar_get_ic_miss_unset)
|
134
|
+
RB_DEBUG_COUNTER(ivar_get_ic_miss_noobject)
|
135
|
+
RB_DEBUG_COUNTER(ivar_set_ic_hit)
|
136
|
+
RB_DEBUG_COUNTER(ivar_set_ic_miss)
|
137
|
+
RB_DEBUG_COUNTER(ivar_set_ic_miss_serial)
|
138
|
+
RB_DEBUG_COUNTER(ivar_set_ic_miss_unset)
|
139
|
+
RB_DEBUG_COUNTER(ivar_set_ic_miss_iv_hit)
|
140
|
+
RB_DEBUG_COUNTER(ivar_set_ic_miss_noobject)
|
141
|
+
RB_DEBUG_COUNTER(ivar_get_base)
|
142
|
+
RB_DEBUG_COUNTER(ivar_set_base)
|
143
|
+
|
144
|
+
/* local variable counts
|
145
|
+
*
|
146
|
+
* * lvar_get: total lvar get counts (VM insn)
|
147
|
+
* * lvar_get_dynamic: lvar get counts if accessing upper env (VM insn)
|
148
|
+
* * lvar_set*: same as "get"
|
149
|
+
* * lvar_set_slowpath: counts using vm_env_write_slowpath()
|
150
|
+
*/
|
151
|
+
RB_DEBUG_COUNTER(lvar_get)
|
152
|
+
RB_DEBUG_COUNTER(lvar_get_dynamic)
|
153
|
+
RB_DEBUG_COUNTER(lvar_set)
|
154
|
+
RB_DEBUG_COUNTER(lvar_set_dynamic)
|
155
|
+
RB_DEBUG_COUNTER(lvar_set_slowpath)
|
156
|
+
|
157
|
+
/* GC counts:
|
158
|
+
*
|
159
|
+
* * count: simple count
|
160
|
+
* * _minor: minor gc
|
161
|
+
* * _major: major gc
|
162
|
+
* * other suffix is corresponding to last_gc_info or
|
163
|
+
* gc_profile_record_flag in gc.c.
|
164
|
+
*/
|
165
|
+
RB_DEBUG_COUNTER(gc_count)
|
166
|
+
RB_DEBUG_COUNTER(gc_minor_newobj)
|
167
|
+
RB_DEBUG_COUNTER(gc_minor_malloc)
|
168
|
+
RB_DEBUG_COUNTER(gc_minor_method)
|
169
|
+
RB_DEBUG_COUNTER(gc_minor_capi)
|
170
|
+
RB_DEBUG_COUNTER(gc_minor_stress)
|
171
|
+
RB_DEBUG_COUNTER(gc_major_nofree)
|
172
|
+
RB_DEBUG_COUNTER(gc_major_oldgen)
|
173
|
+
RB_DEBUG_COUNTER(gc_major_shady)
|
174
|
+
RB_DEBUG_COUNTER(gc_major_force)
|
175
|
+
RB_DEBUG_COUNTER(gc_major_oldmalloc)
|
176
|
+
|
177
|
+
RB_DEBUG_COUNTER(gc_enter_start)
|
178
|
+
RB_DEBUG_COUNTER(gc_enter_mark_continue)
|
179
|
+
RB_DEBUG_COUNTER(gc_enter_sweep_continue)
|
180
|
+
RB_DEBUG_COUNTER(gc_enter_rest)
|
181
|
+
RB_DEBUG_COUNTER(gc_enter_finalizer)
|
182
|
+
|
183
|
+
RB_DEBUG_COUNTER(gc_isptr_trial)
|
184
|
+
RB_DEBUG_COUNTER(gc_isptr_range)
|
185
|
+
RB_DEBUG_COUNTER(gc_isptr_align)
|
186
|
+
RB_DEBUG_COUNTER(gc_isptr_maybe)
|
187
|
+
|
188
|
+
/* object allocation counts:
|
189
|
+
*
|
190
|
+
* * obj_newobj: newobj counts
|
191
|
+
* * obj_newobj_slowpath: newobj with slowpath counts
|
192
|
+
* * obj_newobj_wb_unprotected: newobj for wb_unprotected.
|
193
|
+
* * obj_free: obj_free() counts
|
194
|
+
* * obj_promote: promoted counts (oldgen)
|
195
|
+
* * obj_wb_unprotect: wb unprotect counts
|
196
|
+
*
|
197
|
+
* * obj_[type]_[attr]: *free'ed counts* for each type.
|
198
|
+
* Note that it is not a allocated counts.
|
199
|
+
* * [type]
|
200
|
+
* * _obj: T_OBJECT
|
201
|
+
* * _str: T_STRING
|
202
|
+
* * _ary: T_ARRAY
|
203
|
+
* * _xxx: T_XXX (hash, struct, ...)
|
204
|
+
*
|
205
|
+
* * [attr]
|
206
|
+
* * _ptr: R?? is not embed.
|
207
|
+
* * _embed: R?? is embed.
|
208
|
+
* * _transient: R?? uses transient heap.
|
209
|
+
* * type specific attr.
|
210
|
+
* * str_shared: str is shared.
|
211
|
+
* * str_nofree: nofree
|
212
|
+
* * str_fstr: fstr
|
213
|
+
* * hash_empty: hash is empty
|
214
|
+
* * hash_1_4: has 1 to 4 entries
|
215
|
+
* * hash_5_8: has 5 to 8 entries
|
216
|
+
* * hash_g8: has n entries (n>8)
|
217
|
+
* * match_under4: has under 4 oniguruma regions allocated
|
218
|
+
* * match_ge4: has n regions allocated (4<=n<8)
|
219
|
+
* * match_ge8: has n regions allocated (8<=n)
|
220
|
+
* * data_empty: T_DATA but no memory free.
|
221
|
+
* * data_xfree: free'ed by xfree().
|
222
|
+
* * data_imm_free: free'ed immediately.
|
223
|
+
* * data_zombie: free'ed with zombie.
|
224
|
+
* * imemo_*: T_IMEMO with each type.
|
225
|
+
*/
|
226
|
+
RB_DEBUG_COUNTER(obj_newobj)
|
227
|
+
RB_DEBUG_COUNTER(obj_newobj_slowpath)
|
228
|
+
RB_DEBUG_COUNTER(obj_newobj_wb_unprotected)
|
229
|
+
RB_DEBUG_COUNTER(obj_free)
|
230
|
+
RB_DEBUG_COUNTER(obj_promote)
|
231
|
+
RB_DEBUG_COUNTER(obj_wb_unprotect)
|
232
|
+
|
233
|
+
RB_DEBUG_COUNTER(obj_obj_embed)
|
234
|
+
RB_DEBUG_COUNTER(obj_obj_transient)
|
235
|
+
RB_DEBUG_COUNTER(obj_obj_ptr)
|
236
|
+
|
237
|
+
RB_DEBUG_COUNTER(obj_str_ptr)
|
238
|
+
RB_DEBUG_COUNTER(obj_str_embed)
|
239
|
+
RB_DEBUG_COUNTER(obj_str_shared)
|
240
|
+
RB_DEBUG_COUNTER(obj_str_nofree)
|
241
|
+
RB_DEBUG_COUNTER(obj_str_fstr)
|
242
|
+
|
243
|
+
RB_DEBUG_COUNTER(obj_ary_embed)
|
244
|
+
RB_DEBUG_COUNTER(obj_ary_transient)
|
245
|
+
RB_DEBUG_COUNTER(obj_ary_ptr)
|
246
|
+
RB_DEBUG_COUNTER(obj_ary_extracapa)
|
247
|
+
/*
|
248
|
+
ary_shared_create: shared ary by Array#dup and so on.
|
249
|
+
ary_shared: finished in shard.
|
250
|
+
ary_shared_root_occupied: shared_root but has only 1 refcnt.
|
251
|
+
The number (ary_shared - ary_shared_root_occupied) is meaningful.
|
252
|
+
*/
|
253
|
+
RB_DEBUG_COUNTER(obj_ary_shared_create)
|
254
|
+
RB_DEBUG_COUNTER(obj_ary_shared)
|
255
|
+
RB_DEBUG_COUNTER(obj_ary_shared_root_occupied)
|
256
|
+
|
257
|
+
RB_DEBUG_COUNTER(obj_hash_empty)
|
258
|
+
RB_DEBUG_COUNTER(obj_hash_1)
|
259
|
+
RB_DEBUG_COUNTER(obj_hash_2)
|
260
|
+
RB_DEBUG_COUNTER(obj_hash_3)
|
261
|
+
RB_DEBUG_COUNTER(obj_hash_4)
|
262
|
+
RB_DEBUG_COUNTER(obj_hash_5_8)
|
263
|
+
RB_DEBUG_COUNTER(obj_hash_g8)
|
264
|
+
|
265
|
+
RB_DEBUG_COUNTER(obj_hash_null)
|
266
|
+
RB_DEBUG_COUNTER(obj_hash_ar)
|
267
|
+
RB_DEBUG_COUNTER(obj_hash_st)
|
268
|
+
RB_DEBUG_COUNTER(obj_hash_transient)
|
269
|
+
RB_DEBUG_COUNTER(obj_hash_force_convert)
|
270
|
+
|
271
|
+
RB_DEBUG_COUNTER(obj_struct_embed)
|
272
|
+
RB_DEBUG_COUNTER(obj_struct_transient)
|
273
|
+
RB_DEBUG_COUNTER(obj_struct_ptr)
|
274
|
+
|
275
|
+
RB_DEBUG_COUNTER(obj_data_empty)
|
276
|
+
RB_DEBUG_COUNTER(obj_data_xfree)
|
277
|
+
RB_DEBUG_COUNTER(obj_data_imm_free)
|
278
|
+
RB_DEBUG_COUNTER(obj_data_zombie)
|
279
|
+
|
280
|
+
RB_DEBUG_COUNTER(obj_match_under4)
|
281
|
+
RB_DEBUG_COUNTER(obj_match_ge4)
|
282
|
+
RB_DEBUG_COUNTER(obj_match_ge8)
|
283
|
+
RB_DEBUG_COUNTER(obj_match_ptr)
|
284
|
+
|
285
|
+
RB_DEBUG_COUNTER(obj_iclass_ptr)
|
286
|
+
RB_DEBUG_COUNTER(obj_class_ptr)
|
287
|
+
RB_DEBUG_COUNTER(obj_module_ptr)
|
288
|
+
|
289
|
+
RB_DEBUG_COUNTER(obj_bignum_ptr)
|
290
|
+
RB_DEBUG_COUNTER(obj_bignum_embed)
|
291
|
+
RB_DEBUG_COUNTER(obj_float)
|
292
|
+
RB_DEBUG_COUNTER(obj_complex)
|
293
|
+
RB_DEBUG_COUNTER(obj_rational)
|
294
|
+
|
295
|
+
RB_DEBUG_COUNTER(obj_regexp_ptr)
|
296
|
+
RB_DEBUG_COUNTER(obj_file_ptr)
|
297
|
+
RB_DEBUG_COUNTER(obj_symbol)
|
298
|
+
|
299
|
+
RB_DEBUG_COUNTER(obj_imemo_ment)
|
300
|
+
RB_DEBUG_COUNTER(obj_imemo_iseq)
|
301
|
+
RB_DEBUG_COUNTER(obj_imemo_env)
|
302
|
+
RB_DEBUG_COUNTER(obj_imemo_tmpbuf)
|
303
|
+
RB_DEBUG_COUNTER(obj_imemo_ast)
|
304
|
+
RB_DEBUG_COUNTER(obj_imemo_cref)
|
305
|
+
RB_DEBUG_COUNTER(obj_imemo_svar)
|
306
|
+
RB_DEBUG_COUNTER(obj_imemo_throw_data)
|
307
|
+
RB_DEBUG_COUNTER(obj_imemo_ifunc)
|
308
|
+
RB_DEBUG_COUNTER(obj_imemo_memo)
|
309
|
+
RB_DEBUG_COUNTER(obj_imemo_parser_strterm)
|
310
|
+
RB_DEBUG_COUNTER(obj_imemo_callinfo)
|
311
|
+
RB_DEBUG_COUNTER(obj_imemo_callcache)
|
312
|
+
|
313
|
+
/* ar_table */
|
314
|
+
RB_DEBUG_COUNTER(artable_hint_hit)
|
315
|
+
RB_DEBUG_COUNTER(artable_hint_miss)
|
316
|
+
RB_DEBUG_COUNTER(artable_hint_notfound)
|
317
|
+
|
318
|
+
/* heap function counts
|
319
|
+
*
|
320
|
+
* * heap_xmalloc/realloc/xfree: call counts
|
321
|
+
*/
|
322
|
+
RB_DEBUG_COUNTER(heap_xmalloc)
|
323
|
+
RB_DEBUG_COUNTER(heap_xrealloc)
|
324
|
+
RB_DEBUG_COUNTER(heap_xfree)
|
325
|
+
|
326
|
+
/* transient_heap */
|
327
|
+
RB_DEBUG_COUNTER(theap_alloc)
|
328
|
+
RB_DEBUG_COUNTER(theap_alloc_fail)
|
329
|
+
RB_DEBUG_COUNTER(theap_evacuate)
|
330
|
+
|
331
|
+
// VM sync
|
332
|
+
RB_DEBUG_COUNTER(vm_sync_lock)
|
333
|
+
RB_DEBUG_COUNTER(vm_sync_lock_enter)
|
334
|
+
RB_DEBUG_COUNTER(vm_sync_lock_enter_nb)
|
335
|
+
RB_DEBUG_COUNTER(vm_sync_lock_enter_cr)
|
336
|
+
RB_DEBUG_COUNTER(vm_sync_barrier)
|
337
|
+
|
338
|
+
/* mjit_exec() counts */
|
339
|
+
RB_DEBUG_COUNTER(mjit_exec)
|
340
|
+
RB_DEBUG_COUNTER(mjit_exec_not_added)
|
341
|
+
RB_DEBUG_COUNTER(mjit_exec_not_ready)
|
342
|
+
RB_DEBUG_COUNTER(mjit_exec_not_compiled)
|
343
|
+
RB_DEBUG_COUNTER(mjit_exec_call_func)
|
344
|
+
|
345
|
+
/* MJIT enqueue / unload */
|
346
|
+
RB_DEBUG_COUNTER(mjit_add_iseq_to_process)
|
347
|
+
RB_DEBUG_COUNTER(mjit_unload_units)
|
348
|
+
|
349
|
+
/* MJIT <-> VM frame push counts */
|
350
|
+
RB_DEBUG_COUNTER(mjit_frame_VM2VM)
|
351
|
+
RB_DEBUG_COUNTER(mjit_frame_VM2JT)
|
352
|
+
RB_DEBUG_COUNTER(mjit_frame_JT2JT)
|
353
|
+
RB_DEBUG_COUNTER(mjit_frame_JT2VM)
|
354
|
+
|
355
|
+
/* MJIT cancel counters */
|
356
|
+
RB_DEBUG_COUNTER(mjit_cancel)
|
357
|
+
RB_DEBUG_COUNTER(mjit_cancel_ivar_inline)
|
358
|
+
RB_DEBUG_COUNTER(mjit_cancel_exivar_inline)
|
359
|
+
RB_DEBUG_COUNTER(mjit_cancel_send_inline)
|
360
|
+
RB_DEBUG_COUNTER(mjit_cancel_opt_insn) /* CALL_SIMPLE_METHOD */
|
361
|
+
RB_DEBUG_COUNTER(mjit_cancel_invalidate_all)
|
362
|
+
RB_DEBUG_COUNTER(mjit_cancel_leave)
|
363
|
+
|
364
|
+
/* rb_mjit_unit_list length */
|
365
|
+
RB_DEBUG_COUNTER(mjit_length_unit_queue)
|
366
|
+
RB_DEBUG_COUNTER(mjit_length_active_units)
|
367
|
+
RB_DEBUG_COUNTER(mjit_length_compact_units)
|
368
|
+
RB_DEBUG_COUNTER(mjit_length_stale_units)
|
369
|
+
|
370
|
+
/* Other MJIT counters */
|
371
|
+
RB_DEBUG_COUNTER(mjit_compile_failures)
|
372
|
+
|
373
|
+
/* load (not implemented yet) */
|
374
|
+
/*
|
375
|
+
RB_DEBUG_COUNTER(load_files)
|
376
|
+
RB_DEBUG_COUNTER(load_path_is_not_realpath)
|
377
|
+
*/
|
378
|
+
#endif
|
379
|
+
|
380
|
+
#ifndef RUBY_DEBUG_COUNTER_H
|
381
|
+
#define RUBY_DEBUG_COUNTER_H 1
|
382
|
+
|
383
|
+
#include "ruby/internal/config.h"
|
384
|
+
#include <stddef.h> /* for size_t */
|
385
|
+
#include "ruby/ruby.h" /* for VALUE */
|
386
|
+
|
387
|
+
#if !defined(__GNUC__) && USE_DEBUG_COUNTER
|
388
|
+
#error "USE_DEBUG_COUNTER is not supported by other than __GNUC__"
|
389
|
+
#endif
|
390
|
+
|
391
|
+
enum rb_debug_counter_type {
|
392
|
+
#define RB_DEBUG_COUNTER(name) RB_DEBUG_COUNTER_##name,
|
393
|
+
#include __FILE__
|
394
|
+
RB_DEBUG_COUNTER_MAX
|
395
|
+
#undef RB_DEBUG_COUNTER
|
396
|
+
};
|
397
|
+
|
398
|
+
#if USE_DEBUG_COUNTER
|
399
|
+
extern size_t rb_debug_counter[];
|
400
|
+
RUBY_EXTERN struct rb_ractor_struct *ruby_single_main_ractor;
|
401
|
+
RUBY_EXTERN void rb_debug_counter_add_atomic(enum rb_debug_counter_type type, int add);
|
402
|
+
|
403
|
+
inline static int
|
404
|
+
rb_debug_counter_add(enum rb_debug_counter_type type, int add, int cond)
|
405
|
+
{
|
406
|
+
if (cond) {
|
407
|
+
if (ruby_single_main_ractor != NULL) {
|
408
|
+
rb_debug_counter[(int)type] += add;
|
409
|
+
}
|
410
|
+
else {
|
411
|
+
rb_debug_counter_add_atomic(type, add);
|
412
|
+
}
|
413
|
+
}
|
414
|
+
return cond;
|
415
|
+
}
|
416
|
+
|
417
|
+
inline static int
|
418
|
+
rb_debug_counter_max(enum rb_debug_counter_type type, unsigned int num)
|
419
|
+
{
|
420
|
+
// TODO: sync
|
421
|
+
if (rb_debug_counter[(int)type] < num) {
|
422
|
+
rb_debug_counter[(int)type] = num;
|
423
|
+
return 1;
|
424
|
+
}
|
425
|
+
else {
|
426
|
+
return 0;
|
427
|
+
}
|
428
|
+
}
|
429
|
+
|
430
|
+
VALUE rb_debug_counter_reset(VALUE klass);
|
431
|
+
VALUE rb_debug_counter_show(VALUE klass);
|
432
|
+
|
433
|
+
#define RB_DEBUG_COUNTER_INC(type) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, 1)
|
434
|
+
#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (!rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, !(cond)))
|
435
|
+
#define RB_DEBUG_COUNTER_INC_IF(type, cond) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, 1, !!(cond))
|
436
|
+
#define RB_DEBUG_COUNTER_ADD(type, num) rb_debug_counter_add(RB_DEBUG_COUNTER_##type, (num), 1)
|
437
|
+
#define RB_DEBUG_COUNTER_SETMAX(type, num) rb_debug_counter_max(RB_DEBUG_COUNTER_##type, (unsigned int)(num))
|
438
|
+
|
439
|
+
#else
|
440
|
+
#define RB_DEBUG_COUNTER_INC(type) ((void)0)
|
441
|
+
#define RB_DEBUG_COUNTER_INC_UNLESS(type, cond) (!!(cond))
|
442
|
+
#define RB_DEBUG_COUNTER_INC_IF(type, cond) (!!(cond))
|
443
|
+
#define RB_DEBUG_COUNTER_ADD(type, num) ((void)0)
|
444
|
+
#define RB_DEBUG_COUNTER_SETMAX(type, num) 0
|
445
|
+
#endif
|
446
|
+
|
447
|
+
void rb_debug_counter_show_results(const char *msg);
|
448
|
+
|
449
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
450
|
+
|
451
|
+
size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr);
|
452
|
+
void ruby_debug_counter_reset(void);
|
453
|
+
void ruby_debug_counter_show_at_exit(int enable);
|
454
|
+
|
455
|
+
RUBY_SYMBOL_EXPORT_END
|
456
|
+
|
457
|
+
#endif /* RUBY_DEBUG_COUNTER_H */
|
@@ -0,0 +1,36 @@
|
|
1
|
+
#ifndef DLN_H
|
2
|
+
#define DLN_H
|
3
|
+
/**********************************************************************
|
4
|
+
|
5
|
+
dln.h -
|
6
|
+
|
7
|
+
$Author$
|
8
|
+
created at: Wed Jan 19 16:53:09 JST 1994
|
9
|
+
|
10
|
+
Copyright (C) 1993-2007 Yukihiro Matsumoto
|
11
|
+
|
12
|
+
**********************************************************************/
|
13
|
+
|
14
|
+
#include "ruby/defines.h" /* for RUBY_SYMBOL_EXPORT_BEGIN */
|
15
|
+
|
16
|
+
RUBY_SYMBOL_EXPORT_BEGIN
|
17
|
+
|
18
|
+
#ifndef DLN_FIND_EXTRA_ARG
|
19
|
+
#define DLN_FIND_EXTRA_ARG
|
20
|
+
#endif
|
21
|
+
#ifndef DLN_FIND_EXTRA_ARG_DECL
|
22
|
+
#define DLN_FIND_EXTRA_ARG_DECL
|
23
|
+
#endif
|
24
|
+
|
25
|
+
char *dln_find_exe_r(const char*,const char*,char*,size_t DLN_FIND_EXTRA_ARG_DECL);
|
26
|
+
char *dln_find_file_r(const char*,const char*,char*,size_t DLN_FIND_EXTRA_ARG_DECL);
|
27
|
+
|
28
|
+
#ifdef USE_DLN_A_OUT
|
29
|
+
extern char *dln_argv0;
|
30
|
+
#endif
|
31
|
+
|
32
|
+
void *dln_load(const char*);
|
33
|
+
|
34
|
+
RUBY_SYMBOL_EXPORT_END
|
35
|
+
|
36
|
+
#endif
|
@@ -0,0 +1,70 @@
|
|
1
|
+
#ifndef RUBY_ENCINDEX_H
|
2
|
+
#define RUBY_ENCINDEX_H 1
|
3
|
+
/**********************************************************************
|
4
|
+
|
5
|
+
encindex.h -
|
6
|
+
|
7
|
+
$Author$
|
8
|
+
created at: Tue Sep 15 13:21:14 JST 2015
|
9
|
+
|
10
|
+
Copyright (C) 2015 Yukihiro Matsumoto
|
11
|
+
|
12
|
+
**********************************************************************/
|
13
|
+
|
14
|
+
#include "ruby/encoding.h" /* rb_ascii8bit_encindex etc. */
|
15
|
+
#if defined(__cplusplus)
|
16
|
+
extern "C" {
|
17
|
+
#if 0
|
18
|
+
} /* satisfy cc-mode */
|
19
|
+
#endif
|
20
|
+
#endif
|
21
|
+
|
22
|
+
enum ruby_preserved_encindex {
|
23
|
+
RUBY_ENCINDEX_ASCII,
|
24
|
+
RUBY_ENCINDEX_UTF_8,
|
25
|
+
RUBY_ENCINDEX_US_ASCII,
|
26
|
+
|
27
|
+
/* preserved indexes */
|
28
|
+
RUBY_ENCINDEX_UTF_16BE,
|
29
|
+
RUBY_ENCINDEX_UTF_16LE,
|
30
|
+
RUBY_ENCINDEX_UTF_32BE,
|
31
|
+
RUBY_ENCINDEX_UTF_32LE,
|
32
|
+
RUBY_ENCINDEX_UTF_16,
|
33
|
+
RUBY_ENCINDEX_UTF_32,
|
34
|
+
RUBY_ENCINDEX_UTF8_MAC,
|
35
|
+
|
36
|
+
/* for old options of regexp */
|
37
|
+
RUBY_ENCINDEX_EUC_JP,
|
38
|
+
RUBY_ENCINDEX_Windows_31J,
|
39
|
+
|
40
|
+
RUBY_ENCINDEX_BUILTIN_MAX
|
41
|
+
};
|
42
|
+
|
43
|
+
#define ENCINDEX_ASCII RUBY_ENCINDEX_ASCII
|
44
|
+
#define ENCINDEX_UTF_8 RUBY_ENCINDEX_UTF_8
|
45
|
+
#define ENCINDEX_US_ASCII RUBY_ENCINDEX_US_ASCII
|
46
|
+
#define ENCINDEX_UTF_16BE RUBY_ENCINDEX_UTF_16BE
|
47
|
+
#define ENCINDEX_UTF_16LE RUBY_ENCINDEX_UTF_16LE
|
48
|
+
#define ENCINDEX_UTF_32BE RUBY_ENCINDEX_UTF_32BE
|
49
|
+
#define ENCINDEX_UTF_32LE RUBY_ENCINDEX_UTF_32LE
|
50
|
+
#define ENCINDEX_UTF_16 RUBY_ENCINDEX_UTF_16
|
51
|
+
#define ENCINDEX_UTF_32 RUBY_ENCINDEX_UTF_32
|
52
|
+
#define ENCINDEX_UTF8_MAC RUBY_ENCINDEX_UTF8_MAC
|
53
|
+
#define ENCINDEX_EUC_JP RUBY_ENCINDEX_EUC_JP
|
54
|
+
#define ENCINDEX_Windows_31J RUBY_ENCINDEX_Windows_31J
|
55
|
+
#define ENCINDEX_BUILTIN_MAX RUBY_ENCINDEX_BUILTIN_MAX
|
56
|
+
|
57
|
+
#define rb_ascii8bit_encindex() RUBY_ENCINDEX_ASCII
|
58
|
+
#define rb_utf8_encindex() RUBY_ENCINDEX_UTF_8
|
59
|
+
#define rb_usascii_encindex() RUBY_ENCINDEX_US_ASCII
|
60
|
+
|
61
|
+
int rb_enc_find_index2(const char *name, long len);
|
62
|
+
|
63
|
+
#if defined(__cplusplus)
|
64
|
+
#if 0
|
65
|
+
{ /* satisfy cc-mode */
|
66
|
+
#endif
|
67
|
+
} /* extern "C" { */
|
68
|
+
#endif
|
69
|
+
|
70
|
+
#endif /* RUBY_ENCINDEX_H */
|