[ruby-cvs:67963] ko1:r60782 (trunk): cleanup hook cleanup code.

ko1 at ruby-lang.org ko1 at ruby-lang.org
Thu Nov 16 11:47:58 JST 2017


ko1	2017-11-16 11:47:58 +0900 (Thu, 16 Nov 2017)

  New Revision: 60782

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

  Log:
    cleanup hook cleanup code.
    
    * vm_trace.c: before this patch, deleted hooks are remvoed at
      *the beggining* of hooks (exec_hooks_precheck).
      This patch cleanup deleted hooks at
      (1) just after hook is deleted (TracePoint#disable and so on)
      (2) just after executing hooks (exec_hooks_postcheck)
      Most of time (1) is enough, but if some threads running hooks,
      we need to wait cleaning up deleted hooks until threads finish
      running the hooks. This is why (2) is introduced (and this is
      why current impl cleanup deleted hooks at the beggining of hooks).
    
    * test/lib/tracepointchecker.rb: check also the number of delete
      waiting hooks.
    
    * cont.c (cont_restore_thread): fix VM->trace_running count.

  Modified files:
    trunk/cont.c
    trunk/test/lib/tracepointchecker.rb
    trunk/vm_trace.c


More information about the ruby-cvs mailing list