Re: [vote] HARMONY-1225 : Assorted fixes and enhancements for AWT and Swing

2006-08-28 Thread Alexey Petrenko

+1

2006/8/28, Geir Magnusson Jr [EMAIL PROTECTED]:

+1

Geir Magnusson Jr wrote:
 All is in order and in SVN for Harmony-1225 wrt BCC and ACQ.

 Please vote to accept or reject this set of patches and fixes into the
 Apache Harmony class library :

 [ ] + 1 Accept
 [ ] -1 Reject  (provide reason below)

 Lets let this run a minimum of 3 days unless a) someone states they need
 more time or b) we get all committer votes before then.

 geir



 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Alexey A. Petrenko
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [app] ant with ecj

2006-08-28 Thread Vladimir Gorr

Indeed this issue exists if JAVA_HOME refers to Harmony JRE:
echo $JAVA_HOME
.../classlib/trunk/deploy/jdk/jre

echo $LD_LIBRARY_PATH
.../classlib/trunk/deploy/jdk/jre/bin

echo $CLASSPATH=.../classlib/trunk/depends/jars/ecj_3.2/ecj_3.2.jar

ant -Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter

...
[javac] 3608. ERROR in
/nfs/ins/proj/drl/coreapi/vgorr/GIT/classlib/trunk/modules/text/src/main/java/java/text/DecimalFormat.java
   [javac]  (at line 23)
   [javac] import java.math.BigDecimal;
...

It means our build system doesn't work correspondingly for the self-hosting
mode.
Besides I'd like to note a lot of warning are generated when we use ECJ3.2.

Thanks,
Vladimir.




On 8/28/06, Jordan Justen [EMAIL PROTECTED] wrote:


My JAVA_HOME is set to harmony/jdk/jre.

Are you sure ant is running with harmony's jvm and classlibs when
JAVA_HOME
is set to sun's path?

I am wanting to use the harmony classlibs and jvm with ant and the ecj
compiler.  Hopefully this would make no dependencies on sun's java.

You know what.  I didn't explicitly mention that I was trying to run this
with harmony.  Whoops, sorry.

-Jordan

On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:

 The current build scripts should be doing this already. For example,
this
 is
 a snippet from the 'luni' module's build script.

 javac sourcepath=
