diff options
author | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-03 08:11:07 +0000 |
---|---|---|
committer | tmm1 <tmm1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-03 08:11:07 +0000 |
commit | 084b602d9a52b62a04d17f65ba1a9b8a767d1e3e (patch) | |
tree | 397a5f2e6ec8b546fc44ae5f16e212be20c5d577 /.gdbinit | |
parent | ee7fa8b227a43f2e0af34c73bbdbf549bfaeb189 (diff) | |
download | ruby-084b602d9a52b62a04d17f65ba1a9b8a767d1e3e.tar.gz |
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43973 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to '.gdbinit')
-rw-r--r-- | .gdbinit | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -757,7 +757,7 @@ define rb_method_entry set $rb_method_entry_id = (ID)$arg1 set $rb_method_entry_me = (rb_method_entry_t *)0 while !$rb_method_entry_me && $rb_method_entry_klass - rb_numtable_entry $rb_method_entry_klass->m_tbl $rb_method_entry_id + rb_numtable_entry $rb_method_entry_klass->m_tbl_wrapper->tbl $rb_method_entry_id set $rb_method_entry_me = (rb_method_entry_t *)$rb_numtable_rec if !$rb_method_entry_me set $rb_method_entry_klass = (struct RClass *)$rb_method_entry_klass->ptr->super |