[ruby-cvs:54690] normal:r47542 (trunk): iseq_inline_storage_entry: 24=>16 bytes on 64-bit

normal at ruby-lang.org normal at ruby-lang.org
Fri Sep 12 04:25:34 JST 2014


normal	2014-09-12 04:25:32 +0900 (Fri, 12 Sep 2014)

  New Revision: 47542

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

  Log:
    iseq_inline_storage_entry: 24=>16 bytes on 64-bit
    
    We may tag the running_thread pointer to avoid making the "once" struct
    bigger than "struct iseq_inline_cache_entry".
    
    This only saves a small amount with "valgrind ruby -e exit"
    before:
      total heap usage: 48,122 allocs, 19,248 frees, 8,110,149 bytes allocated
    after:
      total heap usage: 48,122 allocs, 19,253 frees, 8,099,197 bytes allocated
    
    * insns.def (once): define and use fake RUNNING_THREAD_ONCE_DONE
      pointer to indicate is->once.running_thread is done.
    
    * vm_core.h (iseq_inline_storage_entry): remove done field,
      allowing the union to be reduced from 24=>16 bytes on 64-bit

  Modified files:
    trunk/ChangeLog
    trunk/insns.def
    trunk/vm_core.h


More information about the ruby-cvs mailing list