#656: Optimization in src/pmc/RetContinuation.pmc:invoke causes segfault
-------------------------+--------------------------------------------------
 Reporter:  whiteknight  |       Owner:       
     Type:  todo         |      Status:  new  
 Priority:  normal       |   Milestone:       
Component:  none         |     Version:  1.1.0
 Severity:  medium       |    Keywords:       
     Lang:               |       Patch:       
 Platform:               |  
-------------------------+--------------------------------------------------
 After the GC API refactor, there is now a line in
 src/pmc/retcontinuation.pmc:invoke() that is commented out:

 {{{
 /* Parrot_gc_free_pmc_header(interp, SELF); */
 }}}

 Prior to the refactor, this line was replaced by this sequence:

 {{{
 VTABLE_destroy(interp, SELF);
 {
     Arenas            *arena_base = interp->arena_base;
     Small_Object_Pool *pool       = arena_base->pmc_pool;
     Small_Object_Pool *ext_pool   = arena_base->pmc_ext_pool;
     ext_pool->add_free_object(interp, ext_pool,
             (PObj *)SELF->pmc_ext);
     PObj_flags_SETTO((PObj *)SELF, PObj_on_free_list_FLAG);
     pool->add_free_object(interp, pool, (PObj *)SELF);
     pool->num_free_objects++;
 }
 }}}

 As far as I can trace it, the two sequences should perform the same exact
 sequence of steps in the same order (call the destroy VTABLE, free the
 pmc_ext, set the on_free_list flag for the pmc, free the pmc, increment
 the number of items on the free list).

 After the refactor, this line of code causes a segfault in
 t/pmc/packfiledirectory.t, for reasons that I can't figure out. If we can
 figure out the segfault, we can uncomment this line and get a performance
 win. (I think chromatic said it was something like 2.25%).

-- 
Ticket URL: <https://trac.parrot.org/parrot/ticket/656>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets

Reply via email to