srcdir=${hy.luni.src.main.java}
destdir=${hy.build}
source=${hy.javac.source}
target=${hy.javac.target}
debug=${hy.javac.debug}
 bootclasspath
 fileset dir=${hy.jdk}/jre/lib/boot
 include name=**/*.jar /
 /fileset
 /bootclasspath
 /javac

 It points to luni's source directory and puts everything in the deploy
 (JDK)/jre/lib/boot folder on the bootclasspath to compile against. In
the
 case of java.lang.Object, this should be in the luni-kernel-stubs.jar
.
 If you're doing a full compile, then java.lang.Object should be
included
 in the source files.

 I just ran the build using the Eclipse compiler and it worked fine.
Here's
 what I did.
 1. Check out all of the code from the classlib trunk [1] down. You need
 everything from the folder down.
 2. From the 'trunk' folder, run 'ant fetch-depends', which downloads all
 of
 the dependencies for the build.
 3. Grab the ecj_3.2.jar from the 'trunk/depends/jars/ecj_3.2' and copied
 it
 into my ANT_HOME/lib folder. This puts ECJ on Ant's classpath.
 4. From the 'trunk' folder, run 'ant build
 -Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter' and the entire
 federated build runs.

 Is this similar to what you're doing? Note, I'm running Ant with
JAVA_HOME
 pointing to Sun's 5.0_7 JDK.

 -Nathan

 [1]


https://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib/trunk/

  -Original Message-
  From: Jordan Justen [mailto:[EMAIL PROTECTED]
  Sent: Sunday, August 27, 2006 10:31 PM
  To: harmony-dev@incubator.apache.org
  Subject: Re: [app] ant with ecj
 
  Nathan,
 
  Is there a way to have the javac/ecj task include all of standard
 harmony
  jars without including them in the CLASSPATH environment variable?
 
  Thanks,
 
  -Jordan
 
  On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:
  
   Keep in mind that the execution of the Ant scripts and the
compilation
  are
   two separate things, which means they are using two different
  classpaths.
   If
   the compilation task is complaining about a missing class, then this
  means
   the class is missing from the classpath of the compiler, not the
  classpath
   of the executing Ant. You'll need the Eclipse compiler JAR on Ant's
   execution classpath to execute the javac task.
  
   This can be confusing when using the Eclipse compiler, since it
 doesn't
   have
   any default classpath. Normally when you're using 'javac' from a
 JDK,
   the
   classpath of the underlying JRE (all of the java.*, etc classes) is
   automatically on the classpath. The Eclipse compiler is not part of
a
  JDK,
   so there is nothing on the classpath by default.
  
   -Nathan
  
-Original Message-
From: Jordan Justen [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 27, 2006 8:49 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [app] ant with ecj
   
Richard,
   
Yes, I also added ecj_3.2.jar to the CLASSPATH.
   
Ant works fine, but the first time a javac task is encountered,
the
compiler
complained that java.lang.Object was not found.  I then added
jdk/jre/lib/boot/kernel.jar to CLASSPATH.  Now, I see an error
that
java.lang.String is not found, so I added luni.jar to CLASSPATH.
  etc...
   
Since ant is basically working (mkdir tasks, delete tasks, java
 tasks
   all
seem to work), I think the harmony jvm is loading these boot
jars,
  but
it
seems like when the javac task uses ecj, those jars are not
visible.
   
I'm using windows xp, ant 1.6.5, and the 

Re: [app] ant with ecj

2006-08-28 Thread Alexey Petrenko

2006/8/28, Jordan Justen [EMAIL PROTECTED]:

My JAVA_HOME is set to harmony/jdk/jre.

Are you sure ant is running with harmony's jvm and classlibs when JAVA_HOME
is set to sun's path?

Ant can set bootclasspath for compiler or any other subsequent jvm
calls. But it will use original vm.
So if your JAVA_HOME set to RI then it will use RI vm and Harmony classes.



I am wanting to use the harmony classlibs and jvm with ant and the ecj
compiler.  Hopefully this would make no dependencies on sun's java.

You know what.  I didn't explicitly mention that I was trying to run this
with harmony.  Whoops, sorry.

-Jordan

On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:

 The current build scripts should be doing this already. For example, this
 is
 a snippet from the 'luni' module's build script.

 javac sourcepath=
srcdir=${hy.luni.src.main.java}
destdir=${hy.build}
source=${hy.javac.source}
target=${hy.javac.target}
debug=${hy.javac.debug}
 bootclasspath
 fileset dir=${hy.jdk}/jre/lib/boot
 include name=**/*.jar /
 /fileset
 /bootclasspath
 /javac

 It points to luni's source directory and puts everything in the deploy
 (JDK)/jre/lib/boot folder on the bootclasspath to compile against. In the
 case of java.lang.Object, this should be in the luni-kernel-stubs.jar.
 If you're doing a full compile, then java.lang.Object should be included
 in the source files.

 I just ran the build using the Eclipse compiler and it worked fine. Here's
 what I did.
 1. Check out all of the code from the classlib trunk [1] down. You need
 everything from the folder down.
 2. From the 'trunk' folder, run 'ant fetch-depends', which downloads all
 of
 the dependencies for the build.
 3. Grab the ecj_3.2.jar from the 'trunk/depends/jars/ecj_3.2' and copied
 it
 into my ANT_HOME/lib folder. This puts ECJ on Ant's classpath.
 4. From the 'trunk' folder, run 'ant build
 -Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter' and the entire
 federated build runs.

 Is this similar to what you're doing? Note, I'm running Ant with JAVA_HOME
 pointing to Sun's 5.0_7 JDK.

 -Nathan

 [1]

 https://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib/trunk/

  -Original Message-
  From: Jordan Justen [mailto:[EMAIL PROTECTED]
  Sent: Sunday, August 27, 2006 10:31 PM
  To: harmony-dev@incubator.apache.org
  Subject: Re: [app] ant with ecj
 
  Nathan,
 
  Is there a way to have the javac/ecj task include all of standard
 harmony
  jars without including them in the CLASSPATH environment variable?
 
  Thanks,
 
  -Jordan
 
  On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:
  
   Keep in mind that the execution of the Ant scripts and the compilation
  are
   two separate things, which means they are using two different
  classpaths.
   If
   the compilation task is complaining about a missing class, then this
  means
   the class is missing from the classpath of the compiler, not the
  classpath
   of the executing Ant. You'll need the Eclipse compiler JAR on Ant's
   execution classpath to execute the javac task.
  
   This can be confusing when using the Eclipse compiler, since it
 doesn't
   have
   any default classpath. Normally when you're using 'javac' from a
 JDK,
   the
   classpath of the underlying JRE (all of the java.*, etc classes) is
   automatically on the classpath. The Eclipse compiler is not part of a
  JDK,
   so there is nothing on the classpath by default.
  
   -Nathan
  
-Original Message-
From: Jordan Justen [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 27, 2006 8:49 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [app] ant with ecj
   
Richard,
   
Yes, I also added ecj_3.2.jar to the CLASSPATH.
   
Ant works fine, but the first time a javac task is encountered, the
compiler
complained that java.lang.Object was not found.  I then added
jdk/jre/lib/boot/kernel.jar to CLASSPATH.  Now, I see an error that
java.lang.String is not found, so I added luni.jar to CLASSPATH.
  etc...
   
Since ant is basically working (mkdir tasks, delete tasks, java
 tasks
   all
seem to work), I think the harmony jvm is loading these boot jars,
  but
it
seems like when the javac task uses ecj, those jars are not visible.
   
I'm using windows xp, ant 1.6.5, and the latest harmony jdk
 snapshot.
   
Thanks again,
   
-Jordan
   
On 8/27/06, Richard Liang [EMAIL PROTECTED] wrote:



 Jordan Justen wrote:
  Hi all.
 
  I'm trying to use ant with the ecj compiler.  I override the
   compiler
in
  build.xml like this:
   property name=build.compiler value=
  org.eclipse.jdt.core.JDTCompilerAdapter /
 
  This will execute the compiler, but I find I have to add each
 jar
   from
  jdk/jre/lib/boot to CLASSPATH or else 

Re: [app] ant with ecj

2006-08-28 Thread Alexey Petrenko

2006/8/28, Vladimir Gorr [EMAIL PROTECTED]:

Indeed this issue exists if JAVA_HOME refers to Harmony JRE:
echo $JAVA_HOME
.../classlib/trunk/deploy/jdk/jre

echo $LD_LIBRARY_PATH
.../classlib/trunk/deploy/jdk/jre/bin

echo $CLASSPATH=.../classlib/trunk/depends/jars/ecj_3.2/ecj_3.2.jar

ant -Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter

...
[javac] 3608. ERROR in
/nfs/ins/proj/drl/coreapi/vgorr/GIT/classlib/trunk/modules/text/src/main/java/java/text/DecimalFormat.java
   [javac]  (at line 23)
   [javac] import java.math.BigDecimal;
...

It means our build system doesn't work correspondingly for the self-hosting
mode.

Strange... It worked some time ago.


Besides I'd like to note a lot of warning are generated when we use ECJ3.2.

Yep, that is known issue.
Eclipse compiler is much more worried then RI's :)



Thanks,
Vladimir.




On 8/28/06, Jordan Justen [EMAIL PROTECTED] wrote:

 My JAVA_HOME is set to harmony/jdk/jre.

 Are you sure ant is running with harmony's jvm and classlibs when
 JAVA_HOME
 is set to sun's path?

 I am wanting to use the harmony classlibs and jvm with ant and the ecj
 compiler.  Hopefully this would make no dependencies on sun's java.

 You know what.  I didn't explicitly mention that I was trying to run this
 with harmony.  Whoops, sorry.

 -Jordan

 On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:
 
  The current build scripts should be doing this already. For example,
 this
  is
  a snippet from the 'luni' module's build script.
 
  javac sourcepath=
 srcdir=${hy.luni.src.main.java}
 destdir=${hy.build}
 source=${hy.javac.source}
 target=${hy.javac.target}
 debug=${hy.javac.debug}
  bootclasspath
  fileset dir=${hy.jdk}/jre/lib/boot
  include name=**/*.jar /
  /fileset
  /bootclasspath
  /javac
 
  It points to luni's source directory and puts everything in the deploy
  (JDK)/jre/lib/boot folder on the bootclasspath to compile against. In
 the
  case of java.lang.Object, this should be in the luni-kernel-stubs.jar
 .
  If you're doing a full compile, then java.lang.Object should be
 included
  in the source files.
 
  I just ran the build using the Eclipse compiler and it worked fine.
 Here's
  what I did.
  1. Check out all of the code from the classlib trunk [1] down. You need
  everything from the folder down.
  2. From the 'trunk' folder, run 'ant fetch-depends', which downloads all
  of
  the dependencies for the build.
  3. Grab the ecj_3.2.jar from the 'trunk/depends/jars/ecj_3.2' and copied
  it
  into my ANT_HOME/lib folder. This puts ECJ on Ant's classpath.
  4. From the 'trunk' folder, run 'ant build
  -Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter' and the entire
  federated build runs.
 
  Is this similar to what you're doing? Note, I'm running Ant with
 JAVA_HOME
  pointing to Sun's 5.0_7 JDK.
 
  -Nathan
 
  [1]
 
 
 https://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib/trunk/
 
   -Original Message-
   From: Jordan Justen [mailto:[EMAIL PROTECTED]
   Sent: Sunday, August 27, 2006 10:31 PM
   To: harmony-dev@incubator.apache.org
   Subject: Re: [app] ant with ecj
  
   Nathan,
  
   Is there a way to have the javac/ecj task include all of standard
  harmony
   jars without including them in the CLASSPATH environment variable?
  
   Thanks,
  
   -Jordan
  
   On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:
   
Keep in mind that the execution of the Ant scripts and the
 compilation
   are
two separate things, which means they are using two different
   classpaths.
If
the compilation task is complaining about a missing class, then this
   means
the class is missing from the classpath of the compiler, not the
   classpath
of the executing Ant. You'll need the Eclipse compiler JAR on Ant's
execution classpath to execute the javac task.
   
This can be confusing when using the Eclipse compiler, since it
  doesn't
have
any default classpath. Normally when you're using 'javac' from a
  JDK,
the
classpath of the underlying JRE (all of the java.*, etc classes) is
automatically on the classpath. The Eclipse compiler is not part of
 a
   JDK,
so there is nothing on the classpath by default.
   
-Nathan
   
 -Original Message-
 From: Jordan Justen [mailto:[EMAIL PROTECTED]
 Sent: Sunday, August 27, 2006 8:49 PM
 To: harmony-dev@incubator.apache.org
 Subject: Re: [app] ant with ecj

 Richard,

 Yes, I also added ecj_3.2.jar to the CLASSPATH.

 Ant works fine, but the first time a javac task is encountered,
 the
 compiler
 complained that java.lang.Object was not found.  I then added
 jdk/jre/lib/boot/kernel.jar to CLASSPATH.  Now, I see an error
 that
 java.lang.String is not found, so I added luni.jar to CLASSPATH.
   etc...

Re: [vote] HARMONY-1225 : Assorted fixes and enhancements for AWT and Swing

2006-08-28 Thread Vladimir Gorr

I see these improvements don't contain very important thing allowing us
to automatically build (or get) the gl library. Or is this another story?
Otherwise only the advanced people can look at these enhancements :-).

Nevertheless +1 for me.

Thanks,
Vladimir.


On 8/28/06, Alexey Petrenko [EMAIL PROTECTED] wrote:


+1

2006/8/28, Geir Magnusson Jr [EMAIL PROTECTED]:
 +1

 Geir Magnusson Jr wrote:
  All is in order and in SVN for Harmony-1225 wrt BCC and ACQ.
 
  Please vote to accept or reject this set of patches and fixes into the
  Apache Harmony class library :
 
  [ ] + 1 Accept
  [ ] -1 Reject  (provide reason below)
 
  Lets let this run a minimum of 3 days unless a) someone states they
need
  more time or b) we get all committer votes before then.
 
  geir
 
 
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
Alexey A. Petrenko
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [vote] HARMONY-1225 : Assorted fixes and enhancements for AWT and Swing

2006-08-28 Thread Alexey Petrenko

2006/8/28, Vladimir Gorr [EMAIL PROTECTED]:

I see these improvements don't contain very important thing allowing us
to automatically build (or get) the gl library. Or is this another story?

This is another story.


Otherwise only the advanced people can look at these enhancements :-).

Nevertheless +1 for me.

Thanks,
Vladimir.


On 8/28/06, Alexey Petrenko [EMAIL PROTECTED] wrote:

 +1

 2006/8/28, Geir Magnusson Jr [EMAIL PROTECTED]:
  +1
 
  Geir Magnusson Jr wrote:
   All is in order and in SVN for Harmony-1225 wrt BCC and ACQ.
  
   Please vote to accept or reject this set of patches and fixes into the
   Apache Harmony class library :
  
   [ ] + 1 Accept
   [ ] -1 Reject  (provide reason below)
  
   Lets let this run a minimum of 3 days unless a) someone states they
 need
   more time or b) we get all committer votes before then.
  
   geir
  
  
  
   -
   Terms of use : http://incubator.apache.org/harmony/mailing.html
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
  
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 --
 Alexey A. Petrenko
 Intel Middleware Products Division

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]







--
Alexey A. Petrenko
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [app] xmlbeans

2006-08-28 Thread Richard Liang



Nathan Beyer wrote:

I take it that means the issue is pretty obvious (very easy to recreate).
Can you tell us what you did to recreate it and what class in Harmony is at
issue?
  

It seems a bug of java.util.ArrayList. I will attach a patch to fix it.

Best regards,
Richard

-Nathan

  

-Original Message-
From: Richard Liang [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 27, 2006 10:36 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [app] xmlbeans

I reproduce the same error on xmlbeans-2.2.0.

Jordan Justen wrote:


Well, I don't have much details, but here's the stack trace.  I
figured it
wouldn't be to helpful for the list.  I don't see this exception with
  

the


sun jvm/classes.  Anyway, I'll try debug it some...

[java] java.lang.NullPointerException
[java] at org.apache.xmlbeans.impl.common.NameUtil.splitWords(
NameUtil.java:667)
[java] at
org.apache.xmlbeans.impl.common.NameUtil.lowerCamelCase(
NameUtil.java:623)
[java] at
org.apache.xmlbeans.impl.common.NameUtil.getPackageFromNamespace(
NameUtil.java:513)
[java] at

  

org.apache.xmlbeans.impl.common.NameUtil.getClassNameFromQName(NameUtil.ja
va


:328)
[java] at

  

org.apache.xmlbeans.impl.common.NameUtil.getClassNameFromQName(NameUtil.ja
va


:318)
[java] at
org.apache.xmlbeans.impl.schema.StscJavaizer.pickFullJavaClassName(
StscJavaizer.java:679)
[java] at
org.apache.xmlbeans.impl.schema.StscJavaizer.assignGlobalJavaNames(
StscJavaizer.java:91)
[java] at
org.apache.xmlbeans.impl.schema.StscJavaizer.javaizeAllTypes(
StscJavaizer.java:55)
[java] at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compileImpl(
SchemaTypeSystemCompiler.java:313)
[java] at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(
SchemaTypeSystemCompiler.java:181)
[java] at
org.apache.xmlbeans.impl.tool.SchemaCompiler.loadTypeSystem(
SchemaCompiler.java:952)
[java] at org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(
SchemaCompiler.java:1072)
[java] at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(
SchemaCompiler.java:368)


On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:
  

Is there a particular issue that you've run into?



-Original Message-
From: Jordan Justen [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 27, 2006 7:10 PM
To: harmony-dev@incubator.apache.org
Subject: [app] xmlbeans

Has anyone successfully used harmony with xmlbeans (
http://xmlbeans.apache.org/)?

Or, does anyone know of any major reasons why it would not be
  

working at


this time?

I tried it without luck.  I'll debug the error if no one knows of any
major
roadblocks that I'd encounter.

Thanks,

-Jordan
  

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Richard Liang
China Software Development Lab, IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  


--
Richard Liang
China Software Development Lab, IBM 



Re: [drlvm] how does drlvm insert the safe point into a method

2006-08-28 Thread Egor Pasko
On the 0x1D3 day of Apache Harmony Fan Bin wrote:
 Hi, I have a question about jit compiler in drlvm. I want to suspend
 the thread manually on a particular point. I know that the thread
 can only be suspended at safe point. I guess the safe point is
 inserted by jit compiler when it compile the method, but I can't
 prove it from the source code. So my question is whether it's true
 that it is the jit compiler which insert the safe point. If it is
 true, how does it do this?  Thank you for your help.

Hi, Fan Bin,

Weldon's story is great! But I wonder.. do you need to suspend a
thread from within itself or from another thread? 

For the first case you can do almost the same thing as insertion of
Object.wait() does. Suspending from another thread happens just like
during GC enumeration from Weldon's message (a flag in 'thread local
storage' is checked via a special 'VM helper' call inserted by JIT).

Call for more details if you need to.

-- 
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib] Sun compiler change?

2006-08-28 Thread Spark Shen

Alexey Petrenko 写道:

2006/8/28, Spark Shen [EMAIL PROTECTED]:

Richard Liang 写道:


 Richard Liang wrote:


 Nathan Beyer wrote:
 Is anyone else using the latest Sun JDK, v5.0 Update 8 on Windows?



 I'm seeing a compilation error in the LUNI that I don't see with 5.0
 Update
 7. Here's the error I'm getting.



 compile:

 [mkdir] Created dir:
 C:\dev\harmony\enhanced\classlib\trunk\build\classes

 [javac] Compiling 3173 source files to
 C:\dev\harmony\enhanced\classlib\trun

 k\build\classes

 [javac]
 C:\dev\harmony\enhanced\classlib\trunk\modules\luni\src\main\java\ja

 va\util\MiniEnumSet.java:78: inconvertible types

 [javac] found : java.util.Collectioncapture of ? extends E

 [javac] required: java.util.EnumSetE

 [javac] EnumSetE set = (EnumSetE) collection;

 [javac] ^


 Yes, I got the same error using 1.5.0_08. Will have a look at it. :-)
 This should be an enhancement/bug-fixing of java compiler. There are
 bugs in java.util.MiniEnumSet. I will try to fix it later
Seems that in new version of JDK, EnumSetE and capture of ? extends
E (E was previously stated as E extends EnumE) are not considered
compatible.
After changing
EnumSetE set = (EnumSetE)collection;
into
EnumSet set = (EnumSet)collection;
, compilation using ant in command line succeeds.
Would any one give a clue, why the are considered incompatible in this
version of JDK?

Eclipse uses its own JDK compiler, which may differ from this 1.5.0_08
version compiler.

Which IS differ :)
I mean Eclipse uses its own JDT incremental Java compiler (not JDK :-) 
),  which may differ from 1.5.0_08 version JDK compiler.



I guess this is the reason why compilation only fails in command line on
your machine.

Best regards

 Richard.

 Best regards,
 Richard



 When I compile in Eclipse 3.2 there's no error.



 -Nathan






--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[classlib][luni] A problem about behavior of EnumMap

2006-08-28 Thread Spark Shen

Hi All:
When I develop EnumMap,I find EnumMap strange on RI. As the following 
code describes, the method entrySet() of 
EnumMap returns a set view of mappings contained in this map. Then we 
get the set's iterator and use the iterator's next() method to get an 
Entry which contains one mapping. But if we use next() method again to 
get another Entry, the previous Entry will also point to the next Entry.


import java.util.EnumMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;

import junit.framework.TestCase;

public class EnumMapTest extends TestCase{
   enum Size {
   Small, Middle, Big {
   };
   }
   public void test_entrySet() {
   EnumMap enumSizeMap = new EnumMap(Size.class);
   enumSizeMap.put(Size.Middle, 1);
   enumSizeMap.put(Size.Big, null);

   Set set = enumSizeMap.entrySet();
   Iterator iter = set.iterator();
   Map.Entry entry = (Map.Entry) iter.next();
   assertEquals(Size.Middle, entry.getKey());
   Map.Entry entry1 = (Map.Entry) iter.next();
   assertEquals(Size.Big, entry.getKey());
   assertSame(entry,entry1);
   }
}
I guess on RI, the returned iterator maintains a reference to current 
entry and returns this reference in iter.next() method.
I do not think RI's  behavior makes sense here. So I suggest not to 
follow RI on the behavior.


Best regards

--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib] [ldap] support for multiple VMs?

2006-08-28 Thread Paulex Yang

Oliver Deakin wrote:

Hi Alexey,

I have taken a look at the patch - generally it looks good to me, and 
if it all

works ok when you test it, it's fine by me.

I think if there are cases where some functionality is repeated many 
times, it

would be good to see it split out somewhere central. However, Im not sure
the port library is the right place for these functions - the port 
library is really a
generic front hiding platform specific operations. These functions do 
not really
fit into that category - perhaps they would be better placed in the 
common

library (luni/src/main/native/common)? This component provides a set of
helper functions required by many native modules, and seems like the 
right

place to put them.
Agree, portlib is designed to encapsulate OS/architecture difference, 
and it should be taken care to be concise, so that it can be ported 
easily to as many platforms as possible(at least to those Harmony 
planned to support),  it is not a common library.


Regards,
Oliver

Alexey Varlamov wrote:

Oliver,

Please take a look at a HARMONY-1243 patch. I fixed all bugs noticed
and made parsing a bit more robust. Also, added a define for
org.apache.harmony.boot.class.path name to vmi.h - to enforce that
there is 2-sided contract for this property.

I still think that some of those functions may worth to be added to
the portlib, namely:
char * str_concat (HyPortLibrary * portLibrary, ...);
int props_read_from_file(HyPortLibrary * portLibrary, const char 
*filename,

 key_value_pair** properties, U_32 *number);
void props_free(HyPortLibrary * portLibrary, key_value_pair * 
properties);


Justification: the same functionality is duplicated at least in
launcher/shared/main.c, and there are other property files to be read
by VM.

If nobody object, I will try to add these 3 functions to portlib.






--
Paulex Yang
China Software Development Lab
IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [vm] ArgoUML application crashes IBM VME

2006-08-28 Thread Paulex Yang

Vladimir Gorr wrote:
Yes, it makes sense, I think. Although I don't know what the right 
place is?
there is a section named what can it do[1],  and it would be very 
useful to add a new page for Argo on the test procedure/result/missing 
class etc, and add the link to that section.


[1] http://wiki.apache.org/harmony/ClassLibrary


Thanks,
Vladimir.


Regards,



--
Paulex Yang
China Software Development Lab
IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [vote] HARMONY-1225 : Assorted fixes and enhancements for AWT and Swing

2006-08-28 Thread Ilya Okomin

+1

On 8/28/06, Alexey Petrenko [EMAIL PROTECTED] wrote:


2006/8/28, Vladimir Gorr [EMAIL PROTECTED]:
 I see these improvements don't contain very important thing allowing us
 to automatically build (or get) the gl library. Or is this another
story?
This is another story.

 Otherwise only the advanced people can look at these enhancements :-).

 Nevertheless +1 for me.

 Thanks,
 Vladimir.


 On 8/28/06, Alexey Petrenko [EMAIL PROTECTED] wrote:
 
  +1
 
  2006/8/28, Geir Magnusson Jr [EMAIL PROTECTED]:
   +1
  
   Geir Magnusson Jr wrote:
All is in order and in SVN for Harmony-1225 wrt BCC and ACQ.
   
Please vote to accept or reject this set of patches and fixes into
the
Apache Harmony class library :
   
[ ] + 1 Accept
[ ] -1 Reject  (provide reason below)
   
Lets let this run a minimum of 3 days unless a) someone states
they
  need
more time or b) we get all committer votes before then.
   
geir
   
   
   
   
-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
   
   
   
  
  
-
   Terms of use : http://incubator.apache.org/harmony/mailing.html
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
[EMAIL PROTECTED]
  
  
 
 
  --
  Alexey A. Petrenko
  Intel Middleware Products Division
 
  -
  Terms of use : http://incubator.apache.org/harmony/mailing.html
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 




--
Alexey A. Petrenko
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
--
Ilya Okomin
Intel Middleware Products Division


RE: [vote] HARMONY-1225 : Assorted fixes and enhancements for AWT and Swing

2006-08-28 Thread Ivanov, Alexey A
+1

--
Alexey A. Ivanov
Intel Middleware Product Division


-Original Message-
From: Ilya Okomin [mailto:[EMAIL PROTECTED]
Sent: Monday, August 28, 2006 12:10 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [vote] HARMONY-1225 : Assorted fixes and enhancements for
AWT
and Swing

+1

On 8/28/06, Alexey Petrenko [EMAIL PROTECTED] wrote:

 2006/8/28, Vladimir Gorr [EMAIL PROTECTED]:
  I see these improvements don't contain very important thing
allowing us
  to automatically build (or get) the gl library. Or is this another
 story?
 This is another story.

  Otherwise only the advanced people can look at these enhancements
:-).
 
  Nevertheless +1 for me.
 
  Thanks,
  Vladimir.
 
 
  On 8/28/06, Alexey Petrenko [EMAIL PROTECTED] wrote:
  
   +1
  
   2006/8/28, Geir Magnusson Jr [EMAIL PROTECTED]:
+1
   
Geir Magnusson Jr wrote:
 All is in order and in SVN for Harmony-1225 wrt BCC and ACQ.

 Please vote to accept or reject this set of patches and fixes
into
 the
 Apache Harmony class library :

 [ ] + 1 Accept
 [ ] -1 Reject  (provide reason below)

 Lets let this run a minimum of 3 days unless a) someone
states
 they
   need
 more time or b) we get all committer votes before then.

 geir




 -
 Terms of use :
http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]



   
   
 -
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-
[EMAIL PROTECTED]
For additional commands, e-mail:
 [EMAIL PROTECTED]
   
   
  
  
   --
   Alexey A. Petrenko
   Intel Middleware Products Division
  
  
-
   Terms of use : http://incubator.apache.org/harmony/mailing.html
   To unsubscribe, e-mail:
[EMAIL PROTECTED]
   For additional commands, e-mail: harmony-dev-
[EMAIL PROTECTED]
  
  
 
 


 --
 Alexey A. Petrenko
 Intel Middleware Products Division

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
[EMAIL PROTECTED]




--
--
Ilya Okomin
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [classlib][TestNG] How to handle bootclasspath tests

2006-08-28 Thread Ivanov, Alexey A

-Original Message-
From: Mark Hindess [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 24, 2006 6:37 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [classlib][TestNG] How to handle bootclasspath tests


On 24 August 2006 at 13:58, Oliver Deakin
[EMAIL PROTECTED]
wrote:
 Richard Liang wrote:
  Hello All,
 
  I'm investigating the possibilities of migrating Harmony tests from
  JUnit/Directory layout to TestNG while reviewing all the related
  thread in mailing list. And I will try to answer the open issues.
To
  make things simple, I will post the issues one by one. ;-)
 
  Question: How to handle bootclasspath tests?
 
  IMHO, I'm not sure whether it is a good idea to use TestNG groups
to
  differentiate the bootclasspath tests and classpath tests.
 
  If we put bootclasspath and classpath tests in the same
directory,
  and use TestNG groups to differentiate them. When we want to run
the
  bootclasspath tests, we have to put all tests in bootclasspath
  including the classpath tests. I don't think it's a good
approach.
  And I cannot find any ways to compile the java sources from one
  directory into several different directories (ANT or Eclipse). So I
  suggest we put bootclasspath tests and classpath tests into
different
  directories.

 Agreed - this is a fairly simple separation, and there is good reason
to
 do it.
 My vote's for keeping bootclasspath and classpath tests physically
separate.

Yes, I think this is the best way to handle this distinction too.

+1


There are going to be more than enough groups.  I thought about some
more earlier while trying the awt tests... we should identify which
tests require a display to run and which may be run headless.

It makes sense, so that we can exclude the tests which can't run without
a display, and still run those which don't need a display.


Regards,
Alexey.


Regards,
 Mark.

  But if we think putting all tests into bootclasspath is not a
  problem,  we may have a workaround: running bootclasspath and
  classpath tests in separate tasks. I mean:1)  Running bootclasspath
  tests with all tests in bootclasspath 2) running all classpath
tests
  with all tests in classpath
 
  Please correct me if I'm wrong.
 
  Here is sample of how to launch TestNG in ANT:
 
 testng outputDir=${testng.report.dir}
 sourcedir=${test.src.dir}
 haltOnfailure=true
 verbose=3
 jvm=${HarmonyVM}/bin/java
 
 bootclasspath
 pathelement path=../bin/tests.boot /
 /bootclasspath
   classpath
 pathelement path=../bin/tests /
 /classpath
 xmlfileset dir=. includes=suite.xml /
 /testng
 
  Thanks for reading this far. ;-)
 

 --
 Oliver Deakin
 IBM United Kingdom Limited


 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
[EMAIL PROTECTED]



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
Alexey A. Ivanov
Intel Middleware Product Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [classlib][TestNG] groups of Harmony test

2006-08-28 Thread Ivanov, Alexey A

-Original Message-
From: Richard Liang [mailto:[EMAIL PROTECTED]
Sent: Friday, August 25, 2006 7:18 PM
To: harmony-dev@incubator.apache.org
Subject: [classlib][TestNG] groups of Harmony test

Hello All,

Now let's talk about the TestNG groups. I have read the related threads
which posted by George, Vladimir Ivanov and Alexei Zakharov. All of
them
are good discussion about TestNG groups.

IMHO, we may define Harmony test groups according the following 4
dimensions:

1) [Platform] os.any, os.platform id
 *os.any* - group of tests which pass on any platform. IMHO, most of
our
tests should be in this group.
 *os.platform id* - group of tests which are designed for one
specific
platform. A test may be in more than one of the groups. e.g.,
@Test(groups={os.win.IA32, os.linux.IA32})

** os.any and os.platform id are mutually exclusive, that is,
tests in os.any group should not be in os.win.IA32.

2) [Test state] state.broken, state.broken.platform id
 *state.broken* - group of tests which fail on every platform, because
of bugs of tests or implementation. We need to fix the bugs of tests or
implementation to make them pass.
 *state.broken.platform id* - groups of test which only fail on one
specific platform. A test may be in more than one of the groups. e.g.,
@Test(groups={state.broken.linux.IA32, os.broken.linux.IA64})

 **state.broken.platform id group may be used as a convenient way
to indicate that a test is platform-specific. e.g., If we support 10
platforms, and one test are designed for 9 platforms except for MacOS,
instead of list 9 os.platform id, we can just use state.broken.MacOS

3) [Test type] type.api, type.impl
 *type.api* - group of tests which are tests for APIs in the Java
Specification
 *type.impl* - groups of tests which are tests for Harmony-specific
implementation

 ** type.api and type.impl are also mutually exclusive.

4) [Test Level] level.unit, level.integration, level.system,
level.stress, etc. (Levels of Test refer to the increase in complexity
as moving through test cycle. )
** A test may be in more than one of the groups.
** In fact, some tests such as System tests are the verification of
the entire system.  Maybe we'll put them into a separate project. e.g.,
harmony/enhanced/SVT (System Verification Test).

5) [Environment] env.display, env.headless
   To distinguish AWT and Swing tests which need a display to run, and
those which don't, as Mark proposed [1].

Regards,
Alexey.

[1]
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200608.mb
ox/[EMAIL PROTECTED]


If we want to run all the unit test for APIs on windows, we may use
TestNG groups to select the tests:
groups
run
include name=os.any /
include name=type.api /
include name=os.win.IA32 /
exclude name=state.broken /
exclude name=state.broken.win.IA32 /
/run
/groups


Well, I think our most of existing tests are in the groups of
{os.any,
type.api, level.unit}, and I have asked TestNG to add a new option
-groups for its JUnitConverter which allow us to specify the test
groups when migrate from JUnit test to TestNG test.

Thanks for reading so far, and I will highly appreciate your comments
or
suggestion.  ;-)

--
Richard Liang
China Software Development Lab, IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
Alexey A. Ivanov
Intel Middleware Product Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [build-test] Re: Build-Test regular expression matcher pb

2006-08-28 Thread Paulex Yang

Jean,

Sorry for response so late, do you still get this error? I use Sun JVM 
1.5.0_06 and ant 1.6.5 on WinXP SP2, I think this env should be similar 
with you, but I cannot reproduce it. If you still cannot get it work, 
would you please raise a JIRA?


Jean-frederic Clere wrote:

Geir Magnusson Jr. wrote:


Jean-frederic Clere wrote:


Geir Magnusson Jr. wrote:

(can you please prefix the subject line with something like 
[build-test] in the future :))


What JRE are you using?



Sun JVM 1.5.0_06.

Cheers

Jean-Frederic






And you simply checked it out, followed the directions, and it didn't 
work?


Yes ;-(



What version of ant?


1.6.5

Cheers

Jean-Frederic




geir

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Paulex Yang
China Software Development Lab
IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][TestNG] groups of Harmony test

2006-08-28 Thread Andrew Zhang

On 8/28/06, Ivanov, Alexey A [EMAIL PROTECTED] wrote:



-Original Message-
From: Richard Liang [mailto:[EMAIL PROTECTED]
Sent: Friday, August 25, 2006 7:18 PM
To: harmony-dev@incubator.apache.org
Subject: [classlib][TestNG] groups of Harmony test

Hello All,

Now let's talk about the TestNG groups. I have read the related threads
which posted by George, Vladimir Ivanov and Alexei Zakharov. All of
them
are good discussion about TestNG groups.

IMHO, we may define Harmony test groups according the following 4
dimensions:

1) [Platform] os.any, os.platform id
 *os.any* - group of tests which pass on any platform. IMHO, most of
our
tests should be in this group.
 *os.platform id* - group of tests which are designed for one
specific
platform. A test may be in more than one of the groups. e.g.,
@Test(groups={os.win.IA32, os.linux.IA32})

** os.any and os.platform id are mutually exclusive, that is,
tests in os.any group should not be in os.win.IA32.

2) [Test state] state.broken, state.broken.platform id
 *state.broken* - group of tests which fail on every platform, because
of bugs of tests or implementation. We need to fix the bugs of tests or
implementation to make them pass.
 *state.broken.platform id* - groups of test which only fail on one
specific platform. A test may be in more than one of the groups. e.g.,
@Test(groups={state.broken.linux.IA32, os.broken.linux.IA64})

 **state.broken.platform id group may be used as a convenient way
to indicate that a test is platform-specific. e.g., If we support 10
platforms, and one test are designed for 9 platforms except for MacOS,
instead of list 9 os.platform id, we can just use state.broken.MacOS

3) [Test type] type.api, type.impl
 *type.api* - group of tests which are tests for APIs in the Java
Specification
 *type.impl* - groups of tests which are tests for Harmony-specific
implementation

 ** type.api and type.impl are also mutually exclusive.

4) [Test Level] level.unit, level.integration, level.system,
level.stress, etc. (Levels of Test refer to the increase in complexity
as moving through test cycle. )
** A test may be in more than one of the groups.
** In fact, some tests such as System tests are the verification of
the entire system.  Maybe we'll put them into a separate project. e.g.,
harmony/enhanced/SVT (System Verification Test).

5) [Environment] env.display, env.headless
  To distinguish AWT and Swing tests which need a display to run, and
those which don't, as Mark proposed [1].



Will display option be passed manually as an argument to TestNG, or detected
automatically  when running test?

Regards,

Alexey.

[1]
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200608.mb
ox/[EMAIL PROTECTED]


If we want to run all the unit test for APIs on windows, we may use
TestNG groups to select the tests:
groups
run
include name=os.any /
include name=type.api /
include name=os.win.IA32 /
exclude name=state.broken /
exclude name=state.broken.win.IA32 /
/run
/groups


Well, I think our most of existing tests are in the groups of
{os.any,
type.api, level.unit}, and I have asked TestNG to add a new option
-groups for its JUnitConverter which allow us to specify the test
groups when migrate from JUnit test to TestNG test.

Thanks for reading so far, and I will highly appreciate your comments
or
suggestion.  ;-)

--
Richard Liang
China Software Development Lab, IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

--
Alexey A. Ivanov
Intel Middleware Product Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Andrew Zhang
China Software Development Lab, IBM


Re: [app] xmlbeans

2006-08-28 Thread Richard Liang



Richard Liang wrote:



Nathan Beyer wrote:
I take it that means the issue is pretty obvious (very easy to 
recreate).
Can you tell us what you did to recreate it and what class in Harmony 
is at

issue?
  

It seems a bug of java.util.ArrayList. I will attach a patch to fix it.
I have raised a JIRA HARMONY-1293[1] for this issue with patch 
attached.  :-)


[1] https://issues.apache.org/jira/browse/HARMONY-1293

Richard.


Best regards,
Richard

-Nathan

 

-Original Message-
From: Richard Liang [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 27, 2006 10:36 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [app] xmlbeans

I reproduce the same error on xmlbeans-2.2.0.

Jordan Justen wrote:
   

Well, I don't have much details, but here's the stack trace.  I
figured it
wouldn't be to helpful for the list.  I don't see this exception with
  

the
   

sun jvm/classes.  Anyway, I'll try debug it some...

[java] java.lang.NullPointerException
[java] at org.apache.xmlbeans.impl.common.NameUtil.splitWords(
NameUtil.java:667)
[java] at
org.apache.xmlbeans.impl.common.NameUtil.lowerCamelCase(
NameUtil.java:623)
[java] at
org.apache.xmlbeans.impl.common.NameUtil.getPackageFromNamespace(
NameUtil.java:513)
[java] at

  
org.apache.xmlbeans.impl.common.NameUtil.getClassNameFromQName(NameUtil.ja 


va
   

:328)
[java] at

  
org.apache.xmlbeans.impl.common.NameUtil.getClassNameFromQName(NameUtil.ja 


va
   

:318)
[java] at
org.apache.xmlbeans.impl.schema.StscJavaizer.pickFullJavaClassName(
StscJavaizer.java:679)
[java] at
org.apache.xmlbeans.impl.schema.StscJavaizer.assignGlobalJavaNames(
StscJavaizer.java:91)
[java] at
org.apache.xmlbeans.impl.schema.StscJavaizer.javaizeAllTypes(
StscJavaizer.java:55)
[java] at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compileImpl(
SchemaTypeSystemCompiler.java:313)
[java] at
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(
SchemaTypeSystemCompiler.java:181)
[java] at
org.apache.xmlbeans.impl.tool.SchemaCompiler.loadTypeSystem(
SchemaCompiler.java:952)
[java] at 
org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(

SchemaCompiler.java:1072)
[java] at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(
SchemaCompiler.java:368)


On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:
 

Is there a particular issue that you've run into?

   

-Original Message-
From: Jordan Justen [mailto:[EMAIL PROTECTED]
Sent: Sunday, August 27, 2006 7:10 PM
To: harmony-dev@incubator.apache.org
Subject: [app] xmlbeans

Has anyone successfully used harmony with xmlbeans (
http://xmlbeans.apache.org/)?

Or, does anyone know of any major reasons why it would not be
  

working at
   

this time?

I tried it without luck.  I'll debug the error if no one knows of 
any

major
roadblocks that I'd encounter.

Thanks,

-Jordan
  

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: 
[EMAIL PROTECTED]





--
Richard Liang
China Software Development Lab, IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  




--
Richard Liang
China Software Development Lab, IBM 




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [classlib][TestNG] groups of Harmony test

2006-08-28 Thread Ivanov, Alexey A

-Original Message-
From: Andrew Zhang [mailto:[EMAIL PROTECTED]
Sent: Monday, August 28, 2006 1:06 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [classlib][TestNG] groups of Harmony test

On 8/28/06, Ivanov, Alexey A [EMAIL PROTECTED] wrote:


 -Original Message-
 From: Richard Liang [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 25, 2006 7:18 PM
 To: harmony-dev@incubator.apache.org
 Subject: [classlib][TestNG] groups of Harmony test
 
 Hello All,
 
 Now let's talk about the TestNG groups. I have read the related
threads
 which posted by George, Vladimir Ivanov and Alexei Zakharov. All of
 them
 are good discussion about TestNG groups.
 
 IMHO, we may define Harmony test groups according the following 4
 dimensions:
 
 1) [Platform] os.any, os.platform id
  *os.any* - group of tests which pass on any platform. IMHO, most of
 our
 tests should be in this group.
  *os.platform id* - group of tests which are designed for one
 specific
 platform. A test may be in more than one of the groups. e.g.,
 @Test(groups={os.win.IA32, os.linux.IA32})
 
 ** os.any and os.platform id are mutually exclusive, that is,
 tests in os.any group should not be in os.win.IA32.
 
 2) [Test state] state.broken, state.broken.platform id
  *state.broken* - group of tests which fail on every platform,
because
 of bugs of tests or implementation. We need to fix the bugs of tests
or
 implementation to make them pass.
  *state.broken.platform id* - groups of test which only fail on
one
 specific platform. A test may be in more than one of the groups.
e.g.,
 @Test(groups={state.broken.linux.IA32, os.broken.linux.IA64})
 
  **state.broken.platform id group may be used as a convenient
way
 to indicate that a test is platform-specific. e.g., If we support 10
 platforms, and one test are designed for 9 platforms except for
MacOS,
 instead of list 9 os.platform id, we can just use
state.broken.MacOS
 
 3) [Test type] type.api, type.impl
  *type.api* - group of tests which are tests for APIs in the Java
 Specification
  *type.impl* - groups of tests which are tests for Harmony-specific
 implementation
 
  ** type.api and type.impl are also mutually exclusive.
 
 4) [Test Level] level.unit, level.integration, level.system,
 level.stress, etc. (Levels of Test refer to the increase in
complexity
 as moving through test cycle. )
 ** A test may be in more than one of the groups.
 ** In fact, some tests such as System tests are the verification
of
 the entire system.  Maybe we'll put them into a separate project.
e.g.,
 harmony/enhanced/SVT (System Verification Test).

 5) [Environment] env.display, env.headless
   To distinguish AWT and Swing tests which need a display to run, and
 those which don't, as Mark proposed [1].


Will display option be passed manually as an argument to TestNG, or
detected automatically when running test?

I think it should be passed as an argument to TestNG.
Ant script can be setup to detect the state by default, with the ability
to override it from the command line.


Regards,
Alexey.


Regards,
 Alexey.

 [1]

http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200608.mb
 ox/[EMAIL PROTECTED]

 
 If we want to run all the unit test for APIs on windows, we may use
 TestNG groups to select the tests:
 groups
 run
 include name=os.any /
 include name=type.api /
 include name=os.win.IA32 /
 exclude name=state.broken /
 exclude name=state.broken.win.IA32 /
 /run
 /groups
 
 
 Well, I think our most of existing tests are in the groups of
 {os.any,
 type.api, level.unit}, and I have asked TestNG to add a new
option
 -groups for its JUnitConverter which allow us to specify the test
 groups when migrate from JUnit test to TestNG test.
 
 Thanks for reading so far, and I will highly appreciate your
comments
 or
 suggestion.  ;-)
 
 --
 Richard Liang
 China Software Development Lab, IBM
 
 
 

-
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
[EMAIL PROTECTED]

 --
 Alexey A. Ivanov
 Intel Middleware Product Division

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
[EMAIL PROTECTED]




--
Andrew Zhang
China Software Development Lab, IBM

--
Alexey A. Ivanov
Intel Middleware Product Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[kernel][reflect] Should we copy bug of RI JVM ?

2006-08-28 Thread Alexey Varlamov

There is a test[1] in classlib, which verifies that reflection access
from enclosing class to a private member of a nested class results in
IllegalAccessException.
However, this is against the language specification (para 6.6.1 of the JLS3):
if the member or constructor is declared private, then access is
permitted if and only if it occurs within the body of the top level class (§7.6)
that encloses the declaration of the member or constructor.

Moreover, the following test reveals inconsistency between standard
access control and reflective one:
-
class NestedAccessTest {
static class A {
private static int x = 123;
}
public static void main(String... s) throws Throwable{
System.out.println(A.x);
System.out.println(A.class.getDeclaredField(x).get(null));
}
}


java -showversion NestedAccessTest

java version 1.5.0_06
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
123
Exception in thread main java.lang.IllegalAccessException: Class
NestedAccessTest can not access a member of class NestedAccessTest$A
with modifiers private static
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
at java.lang.reflect.Field.doSecurityCheck(Field.java:954)
at java.lang.reflect.Field.getFieldAccessor(Field.java:895)
at java.lang.reflect.Field.get(Field.java:357)
at NestedAccessTest.main(NestedAccessTest.java:7)
--

I found out, this is an acknowledged bug of RI [2], and is ranked TOP#6.
The good news, however, that DRLVM is free of this defect. OTOH, it
surely cannot pass the aforementioned test of the classlib.

So the question: should we fix the test and will IBM VME address this
issue? What is appropriate JIRA category for it?

[1]testcase classname=tests.api.java.lang.reflect.FieldTest
name=test_getLjava_lang_Object/
[2] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4071957

--
Alexey Varlamov

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib] Sun compiler change?

2006-08-28 Thread Krzysztof Sobolewski
Spark Shen wrote:

 Seems that in new version of JDK, EnumSetE and capture of ? extends
 E (E was previously stated as E extends EnumE) are not considered
 compatible.
 After changing
 EnumSetE set = (EnumSetE)collection;
 into
 EnumSet set = (EnumSet)collection;
 , compilation using ant in command line succeeds.

...but gives unsafe warnings.

 Would any one give a clue, why the are considered incompatible in this
 version of JDK?

Maybe a bugfix? :)


As far as I understand generics, SomeClassA and SomeClassB, where B
extends A, *are* incompatible (per the spec). Generic types are not polymorphic.
The problematic line IMO should read:

EnumSet? extends E set = (EnumSet? extends E)collection;

That's because collection seems to be an EnumSet of some unknown subclass of
E[1] and that connot be safely converted to EnumSetE.

[1] I guess this is in addAll() or its friends?
-KS



signature.asc
Description: OpenPGP digital signature


Re: [classlib] Sun compiler change?

2006-08-28 Thread Spark Shen

Krzysztof Sobolewski 写道:

Spark Shen wrote:

  

Seems that in new version of JDK, EnumSetE and capture of ? extends
E (E was previously stated as E extends EnumE) are not considered
compatible.
After changing
EnumSetE set = (EnumSetE)collection;
into
EnumSet set = (EnumSet)collection;
, compilation using ant in command line succeeds.



...but gives unsafe warnings.

  

Would any one give a clue, why the are considered incompatible in this
version of JDK?



Maybe a bugfix? :)


As far as I understand generics, SomeClassA and SomeClassB, where B
extends A, *are* incompatible (per the spec). Generic types are not polymorphic.
The problematic line IMO should read:

EnumSet? extends E set = (EnumSet? extends E)collection;
  
Do you mean to change the problematic line into the above statement? I 
have tried this already, but this type of cast will also give a 
compilation error.
And I did not find a way to suppress the unchecked warning while 
compilation succeed.

That's because collection seems to be an EnumSet of some unknown subclass of
E[1] and that connot be safely converted to EnumSetE.

[1] I guess this is in addAll() or its friends?
  
I guess 'its friends' refers to removeAll, containsAll, and retainAll. 
:-)   But all its friends have different signature as addAll


boolean addAll(*Collection? extends E* c) 


boolean containsAll(*Collection?* c)
boolean removeAll(*Collection?* c)
boolean retainAll(*Collection?* c)
I guess you know why they are different.

So, in the implementation of all its friends, same problem is not 
encountered.

-KS

  



--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] how does drlvm insert the safe point into a method

2006-08-28 Thread Mikhail Fursov

On 8/28/06, Weldon Washburn [EMAIL PROTECTED] wrote:


When the JITed code sees the flag set, it will
suspend the thread and report the live references. As far as I know
the DRLVM JIT you are looking at does not quite do this yet.



Weldon, AFAIK both DRLVM JITs: Jitrino.JET  Jitrino.OPT do back branch
polling.
In other words once JIT founds a method or a loop without any
VM-helper-calls (that are suspension points) it inserts special code (look
for back branch polling or bbp in sources), checks TLS flag (with a helper
call or directly)  and calls VM helper to suspend the thread if needed.
All thread suspensions points are enumeration points from GC's point of
view.

Also I know that Jitrino.OPT BBP (back-branch-polling) algorithm could be
optimized to avoid insertion of BBP checking code in to the finite loops. I
hope we will back to this problem because solving it we get a real percents
in performance.


--
Mikhail Fursov


Re: [classlib] Sun compiler change?

2006-08-28 Thread Krzysztof Sobolewski
Spark Shen wrote:

 As far as I understand generics, SomeClassA and SomeClassB, where B
 extends A, *are* incompatible (per the spec). Generic types are not
 polymorphic.
 The problematic line IMO should read:

 EnumSet? extends E set = (EnumSet? extends E)collection;
   
 Do you mean to change the problematic line into the above statement? I
 have tried this already, but this type of cast will also give a
 compilation error.

That's odd. I used a compiler this time and could not reproduce it (with
javac 1.5.0_08-b03 and quick-and-dirty from-the-scratch EnumSet impl). It
always gives me unchecked cast warning, no errors. Maybe I should check
out Harmony sources? :)

 And I did not find a way to suppress the unchecked warning while
 compilation succeed.

Maybe @SuppressWarnings(unchecked)? If you're absolutely sure it's OK...

BTW:
EnumSet? set = (EnumSet?)collection;
seems to compile fine, but I'm not sure it's enough for you :)

 [1] I guess this is in addAll() or its friends?
   
 I guess 'its friends' refers to removeAll, containsAll, and retainAll.
 :-)   But all its friends have different signature as addAll
 
 boolean addAll(*Collection? extends E* c)
 boolean containsAll(*Collection?* c)
 boolean removeAll(*Collection?* c)
 boolean retainAll(*Collection?* c)
 I guess you know why they are different.
 
 So, in the implementation of all its friends, same problem is not
 encountered.

Oh, yeah... Who'd remember all that... ;)
-KS



signature.asc
Description: OpenPGP digital signature


Re: [kernel][reflect] Should we copy bug of RI JVM ?

2006-08-28 Thread Vladimir Gorr

On 8/28/06, Alexey Varlamov [EMAIL PROTECTED] wrote:


There is a test[1] in classlib, which verifies that reflection access
from enclosing class to a private member of a nested class results in
IllegalAccessException.
However, this is against the language specification (para 6.6.1 of the
JLS3):
if the member or constructor is declared private, then access is
permitted if and only if it occurs within the body of the top level class
(§7.6)
that encloses the declaration of the member or constructor.

Moreover, the following test reveals inconsistency between standard
access control and reflective one:
-
class NestedAccessTest {
static class A {
   private static int x = 123;
}
public static void main(String... s) throws Throwable{
   System.out.println(A.x);
   System.out.println(A.class.getDeclaredField(x).get(null));
}
}

java -showversion NestedAccessTest
java version 1.5.0_06
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
123
Exception in thread main java.lang.IllegalAccessException: Class
NestedAccessTest can not access a member of class NestedAccessTest$A
with modifiers private static
   at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)
   at java.lang.reflect.Field.doSecurityCheck(Field.java:954)
   at java.lang.reflect.Field.getFieldAccessor(Field.java:895)
   at java.lang.reflect.Field.get(Field.java:357)
   at NestedAccessTest.main(NestedAccessTest.java:7)
--

I found out, this is an acknowledged bug of RI [2], and is ranked TOP#6.
The good news, however, that DRLVM is free of this defect. OTOH, it
surely cannot pass the aforementioned test of the classlib.

So the question: should we fix the test and will IBM VME address this
issue? What is appropriate JIRA category for it?



I suppose this test should be modified after IBM VME will behave in
accordance with the specifications if any.
Certainly, if there are no any objections. IMO we should avoid any bugs
known for the RI, shouldn't we?

Thanks,
Vladimir.

[1]testcase classname=tests.api.java.lang.reflect.FieldTest

name=test_getLjava_lang_Object/
[2] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4071957

--
Alexey Varlamov

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [DRLVM][VM] -- which header bits are available for GC mark and GC forwarding use?

2006-08-28 Thread Robin Garner
  From talking to
 the MMTk guys (Steve Blackburn) it seems MMTk wants to have one byte
 of object header for private use.  Its unclear to me if this will be a
 performance problem for a product JVM.

Yep.  We found a nice mark-sweep implementation technique that greatly
reduces the cost of sweeping if we have several mark bits available, but
after 4 or so bits the advantage tails off, so there is room for
compromise with the VM's need.  On the other hand I'm currently looking at
other ways we could speed up GC if there were a few extra header bits
available, so the more bits available to GC, the better - and these will
generally be tunable parameters that can be traded against the VM's other
needs.

   I think the hashCode can be
 reduced to one bit plus the object's current address at first
 HashCode() invocation.  I'd put this hash bit in the GC byte.  And
 make the GC byte the lowest byte in the header word.  The remaining
 3bytes could be used for fat/thin locks.

In GenMS, where there is a copying nursery and a non-moving mature space,
you could indeed get away with 1 bit for hashcode, with a different
meeaning in each space.  In a heap where objects could move more than
once, I think you might still need 2 bits.

cheers


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[classlib][build] bug of RI 1.5.0_08 compiler

2006-08-28 Thread Richard Liang

Hello,

Our incremental build does not work under the new compiler.

1) ant clean
2) ant
3) modify a piece of code
4) ant
Then, lots of compilation error are reported. To make the build pass, 
call ant clean before the build.


Could anyone re-produce this issue? Thanks a lot.

Best regards,

--
Richard Liang
China Software Development Lab, IBM 




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] how does drlvm insert the safe point into a method

2006-08-28 Thread Fan Bin
Thank you very much for your answer and your bearing my awful english:). and 
thanks to Egor and Mikhail. Yes, my question is about the safe point in JITed 
code. Your answer are really helps. 

I want to suspend a thread from another thead, not for the reason of GC, but 
for some other reasons. From your answer, I know that it is JIT who insert the 
polling code. So I think what should I do is modifying the JIT, insert the 
polling code at the point I want the suspendee to stop. I'll look for bbp in 
the source to see some details first. I'll ask if I meet some questions.

I still have a question to Wedlon: What do you mean that As far as I know the 
DRLVM JIT you are looking at does not quite do this yet. Does it mean that the 
drlvm JIT(Jitrino.JET and OPT) I'm looking at can't insert the polling code, or 
just JET can't do this?

Many thanks, 
fanbin

- Original Message - 
From: Weldon Washburn [EMAIL PROTECTED]
To: harmony-dev@incubator.apache.org
Sent: Monday, August 28, 2006 12:38 PM
Subject: Re: [drlvm] how does drlvm insert the safe point into a method


 Hi Fan,
 
 I think you are asking about safe instruction pointer addresses in
 JITed code where the JIT is able to enumerate all live references.  If
 this is the case, it turns out there are lots of subtle interactions
 between all the pieces of the system.  In otherwords, I can't do
 justice to the topic in an email.  But I will point you in the right
 direction.
 
 The JIT can insert  polling code at points where it knows it can find
 all live references on a thread's stack.  When the GC wants a thread
 to suspend and report its live references, it can set a flag in the
 thread-local context.  When the JITed code sees the flag set, it will
 suspend the thread and report the live references. As far as I know
 the DRLVM JIT you are looking at does not quite do this yet.
 
 An incomplete but useful for bringup approach is to let the targetted
 thread continue executing until it tries to allocate an object.
 Assuming there is no space available, the thread is vectored into the
 garbage collector itself.  By design, object allocation sites are
 places where the JIT can enumerate all live references on the stack.
 
 There are other schemes, such as suspending and resuming the targetted
 thread until the JIT reports it can enumerate.  I won't bore you with
 the details here.  Let me know if this helps.
 
 
 On 8/27/06, Fan Bin [EMAIL PROTECTED] wrote:
 Hi, I have a question about jit compiler in drlvm. I want to suspend the 
 thread manually on a particular point. I know that the thread can only be 
 suspended at safe point. I guess the safe point is inserted by jit compiler 
 when it compile the method, but I can't prove it from the source code. So my 
 question is whether it's true that it is the jit compiler which insert the 
 safe point. If it is true, how does it do this?
 Thank you for your help.

 
 
 -- 
 Weldon Washburn
 Intel Middleware Products Division
 
 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


Re: [classlib] HARMONY-790 is not reproducible

2006-08-28 Thread Denis Kishenko

2006/8/25, Mark Hindess [EMAIL PROTECTED]:

Thanks for helping by looking at these.  If you spot others and send
messages and/or add comments in JIRA I'll take a look at them.


Mark

There are a lot of unassigned issues with patches in JIRA. For example
most of issues listed bellow were created more then two weeks ago.
http://issues.apache.org/jira/browse/HARMONY-1070
http://issues.apache.org/jira/browse/HARMONY-1118
http://issues.apache.org/jira/browse/HARMONY-1190
http://issues.apache.org/jira/browse/HARMONY-1131
http://issues.apache.org/jira/browse/HARMONY-1231
http://issues.apache.org/jira/browse/HARMONY-1168
http://issues.apache.org/jira/browse/HARMONY-1153
http://issues.apache.org/jira/browse/HARMONY-1107
http://issues.apache.org/jira/browse/HARMONY-
http://issues.apache.org/jira/browse/HARMONY-1175
http://issues.apache.org/jira/browse/HARMONY-1244

Also there are several assigned but not resolved issues which have patches too.
http://issues.apache.org/jira/browse/HARMONY-1031
http://issues.apache.org/jira/browse/HARMONY-1139
http://issues.apache.org/jira/browse/HARMONY-1148
http://issues.apache.org/jira/browse/HARMONY-1081
http://issues.apache.org/jira/browse/HARMONY-1184
http://issues.apache.org/jira/browse/HARMONY-1169

Could you please look at these issues?

Thanks.

--
Denis M. Kishenko
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][luni] Enable tests.api.java.net.DatagramSocketTest?

2006-08-28 Thread Alexey Varlamov

Guys,

Please take a look at HARMONY-1295 - debug build of DRLVM revealed funny bug(s).

--
Alexey

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib] Sun compiler change?

2006-08-28 Thread Spark Shen

Krzysztof Sobolewski 写道:

Spark Shen wrote:

  

As far as I understand generics, SomeClassA and SomeClassB, where B
extends A, *are* incompatible (per the spec). Generic types are not
polymorphic.
The problematic line IMO should read:

EnumSet? extends E set = (EnumSet? extends E)collection;
  
  

Do you mean to change the problematic line into the above statement? I
have tried this already, but this type of cast will also give a
compilation error.



That's odd. I used a compiler this time and could not reproduce it (with
javac 1.5.0_08-b03 and quick-and-dirty from-the-scratch EnumSet impl). It
always gives me unchecked cast warning, no errors. Maybe I should check
out Harmony sources? :)

  

Hi
That's really odd. :-) 
I use javac:

java version 1.5.0_08
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode)

And I check out Harmony sources and run build task using ant under 
command, which gives the following error prompt:

[mkdir] Created dir: C:\spark\harmony\build\classes
[javac] Compiling 3173 source files to C:\spark\harmony\build\classes
[javac] 
C:\spark\harmony\modules\luni\src\main\java\java\util\MiniEnumSet.java:78: 
inconvertible types

[javac] found   : java.util.Collectioncapture of ? extends E
[javac] required: java.util.EnumSet? extends E
[javac] EnumSet? extends E set = (EnumSet? extends E) 
collection;

[javac]   ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 1 error

BTW, before every build, I run 'ant clean' to clean all previous outputs.

Best regards

And I did not find a way to suppress the unchecked warning while
compilation succeed.



Maybe @SuppressWarnings(unchecked)? If you're absolutely sure it's OK...

BTW:
EnumSet? set = (EnumSet?)collection;
seems to compile fine, but I'm not sure it's enough for you :)

  

[1] I guess this is in addAll() or its friends?
  
  

I guess 'its friends' refers to removeAll, containsAll, and retainAll.
:-)   But all its friends have different signature as addAll

boolean addAll(*Collection? extends E* c)
boolean containsAll(*Collection?* c)
boolean removeAll(*Collection?* c)
boolean retainAll(*Collection?* c)
I guess you know why they are different.

So, in the implementation of all its friends, same problem is not
encountered.



Oh, yeah... Who'd remember all that... ;)
-KS

  



--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib] Sun compiler change?

2006-08-28 Thread Krzysztof Sobolewski
Spark Shen wrote:

 Did you (refer to thread [app] ant with ecj) put
 
 Eclipse compiler JAR on Ant's
 execution classpath to execute the javac task.
 
 If so, may be that's why It always gives you unchecked cast warning,
 no errors.

Well, I created a new EnumSet class in completly unrelated environment... So
it is perfectly possible that there's a classpath conflict somewhere. I
can't verify that because don't have the Harmony build here :)

BTW: another experiment revealed that
EnumSet? extends EnumE set = (EnumSet? extends EnumE)collection;
compiles without warnings. No matter how much I think I understand generics,
there's always something that surprises me ;)
-KS



signature.asc
Description: OpenPGP digital signature


Re: [classlib][TestNG] groups of Harmony test

2006-08-28 Thread Richard Liang



Richard Liang wrote:

Hello All,

Now let's talk about the TestNG groups. I have read the related 
threads which posted by George, Vladimir Ivanov and Alexei Zakharov. 
All of them are good discussion about TestNG groups.


IMHO, we may define Harmony test groups according the following 4 
dimensions:


1) [Platform] os.any, os.platform id
*os.any* - group of tests which pass on any platform. IMHO, most of 
our tests should be in this group.
*os.platform id* - group of tests which are designed for one 
specific platform. A test may be in more than one of the groups. e.g., 
@Test(groups={os.win.IA32, os.linux.IA32})


   ** os.any and os.platform id are mutually exclusive, that is, 
tests in os.any group should not be in os.win.IA32.


2) [Test state] state.broken, state.broken.platform id
*state.broken* - group of tests which fail on every platform, because 
of bugs of tests or implementation. We need to fix the bugs of tests 
or implementation to make them pass.
*state.broken.platform id* - groups of test which only fail on one 
specific platform. A test may be in more than one of the groups. e.g., 
@Test(groups={state.broken.linux.IA32, os.broken.linux.IA64})


**state.broken.platform id group may be used as a convenient way 
to indicate that a test is platform-specific. e.g., If we support 10 
platforms, and one test are designed for 9 platforms except for MacOS, 
instead of list 9 os.platform id, we can just use state.broken.MacOS


3) [Test type] type.api, type.impl
*type.api* - group of tests which are tests for APIs in the Java 
Specification
*type.impl* - groups of tests which are tests for Harmony-specific 
implementation


** type.api and type.impl are also mutually exclusive.

4) [Test Level] level.unit, level.integration, level.system, 
level.stress, etc. (Levels of Test refer to the increase in complexity 
as moving through test cycle. )

   ** A test may be in more than one of the groups.
   ** In fact, some tests such as System tests are the verification of 
the entire system.  Maybe we'll put them into a separate project. 
e.g., harmony/enhanced/SVT (System Verification Test).


If we want to run all the unit test for APIs on windows, we may use 
TestNG groups to select the tests:

   groups
   run
   include name=os.any /
   include name=type.api /
   include name=os.win.IA32 /
   exclude name=state.broken /
   exclude name=state.broken.win.IA32 /
   /run
   /groups


Hello All,

I'm sorry. It seems that the example does not work. I will try to figure 
another example soon. ;-)


Best regards,
Richard


Well, I think our most of existing tests are in the groups of 
{os.any, type.api, level.unit}, and I have asked TestNG to add a 
new option -groups for its JUnitConverter which allow us to specify 
the test groups when migrate from JUnit test to TestNG test.


Thanks for reading so far, and I will highly appreciate your comments 
or suggestion.  ;-)




--
Richard Liang
China Software Development Lab, IBM 




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib] Sun compiler change?

2006-08-28 Thread Spark Shen

Krzysztof Sobolewski 写道:

Spark Shen wrote:

  

Did you (refer to thread [app] ant with ecj) put

Eclipse compiler JAR on Ant's
execution classpath to execute the javac task.

If so, may be that's why It always gives you unchecked cast warning,
no errors.



Well, I created a new EnumSet class in completly unrelated environment... So
it is perfectly possible that there's a classpath conflict somewhere. I
can't verify that because don't have the Harmony build here :)

BTW: another experiment revealed that
EnumSet? extends EnumE set = (EnumSet? extends EnumE)collection;
compiles without warnings. No matter how much I think I understand generics,
there's always something that surprises me ;)
  
HaHa,  agree!!! :-) 
And thank you for your information.


Best regards

-KS

  



--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [vote] HARMONY-1225 : Assorted fixes and enhancements for AWT and Swing

2006-08-28 Thread Sergey Soldatov

+1

On 8/28/06, Ivanov, Alexey A [EMAIL PROTECTED] wrote:


+1

--
Alexey A. Ivanov
Intel Middleware Product Division


-Original Message-
From: Ilya Okomin [mailto:[EMAIL PROTECTED]
Sent: Monday, August 28, 2006 12:10 PM
To: harmony-dev@incubator.apache.org
Subject: Re: [vote] HARMONY-1225 : Assorted fixes and enhancements for
AWT
and Swing

+1

On 8/28/06, Alexey Petrenko [EMAIL PROTECTED] wrote:

 2006/8/28, Vladimir Gorr [EMAIL PROTECTED]:
  I see these improvements don't contain very important thing
allowing us
  to automatically build (or get) the gl library. Or is this another
 story?
 This is another story.

  Otherwise only the advanced people can look at these enhancements
:-).
 
  Nevertheless +1 for me.
 
  Thanks,
  Vladimir.
 
 
  On 8/28/06, Alexey Petrenko [EMAIL PROTECTED] wrote:
  
   +1
  
   2006/8/28, Geir Magnusson Jr [EMAIL PROTECTED]:
+1
   
Geir Magnusson Jr wrote:
 All is in order and in SVN for Harmony-1225 wrt BCC and ACQ.

 Please vote to accept or reject this set of patches and fixes
into
 the
 Apache Harmony class library :

 [ ] + 1 Accept
 [ ] -1 Reject  (provide reason below)

 Lets let this run a minimum of 3 days unless a) someone
states
 they
   need
 more time or b) we get all committer votes before then.

 geir




 -
 Terms of use :
http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]



   
   
 -
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-
[EMAIL PROTECTED]
For additional commands, e-mail:
 [EMAIL PROTECTED]
   
   
  
  
   --
   Alexey A. Petrenko
   Intel Middleware Products Division
  
  
-
   Terms of use : http://incubator.apache.org/harmony/mailing.html
   To unsubscribe, e-mail:
[EMAIL PROTECTED]
   For additional commands, e-mail: harmony-dev-
[EMAIL PROTECTED]
  
  
 
 


 --
 Alexey A. Petrenko
 Intel Middleware Products Division

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
[EMAIL PROTECTED]




--
--
Ilya Okomin
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Sergey Soldatov
Intel Middleware Products Division


Re: [classlib][build] bug of RI 1.5.0_08 compiler

2006-08-28 Thread Paulex Yang
I got this error reproduced, more than 50 compile errors when I switched 
to Sun JDK 1.5.0_08 with ant 1.6.5 on WinXP. The mysterious thing is the 
build passed after ant clean, while failed again when I modified one 
file then built without clean.


Anyone others have same issue? Any ideas what happened?

Richard Liang wrote:

Hello,

Our incremental build does not work under the new compiler.

1) ant clean
2) ant
3) modify a piece of code
4) ant
Then, lots of compilation error are reported. To make the build pass, 
call ant clean before the build.


Could anyone re-produce this issue? Thanks a lot.

Best regards,




--
Paulex Yang
China Software Development Lab
IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [DRLVM][VM] -- which header bits are available for GC mark and GC forwarding use?

2006-08-28 Thread Weldon Washburn

Robin,

Good points.  Given that Object.hashCode() implementation sortof,
kindof depends on a copying mature space, does it make sense for the
GC to own the Object.hashCode() implementation?  That way, we
eliminate the vm-wide debate about giving object hash one or two or
even 12 header bits.  It all becomes a local problem of GC
implementation.  No need for negotiating with the rest of the VM :)

From a top-level how about giving the GC one byte of object header to

do hash plus whatever it wants?  I realize it would be nice to have an
expando object model in Harmony that would allow arbitrary number of
header bits for a) tib ptr, b) default hash code, c) lock info and d)
GC info.  I worry that this would be too disruptive to the code base
right now.  Can we make do with the above proposal?

Just to be clear, the two-bit Object.hashCode() scheme I refer to is
the one in section 3.3 of, Space- and Time-Efficient Implemention of
the Java Object Model by David Bacon, et al.  I think this is also
the scheme Ivan Volosyuk is refering to and has an implementation of.

On 8/28/06, Robin Garner [EMAIL PROTECTED] wrote:

  From talking to
 the MMTk guys (Steve Blackburn) it seems MMTk wants to have one byte
 of object header for private use.  Its unclear to me if this will be a
 performance problem for a product JVM.

Yep.  We found a nice mark-sweep implementation technique that greatly
reduces the cost of sweeping if we have several mark bits available, but
after 4 or so bits the advantage tails off, so there is room for
compromise with the VM's need.  On the other hand I'm currently looking at
other ways we could speed up GC if there were a few extra header bits
available, so the more bits available to GC, the better - and these will
generally be tunable parameters that can be traded against the VM's other
needs.

   I think the hashCode can be
 reduced to one bit plus the object's current address at first
 HashCode() invocation.  I'd put this hash bit in the GC byte.  And
 make the GC byte the lowest byte in the header word.  The remaining
 3bytes could be used for fat/thin locks.

In GenMS, where there is a copying nursery and a non-moving mature space,
you could indeed get away with 1 bit for hashcode, with a different
meeaning in each space.  In a heap where objects could move more than
once, I think you might still need 2 bits.

cheers


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Weldon Washburn
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [DRLVM][VM] -- which header bits are available for GC mark and GC forwarding use?

2006-08-28 Thread Ivan Volosyuk

+1, for GC to own Object.hashCode(). That's exactly, what I propose.

Slightly outdated patch with the changes included can be found in HARMONY-1269.
I can update it to reflect recent TM changes or you can redo this work
by yourself.
--
Thanks,
Ivan

On 8/28/06, Weldon Washburn [EMAIL PROTECTED] wrote:

Robin,

Good points.  Given that Object.hashCode() implementation sortof,
kindof depends on a copying mature space, does it make sense for the
GC to own the Object.hashCode() implementation?  That way, we
eliminate the vm-wide debate about giving object hash one or two or
even 12 header bits.  It all becomes a local problem of GC
implementation.  No need for negotiating with the rest of the VM :)
From a top-level how about giving the GC one byte of object header to
do hash plus whatever it wants?  I realize it would be nice to have an
expando object model in Harmony that would allow arbitrary number of
header bits for a) tib ptr, b) default hash code, c) lock info and d)
GC info.  I worry that this would be too disruptive to the code base
right now.  Can we make do with the above proposal?

Just to be clear, the two-bit Object.hashCode() scheme I refer to is
the one in section 3.3 of, Space- and Time-Efficient Implemention of
the Java Object Model by David Bacon, et al.  I think this is also
the scheme Ivan Volosyuk is refering to and has an implementation of.

On 8/28/06, Robin Garner [EMAIL PROTECTED] wrote:
   From talking to
  the MMTk guys (Steve Blackburn) it seems MMTk wants to have one byte
  of object header for private use.  Its unclear to me if this will be a
  performance problem for a product JVM.

 Yep.  We found a nice mark-sweep implementation technique that greatly
 reduces the cost of sweeping if we have several mark bits available, but
 after 4 or so bits the advantage tails off, so there is room for
 compromise with the VM's need.  On the other hand I'm currently looking at
 other ways we could speed up GC if there were a few extra header bits
 available, so the more bits available to GC, the better - and these will
 generally be tunable parameters that can be traded against the VM's other
 needs.

I think the hashCode can be
  reduced to one bit plus the object's current address at first
  HashCode() invocation.  I'd put this hash bit in the GC byte.  And
  make the GC byte the lowest byte in the header word.  The remaining
  3bytes could be used for fat/thin locks.

 In GenMS, where there is a copying nursery and a non-moving mature space,
 you could indeed get away with 1 bit for hashcode, with a different
 meeaning in each space.  In a heap where objects could move more than
 once, I think you might still need 2 bits.


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[classlib][ldap] contribution of missing javax.naming.ldap 1.4 classes

2006-08-28 Thread Daniel Gandara
Hi all, 

on http://issues.apache.org/jira/browse/HARMONY-1296 we have contributed 
the missing classes for v1.4 of the javax.naming.ldap package.At the ITC we 
are working to complete the 1.5 version of the package, in the following weeks 
we plan to contribute it.
Within the contribution you will find a test suite for the package and a 
coverage analysis of it.

Thanks, 

Daniel Gándara


Re: [drlvm] Helper inlining in JIT

2006-08-28 Thread Mikhail Fursov

Folks,
Here is the example of fast allocation helper written in Java with the help
of VMMagic
If nobody objects I'm starting to implement VMMagic support in
Jitrino.OPTthis week.



private static final int GC_TLS_OFFSET = 10;
private static final int GC_CURRENT_OFFSET= GC_TLS_OFFSET + 0;
private static final int GC_CEILING_OFFSET= GC_TLS_OFFSET + 4;
private static final int OBJ_VTABLE_OFFSET = 0;

//annotate with calling convention and real VM helper id/name information
private static Address slowAlloc(int vtable, int size) {throw new
Error(must never be called!);}

private static Address fastAlloc(int vtable, int size) {
   Address tlsBase = TLS.getAddress();  //load thread local client area
address

   Address currentFieldAddress = tlsBase.plus(GC_CURRENT_OFFSET);
   Address ceilingFieldAddress = tlsBase.plus(GC_CEILING_OFFSET);

   Address newObjectAddress; //the result of the method

   // check if there is enough size to do allocation in thread local buffer
   Address current = currentFieldAddress.loadAddress();
   Address ceiling = ceilingFieldAddress.loadAddress();
   Address newCurrent = current.plus(size);
   if (newCurrent.LT(ceiling)) {
   currentFieldAddress.store(newCurrent.toWord());
   newObjectAddress = newCurrent;
   newObjectAddress.store(vtable, Offset.fromInt(OBJ_VTABLE_OFFSET));

   } else {
   newObjectAddress = slowAlloc(vtable, size);
   }
   return newObjectAddress;
}

--
Mikhail Fursov


[DRLVM][VM] set_hash_bits() in vmcore/src/thread/mon_enter_exit.cpp -- is it a bug or a feature?

2006-08-28 Thread Weldon Washburn

While porting MMTk to harmony/drlvm, I hit an integration problem.  It
could even be a bug.  set_hash_bits() assumes the least significant
bit is zero.  Assuming that the LSB can be owned by the garbage
collector for its purposes, set_hash_bits() will fail if the GC sets
this bit to one.  Somehow I think the code should read the target
location, create the intended bit pattern before attempting to do the
atomic compare and swap.  Currently the code assume the target CAS
location holds zero.

SInce I am working only in single thread right now, I hacked around
the problem with the below.  Thoughts?


C:\t_harmony\drlvm\trunk\vm\vmcore\src\threadsvn diff mon_enter_exit.cpp
Index: mon_enter_exit.cpp
===
--- mon_enter_exit.cpp  (revision 425482)
+++ mon_enter_exit.cpp  (working copy)
@@ -368,7 +368,12 @@
hb = (23  HASH_MASK);  // NO hash = zero allowed, thus hard map hb = 0
to a fixed prime number

// don't care if the cmpxchg fails -- just means someone else already set t
he hash
-port_atomic_cas8(P_HASH_CONTENTION(p_obj),hb, 0);
+//port_atomic_cas8(P_HASH_CONTENTION(p_obj),hb, 0);
+unsigned char lsb = *P_HASH_CONTENTION(p_obj);
+lsb = lsb  0x01;  //wjw need to keep the LSB, its used by MMTk Garbage Col
lector
+hb = hb | lsb;
+if ( (*P_HASH_CONTENTION(p_obj)  HASH_MASK) == 0 ) // wjw non-atomic hack
for now
+*P_HASH_CONTENTION(p_obj) = hb;
}




--
Weldon Washburn
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Helper inlining in JIT

2006-08-28 Thread Weldon Washburn

On 8/28/06, Mikhail Fursov [EMAIL PROTECTED] wrote:

Folks,
Here is the example of fast allocation helper written in Java with the help
of VMMagic
If nobody objects I'm starting to implement VMMagic support in
Jitrino.OPTthis week.


I like it!  It makes sense.  No objections to what you propose.
 - Weldon





private static final int GC_TLS_OFFSET = 10;
private static final int GC_CURRENT_OFFSET= GC_TLS_OFFSET + 0;
private static final int GC_CEILING_OFFSET= GC_TLS_OFFSET + 4;
private static final int OBJ_VTABLE_OFFSET = 0;

//annotate with calling convention and real VM helper id/name information
private static Address slowAlloc(int vtable, int size) {throw new
Error(must never be called!);}

private static Address fastAlloc(int vtable, int size) {
   Address tlsBase = TLS.getAddress();  //load thread local client area
address

   Address currentFieldAddress = tlsBase.plus(GC_CURRENT_OFFSET);
   Address ceilingFieldAddress = tlsBase.plus(GC_CEILING_OFFSET);

   Address newObjectAddress; //the result of the method

   // check if there is enough size to do allocation in thread local buffer
   Address current = currentFieldAddress.loadAddress();
   Address ceiling = ceilingFieldAddress.loadAddress();
   Address newCurrent = current.plus(size);
   if (newCurrent.LT(ceiling)) {
   currentFieldAddress.store(newCurrent.toWord());
   newObjectAddress = newCurrent;
   newObjectAddress.store(vtable, Offset.fromInt(OBJ_VTABLE_OFFSET));

   } else {
   newObjectAddress = slowAlloc(vtable, size);
   }
   return newObjectAddress;
}

--
Mikhail Fursov





--
Weldon Washburn
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [app] xmlbeans

2006-08-28 Thread Jordan Justen

Thanks Richard!

On 8/28/06, Richard Liang [EMAIL PROTECTED] wrote:




Richard Liang wrote:


 Nathan Beyer wrote:
 I take it that means the issue is pretty obvious (very easy to
 recreate).
 Can you tell us what you did to recreate it and what class in Harmony
 is at
 issue?

 It seems a bug of java.util.ArrayList. I will attach a patch to fix it.
I have raised a JIRA HARMONY-1293[1] for this issue with patch
attached.  :-)

[1] https://issues.apache.org/jira/browse/HARMONY-1293

Richard.

 Best regards,
 Richard
 -Nathan


 -Original Message-
 From: Richard Liang [mailto:[EMAIL PROTECTED]
 Sent: Sunday, August 27, 2006 10:36 PM
 To: harmony-dev@incubator.apache.org
 Subject: Re: [app] xmlbeans

 I reproduce the same error on xmlbeans-2.2.0.

 Jordan Justen wrote:

 Well, I don't have much details, but here's the stack trace.  I
 figured it
 wouldn't be to helpful for the list.  I don't see this exception with

 the

 sun jvm/classes.  Anyway, I'll try debug it some...

 [java] java.lang.NullPointerException
 [java] at org.apache.xmlbeans.impl.common.NameUtil.splitWords
(
 NameUtil.java:667)
 [java] at
 org.apache.xmlbeans.impl.common.NameUtil.lowerCamelCase(
 NameUtil.java:623)
 [java] at
 org.apache.xmlbeans.impl.common.NameUtil.getPackageFromNamespace(
 NameUtil.java:513)
 [java] at


 org.apache.xmlbeans.impl.common.NameUtil.getClassNameFromQName(
NameUtil.ja

 va

 :328)
 [java] at


 org.apache.xmlbeans.impl.common.NameUtil.getClassNameFromQName(
NameUtil.ja

 va

 :318)
 [java] at
 org.apache.xmlbeans.impl.schema.StscJavaizer.pickFullJavaClassName(
 StscJavaizer.java:679)
 [java] at
 org.apache.xmlbeans.impl.schema.StscJavaizer.assignGlobalJavaNames(
 StscJavaizer.java:91)
 [java] at
 org.apache.xmlbeans.impl.schema.StscJavaizer.javaizeAllTypes(
 StscJavaizer.java:55)
 [java] at
 org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compileImpl(
 SchemaTypeSystemCompiler.java:313)
 [java] at
 org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(
 SchemaTypeSystemCompiler.java:181)
 [java] at
 org.apache.xmlbeans.impl.tool.SchemaCompiler.loadTypeSystem(
 SchemaCompiler.java:952)
 [java] at
 org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(
 SchemaCompiler.java:1072)
 [java] at org.apache.xmlbeans.impl.tool.SchemaCompiler.main(
 SchemaCompiler.java:368)


 On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:

 Is there a particular issue that you've run into?


 -Original Message-
 From: Jordan Justen [mailto:[EMAIL PROTECTED]
 Sent: Sunday, August 27, 2006 7:10 PM
 To: harmony-dev@incubator.apache.org
 Subject: [app] xmlbeans

 Has anyone successfully used harmony with xmlbeans (
 http://xmlbeans.apache.org/)?

 Or, does anyone know of any major reasons why it would not be

 working at

 this time?

 I tried it without luck.  I'll debug the error if no one knows of
 any
 major
 roadblocks that I'd encounter.

 Thanks,

 -Jordan


-
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]



 --
 Richard Liang
 China Software Development Lab, IBM



 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





--
Richard Liang
China Software Development Lab, IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [drlvm] how does drlvm insert the safe point into a method

2006-08-28 Thread Weldon Washburn

On 8/28/06, Fan Bin [EMAIL PROTECTED] wrote:

I still have a question to Wedlon: What do you mean that As far as I know the DRLVM 
JIT you are looking at does not quite do this yet. Does it mean that the drlvm 
JIT(Jitrino.JET and OPT) I'm looking at can't insert the polling code, or just JET can't 
do this?



What I really mean is that I have not looked at Jitrino code recently.
Please see Mikhail Fursov's answer.  It looks like Jitrino might have
what you need.  You may want to also look in Harmony JIRA.  Feel free
to continue to ask questions.


Many thanks,
fanbin

- Original Message -
From: Weldon Washburn [EMAIL PROTECTED]
To: harmony-dev@incubator.apache.org
Sent: Monday, August 28, 2006 12:38 PM
Subject: Re: [drlvm] how does drlvm insert the safe point into a method


 Hi Fan,

 I think you are asking about safe instruction pointer addresses in
 JITed code where the JIT is able to enumerate all live references.  If
 this is the case, it turns out there are lots of subtle interactions
 between all the pieces of the system.  In otherwords, I can't do
 justice to the topic in an email.  But I will point you in the right
 direction.

 The JIT can insert  polling code at points where it knows it can find
 all live references on a thread's stack.  When the GC wants a thread
 to suspend and report its live references, it can set a flag in the
 thread-local context.  When the JITed code sees the flag set, it will
 suspend the thread and report the live references. As far as I know
 the DRLVM JIT you are looking at does not quite do this yet.

 An incomplete but useful for bringup approach is to let the targetted
 thread continue executing until it tries to allocate an object.
 Assuming there is no space available, the thread is vectored into the
 garbage collector itself.  By design, object allocation sites are
 places where the JIT can enumerate all live references on the stack.

 There are other schemes, such as suspending and resuming the targetted
 thread until the JIT reports it can enumerate.  I won't bore you with
 the details here.  Let me know if this helps.


 On 8/27/06, Fan Bin [EMAIL PROTECTED] wrote:
 Hi, I have a question about jit compiler in drlvm. I want to suspend the 
thread manually on a particular point. I know that the thread can only be suspended 
at safe point. I guess the safe point is inserted by jit compiler when it compile the 
method, but I can't prove it from the source code. So my question is whether it's 
true that it is the jit compiler which insert the safe point. If it is true, how does 
it do this?
 Thank you for your help.



 --
 Weldon Washburn
 Intel Middleware Products Division

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
Weldon Washburn
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] how does drlvm insert the safe point into a method

2006-08-28 Thread Andrey Chernyshev

On 8/28/06, Fan Bin [EMAIL PROTECTED] wrote:

Thank you very much for your answer and your bearing my awful english:). and 
thanks to Egor and Mikhail. Yes, my question is about the safe point in JITed 
code. Your answer are really helps.

I want to suspend a thread from another thead, not for the reason of GC, but 
for some other reasons. From your answer, I know that it is JIT who insert the 
polling code. So I think what should I do is modifying the JIT, insert the 
polling code at the point I want the suspendee to stop. I'll look for bbp in 
the source to see some details first. I'll ask if I meet some questions.



If I get it right, you can also try doing this without JIT polling
code modification. The TM module in DRLVM has a safepoint callback
mechanism which allows to call a user-defined code at a closest
safepoint. See hythread_set_safepoint_callback() defined in
vm/include/open/hythread_ext.h.

In other words, if you need to stop another thread at a particular
point and execute some code, you can try doing a sequence like this:
   hythread_suspend_other(t)
   hythread_set_safepoint_callback(t, your_callback_func)
   hythread_resume(t)

For example, this scheme is used for implementing j.l.Thread.stop()
method in DRLVM, you can also look at the jthread_exception_stop()
impl code in vm/thread/src/thread_java_basic.c.

The default action at the safepoint is just do nothing and wait for
the resume event (typically it will come from the GC after enumeration
is done).

Thanks,
Andrey.




I still have a question to Wedlon: What do you mean that As far as I know the DRLVM 
JIT you are looking at does not quite do this yet. Does it mean that the drlvm 
JIT(Jitrino.JET and OPT) I'm looking at can't insert the polling code, or just JET can't 
do this?

Many thanks,
fanbin

- Original Message -
From: Weldon Washburn [EMAIL PROTECTED]
To: harmony-dev@incubator.apache.org
Sent: Monday, August 28, 2006 12:38 PM
Subject: Re: [drlvm] how does drlvm insert the safe point into a method


 Hi Fan,

 I think you are asking about safe instruction pointer addresses in
 JITed code where the JIT is able to enumerate all live references.  If
 this is the case, it turns out there are lots of subtle interactions
 between all the pieces of the system.  In otherwords, I can't do
 justice to the topic in an email.  But I will point you in the right
 direction.

 The JIT can insert  polling code at points where it knows it can find
 all live references on a thread's stack.  When the GC wants a thread
 to suspend and report its live references, it can set a flag in the
 thread-local context.  When the JITed code sees the flag set, it will
 suspend the thread and report the live references. As far as I know
 the DRLVM JIT you are looking at does not quite do this yet.

 An incomplete but useful for bringup approach is to let the targetted
 thread continue executing until it tries to allocate an object.
 Assuming there is no space available, the thread is vectored into the
 garbage collector itself.  By design, object allocation sites are
 places where the JIT can enumerate all live references on the stack.

 There are other schemes, such as suspending and resuming the targetted
 thread until the JIT reports it can enumerate.  I won't bore you with
 the details here.  Let me know if this helps.


 On 8/27/06, Fan Bin [EMAIL PROTECTED] wrote:
 Hi, I have a question about jit compiler in drlvm. I want to suspend the 
thread manually on a particular point. I know that the thread can only be suspended 
at safe point. I guess the safe point is inserted by jit compiler when it compile the 
method, but I can't prove it from the source code. So my question is whether it's 
true that it is the jit compiler which insert the safe point. If it is true, how does 
it do this?
 Thank you for your help.



 --
 Weldon Washburn
 Intel Middleware Products Division

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




--
Andrey Chernyshev
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib][concurrent] Integrating into builds and snapshot

2006-08-28 Thread Andrey Chernyshev

On 8/21/06, Weldon Washburn [EMAIL PROTECTED] wrote:

On 8/21/06, Geir Magnusson Jr [EMAIL PROTECTED] wrote:


 Nathan Beyer wrote:
  Now that we're getting some good submissions to make the
  java.util.concurrent code to work with DRLVM, I'd like make a proposal for
  getting the code in the Class Library and a part of our regular builds,
  tests and snapshots.
 
 
 
 From a technical/code integration standpoint, the go ahead assumption is
  that Harmony will have VMs implement a subset of the 'sun.misc.Unsafe'
  class, such that the concurrent code, most of which is in the public domain,
  from the Concurrency Interest Site [1] can be used as-is, as least to the
  greatest extent possible. Are there any major dissents to this?

 This is my understanding of what we already agreed to, and I'm getting a
 note from Doug about the code provenance.


I was not able to see any open documentation on sun.misc.Unsafe on the
web.  I did notice emails that describe using sun.misc.Unsafe to
read/write specific memory addresses.  I suspect that both
sun.misc.Unsafe and Jikes vmmagic do essentially the same thing.  That
is, read/write and also compare/swap specific memory addresses from
Java code.

MMTk definitely relies on efficient JIT inlining of Jikes vmmagic.  It
also looks like java.util.concurrent needs efficient JIT inlining of
sun.misc.Unsafe.  If indeed both vmmagic and Unsafe do the same thing,
it probably does not make sense to rewrite Concurrency or MMTk.  In
other words, we might be stuck with supporting both APIs in the short
term.


I agree that j.u.c. will need efficient inlining for the Unsafe.
However, if the Harmony impl of Unsafe does nothing but simple call
forwarding to the appropriate methods of vmmagic, then we probably
won't get that big overhead.
In other words, we can try keeping Unsafe interface as a bridge
between j.u.c. and various VM's at the price of one extra method call
to it's real implementation (which could be vmmagic in our case). It
would be nice, however, if we can agree with the concurrency group to
hide Unsafe under some other interface which would have a more neutral
package name (e.g. not sun.misc).

Thanks,
Andrey.




In any case, can the sun.misc.Unsafe API be described on this mailing
list?  It would help us all figure out what existing pieces can be
reused to support high-performance java.util.concurrent.

Thanks

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





--
Andrey Chernyshev
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[DRLVM][GC] proposal: tools to help verify all live references are properly enumerated

2006-08-28 Thread Weldon Washburn

One of the harder GC debugging problems is verifying that all live
references are indeed reported to the GC.  In other words, verify the
stuff that happens outside the GC that impacts the GC.  This actually
complements verifying that GC internals are functioning correctly.
Both are important for building a product quality JVM.  Perhaps it
makes sense to build the following tool for Harmony:

Build a stack scanner that scans a given Java thread and compares each
4-byte slot to see if it can be interpreted as a ref ptr into the java
heap.  Put the scan results in a list.  The locations that match what
the JIT reports are removed from this list.  The assumption is that
two independent approaches to identifying live references is most
likely correct.  The remaining (hopefully few) items on the list can
be manually inspected by JIT and VM developers to determine if somehow
a live reference was actually overlooked.

The above approach can be refined.  More powerful filters can be
constructed to reduce the clutter of false positives.  It may even be
possible to run the JVM in debug mode that will do an assert(0); if
it sees suspicious bit patterns in the stack.

Thoughts?

--
Weldon Washburn
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [drlvm] Helper inlining in JIT

2006-08-28 Thread Xiao-Feng Li

Fursov, what are the intrinsics supports you want to implement? The
code below you gave has only a few examples. I think it would be a
good idea to well define the instrinsics before code them.

Thanks,
xiaofeng

On 8/28/06, Mikhail Fursov [EMAIL PROTECTED] wrote:

Folks,
Here is the example of fast allocation helper written in Java with the help
of VMMagic
If nobody objects I'm starting to implement VMMagic support in
Jitrino.OPTthis week.



private static final int GC_TLS_OFFSET = 10;
private static final int GC_CURRENT_OFFSET= GC_TLS_OFFSET + 0;
private static final int GC_CEILING_OFFSET= GC_TLS_OFFSET + 4;
private static final int OBJ_VTABLE_OFFSET = 0;

//annotate with calling convention and real VM helper id/name information
private static Address slowAlloc(int vtable, int size) {throw new
Error(must never be called!);}

private static Address fastAlloc(int vtable, int size) {
Address tlsBase = TLS.getAddress();  //load thread local client area
address
Address currentFieldAddress = tlsBase.plus(GC_CURRENT_OFFSET);
Address ceilingFieldAddress = tlsBase.plus(GC_CEILING_OFFSET);

Address newObjectAddress; //the result of the method

// check if there is enough size to do allocation in thread local buffer
Address current = currentFieldAddress.loadAddress();
Address ceiling = ceilingFieldAddress.loadAddress();
Address newCurrent = current.plus(size);
if (newCurrent.LT(ceiling)) {
currentFieldAddress.store(newCurrent.toWord());
newObjectAddress = newCurrent;
newObjectAddress.store(vtable, Offset.fromInt(OBJ_VTABLE_OFFSET));

} else {
newObjectAddress = slowAlloc(vtable, size);
}
return newObjectAddress;
}

--
Mikhail Fursov




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-1295) [classlib][net] flaw in setReuseAddrAndReusePort()

2006-08-28 Thread Andrew Zhang

On 8/28/06, Alexey Varlamov (JIRA) [EMAIL PROTECTED] wrote:


[classlib][net] flaw in setReuseAddrAndReusePort()
--

Key: HARMONY-1295
URL: http://issues.apache.org/jira/browse/HARMONY-1295
Project: Harmony
 Issue Type: Bug
 Components: Classlib
   Reporter: Alexey Varlamov
   Priority: Critical


The tests.api.java.net.DatagramSocketTest test crashes on assert in DRLVM
: Assertion `IsInstanceOf(env, obj, struct_Class_to_jclass(f-get_class()))'
failed.
The reason is that java.net.DatagramSocket.setReuseAddress(boolean) calls
to
PlainDatagramSocketImpl.setOption(int optID, Object val) with Boolean
value, but underlying native code treats this value as Integer.

Quickfix must be straightforward enough, but I inclined to blame the
design of INetworkSystem.[set|get]SocketOption() as the actual root of the
evil. The problem is that this API conceals the details of contract for
particular options, and a client have to guess which type of value to pass.



I think it's determine, not guess. :)

And the implementation is basically an ugly switch sorting requests out to

setBoolSocketOption() or setIntegerSocketOption(), etc. Shouldn'te refactor
this?



Any proposals? Thanks!

Native stack is :

vmcore.dll!GetIntField(JNIEnv_External * env=0x103353a8, _jobject *
obj=0x0654f184, _jfieldID * fieldID=0x05e4c088)  Line 304 + 0x3aC++
hyluni.dll!intValue(const JNINativeInterface_ * * env=0x103353a8, _jobject
* anInteger=0x0654f184)  Line 598 + 0x1d C
hyluni.dll!setReuseAddrAndReusePort(const JNINativeInterface_ * *
env=0x103353a8, hysocket_struct * hysocketP=0x00160ae0, _jobject *
optVal=0x0654f184)  Line 1140  C

hyluni.dll!Java_org_apache_harmony_luni_platform_OSNetworkSystem_setSocketOptionImpl(const
JNINativeInterface_ * * env=, _jobject * thisClz=, _jobject *
aFileDescriptor=, int anOption=, _jobject * aValue=)  Line 2321 + 0xc  C

Java stack is:
Stack Trace (003FB238):
[003FB238] (n):
org/apache/harmony/luni/platform/OSNetworkSystem.setSocketOptionImpl(Ljava
/io/FileDescriptor;ILjava/lang/Object;)V
[003FB238] 011D0625(m):
org/apache/harmony/luni/platform/OSNetworkSystem.setSocketOption(Ljava/io/
FileDescriptor;ILjava/lang/Object;)V
[003FB238] 011CFF4E(m):
org/apache/harmony/luni/net/PlainDatagramSocketImpl.setOption(ILjava/lang/
Object;)V
[003FB238] 011E3DB1(m): java/net/DatagramSocket.setReuseAddress(Z)V
[003FB238] 011E3BB0(m):
tests/api/java/net/DatagramSocketTest.test_getReuseAddress()V
[003FB238] 100657D0(n):
java/lang/reflect/VMReflection.invokeMethod(Ljava/lang/Object;Ljava/lang/O
bject;[Ljava/lang/Object;)Ljava/lang/Object;
[003FB238] 011C2CA0(m):
java/lang/reflect/Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljav
a/lang/Object;
[003FB238] 011CCB25(m): junit/framework/TestCase.runTest()V
[003FB238] 011CC66E(m): junit/framework/TestCase.runBare()V
[003FB238] 011CC5BA(m): junit/framework/TestResult$1.protect()V
[003FB238] 011CC44F(m):
junit/framework/TestResult.runProtected(Ljunit/framework/Test;Ljunit/frame
work/Protectable;)V
[003FB238] 011CAA3C(m):
junit/framework/TestResult.run(Ljunit/framework/TestCase;)V
[003FB238] 011CA910(m):
junit/framework/TestCase.run(Ljunit/framework/TestResult;)V
[003FB238] 011CA85B(m):
junit/framework/TestSuite.runTest(Ljunit/framework/Test;Ljunit/framework/T
estResult;)V
[003FB238] 011CA12E(m):
junit/framework/TestSuite.run(Ljunit/framework/TestResult;)V
[003FB238] 011C9B22(m):
junit/textui/TestRunner.doRun(Ljunit/framework/Test;Z)Ljunit/framework/Tes
tResult;
[003FB238] 011C4186(m):
junit/textui/TestRunner.start([Ljava/lang/String;)Ljunit/framework/TestRes
ult;
[003FB238] 011C365E(m): junit/textui/TestRunner.main([Ljava/lang/String;)V
[003FB238] 100657D0(n):
java/lang/reflect/VMReflection.invokeMethod(Ljava/lang/Object;Ljava/lang/O
bject;[Ljava/lang/Object;)Ljava/lang/Object;
[003FB238] 011C2CA0(m):
java/lang/reflect/Method.invoke(Ljava/lang/Object;[Ljava/lang/Object;)Ljav
a/lang/Object;
[003FB238] 011A59DF(m): java/lang/VMStart$MainThread.runImpl()V
[003FB238] 100657D0(n): *null*
End Stack Trace (003FB238, depth=22)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira






--
Andrew Zhang
China Software Development Lab, IBM


RE: [classlib] Sun compiler change?

2006-08-28 Thread Nathan Beyer
There were some compiler changes according to the release notes [1]. Of
particular note is this bug fix [2], which is related to a number of bugs. I
think this may be it.

-Nathan

[1] https://java.sun.com/j2se/1.5.0/ReleaseNotes.html#150_08
[2] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4916620

 -Original Message-
 From: Nathan Beyer [mailto:[EMAIL PROTECTED]
 Sent: Friday, August 25, 2006 6:55 PM
 To: harmony-dev@incubator.apache.org
 Subject: [classlib] Sun compiler change?
 
 Is anyone else using the latest Sun JDK, v5.0 Update 8 on Windows?
 
 
 
 I'm seeing a compilation error in the LUNI that I don't see with 5.0
 Update
 7. Here's the error I'm getting.
 
 
 
 compile:
 
 [mkdir] Created dir:
 C:\dev\harmony\enhanced\classlib\trunk\build\classes
 
 [javac] Compiling 3173 source files to
 C:\dev\harmony\enhanced\classlib\trun
 
 k\build\classes
 
 [javac]
 C:\dev\harmony\enhanced\classlib\trunk\modules\luni\src\main\java\ja
 
 va\util\MiniEnumSet.java:78: inconvertible types
 
 [javac] found   : java.util.Collectioncapture of ? extends E
 
 [javac] required: java.util.EnumSetE
 
 [javac] EnumSetE set = (EnumSetE) collection;
 
 [javac]   ^
 
 
 
 
 
 When I compile in Eclipse 3.2 there's no error.
 
 
 
 -Nathan



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [app] ant with ecj

2006-08-28 Thread Nathan Beyer


 -Original Message-
 From: Alexey Petrenko [mailto:[EMAIL PROTECTED]
 Sent: Monday, August 28, 2006 1:25 AM
 To: harmony-dev@incubator.apache.org
 Subject: Re: [app] ant with ecj
 
 2006/8/28, Vladimir Gorr [EMAIL PROTECTED]:
  Indeed this issue exists if JAVA_HOME refers to Harmony JRE:
  echo $JAVA_HOME
  .../classlib/trunk/deploy/jdk/jre
 
  echo $LD_LIBRARY_PATH
  .../classlib/trunk/deploy/jdk/jre/bin
 
  echo $CLASSPATH=.../classlib/trunk/depends/jars/ecj_3.2/ecj_3.2.jar
 
  ant -Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter
 
  ...
  [javac] 3608. ERROR in
 
 /nfs/ins/proj/drl/coreapi/vgorr/GIT/classlib/trunk/modules/text/src/main/j
 ava/java/text/DecimalFormat.java
 [javac]  (at line 23)
 [javac] import java.math.BigDecimal;
  ...
 
  It means our build system doesn't work correspondingly for the self-
 hosting
  mode.
 Strange... It worked some time ago.
 
  Besides I'd like to note a lot of warning are generated when we use
 ECJ3.2.
 Yep, that is known issue.
 Eclipse compiler is much more worried then RI's :)

I believe we could get many of the same errors if we enabled -Xlint with the
RI.

 
 
  Thanks,
  Vladimir.
 
 
 
 
  On 8/28/06, Jordan Justen [EMAIL PROTECTED] wrote:
  
   My JAVA_HOME is set to harmony/jdk/jre.
  
   Are you sure ant is running with harmony's jvm and classlibs when
   JAVA_HOME
   is set to sun's path?
  
   I am wanting to use the harmony classlibs and jvm with ant and the ecj
   compiler.  Hopefully this would make no dependencies on sun's java.
  
   You know what.  I didn't explicitly mention that I was trying to run
 this
   with harmony.  Whoops, sorry.
  
   -Jordan
  
   On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:
   
The current build scripts should be doing this already. For example,
   this
is
a snippet from the 'luni' module's build script.
   
javac sourcepath=
   srcdir=${hy.luni.src.main.java}
   destdir=${hy.build}
   source=${hy.javac.source}
   target=${hy.javac.target}
   debug=${hy.javac.debug}
bootclasspath
fileset dir=${hy.jdk}/jre/lib/boot
include name=**/*.jar /
/fileset
/bootclasspath
/javac
   
It points to luni's source directory and puts everything in the
 deploy
(JDK)/jre/lib/boot folder on the bootclasspath to compile against.
 In
   the
case of java.lang.Object, this should be in the luni-kernel-
 stubs.jar
   .
If you're doing a full compile, then java.lang.Object should be
   included
in the source files.
   
I just ran the build using the Eclipse compiler and it worked fine.
   Here's
what I did.
1. Check out all of the code from the classlib trunk [1] down. You
 need
everything from the folder down.
2. From the 'trunk' folder, run 'ant fetch-depends', which downloads
 all
of
the dependencies for the build.
3. Grab the ecj_3.2.jar from the 'trunk/depends/jars/ecj_3.2' and
 copied
it
into my ANT_HOME/lib folder. This puts ECJ on Ant's classpath.
4. From the 'trunk' folder, run 'ant build
-Dbuild.compiler=org.eclipse.jdt.core.JDTCompilerAdapter' and the
 entire
federated build runs.
   
Is this similar to what you're doing? Note, I'm running Ant with
   JAVA_HOME
pointing to Sun's 5.0_7 JDK.
   
-Nathan
   
[1]
   
   
  
 https://svn.apache.org/repos/asf/incubator/harmony/enhanced/classlib/trunk
 /
   
 -Original Message-
 From: Jordan Justen [mailto:[EMAIL PROTECTED]
 Sent: Sunday, August 27, 2006 10:31 PM
 To: harmony-dev@incubator.apache.org
 Subject: Re: [app] ant with ecj

 Nathan,

 Is there a way to have the javac/ecj task include all of standard
harmony
 jars without including them in the CLASSPATH environment variable?

 Thanks,

 -Jordan

 On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:
 
  Keep in mind that the execution of the Ant scripts and the
   compilation
 are
  two separate things, which means they are using two different
 classpaths.
  If
  the compilation task is complaining about a missing class, then
 this
 means
  the class is missing from the classpath of the compiler, not the
 classpath
  of the executing Ant. You'll need the Eclipse compiler JAR on
 Ant's
  execution classpath to execute the javac task.
 
  This can be confusing when using the Eclipse compiler, since it
doesn't
  have
  any default classpath. Normally when you're using 'javac' from
 a
JDK,
  the
  classpath of the underlying JRE (all of the java.*, etc classes)
 is
  automatically on the classpath. The Eclipse compiler is not part
 of
   a
 JDK,
  so there is nothing on the classpath by default.
 
  -Nathan
 
   -Original 

Re: [classlib]strings externalization

2006-08-28 Thread Tim Ellison
Thanks for waiting Ilya, I've applied the final patch on HARMONY-1201
(I'll check-in the tool when I get back from vacation).  So now we can
get to work on breaking out the messages into each component's message file.

Regards,
Tim

Ilya Okomin wrote:
 On 8/11/06, Tim Ellison [EMAIL PROTECTED] wrote:

 I took a look at the HARMONY-1041 tool.  It is fine, I have only minor
 comments:

 - do you think we need to separate the Message and MsgUtil types?
 Given that they are generated from a template I'd be inclined to combine
 them into a single type now.  We have no need to look in that file in
 general.  If you do choose to combine them then I would expect the
 resulting header to be (c) 1998, 2006.

 - Minor typo Better make changes in the teamplate file. - template.

 Ilya Okomin wrote:
  I would suggest to split this task into a set of jira sub-issues, one
  module - one issue. This kind of division would give us an
  opportunity this work to be done in a parallel mode.

 Agreed.  I suggest that we run the msgtool on the existing modules and
 commit the generated code and catalog files, then the incoming patches
 can assume they are there and use them to fix the externalization.
 
 
 Hello, Tim!
 
 I've made changes to the generation tool [1] and also prepared patch with
 the set of generated files according to the existing modules set I've
 raised
 issue for that [2]. Not all modules were included into the generation (full
 set can be found in comments to the [2]). E.g. x-net module has package
 xnet, also I'm not sure about necessity to make internationalization in
 suncompat or rmi2, etc. You can check list of suggested modules and if
 something is missed I'll make update.
 Waiting for your comments and proposals!
 
 [1]http://issues.apache.org/jira/browse/HARMONY-1041
 [2]http://issues.apache.org/jira/browse/HARMONY-1201
 
 Regards,
 Ilya.
 
 
 Regards,
 Tim

 -- 

 Tim Ellison ([EMAIL PROTECTED])
 IBM Java technology centre, UK.

 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 
 

-- 

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [app] xmlbeans

2006-08-28 Thread Paulex Yang
HARMONY-1293 has been resolved at r437626, thank Richard to provide 
patch. Would anyone help to check the status of xmlbeans with Harmony now?


Jordan Justen wrote:

Thanks Richard!

On 8/28/06, Richard Liang [EMAIL PROTECTED] wrote:




Richard Liang wrote:


 Nathan Beyer wrote:
 I take it that means the issue is pretty obvious (very easy to
 recreate).
 Can you tell us what you did to recreate it and what class in Harmony
 is at
 issue?

 It seems a bug of java.util.ArrayList. I will attach a patch to fix 
it.

I have raised a JIRA HARMONY-1293[1] for this issue with patch
attached.  :-)

[1] https://issues.apache.org/jira/browse/HARMONY-1293

Richard.

 Best regards,
 Richard
 -Nathan


 -Original Message-
 From: Richard Liang [mailto:[EMAIL PROTECTED]
 Sent: Sunday, August 27, 2006 10:36 PM
 To: harmony-dev@incubator.apache.org
 Subject: Re: [app] xmlbeans

 I reproduce the same error on xmlbeans-2.2.0.

 Jordan Justen wrote:

 Well, I don't have much details, but here's the stack trace.  I
 figured it
 wouldn't be to helpful for the list.  I don't see this exception 
with


 the

 sun jvm/classes.  Anyway, I'll try debug it some...

 [java] java.lang.NullPointerException
 [java] at 
org.apache.xmlbeans.impl.common.NameUtil.splitWords

(
 NameUtil.java:667)
 [java] at
 org.apache.xmlbeans.impl.common.NameUtil.lowerCamelCase(
 NameUtil.java:623)
 [java] at
 org.apache.xmlbeans.impl.common.NameUtil.getPackageFromNamespace(
 NameUtil.java:513)
 [java] at


 org.apache.xmlbeans.impl.common.NameUtil.getClassNameFromQName(
NameUtil.ja

 va

 :328)
 [java] at


 org.apache.xmlbeans.impl.common.NameUtil.getClassNameFromQName(
NameUtil.ja

 va

 :318)
 [java] at
 org.apache.xmlbeans.impl.schema.StscJavaizer.pickFullJavaClassName(
 StscJavaizer.java:679)
 [java] at
 org.apache.xmlbeans.impl.schema.StscJavaizer.assignGlobalJavaNames(
 StscJavaizer.java:91)
 [java] at
 org.apache.xmlbeans.impl.schema.StscJavaizer.javaizeAllTypes(
 StscJavaizer.java:55)
 [java] at
 
org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compileImpl(

 SchemaTypeSystemCompiler.java:313)
 [java] at
 org.apache.xmlbeans.impl.schema.SchemaTypeSystemCompiler.compile(
 SchemaTypeSystemCompiler.java:181)
 [java] at
 org.apache.xmlbeans.impl.tool.SchemaCompiler.loadTypeSystem(
 SchemaCompiler.java:952)
 [java] at
 org.apache.xmlbeans.impl.tool.SchemaCompiler.compile(
 SchemaCompiler.java:1072)
 [java] at 
org.apache.xmlbeans.impl.tool.SchemaCompiler.main(

 SchemaCompiler.java:368)


 On 8/27/06, Nathan Beyer [EMAIL PROTECTED] wrote:

 Is there a particular issue that you've run into?


 -Original Message-
 From: Jordan Justen [mailto:[EMAIL PROTECTED]
 Sent: Sunday, August 27, 2006 7:10 PM
 To: harmony-dev@incubator.apache.org
 Subject: [app] xmlbeans

 Has anyone successfully used harmony with xmlbeans (
 http://xmlbeans.apache.org/)?

 Or, does anyone know of any major reasons why it would not be

 working at

 this time?

 I tried it without luck.  I'll debug the error if no one knows of
 any
 major
 roadblocks that I'd encounter.

 Thanks,

 -Jordan


-
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: 
[EMAIL PROTECTED]

 For additional commands, e-mail:
 [EMAIL PROTECTED]



 --
 Richard Liang
 China Software Development Lab, IBM



 
-

 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
[EMAIL PROTECTED]




 -
 Terms of use : http://incubator.apache.org/harmony/mailing.html
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: 
[EMAIL PROTECTED]






--
Richard Liang
China Software Development Lab, IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







--
Paulex Yang
China Software Development Lab
IBM



-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib] Sun compiler change?

2006-08-28 Thread Spark Shen

Nathan Beyer 写道:

There were some compiler changes according to the release notes [1]. Of
particular note is this bug fix [2], which is related to a number of bugs. I
think this may be it.
  
So, I think at the moment, it is more safe to use the below 
pattern(different compiler implements slightly different generic feature):


EnumSet set = (EnumSet)collection;
and leave the warning as it is. When compiler itself is consistent with generic,
these warning may remind us later.

Best regards

-Nathan

[1] https://java.sun.com/j2se/1.5.0/ReleaseNotes.html#150_08
[2] http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4916620

  

-Original Message-
From: Nathan Beyer [mailto:[EMAIL PROTECTED]
Sent: Friday, August 25, 2006 6:55 PM
To: harmony-dev@incubator.apache.org
Subject: [classlib] Sun compiler change?

Is anyone else using the latest Sun JDK, v5.0 Update 8 on Windows?



I'm seeing a compilation error in the LUNI that I don't see with 5.0
Update
7. Here's the error I'm getting.



compile:

[mkdir] Created dir:
C:\dev\harmony\enhanced\classlib\trunk\build\classes

[javac] Compiling 3173 source files to
C:\dev\harmony\enhanced\classlib\trun

k\build\classes

[javac]
C:\dev\harmony\enhanced\classlib\trunk\modules\luni\src\main\java\ja

va\util\MiniEnumSet.java:78: inconvertible types

[javac] found   : java.util.Collectioncapture of ? extends E

[javac] required: java.util.EnumSetE

[javac] EnumSetE set = (EnumSetE) collection;

[javac]   ^





When I compile in Eclipse 3.2 there's no error.



-Nathan





-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  



--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [classlib] Sun compiler change?

2006-08-28 Thread Spark Shen

Krzysztof Sobolewski 写道:

Spark Shen wrote:

  

Did you (refer to thread [app] ant with ecj) put

Eclipse compiler JAR on Ant's
execution classpath to execute the javac task.

If so, may be that's why It always gives you unchecked cast warning,
no errors.



Well, I created a new EnumSet class in completly unrelated environment... So
it is perfectly possible that there's a classpath conflict somewhere. I
can't verify that because don't have the Harmony build here :)

BTW: another experiment revealed that
EnumSet? extends EnumE set = (EnumSet? extends EnumE)collection;
compiles without warnings. No matter how much I think I understand generics,
there's always something that surprises me ;)
  
Conceptually speaking, I think EnumSet? extends EnumE still has 
potential pitfall:


In the signature of addAll(Collection? extends E collection) method, ? 
denotes subclass of E.
While in EnumSet? extends EnumE, ? denotes subclass of EnumE. But 
consider the relationship
between E and EnumE, E is subclass of EnumE. So, we can not 
guarantee that subclass of E is definitely

subclass of EnumE.

Correct me if I am wrong.

Best regards

-KS

  



--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how to use the jet?

2006-08-28 Thread jingxia xing

I instrument some printf in the JIT_compile_method_with_params in
jitrino/sr/jet/jet.cpp. But no output in my printf.Does it need some option
to turn it on?Thansk.


Re: [classlib] Sun compiler change?

2006-08-28 Thread Alexey Varlamov

2006/8/29, Spark Shen [EMAIL PROTECTED]:

Krzysztof Sobolewski 写道:
 Spark Shen wrote:


 Did you (refer to thread [app] ant with ecj) put

 Eclipse compiler JAR on Ant's
 execution classpath to execute the javac task.

 If so, may be that's why It always gives you unchecked cast warning,
 no errors.


 Well, I created a new EnumSet class in completly unrelated environment... So
 it is perfectly possible that there's a classpath conflict somewhere. I
 can't verify that because don't have the Harmony build here :)

 BTW: another experiment revealed that
 EnumSet? extends EnumE set = (EnumSet? extends EnumE)collection;
 compiles without warnings. No matter how much I think I understand generics,
 there's always something that surprises me ;)

Conceptually speaking, I think EnumSet? extends EnumE still has
potential pitfall:

In the signature of addAll(Collection? extends E collection) method, ?
denotes subclass of E.
While in EnumSet? extends EnumE, ? denotes subclass of EnumE. But
consider the relationship
between E and EnumE, E is subclass of EnumE. So, we can not
guarantee that subclass of E is definitely
subclass of EnumE.


Hmm, as E is a subclass of EnumE, subclasses of E definitely have
EnumE among ancestors ;)



Correct me if I am wrong.

Best regards
 -KS




--
Spark Shen
China Software Development Lab, IBM


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[DRLVM][MMTk GC] marksweep configuration works in user mode

2006-08-28 Thread Weldon Washburn

All,

I just committed mods that allow MMTk marksweep configuration to run
the simple tests in test.java.

There were some workarounds in MMTk code itself.  It does not make
sense to commit these workarounds to drlvm/trunk or to put them in
JIRA.  Instead, I told Steve Blackburn what the MMTk porting problems
are.

For the record the MMTk mods are:

1)
SegregatedFreeList.java wants to use vmmagic atomic operations even in
single java thread app.  But vmmagic atomic ops are not fully
functional in Jitrino.JET just yet.  The workaround is to do a simple
write to memory instead of CAS.  The mods to SegregatedFreeList.java
are:
731a732

  atomic = false;  //wjw hack around Addresss.attempt bug


2)
MMType.getSlot() is hard coded to assume that element zero is an
Offset of zero from the vtable ptr.  While this may indeed be the
case for JikesRVM, in DRLVM the offset is 12.  The diff to MMType.java
is:
83,86c83,86
 if (isReferenceArray)
   return addr.plus(arrayOffset).plus(reference  LOG_BYTES_IN_ADDRESS);
 else
   return addr.plus(offsets[reference]);
---

  if (isReferenceArray)
  return addr.plus(12).plus(reference  LOG_BYTES_IN_ADDRESS);  // return 
addr.plus(arrayOffset).plus(reference  LOG_BYTES_IN_ADDRESS);
  else
  return addr.plus(offsets[reference]);




--
Weldon Washburn
Intel Middleware Products Division

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: how to use the jet?

2006-08-28 Thread Egor Pasko
On the 0x1D4 day of Apache Harmony jingxia xing wrote:
 I instrument some printf in the JIT_compile_method_with_params in
 jitrino/sr/jet/jet.cpp. But no output in my printf.Does it need some option
 to turn it on?Thansk.

try the same with:
jet.cpp:223: compile_with_params

which works for me :)

