summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-09-11* vm.c (rb_vm_register_special_exception): make new function toko1
make and register special exceptions. * vm.c (rb_vm_mark): do not need to mark special exceptions because they are registerd by rb_gc_register_mark_object(). * eval.c (Init_eval): use rb_vm_register_special_exception(). * gc.c (Init_GC): ditto. * proc.c (Init_Proc): ditto. * thread.c (Init_Thread): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* gc.c (rb_gc_mark_values): added.ko1
This function is similar to rb_gc_mark_locations(), but not conservertive. * internal.h: ditto. * vm.c (env_mark): use rb_gc_mark_values() because env values should be Ruby VALUEs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47533 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* gc.c (gc_mark_ptr): rename to gc_mark_set.ko1
* gc.c (gc_mark): add gc_mark_ptr() to skip is_markable_object() check. gc_mark_maybe() can use gc_mark_ptr() directly because passed pointer is checked by is_pointer_to_heap(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47532 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* .gitignore: ignored temporary files and coverage results.hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* .gitignore: ignored only simplecov.hsbt
* coverage/README: Added coverage docs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* include/ruby/ruby.h, gc.c: add new internal eventsko1
RUBY_INTERNAL_EVENT_GC_ENTER and RUBY_INTERNAL_EVENT_GC_EXIT. When invoking GC process, GC_ENTER event is called. When exiting from GC process, GC_EXIT event is called. Incremental GC (incremental marking and lazy sweep) can call these events many times. For example (minor marking): (1) GC_ENTER - (2) GC_START (minor GC) (minor marking) - (3) GC_END_MARK (start lazy sweep) (4) GC_EXIT (ruby process) (5) GC_ENTER (lazy sweep) (6) GC_EXIT (ruby process) (... repeat (5), (6)) (7) GC_ENTER (finish lazy sweep) - (8) GC_END_SWEEP (9) GC_EXIT 2nd example (incremental major marking): (1) GC_ENTER - (2) GC_START (minor GC) (start incremental marking) (3) GC_EXIT (ruby process) (4) GC_ENTER (incremental marking) (5) GC_EXIT (ruby process) (... repeat (4), (5)) (6) GC_ENTER (finish incremental marking) - (7) GC_END_MARK (start lazy sweep) (8) GC_EXIT (ruby process) (9) GC_ENTER (lazy sweep) (10) GC_EXIT (ruby process) (... repeat (9), (10)) (11) GC_ENTER (finish lazy marking) - (12) GC_STOP_SWEEP (13) GC_EXIT Thease internal events enable to measure GC pause time completely. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47528 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* ChangeLog: use ascii characterhsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11lib/benchmark.rb: remove CLOCK_MONOTONIC_RAW supportnormal
In addition to being unaffected by _offset_ correction, CLOCK_MONOTONIC_RAW is also unaffected by _frequency_ correction, making it unsuitable for measuring real time on systems where the clock is always running too fast or slow. CLOCK_MONOTONIC (without _RAW) is the correct clock, as it is unaffected by _offset_ correction (due to human error or battery replacement), but still takes _frequency_ correction into account for clocks which consistently run too fast or slow. Thanks to Vít Ondruch for reporting the issue on ARM [Bug #10202] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47526 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11test_object.rb: add assertionsnobu
* test/ruby/test_object.rb (test_freeze_immediate): assertions for [Feature #8923]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11add reference to the ticket.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* include/ruby/ruby.h: freeze nil/true/false.ko1
* gc.c (should_be_finalizable): check frozen after checkin FL_ABLE. * object.c (rb_obj_taint): check OBJ_TAINTABLE(obj). * object.c (rb_obj_freeze): remove immediate_frozen_tbl because all of immediate values are frozen. YAY! * object.c (rb_obj_frozen_p): ditto. * test/ruby/test_eval.rb: skip instance_variable_set for frozen objects. * test/ruby/test_weakmap.rb: check ArgumentError instead of RuntimeError. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* 2014-09-11svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-11* lib/rdoc.rb, lib/rdoc, test/rdoc: Update to RDoc 4.2.0.alpha(21b241a)hsbt
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10variable.c (rb_ivar_set): remove unnecessary checknormal
r47512 contains the proper fix git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10* compile.c (rb_vm_addr2insn): rename to rb_vm_insn_addr2insnko1
to clear what address. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10test_date.rb: nonsense assertionnobu
* test/date/test_date.rb (TestDate#test__const): remove nonsense assertion. nil.frozen? is not date's concern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10gc.c: preserve encodingnobu
* gc.c (should_be_callable): preserve encoding of class name in error messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47514 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10compile.c: remove useless castnobu
* compile.c (rb_iseq_original_iseq): remove useless cast to fix compile error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10variable.c: check index overflownobu
* variable.c (rb_ivar_set), vm_insnhelper.c (vm_setivar): check instance variable index overflow. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10pack.c: no nil.taintnobu
* pack.c (pack_pack): nil is not taintable. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47511 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-10rb_call_info_t: shrink to 96 bytes from 104 bytes on 64-bitnormal
This keeps ci->flag and ci->aux.index consistent across 32-bit and 64-bit platforms. ci->flag: VM_CALL_* flags only use 9 bits, currently ci->aux.index: 2 billion ivars per class should be enough for anybody This saves around 50K allocations on "valgrind ruby -e exit" on x86-64 before: total heap usage: 48,122 allocs, 19,253 frees, 8,099,197 bytes allocated after: total heap usage: 48,069 allocs, 19,214 frees, 8,047,266 bytes allocated * vm_core.h (rb_call_info_t): ci->flag becomes 32-bit unsigned int ci->index becomes a 32-bit signed int (from signed long). Reorder for better packing on 64-bit, giving an 8 byte reduction from 104 to 96 bytes for each ci. * compile.c (new_callinfo, setup_args, iseq_compile_each, iseq_build_from_ary_body): adjust for type changes * vm_insnhelper.c (vm_getivar): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10compile: translate iseq in-placenormal
running "ruby -rpp -e 'pp GC.stat'", a reduction in malloc usage is shown: before: :malloc_increase=>118784, :oldmalloc_increase=>1178736, after: :malloc_increase=>99832, :oldmalloc_increase=>1031976, For "ruby -e exit", valgrind reports over 300K reduction in overall allocations (and unnecessary memory copies). before: total heap usage: 49,622 allocs, 20,492 frees, 8,697,493 bytes allocated after: total heap usage: 48,935 allocs, 19,805 frees, 8,373,773 bytes allocated (numbers from x86-64) v2 changes based on ko1 recommendations [ruby-core:64883]: - squashed in-place direct thread translation to avoid alloc+copy - renamed rb_iseq_untranslate_threaded_code to rb_iseq_original_iseq, cache new iseq->iseq_original field. * compile.c (rb_iseq_translate_threaded_code): modify in-place w/o copy (rb_vm_addr2insn): new function for debug (rb_iseq_original_iseq): ditto (iseq_set_sequence): assign iseq_encoded directly [Feature #10185] * vm_core (rb_iseq_t): move original ->iseq to bottom * iseq.c (iseq_free, iseq_free): adjust for new layout (rb_iseq_disasm): use original iseq for dump (iseq_data_to_ary): ditto (rb_iseq_line_trace_each): ditto (rb_iseq_build_for_ruby2cext): use iseq_encoded directly * vm_dump.c (rb_vmdebug_debug_print_pre): use original iseq git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10* remove trailing spaces.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10time.c: DATA_PTR is never NULLnormal
* time.c (time_mark): remove NULL check (time_memsize): ditto (time_free): remove, use RUBY_TYPED_DEFAULT_FREE instead [Feature #10219] Tiny improvement on my old Phenom II X4 945 system: $ ruby --disable=gems -e '6000000.times { Time.now }' before: 2.51user 0.00system 0:02.51elapsed 100%CPU after: 2.45user 0.00system 0:02.45elapsed 100%CPU git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10* common.mk (encs enc trans libencs libenc libtrans): force to runusa
enk.mk because common.mk does not know the dependency, but enk.mk knows. [ruby-dev:48530] [Bug #10220] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10* gc.c (gc_stat): update rdoc.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10* gc.c (gc_stat_internal): rename:ko1
* malloc_increase -> malloc_increase_bytes * malloc_limit -> malloc_increase_bytes_limit * oldmalloc_increase -> oldmalloc_increase_bytes * oldmalloc_limit -> oldmalloc_increase_bytes_limit ref: [Feature #9924] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47495 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* gc.c (gc_stat_internal): rename:ko1
* remembered_shady_object -> remembered_wb_unprotected_objects * remembered_shady_object_limit -> remembered_wb_unprotected_objects_limit * old_object -> old_objects * old_object_limit -> old_objects_limit ref: [Feature #9924] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-10* gc.c (gc_stat_internal): support:ko1
* total_allocated_pages * total_freed_pages ref: [Feature #9924] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47490 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-10* gc.c (objspace_total_slot): rename objspace_available_slots.ko1
* gc.c (objspace_live_slot, objspace_free_slot): rename ..._slot() to ..._slots(). * gc.c (objspace_free_slot): should subtract heap_pages_final_slots. * gc.c (gc_stat_internal): * add `heap_available_slots' field * rename heap_live_slot to heap_live_slots * rename heap_free_slot to heap_free_slots ref: [Feature #9924] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* gc.c: refactoring for RGENGC_PROFILE > 0.ko1
* rename rb_objspace_t::profile::..._count to rb_objspace_t::profile::total_..._count * rename promote_infant_types to promote_types * gc.c (gc_remember_unprotected): count remembered shady objects here. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* 2014-09-10svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* gc.c (init_mark_stack): MEMZERO() receive type as 2nd argument insteadnagachika
of size. Coverity Scan found this bug. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09s/stressfull/stressful/gkazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* ext/win32ole/sample/excel2.rb: remove some commented-out code.suke
rotate graph more slowly to see graph clearly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09fix a typo [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09fix typos [ci skip]kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09GC.stat key namenobu
* test/-ext-/tracepoint/test_tracepoint.rb: follow the change of key name of GC.stat. * test/ruby/test_hash.rb (TestHash#test_AREF_fstring_key): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* gc.c: rename rb_objspace_t::marked_objects to marked_slots.ko1
* gc.c (gc_marks_start): should be clear first. * gc.c (gc_marks_start): remembered shady objects are also marked. * gc.c (gc_stat_internal): add heap_marked_slots. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* gc.c: renameko1
* total_allocated_object_num -> total_allocated_objects * total_allocated_object_num_at_gc_start -> total_allocated_objects_at_gc_start * total_freed_object_num -> total_freed_objects * gc.c (gc_stat_internal): * rename total_allocated_object -> total_allocated_objects * rename total_freed_object -> total_freed_objects git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* gc.c (gc_stat_internal): fix symbol namesko1
* heap_final_slot -> heap_final_slots * heap_swept_slot -> heap_swept_slots git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47472 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-09-09gc.c: fix typosnobu
* gc.c (gc_stat_transition): fix typos. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* gc.c: continue layout changing.ko1
newobj_of() also touch: (4) increment total_allocated_object_num (5) check hook_events And gather fields related to marking phase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* gc.c: fix layout of rb_objsapce_t to improve cache locality.ko1
newobj_of() accesses: (1) rb_objspace_t::flags (2) rb_objspace_t::eden_heap::freelist (3) and rb_objspace_t::eden_heap::free_pages if freelist is NULL. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-09-09* gc.c: move rb_objspace_t::flags::gc_stressfull after during_gcko1
to make accesssing both parameters easy. * gc.c (heap_get_freeobj): add LIKELY() hint. * gc.c (heap_get_freeobj_from_next_freepage): ditto. * gc.c (newobj_of): check both parameters at once for exceptional case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e