ruby/tool
Alan Wu 89e7997622 Combine call info and cache to speed up method invocation
To perform a regular method call, the VM needs two structs,
`rb_call_info` and `rb_call_cache`. At the moment, we allocate these two
structures in separate buffers. In the worst case, the CPU needs to read
4 cache lines to complete a method call. Putting the two structures
together reduces the maximum number of cache line reads to 2.

Combining the structures also saves 8 bytes per call site as the current
layout uses separate two pointers for the call info and the call cache.
This saves about 2 MiB on Discourse.

This change improves the Optcarrot benchmark at least 3%. For more
details, see attached bugs.ruby-lang.org ticket.

Complications:
 - A new instruction attribute `comptime_sp_inc` is introduced to
 calculate SP increase at compile time without using call caches. At
 compile time, a `TS_CALLDATA` operand points to a call info struct, but
 at runtime, the same operand points to a call data struct. Instruction
 that explicitly define `sp_inc` also need to define `comptime_sp_inc`.
 - MJIT code for copying call cache becomes slightly more complicated.
 - This changes the bytecode format, which might break existing tools.

[Misc #16258]
2019-10-24 18:03:42 +09:00
..
lib Catch syntax error even if fatal 2019-10-23 02:05:28 +09:00
m4 typedef rb_jmpbuf_t to void *[5] if __builtin_setjmp is used 2019-09-21 13:24:58 +09:00
ruby_vm Combine call info and cache to speed up method invocation 2019-10-24 18:03:42 +09:00
test fix assertion number. 2019-10-02 17:19:14 +09:00
asm_parse.rb tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
bisect.sh Recent commits of trunk do not have svn revision 2019-05-07 22:53:45 +09:00
build-transcode
checksum.rb Move vpath.rb into tool library direcotry. 2019-07-15 13:16:16 +09:00
colors Move to tool/lib from test/lib. 2019-07-02 07:59:54 +09:00
darwin-cc darwin-cc: hide ld warnings 2018-09-21 07:19:13 +00:00
downloader.rb Revert "Fix building with 1.8 BASERUBY" 2019-05-29 18:03:21 -07:00
enc-emoji-citrus-gen.rb Put jisx0208.rb to under the library directory. 2019-07-15 11:16:29 +09:00
enc-emoji4unicode.rb
enc-unicode.rb Embed the Emoji version 2018-11-27 06:44:02 +00:00
eval.rb tool: removed unused variables 2018-05-18 00:38:00 +00:00
expand-config.rb tool: removed unused variables 2018-05-18 00:38:00 +00:00
extlibs.rb Put colorize to library directory. 2019-07-15 09:40:22 +09:00
fake.rb Add RbConfig.fire_update! 2018-11-14 04:42:14 +00:00
fetch-bundled_gems.rb Use `git pull` instead of `git fetch` if master branch 2019-09-04 12:46:26 +09:00
file2lastrev.rb Exit gently if no VCS found but --suppress_not_found is given 2019-09-07 17:26:28 +09:00
format-release Move format-release to tool and fix bugs 2019-10-22 21:44:19 +09:00
gem-unpack.rb * tool/downloader.rb: Removed verification of gem certification. 2016-10-12 06:24:59 +00:00
gen_dummy_probes.rb probes.dmyh: remove preprocessor directives 2016-07-06 05:03:14 +00:00
gen_ruby_tapset.rb tool: removed unused variables 2018-05-18 00:38:00 +00:00
generic_erb.rb Removed needless LOAD_PATH modification. 2019-07-15 13:44:37 +09:00
git-refresh tool/git-refresh: skip git fetch and checkout 2018-07-08 05:52:12 +00:00
gperf.sed gperf.sed: static declarations 2017-12-15 14:42:43 +00:00
id2token.rb Removed needless LOAD_PATH modification. 2019-07-15 13:44:37 +09:00
ifchange ifchange: --debug option 2018-02-08 02:08:27 +00:00
insns2vm.rb insns2vm.rb: make #generate_parser private 2018-01-27 02:14:20 +00:00
install-sh configure.ac 2017-09-29 13:21:17 +00:00
leaked-globals st.c: Use rb_st_* prefix instead of st_* (#2479) 2019-09-22 22:12:18 +09:00
make-snapshot Fix typo [ci skip] 2019-10-08 00:00:24 +09:00
make_hgraph.rb * tool/make_hgraph.rb: added. 2015-05-29 08:39:50 +00:00
mdoc2man.rb Add support for the `Lk` macro to tool/mdoc2man.rb 2016-09-23 12:40:16 +00:00
merger.rb tool/merger.rb: fix tag existence check with subversion. 2019-08-28 14:50:21 +09:00
mjit_archflag.sh mjit_archflag.sh: fix bare word in the header 2018-11-22 06:09:07 +00:00
mk_call_iseq_optimized.rb add debug counters to count call cache fastpath. 2019-03-22 07:57:26 +00:00
mkconfig.rb Removed unused variable 2019-06-28 12:39:14 +09:00
mkrunnable.rb tool: removed unused variables 2018-05-18 00:38:00 +00:00
node_name.rb tool/node_name.rb: rewrote without flip-flop 2018-09-07 13:43:01 +00:00
parse.rb tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
prereq.status Substitute autoconf variables by prereq.status 2019-07-02 09:44:37 +09:00
probes_to_wiki.rb
pure_parser.rb Refine error message 2019-08-03 14:20:36 +09:00
rbinstall.rb add include/ruby/backward/cxxanyargs.hpp 2019-09-06 15:50:58 +09:00
rbuninstall.rb tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
redmine-backporter.rb tool/redmine-backporter.rb: Change redmine git revisions URL path. 2019-06-16 11:59:59 +09:00
release.sh tool/release.sh uses ruby-actions' result 2019-10-22 22:15:52 +09:00
rmdirs tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
run-gcov.rb tool/run-gcov.rb: ignore rubyspec_temp directory 2017-07-04 16:02:18 +00:00
run-lcov.rb Revamp method coverage to support define_method 2017-12-05 07:16:42 +00:00
runruby.rb Fix some bundler specs (#2380) 2019-08-20 09:46:31 +09:00
strip-rdoc.rb tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
sync_default_gems.rb Fixed sync path of e2mmap structure for gemspec. 2019-10-24 16:11:01 +09:00
test-bundled-gems.rb Pass $(XRUBY) to test-bundled-gems.rb since RbConfig.ruby is incorrect for miniruby 2019-09-29 13:57:54 +02:00
test-coverage.rb `make test-all COVERAGE=true` supports directory-separated build 2018-04-05 01:05:16 +00:00
transcode-tblgen.rb tool: fixed shadowing variables 2018-05-18 00:40:06 +00:00
transform_mjit_header.rb Fix a typo [ci skip] 2018-11-05 06:02:42 +00:00
travis_retry.sh We did not have tool/ before checkout 2019-08-12 14:37:26 +09:00
update-deps Prefer relative directory from srcdir to top_srcdir 2019-02-14 05:42:14 +00:00
vtlh.rb tool: add descriptions and fix typos 2016-07-02 21:01:04 +00:00
ytab.sed Propagate parser_params to rb_yytnamerr 2019-05-10 22:02:54 +09:00