[ruby-cvs:51118] tmm1:r43973 (trunk): * include/ruby/ruby.h (struct RClass): Add wrapper struct around

tmm1 at ruby-lang.org tmm1 at ruby-lang.org
Tue Dec 3 17:11:09 JST 2013


tmm1	2013-12-03 17:11:07 +0900 (Tue, 03 Dec 2013)

  New Revision: 43973

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43973

  Log:
    * include/ruby/ruby.h (struct RClass): Add wrapper struct around
      RClass->m_tbl with serial. This prevents double marking method
      tables, since many classes/modules can share the same method table.
      This improves minor mark time in a large application by 30%.
    * internal.h (struct method_table_wrapper): Define new
      wrapper struct with additional serial.
    * internal.h (RCLASS_M_TBL_INIT): New macro for initializing method
      table wrapper and st_table.
    * method.h (void rb_sweep_method_entry): Rename rb_free_m_table to
      rb_free_m_tbl for consistentcy
    * .gdbinit (define rb_method_entry): Update rb_method_entry gdb helper
      for new method table structure.
    * class.c: Use RCLASS_M_TBL_WRAPPER and
      RCLASS_M_TBL_INIT macros.
    * class.c (rb_include_class_new): Share WRAPPER between module and
      iclass, so serial can prevent double marking.
    * eval.c (rb_prepend_module): ditto.
    * eval.c (rb_using_refinement): ditto.
    * gc.c: Mark and free new wrapper struct.
    * gc.c (obj_memsize_of): Count size of additional wrapper struct.

  Modified files:
    trunk/.gdbinit
    trunk/ChangeLog
    trunk/class.c
    trunk/eval.c
    trunk/gc.c
    trunk/include/ruby/ruby.h
    trunk/internal.h
    trunk/method.h


More information about the ruby-cvs mailing list