Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual GC Compaction #111

Merged
merged 310 commits into from May 28, 2019
Merged

Manual GC Compaction #111

merged 310 commits into from May 28, 2019

Conversation

@tenderlove
Copy link

tenderlove commented Feb 27, 2019

GC Compaction for MRI

@vmg
Copy link
Member

vmg commented Mar 26, 2019

@tenderlove tenderlove force-pushed the gc-compact branch from c35b657 to 62c0767 Apr 17, 2019
nobu and others added 28 commits Apr 26, 2019
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66866 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67679 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
https://rubyci.org/logs/rubyci.s3.amazonaws.com/centos7/ruby-trunk/log/20190421T040003Z.fail.html.gz

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Re-committing ruby@7f09b5e
Backport changes from ruby/irb.
```
% ruby -ve 'p (nil..).first'
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
nil
% ruby -ve 'p (nil..).begin'
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18]
nil
```
Wercker seems to randomly fail
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5cc3c1c423fcb70008db9b64?step=5cc3c46a03f4460007da0659

To help debugging, let me isolate the impact from GC.compact in the JIT
testing on Wercker.
r59829 stopped clearing stack_start and enabled the code for
!FIBER_USE_NATIVE, but we need to do the same for register_stack_start
on ia64, otherwise we end up with NULL in cont_save_machine_stack.

Closes: ruby#2155
It refers to `Method#receiver` in the doc, but
there's no class reference in current doc.
Some tools automatically make it a link so it's useful.

Closes: ruby#2156
* string.c (str_duplicate): share the root shared string if the
  original string is already sharing, so that all shared strings
  refer the root shared string directly.  indirect sharing can
  cause a dangling pointer.

[Bug #15792]
Synced from ruby/irb@5feb361.
This includes a support to colorize named Class instance on IRB inspect.
VCS::GITSVN#format_changelog generates previous format, similar to
svn-log, and VCS::GIT#format_changelog stores just git-log as-is
for now.
* Mostly to try the new git repository.
matzbot and others added 27 commits May 13, 2019
GC is required for pinning / marking objects.  If the compactor runs
without pinning everything, then it will blow up, so just return early
if the GC is disabled.
This prevents the constants from moving.
Aliasing a method preserves its visibility.  These aliases turn
formerly-public methods into private.  Should make them public
again.  [Bug #15847]
I failed to collect any debug info in
https://app.wercker.com/ruby/ruby/runs/mjit-test1/5cda57fcab79a30008f195f6?step=5cda6a4e1090c4000800772e

It seems that it's due to this typo.
This function is used for marking / pinning vm stack values, so it
should have "vm" in the function name to be more clear.
This commit adds an alternative packing strategy for compaction.
Instead of packing towards "most pinned" pages, we can pack towards
"most empty" pages.  The idea is that we can double the heap size, then
pack all objects towards the empty side of the heap.  This will ensure
maximum chaos for testing / verification.
IDs can't move, we need to use them to look up the symbol objects later.
This is my mistake, I thought they were regular objects, but apparently
they are not.  We don't need to pin them.

Revert "Symbols can move so only cache IDs"

This reverts commit 672ee5f.
[Bug #15850]
@tenderlove tenderlove force-pushed the gc-compact branch from 81133cc to 3cf767e May 15, 2019
@tenderlove tenderlove merged commit 3cf767e into trunk May 28, 2019
jhawthorn pushed a commit that referenced this pull request Jul 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

You can’t perform that action at this time.