1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool
tenderlove 8952964976 Add direct marking on iseq operands
Directly marking iseq operands allows us to eliminate the "mark array"
stored on ISEQ objects, which will reduce the amount of memory ISEQ
objects consume.  This patch changes the iseq mark function to:

* Directly marks ISEQ operands
* Iterate over and mark child ISEQs

It also introduces two flags on the ISEQ object.  In order to mark
instruction operands, we have to disassemble the instructions and find
the instruction parameters and types.  Instructions may also be
translated to jump addresses.  Instruction sequences may get marked by
the GC *while* they're mid flight (being compiled).  The
`ISEQ_TRANSLATED` flag is used to indicate whether or not the
instructions have been translated to jump addresses so that when we
decode the instructions we know whether or not we need to go from jump
location back to original instruction or not.

Not all ISEQ objects have any markable objects embedded in their
instructions.  We can detect whether or not an ISEQ has markable objects
in the instructions at compile time.  If the instructions contain
markable objects, we set a flag `ISEQ_MARKABLE_ISEQ` on the ISEQ object.
This means that during the mark phase, we can skip decompilation if the
flag is *not* set.  In other words, we can avoid decompilation of we
know in advance there is nothing to mark.

`once` instructions have an operand that contains the result of a
one-time compilation of a regex.  Before this patch, that operand was
called an "inline cache", even though the struct was actually an "inline
storage".  This patch changes the operand to be an "inline storage" so
that we can differentiate between caches that need marking (the inline
storage) and caches that don't need marking (inline cache).

[ruby-core:84909]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62706 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-03-09 20:11:45 +00:00
..
m4 tool/m4/ruby_replace_type.m4: use AC_CHECK_TYPES for HAVE_* macros 2018-02-20 08:44:38 +00:00
ruby_vm Add direct marking on iseq operands 2018-03-09 20:11:45 +00:00
test
asm_parse.rb
bisect.sh tool/bisect.sh: extracted build part [ci skip] 2018-03-01 03:26:05 +00:00
build-transcode
change_maker.rb
checksum.rb
colorize.rb distinguish pass and fail by highlight [ci skip] 2017-10-14 02:17:07 +00:00
downloader.rb tool/downloader.rb: retry SocketError 2018-02-05 13:24:00 +00:00
enc-emoji-citrus-gen.rb
enc-emoji4unicode.rb
enc-unicode.rb support gperf 3.1 2017-12-08 05:51:19 +00:00
eval.rb
expand-config.rb
extlibs.rb
fake.rb fake.rb: set libdir 2017-12-27 01:26:22 +00:00
fetch-bundled_gems.rb test-bundled-gems-fetch 2017-10-25 23:35:46 +00:00
file2lastrev.rb file2lastrev.rb: suppress_not_found 2017-12-06 11:18:53 +00:00
gem-unpack.rb
gen_dummy_probes.rb
gen_ruby_tapset.rb
generate-backport-changelog.rb
generic_erb.rb Refactor ERB version checking for keyword arguments 2018-02-27 11:12:23 +00:00
git-refresh
gperf.sed gperf.sed: static declarations 2017-12-15 14:42:43 +00:00
id2token.rb
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
jisx0208.rb
make-snapshot Prefer to use %x instead of backtick. 2018-02-28 11:12:36 +00:00
make_hgraph.rb
mdoc2man.rb
merger.rb aliases 2017-12-16 01:56:14 +00:00
mk_call_iseq_optimized.rb mk_call_iseq_optimized.rb: add mode string [ci skip] 2017-11-09 23:02:52 +00:00
mkconfig.rb mkconfig.rb: hide MJIT configurations 2018-02-08 15:19:01 +00:00
mkrunnable.rb
node_name.rb
parse.rb
prereq.status
probes_to_wiki.rb
rbinstall.rb tool/rbinstall.rb: allow owner to have write permissions 2018-01-05 09:41:21 +00:00
rbuninstall.rb
redmine-backporter.rb
release.sh
rmdirs
run-gcov.rb
run-lcov.rb Revamp method coverage to support define_method 2017-12-05 07:16:42 +00:00
runruby.rb tool/runruby.rb: fix RUNRUBY_USE_GDB case 2017-11-07 11:21:09 +00:00
strip-rdoc.rb
sync_default_gems.rb Postponing the Bundler merge. 2017-12-22 23:08:05 +00:00
test-coverage.rb ext/coverage/coverage.c: remove COVERAGE_EXPERIMENTAL_MODE 2017-12-12 00:20:58 +00:00
transcode-tblgen.rb Refactor ERB version checking for keyword arguments 2018-02-27 11:12:23 +00:00
transform_mjit_header.rb transform_mjit_header.rb: inline ivar operations 2018-03-07 14:35:28 +00:00
update-deps mjit_compile.c: merge initial JIT compiler 2018-02-04 11:22:28 +00:00
vcs.rb vcs.rb: .git at export 2018-02-26 06:00:08 +00:00
vpath.rb
vtlh.rb
ytab.sed more ytab.sed fixes 2018-01-15 02:39:32 +00:00