LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Sponsors
  • Mirrors
  • Logos
  • Contact us
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Cvs-checkins > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: cvs at opencores.org<cvs@o...>
    Date: Wed Apr 30 19:00:36 CEST 2008
    Subject: [cvs-checkins] MODIFIED: jop ...
    Top
    Date: 00/08/04 30:19:00

    Modified: jop/java/target/src/common/com/jopdesign/sys GC.java
    Native.java
    Log:
    Added support for non-blocking copying.




    Revision Changes Path
    1.58 jop/java/target/src/common/com/jopdesign/sys/GC.java

    http://www.opencores.org/cvsweb.shtml/jop/java/target/src/common/com/jopdesign/sys/GC.java.diff?r1=1.57&r2=1.58

    (In the diff below, changes in quantity of whitespace are not shown.)

    Index: GC.java
    ===================================================================
    RCS file: /cvsroot/jeuneS2/jop/java/target/src/common/com/jopdesign/sys/GC.java,v
    retrieving revision 1.57
    retrieving revision 1.58
    diff -u -b -r1.57 -r1.58
    --- GC.java 4 Mar 2008 19:17:01 -0000 1.57
    +++ GC.java 30 Apr 2008 17:00:35 -0000 1.58
    @@ -181,8 +181,9 @@
    Native.wrMem(0, ref+OFF_SPACE);
    }
    // clean the heap
    - for (int i=0; i<2*semi_size; ++i) {
    - Native.wrMem(0, heapStartA+i);
    + int end = heapStartA+2*semi_size;
    + for (int i=heapStartA; i<end; ++i) {
    + Native.wrMem(0, i);
    }
    concurrentGc = false;

    @@ -383,23 +384,32 @@
    }

    // now copy it - color it BLACK
    + int size;
    + int dest;
    +
    + synchronized(mutex) {
    + size = Native.rdMem(ref+OFF_SIZE);
    + dest = copyPtr;
    + copyPtr += size;

    - int size = Native.rdMem(ref+OFF_SIZE);
    - synchronized (mutex) {
    - // update object pointer to the new location
    - Native.wrMem(copyPtr, ref+OFF_PTR);
    // set it BLACK
    Native.wrMem(toSpace, ref+OFF_SPACE);
    + }
    +
    if (size>0) {
    // copy it
    -// for (i=size-1; i>=0; --i) {
    -// Native.wrMem(Native.rdMem(addr+i), copyPtr+i);
    -// }
    - Native.memCopy(addr, copyPtr, size);
    + for (i=0; i<size; i++) {
    +// Native.wrMem(Native.rdMem(addr+i), dest+i);
    + Native.memCopy(dest, addr, i);
    }
    - copyPtr += size;
    }

    + // update object pointer to the new location
    + Native.wrMem(dest, ref+OFF_PTR);
    + // wait until everybody uses the new location
    + for (i = 0; i < 10; i++);
    + // turn off address translation
    + Native.memCopy(dest, dest, -1);
    }
    }

    @@ -447,7 +457,8 @@

    // clean the from-space to prepare for the next
    // flip
    - for (int i=fromSpace; i<fromSpace+semi_size; ++i) {
    + int end = fromSpace+semi_size;
    + for (int i=fromSpace; i<end; ++i) {
    Native.wrMem(0, i);
    }
    // for tests clean also the remainig memory in the to-space



    1.9 jop/java/target/src/common/com/jopdesign/sys/Native.java

    http://www.opencores.org/cvsweb.shtml/jop/java/target/src/common/com/jopdesign/sys/Native.java.diff?r1=1.8&r2=1.9

    (In the diff below, changes in quantity of whitespace are not shown.)

    Index: Native.java
    ===================================================================
    RCS file: /cvsroot/jeuneS2/jop/java/target/src/common/com/jopdesign/sys/Native.java,v
    retrieving revision 1.8
    retrieving revision 1.9 diff -u -b -r1.8 -r1.9 --- Native.java 24 Feb 2008 18:36:07 -0000 1.8 +++ Native.java 30 Apr 2008 17:00:36 -0000 1.9 @@ -53,10 +53,10 @@ // public static native int condMove(int a, int b, boolean cond); /** * - * @param src memory source address * @param dest memory destination address - * @param cnt number of words (cnt must be >0!) + * @param src memory source address + * @param pos position to copy */ - public static native void memCopy(int src, int dest, int cnt); + public static native void memCopy(int dest, int src, int pos); }

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.