ruby-changes:31365
From: charliesome <ko1@a...>
Date: Mon, 28 Oct 2013 09:31:13 +0900 (JST)
Subject: [ruby-changes:31365] charliesome:r43444 (trunk): * vm.c: vm_clear_all_cache is not necessary now we use a 64 bit counter
charliesome 2013-10-28 09:31:07 +0900 (Mon, 28 Oct 2013) New Revision: 43444 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=43444 Log: * vm.c: vm_clear_all_cache is not necessary now we use a 64 bit counter for global state version. * vm_insnhelper.h: ruby_vm_global_state_version overflow is unnecessary Modified files: trunk/ChangeLog trunk/vm.c trunk/vm_insnhelper.h Index: ChangeLog =================================================================== --- ChangeLog (revision 43443) +++ ChangeLog (revision 43444) @@ -1,3 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Mon Oct 28 09:29:00 2013 Charlie Somerville <charliesome@r...> + + * vm.c: vm_clear_all_cache is not necessary now we use a 64 bit counter + for global state version. + + * vm_insnhelper.h: ruby_vm_global_state_version overflow is unnecessary + Mon Oct 28 07:47:32 2013 Aman Gupta <ruby@t...> * vm_backtrace.c (rb_profile_frame_classpath): do not use rb_inspect Index: vm.c =================================================================== --- vm.c (revision 43443) +++ vm.c (revision 43444) @@ -106,22 +106,6 @@ rb_event_flag_t ruby_vm_event_flags; https://github.com/ruby/ruby/blob/trunk/vm.c#L106 static void thread_free(void *ptr); -static void -vm_clear_all_inline_method_cache(void) -{ - /* TODO: Clear all inline cache entries in all iseqs. - How to iterate all iseqs in sweep phase? - rb_objspace_each_objects() doesn't work at sweep phase. - */ -} - -static void -vm_clear_all_cache() -{ - vm_clear_all_inline_method_cache(); - ruby_vm_global_state_version = 1; -} - void rb_vm_inc_const_missing_count(void) { Index: vm_insnhelper.h =================================================================== --- vm_insnhelper.h (revision 43443) +++ vm_insnhelper.h (revision 43444) @@ -263,9 +263,7 @@ enum vm_regan_acttype { https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.h#L263 #define GET_VM_STATE_VERSION() (ruby_vm_global_state_version) #define INC_VM_STATE_VERSION() do { \ ruby_vm_global_state_version = (ruby_vm_global_state_version + 1); \ - if (ruby_vm_global_state_version == 0) vm_clear_all_cache(); \ } while (0) -static void vm_clear_all_cache(void); static VALUE make_no_method_exception(VALUE exc, const char *format, VALUE obj, int argc, const VALUE *argv); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/