summaryrefslogtreecommitdiff
path: root/test/ruby/test_gc.rb
AgeCommit message (Collapse)Author
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
2014-07-24* gc.c: fix major GC flags.ko1
* add GPR_FLAG_MAJOR_BY_FORCE, which indicates major GC by METHOD, CAPI and so on (see GC_BY). * remove GPR_FLAG_MAJOR_BY_RESCAN because not used. * remove GPR_FLAG_MAJOR_BY_STRESS, use FORCE instead. * test/ruby/test_gc.rb: catch up. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46927 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-30* gc.c: support `USE_RGENGC == 0'.ko1
* test/ruby/test_gc.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46622 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-10* gc.c: invoke GC before memory allocation (xmalloc/xrealloc)ko1
when GC.stress = true. [Bug #9859] * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-03* test/ruby/test_gc.rb: allocate more objects to invoke GC by newobj.ko1
GC allows extending pages depends on heap_increment. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-04-09* test/ruby/test_gc.rb: more long timeout.ko1
This test failed under RGENGC_CHECK_MODE >= 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45538 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-30gc.c: avoid inadvertent pin-downnobu
* gc.c (gc_info_decode): get rid of inadvertent dynamic symbol pin-down, and preserve encoding in error messages. also should not use RSTRING_PTR macro on function calls. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17* test/ruby/test_gc.rb: ignore warning messages for running with -wko1
option such as chkbuild. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45028 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-17* gc.c: introduce new environment variableko1
"RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR" to control major/minor GC frequency. Do full GC when the number of old objects is more than R * N where R is this factor and N is the number of old objects just after last full GC. * test/ruby/test_gc.rb: add a test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-15test_gc.rb: relax assertionnobu
* test/ruby/test_gc.rb (test_profiler_total_time): GC time may be shorter than the timer resolution. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44619 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-01-04test/ruby/test_gc.rb: use GC.stat(:key) instead of GC.statkazu
* test/ruby/test_gc.rb (TestGc#test_latest_gc_info): use GC.stat(:key) instead of GC.stat. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18test_gc.rb: fix syntax errornobu
* test/ruby/test_gc.rb (TestGc#test_expand_heap): fix syntax error by mismatched paren. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44274 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18test_gc.rb: refine assertionnobu
* test/ruby/test_gc.rb (test_expand_heap): use assert_in_delta instead of bare assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44273 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-18* test/ruby/test_gc.rb (test_expand_heap): allow +/-1 diff.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-17vm_trace.c: isolate exceptionsnobu
* vm_trace.c (rb_postponed_job_flush): isolate exceptions in postponed jobs and restore outer ones. based on a patch by tarui. [ruby-core:58652] [Bug #9168] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-16* gc.c: introduce GC.verify_internal_consistency method to verify GCko1
internal data structure. Now this method only checks geneartion (old/young) consistency. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-13test/ruby: better assertionsnobu
* test/ruby: use better assertions instead of mere assert. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-06gc.c: add minor marking and lazy sweeping options to GC.starttmm1
* gc.c (gc_start_internal): GC.start() now accepts two optional keyword arguments. These can be used to disable full_mark (minor mark only) or disable immediate_sweep (use lazy sweep). These new options are useful for benchmarking GC behavior, or performing minor GC out-of-band. * test/ruby/test_gc.rb (class TestGc): tests for new options. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_gc.rb: expand timeoutnobu
* test/ruby/test_gc.rb (test_sweep_in_finalizer): expand timeout for slower machines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: add GC.latest_gc_info()tmm1
* gc.c (struct rb_objspace): rename internal last_collection_flags to latest_gc_info * gc.c (gc_latest_collection_info): add GC.latest_gc_info() with similar behavior to GC.stat() * gc.c (rb_gc_latest_gc_info): new c-api for above * gc.c (gc_stat_internal): remove :last_collection_flags from GC.stat * gc.c (gc_profile_decode_flags): remove GC::Profiler.decode_flags * include/ruby/intern.h (rb_gc_latest_gc_info): export new c-api * test/ruby/test_gc.rb (class TestGc): test for new behavior * NEWS: note about new api * gc.c (gc_stat_internal): raise TypeError on wrong type * gc.c (gc_stat): fix error message git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: expose GC.stat() to C-api via rb_gc_stat()tmm1
* include/ruby/intern.h: add rb_gc_stat() for access to GC.stat variables from c-api * gc.c (rb_gc_stat): new c-api method. accepts either VALUE hash like GC.stat, or VALUE symbol key and returns size_t directly. the second form is useful to avoid allocations, i.e. for usage inside INTERNAL_EVENT_GC tracepoints. * gc.c (gc_stat): add GC.stat(:key) to return single value instead of hash * gc.c (gc_stat_internal): helper method to retrieve single or all stat values * test/ruby/test_gc.rb (class TestGc): test for new behavior * NEWS: note about this new api git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44005 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05test_gc.rb: shortennobu
* test/ruby/test_gc.rb (test_sweep_in_finalizer): omit iteration number to 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44000 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-05gc.c: flush all deferred finalizersnobu
* gc.c (finalize_deferred): flush all deferred finalizers while other finalizers can get ready to run newly by lazy sweep. [ruby-core:58833] [Bug #9205] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-30* test/ruby/test_gc.rb (test_gc_reason): Force minor GC by consumingtmm1
free slots to fix test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43937 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-28* gc.c: Expose details about last garbage collection via GC.stat.tmm1
* gc.c (gc_stat): Add :last_collection_flags for reason/trigger/type of last GC run. * gc.c (gc_prof_sweep_timer_stop): Record HAVE_FINALIZE GPR even without GC_PROFILE_MORE_DETAIL. * gc.c (gc_profile_flags): Add GC::Profiler.decode_flags to make sense of GC.stat[:last_collection_flags] * test/ruby/test_gc.rb (class TestGc): Test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27* test/ruby/test_gc.rb (class TestGc): Fix warning intmm1
test_expand_heap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43878 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27* gc.c (Init_GC): Add new GC::INTERNAL_CONSTANTS for information abouttmm1
GC heap/page/slot sizing. * test/ruby/test_gc.rb (class TestGc): test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-27* gc.c (gc_stat): add new information heap_eden_page_length andko1
heap_tomb_page_length. * test/ruby/test_gc.rb: fix to use GC.stat[:heap_eden_page_length] instead of GC.stat[:heap_length]. This test expects `heap_eden_page_length' (used pages size). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-24* gc.c (gc_stat): add internal information.ko1
* heap_swept_slot * malloc_increase * malloc_limit * remembered_shady_object * remembered_shady_object_limit * old_object * old_object_limit * oldmalloc_increase * oldmalloc_limit * gc.c (gc_stat): rename names. * heap_live_num -> heap_live_slot * heap_free_num -> heap_free_slot * heap_final_slot -> heap_final_slot Quote from RDoc of GC.stat(): "The contents of the hash are implementation specific and may be changed in the future." * test/ruby/test_gc.rb: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-24* test/ruby/test_gc.rb: catch up last commit.ko1
Now RUBY_GC_OLDSPACE_LIMIT(...) is RUBY_GC_OLDMALLOC_LIMIT(...). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-11-23* gc.c: fix gloval variable name.ko1
Now we have following environments (and related variable names). * RUBY_GC_HEAP_INIT_SLOTS * RUBY_GC_HEAP_FREE_SLOTS * RUBY_GC_HEAP_GROWTH_FACTOR (new from 2.1) * RUBY_GC_HEAP_GROWTH_MAX_SLOTS (new from 2.1) * obsolete * RUBY_FREE_MIN -> RUBY_GC_HEAP_FREE_SLOTS (from 2.1) * RUBY_HEAP_MIN_SLOTS -> RUBY_GC_HEAP_INIT_SLOTS (from 2.1) * RUBY_GC_MALLOC_LIMIT * RUBY_GC_MALLOC_LIMIT_MAX (new from 2.1) * RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR (new from 2.1) * RUBY_GC_OLDSPACE_LIMIT (new from 2.1) * RUBY_GC_OLDSPACE_LIMIT_MAX (new from 2.1) * RUBY_GC_OLDSPACE_LIMIT_GROWTH_FACTOR (new from 2.1) * test/ruby/test_gc.rb: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-29* gc.c (gc_profile_total_time): fix off-by-one error in GC::Profiler.total_time.tmm1
* test/ruby/test_gc.rb (class TestGc): test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-23* gc.c: add new initial_growth_max tuning parameter. [ruby-core:57928] [Bug ↵tmm1
#9035] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-10-04gc.c: add objspace_free_num and make GC.stat[:heap_free_num] use ittmm1
* gc.c (objspace_free_num): new method for available/free slots on heap. [ruby-core:57633] [Bug #8983] * gc.c (gc_stat): change heap_free_num definition to use new method. * test/ruby/test_gc.rb: test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-27* gc.c: add two GC tuning environment variables.ko1
RUBY_GC_MALLOC_LIMIT_MAX and RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR. See r43067 for details. * gc.c (rb_gc_set_params): refactoring. And change verbose notation. Mostly duplicated functions get_envparam_int/double is not cool. Please rewrite it. * test/ruby/test_gc.rb: fix a test for this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-18* gc.c: Improve accuracy of objspace_live_num() andnari
allocated/freed counters. patched by tmm1(Aman Gupta). [Bug #8092] [ruby-core:53392] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-18* gc.c: Avoid unnecessary heap growth. patched by tmm1(Aman Gupta).nari
[Bug #8093] [ruby-core:53393] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-13* gc.c: allow to tune growth of heap by environment variablenari
RUBY_HEAP_SLOTS_GROWTH_FACTOR. patched by tmm1(Aman Gupta). [Feature #8015] [ruby-core:53131] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-12-14Use assert_separately to speed up slow testsnaruse
These speed will slow down when there are many objects like test-all. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38370 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-29* gc.c (rb_objspace_call_finalizer): finalize_deferred may free upnari
a object which is reachable from a part after this function, e.g. ruby_vm_destruct(). [ruby-dev:46647] [Bug #7452] * test/ruby/test_gc.rb (test_finalizing_main_thread): add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-21* test/ruby/test_gc.rb (test_profiler_clear): fix wrong methodnari
calls [Bug #7419] [ruby-core:49828]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-11-21* gc.c (gc_profile_clear): realloc profile records if its size isnari
higher than the threshold, GC_PROFILE_RECORD_DEFAULT_SIZE * 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37783 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-02* gc.c: return true or false. Patch by Dirkjan Bussink. [Bug #6821]nari
* test/ruby/test_gc.rb: add test-case for this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-29Suppress warning: method redefined.naruse
The warning cause test_singleton_method_added to fail. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-28* gc.c (obj_free): doesn't free a method table if it doesn'tnari
exits. [ruby-dev:44436] * test/ruby/test_gc.rb (class TestGc): added the test case for this issue. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-18Run separate process this GC.stress test.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e