summaryrefslogtreecommitdiff
path: root/test/ruby/test_gc.rb
AgeCommit message (Collapse)Author
2019-06-30Suppress unused variable warningsNobuyoshi Nakada
2019-05-24test/ruby/test_gc.rb (test_gc_stress_at_startup): extend time timeoutYusuke Endoh
It fails on some CI environments. https://rubyci.org/logs/rubyci.s3.amazonaws.com/debian8/ruby-trunk/log/20190524T003006Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/unstable11s/ruby-trunk/log/20190523T002505Z.fail.html.gz
2019-05-21Do not modify shared arrayNobuyoshi Nakada
[Bug #15821]
2019-05-18skip a test to pass CIs.Koichi Sasada
I'm debugging [Bug #15821] but my patch introduces another issue. So I simply skip this test and re-enable it later.
2019-04-24Defer setting gc_stress until inits doneNobuyoshi Nakada
[Bug #15784]
2019-04-20Add `GC.compact` again.tenderlove
🙏 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-10Reverting all commits from r67479 to r67496 because of CI failureskazu
Because hard to specify commits related to r67479 only. So please commit again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2019-04-09Adding `GC.compact` and compacting GC support.tenderlove
This commit adds the new method `GC.compact` and compacting GC support. Please see this issue for caveats: https://bugs.ruby-lang.org/issues/15626 [Feature #15626] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-29test_gc.rb: increase timeout for RubyCIk0kubun
https://rubyci.org/logs/rubyci.s3.amazonaws.com/amazon/ruby-trunk/log/20181229T033003Z.fail.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66630 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-27Revert "Revert "Manage AST NODEs out of GC""mame
This re-introduces r60485. This reverts commit 5a176b75b1187cbd3861c387bde65ff66396a07c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-27Revert "Manage AST NODEs out of GC"mame
This reverts commit 620ba74778bfdbdc34ffbb142d49ce84a0ef58e9. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-27Manage AST NODEs out of GCmame
NODEs in AST are no longer objects managed by GC. This change will remove the restriction imposed by the GC. For example, a NODE can use more than five words (this is my primary purpose; we want to store the position data for each NODE, for coverage library), or even a NODE can have variable length (some kinds of NODEs have unused fields). To do this, however, we need more work, since Ripper still uses T_NODE objects managed by the GC. The life time of NODEs is more obvious than other kinds of objects; they are created at parsing, and they become disused immediately after compilation. This change releases all NODEs by a few `xfree`s after compilation, so performance will be improved a bit. In extreme example, `eval("x=1;" * 10000000)` runs much faster (40 sec. -> 7.8 sec. on my machine). The most important part of this change is `ast_t` struct, which has three contents: (1) NODE buffer (malloc'ed memory), (2) a reference to the root NODE, and (3) an array that contains objects that must be marked during parsing (such as literal objects). Some functions that had received `NODE*` arguments, must now receive `ast_t*`. * node.c, node.h: defines `ast_t` struct and related operations. * gc.c, internal.h: defines `imemo_ast`. * parse.y: makes `parser_params` struct have a reference to `ast_t`. Instead of `rb_node_newnode`, use `rb_ast_newnode` to create a NODE. * iseq.c, load.c, ruby.c, template/prelude.c.tmpl: modifies some functions to handle `ast_t*` instead of `NODE*`. * test/ruby/test_gc.rb: ad-hoc fix for a failed test. The test assumes GC eden is increased at startup by NODE object creation. However, this change now create no NODE object, so GC eden is not necessarily increased. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-09-24test_gc.rb: relax criterionnobu
* test/ruby/test_gc.rb (TestGc#test_expand_heap): relax the criterion and compare by epsilon. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-23gc.c: restore cfp at finalizernobu
* gc.c (run_finalizer): restore cfp for the case an exception raised in a finalizer. [ruby-core:82432] [Bug #13832] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59649 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-23skip unless finalizers runnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-08-23gc.c: run all finalizersnobu
* gc.c (run_finalizer): revert r59155 partially. finalizing loop should continue even after an exception is rescued. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-13* gc.c (gc_mark_roots): should mark the VM object itself to markko1
singleton class of the VM object. Before this patch, we only set mark bit for the VM object and invoke mark function separately. [Bug #12583] * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55663 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-03Remove debug print introduced in r52386naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-08* gc.c: rename PAGE_* to HEAP_PAGE_* because PAGE_SIZE is usedko1
in Mac OS X. * test/ruby/test_gc.rb: catch up this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-08* gc.c: rename constant names HEAP_* to PAGE_*.ko1
Keys of GC::INTERNAL_CONSTANTS are also renamed. * test/ruby/test_gc.rb: catch up this fix. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16Add frozen_string_literal: false for all filesnaruse
When you change this to true, you may need to add more tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-10* test/ruby/test_gc.rb (test_expand_heap): relax condition (1->2).ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-11-19* gc.c (gc_start): force to invoke GC by GC.startko1
even if it is GC.disable'd. * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52672 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30explicitly overwrite signal handlingnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30show parent process's signal mask from child processnaruse
Because this tests raises timeout on failure, and it doesn't reach assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30test_gc.rb: fix failure messagenobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): append signal info to stderr outputs in a proc, not to a proc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-30show child and parent signal masknaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29show signal mask on solarisnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52364 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-29revert experimental changes related to Solaris CInaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-28increase timeout (with full GC)naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-28write in shroternaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52319 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-27suppress warnings: assigned but unused variablenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-27dumping core may take too much time for CInaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52311 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-13test_gc.rb: dump hung up processnobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): kill hung up process by SIGSEGV to dump the backtrace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-12test_gc.rb: abort hung up processnobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): abort hung up process to dump the backtrace instead of terminating. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-12test_gc.rb: timeout of test_interrupt_in_finalizernobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): leave timeout to invoke_ruby. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-09test_gc.rb: check signal firstnobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): check the signal terminated the process before messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-02use assert_raisenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-31* test/ruby/test_gc.rb: increase timeout seconds for GC stressfulko1
debugging. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-02-05test_gc.rb: read binarynobu
* test/ruby/test_gc.rb (test_exception_in_finalizer): read in binary encoding to get rid of invalid byte sequence exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-24test_gc.rb: termsignobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): also check termsig to ensure killed by SIGINT. and try SIGSEGV to dump something. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48974 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13test_gc.rb: workaround for Windowsnobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): use inner process signal for Windows. [ruby-core:66825] [Bug #10595] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13test_gc.rb: waitnobu
* test/ruby/test_gc.rb (test_interrupt_in_finalizer): wait longer and send more interrupts for slower cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-12-13vm_trace.c: defer interrupts while postponed jobsnobu
* vm_trace.c (rb_postponed_job_flush): mask signal trap interrupt too to defer handling after finalizers finished. [ruby-core:66825] [Bug #10595] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-26* test/ruby/test_gc.rb (test_latest_gc_info): do test separatelyko1
to avoid mysterious behavior. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13* test/lib/envutil.rb: Moved from test/ruby/.akr
* test/lib/find_executable.rb: Ditto. * test/lib/memory_status.rb: Ditto. * test/lib/test/unit.rb: require envutil. * test/: Don't require envutil in test files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10* test/ruby/test_gc.rb: fix condition.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10* gc.c (gc_stat_internal): rename `heap_used' to `heap_allocated_pages'.ko1
ref: [Feature #9924] * test/ruby/test_gc.rb: add constraints test for gc stat information. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10* test/ruby/test_gc.rb: catch up last fix.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* gc.c (rb_objspace_t::heap_pages): rename field names:ko1
* used -> allocated_pages * increment -> allocatable_pages * length -> sorted_length And remove unused `limt' field. * gc.c: rename macros: * heap_pages_used -> heap_allocated_pages * heap_pages_length -> heap_pages_sorted_length * heap_pages_increment -> heap_allocatable_pages * gc.c (gc_stat_internal): fix symbol names ref: [Feature #9924] https://docs.google.com/spreadsheets/d/11Ua4uBr6o0k-nORrZLEIIUkHJ9JRzRR0NyZfrhEEnc8/edit?usp=sharing Yellow color fields in this table are changed. * test/ruby/test_gc.rb: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e