cvsuser     04/04/12 03:51:27

  Modified:    config/gen/makefiles root.in
               include/parrot pobj.h
               src      dod.c interpreter.c thread.c
  Log:
  fix DOD SIGSEGV with threads
  * acquire LOCK during DOD runs
  * set lo_var_ptr for threads correctly
  * don't clean icu libs in make clean
  
  Revision  Changes    Path
  1.196     +3 -2      parrot/config/gen/makefiles/root.in
  
  Index: root.in
  ===================================================================
  RCS file: /cvs/public/parrot/config/gen/makefiles/root.in,v
  retrieving revision 1.195
  retrieving revision 1.196
  diff -u -w -r1.195 -r1.196
  --- root.in   10 Apr 2004 15:10:09 -0000      1.195
  +++ root.in   12 Apr 2004 10:51:14 -0000      1.196
  @@ -1,4 +1,4 @@
  -# $Id: root.in,v 1.195 2004/04/10 15:10:09 mikescott Exp $
  +# $Id: root.in,v 1.196 2004/04/12 10:51:14 leo Exp $
   
   ###############################################################################
   #
  @@ -985,7 +985,7 @@
                $(PDUMP) $(SRC)/pdump$(O) $(SRC)/packdump$(O) $(SRC)/pbc_info$(O) 
$(PINFO) \
                $(PDB) $(SRC)/pdb$(O) \
                $(DIS) $(SRC)/disassemble$(O)
  -     $(RM_RF) blib
  +     $(RM_F) $(LIBPARROT)
        $(MAKE_C) classes progclean
   
   testclean :
  @@ -998,6 +998,7 @@
   
   realclean : clean
        $(RM_F) $(STICKY_FILES)
  +     $(RM_RF) blib
   
   distclean :
        $(PERL) "-MExtUtils::Manifest=filecheck" -le ${PQ}sub 
ExtUtils::Manifest::_maniskip{sub{0}};$$ExtUtils::Manifest::Quiet=1;unlink $$_ for 
filecheck()${PQ}
  
  
  
  1.41      +2 -2      parrot/include/parrot/pobj.h
  
  Index: pobj.h
  ===================================================================
  RCS file: /cvs/public/parrot/include/parrot/pobj.h,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -w -r1.40 -r1.41
  --- pobj.h    9 Apr 2004 20:32:23 -0000       1.40
  +++ pobj.h    12 Apr 2004 10:51:21 -0000      1.41
  @@ -1,7 +1,7 @@
   /* pobj.h
    *  Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
    *  CVS Info
  - *     $Id: pobj.h,v 1.40 2004/04/09 20:32:23 dan Exp $
  + *     $Id: pobj.h,v 1.41 2004/04/12 10:51:21 leo Exp $
    *  Overview:
    *     Parrot Object data members and flags enum
    *  Data Structure and Algorithms:
  
  
  
  1.105     +4 -4      parrot/src/dod.c
  
  Index: dod.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/dod.c,v
  retrieving revision 1.104
  retrieving revision 1.105
  diff -u -w -r1.104 -r1.105
  --- dod.c     11 Apr 2004 13:16:24 -0000      1.104
  +++ dod.c     12 Apr 2004 10:51:26 -0000      1.105
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: dod.c,v 1.104 2004/04/11 13:16:24 leo Exp $
  +$Id: dod.c,v 1.105 2004/04/12 10:51:26 leo Exp $
   
   =head1 NAME
   
  @@ -1010,11 +1010,11 @@
       if (interpreter->DOD_block_level) {
           return;
       }
  +    pt_DOD_start_mark(interpreter);
       Parrot_block_DOD(interpreter);
       /*
        * tell the threading system that we gonna DOD mark
        */
  -    pt_DOD_start_mark(interpreter);
   
       interpreter->lazy_dod = flags & DOD_lazy_FLAG;
       interpreter->dod_trace_ptr = NULL;
  @@ -1041,7 +1041,7 @@
            */
           if (interpreter->profile)
               profile_dod_end(interpreter, PARROT_PROF_DOD_p2);
  -        pt_DOD_stop_mark(interpreter);
  +        /* pt_DOD_stop_mark(interpreter); */
           /* Now put unused PMCs on the free list */
           header_pool = interpreter->arena_base->pmc_pool;
           free_unused_pobjects(interpreter, header_pool);
  @@ -1073,10 +1073,10 @@
   #if 1
           clear_live_bits(interpreter);
   #endif
  -        pt_DOD_stop_mark(interpreter);
           if (interpreter->profile)
               profile_dod_end(interpreter, PARROT_PROF_DOD_p2);
       }
  +    pt_DOD_stop_mark(interpreter);
       /* Note it */
       interpreter->dod_runs++;
       interpreter->dod_trace_ptr = NULL;
  
  
  
  1.296     +2 -2      parrot/src/interpreter.c
  
  Index: interpreter.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/interpreter.c,v
  retrieving revision 1.295
  retrieving revision 1.296
  diff -u -w -r1.295 -r1.296
  --- interpreter.c     9 Apr 2004 20:32:43 -0000       1.295
  +++ interpreter.c     12 Apr 2004 10:51:27 -0000      1.296
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: interpreter.c,v 1.295 2004/04/09 20:32:43 dan Exp $
  +$Id: interpreter.c,v 1.296 2004/04/12 10:51:27 leo Exp $
   
   =head1 NAME
   
  @@ -1679,9 +1679,9 @@
           interpreter->lo_var_ptr = parent->lo_var_ptr;
       }
       else {
  -        interpreter->resume_flag = RESUME_INITIAL;
           SET_NULL(interpreter->parent_interpreter);
       }
  +    interpreter->resume_flag = RESUME_INITIAL;
   
       interpreter->DOD_block_level = 1;
       interpreter->GC_block_level = 1;
  
  
  
  1.26      +10 -2     parrot/src/thread.c
  
  Index: thread.c
  ===================================================================
  RCS file: /cvs/public/parrot/src/thread.c,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -w -r1.25 -r1.26
  --- thread.c  31 Mar 2004 11:55:43 -0000      1.25
  +++ thread.c  12 Apr 2004 10:51:27 -0000      1.26
  @@ -1,6 +1,6 @@
   /*
   Copyright: 2001-2003 The Perl Foundation.  All Rights Reserved.
  -$Id: thread.c,v 1.25 2004/03/31 11:55:43 leo Exp $
  +$Id: thread.c,v 1.26 2004/04/12 10:51:27 leo Exp $
   
   =head1 NAME
   
  @@ -601,7 +601,7 @@
   
   DOD is gonna start the mark phase. In the presence of shared PMCs, we
   can only run one DOD run at a time because
  -C<< interpreter->dod_mark_ptr >> may be changed.
  +C<< PMC->next_for_GC >> may be changed.
   
   TODO - Have a count of shared PMCs and check it during DOD.
   
  @@ -626,6 +626,13 @@
        * - return and continue the mark phase
        * - then s. comments below
        */
  +
  +
  +    /*
  +     * we can't allow parallel running DODs both would mess with shared PMCs
  +     * next_for_GC pointers
  +     */
  +    LOCK(interpreter_array_mutex);
   }
   
   /*
  @@ -674,6 +681,7 @@
        *   - other threads may or not free unused objects then,
        *     depending on their resource statistics
        */
  +    UNLOCK(interpreter_array_mutex);
   }
   
   /*
  
  
  

Reply via email to