-- 
Egor Pasko, Intel Managed Runtime Division


-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Created: (HARMONY-1295) [classlib][net] flaw in setReuseAddrAndReusePort()

2006-08-28 Thread Alexey Varlamov

2006/8/29, Andrew Zhang [EMAIL PROTECTED]:

On 8/28/06, Alexey Varlamov (JIRA) [EMAIL PROTECTED] wrote:

 [classlib][net] flaw in setReuseAddrAndReusePort()
 --

 Key: HARMONY-1295
 URL: http://issues.apache.org/jira/browse/HARMONY-1295
 Project: Harmony
  Issue Type: Bug
  Components: Classlib
Reporter: Alexey Varlamov
Priority: Critical


 The tests.api.java.net.DatagramSocketTest test crashes on assert in DRLVM
 : Assertion `IsInstanceOf(env, obj, struct_Class_to_jclass(f-get_class()))'
 failed.
 The reason is that java.net.DatagramSocket.setReuseAddress(boolean) calls
 to
 PlainDatagramSocketImpl.setOption(int optID, Object val) with Boolean
 value, but underlying native code treats this value as Integer.

 Quickfix must be straightforward enough, but I inclined to blame the
 design of INetworkSystem.[set|get]SocketOption() as the actual root of the
 evil. The problem is that this API conceals the details of contract for
 particular options, and a client have to guess which type of value to pass.


I think it's determine, not guess. :)

And the implementation is basically an ugly switch sorting requests out to
 setBoolSocketOption() or setIntegerSocketOption(), etc. Shouldn'te refactor
 this?


Any proposals? Thanks!


Of course, lots of them ;). Just to start:

1) Why at all we clone underlying OS interface to Java with extra
mapping JAVASOCKOPT_* to HY_SO_*? Let's have a clean API with
specialized methods as XXXSocket classes have: setTTL(int) ,
isReuseAddress() etc.

2) At least we could provide more typified [s|g]etOption() methods,
which  take/return primitive values instead of wrappers. At first
glance int and boolean would fit all needs, am I wrong? This way, type
mismatch will be found immediately during compilation. Though this
would not detect optid and value type disparity...

--
Regards,
Alexey

-
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]