[kaffe] regression testing

2002-04-24 Thread Patrick Tullmann

If anyone's interested in doing more comprehensive regression testing
of Kaffe, I've attached a script which will configure, compile, build
Klasses, install, and check Kaffe in 16 different combinations.  

It tests all combinations of jit3/intrp, with/without static linking,
and with debugging, without debugging, with stats, and with xprof.
Its pretty easy to edit to do less than that (for example, leave out
the xprof because it currently doesn't compile.)  You'll need about
400Mb of free disk space.  You'll also have to edit some of the
directories coded in the script before running it.

While that may seem like a lot of configurations, take a look at the
output to ./configure --help, and look at all the variations that
are not included.  :)

Anyway, if you use this, or have suggestions let me know.  If there's
enough interest I can put this in the developers/ directory.

In addition the xprof problem, several tests fail if Kaffe is built
with jit3 and -O4 (I think this is a known problem with some of the
asm goop and the jit'd code).  Oddly, if both --with-stats and
--with-engine=intrp are enabled, several tests also fail.  I'll look
into this last one a bit more.  Note that this is Linux/x86 that I'm
testing on

-Pat

- -  ---  ---  --   --  - -   -
Pat Tullmann   [EMAIL PROTECTED]
Your research fills a much needed gap.


#!/bin/sh
#
# FullTest.sh
#
# Copyright (c) 2002 Pat Tullmann [EMAIL PROTECTED]
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#


#
# Build/test/install a full complement of Kaffe variations.  Stores
# full log of the build/test/install.  Prints a summary of steps and
# any failures to stdout.  The commands are all run under 'nice' so
# your machine should still be usable while you run this script.
#
# BEFORE RUNNING: Edit the BASE_OBJ_DIR and BASE_INSTALL_DIR variables
# set them to point to someplace sensible on your system.  Edit 
#
# TODO:
#Add a 'default' build style that doesn't change anything...
#

# About 350Mb of object trees
BASE_OBJ_DIR=/home/pat/kaffe-core/obj

# About 70Mb of installed stuff 
BASE_INSTALL_DIR=/home/pat/kaffe-core/install

GMAKE=make
# -s means quiet; -j for multiple jobs
MAKE_OPTS=-s -j 2

### Control the variations of Kaffe that are tested:  See the case statements
### below to see what these mean (or to add your own).
#BUILDS=debug optimized stats xprof
BUILDS=debug optimized stats
ENGINE=jit3 intrp
STATICBUILD=no yes
CONFIG_COMMON_OPTIONS=--disable-gcj


SRC=$1
PREFIX=$2   # Optional, will be deduced from $SRC if not provided.

if test ! -d $SRC; then
echo Usage: $0 full path to Kaffe src [output prefix]
exit 11;
fi

if test ! -x $SRC/configure; then
echo No configure script in $SRC
exit 11;
fi

if test -z $PREFIX; then
PREFIX=`basename $SRC`
fi


status() {
echo $@
}

ok=1

doCmd() {
# Only do the command if a previous one didn't fail
if test $ok -eq 1; then
MSG=$1
shift;
if test ! -z $MSG; then
status $MSG
fi

# run the command at a nice level, and put all output in TRACEF
nice $@  $TRACEF 21
rc=$?
if test $rc -ne 0; then
status Command FAILED: $@
status tail -5 $TRACEF:
tail -5 $TRACEF | sed -e 's/^//'
ok=0;
fi
fi
}

for s in $STATICBUILD; do
for b in $BUILDS; do
for e in $ENGINE; do
# Map the static build yes/no into configuration information
case $s in 
yes)
STATDIR=-static
CONFIG_STATIC=--with-staticvm --with-staticlib --with-staticbin
;;
no)
STATDIR=
CONFIG_STATIC=
;;
esac

# Map the build style into configuration information
case $b in
debug)
CFLAGS=-O0 -g
CONFIG_BUILD=--enable-debug --enable-xdebugging
;;
optimized)
CFLAGS=-O4
CONFIG_BUILD=--disable-debug
;;
stats)
CFLAGS=
CONFIG_BUILD=--with-stats
;;
xprof)
CFLAGS=
CONFIG_BUILD=--enable-xprofiling --with-profiling
;;
esac

export 

Re: [kaffe] Some obscure(?) problem...

2002-04-24 Thread Jukka Santala

On Wed, 24 Apr 2002, Dalibor Topic wrote:
 It doesn't really help much. The next thing I get in GDB is a kaffe crash in 
 xerces :( org.apache/xerces/StringPool.ensureCapacity(II)Z: the iaload array 
 index check at pc=7 causes a SIGSEGV, since the array on stack is null. That 
 doesn't seem to be picked up by the null check, though. Weird.

Thanks for looking at it. I tried to check into it myself quickly, but
xdebug (and xprof) don't appear compilable on my system right now. First
there's a no-brainer:

../../../kaffe/kaffe/xprof/gmonFile.c: In function `writeGmonRecord':
../../../kaffe/kaffe/xprof/gmonFile.c:136: `char' is promoted to `int'
when passed through `...'
../../../kaffe/kaffe/xprof/gmonFile.c:136: (so you should pass `int' not
`char' to `va_arg')

--- kaffe/xprof/gmonFile.c  23 May 2000 17:55:37 -  1.1
+++ kaffe/xprof/gmonFile.c  24 Apr 2002 08:12:23 -
@@ -133,7 +133,7 @@
strcpy(ghh.dimen, va_arg(args, char *));
break;
case GRA_DimensionAbbrev:
-   ghh.dimen_abbrev = va_arg(args, char);
+   ghh.dimen_abbrev = va_arg(args, int);
break;
case GRA_ProfilingRate:
*((int *)ghh.prof_rate) = va_arg(args, int);

After fixing that, xdebug still doesn't compile because machine_debug_file
isn't compiled in for some reason - why isn't exactly clear, as
debugFile.c is wrapped with checks for both KAFFE_XPROFILER and
KAFFE_XDEBUGGING. Rather than try to figure that out, I turned also
xprofiling on, but then the compile breaks with:

../xprof/.libs/libkaffexprof.a(xprofiler.o): In function
`enableXProfiling':
/home/jsantala/kaffe-build/kaffe/xprof/../../../kaffe/kaffe/xprof/xprofiler.c:243:
undefined reference to `_gmonparam'
/home/jsantala/kaffe-build/kaffe/xprof/../../../kaffe/kaffe/xprof/xprofiler.c:249:
undefined reference to `_gmonparam'

...etc.

Oh well, I guess it's off to try to figure out makefile magic ;)

 -Jukka Santala


___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe



Re: [kaffe] Some obscure(?) problem...

2002-04-24 Thread Dalibor Topic

Hi Jukka,

--- Jukka Santala [EMAIL PROTECTED] wrote:
 On Wed, 24 Apr 2002, Dalibor Topic wrote:
  It doesn't really help much. The next thing I get
 in GDB is a kaffe crash in 
  xerces :(
 org.apache/xerces/StringPool.ensureCapacity(II)Z:
 the iaload array 
  index check at pc=7 causes a SIGSEGV, since the
 array on stack is null. That 
  doesn't seem to be picked up by the null check,
 though. Weird.
 
 Thanks for looking at it. I tried to check into it
 myself quickly, but
 xdebug (and xprof) don't appear compilable on my
 system right now. First
 there's a no-brainer:
 
 ../../../kaffe/kaffe/xprof/gmonFile.c: In function
 `writeGmonRecord':
 ../../../kaffe/kaffe/xprof/gmonFile.c:136: `char' is
 promoted to `int'
 when passed through `...'
 ../../../kaffe/kaffe/xprof/gmonFile.c:136: (so you
 should pass `int' not
 `char' to `va_arg')
 
 --- kaffe/xprof/gmonFile.c  23 May 2000 17:55:37
 -  1.1
 +++ kaffe/xprof/gmonFile.c  24 Apr 2002 08:12:23
 -
 @@ -133,7 +133,7 @@
 strcpy(ghh.dimen,
 va_arg(args, char *));
 break;
 case GRA_DimensionAbbrev:
 -   ghh.dimen_abbrev =
 va_arg(args, char);
 +   ghh.dimen_abbrev =
 va_arg(args, int);
 break;
 case GRA_ProfilingRate:
 *((int *)ghh.prof_rate) =
 va_arg(args, int);
 

Thanks, I'll check it in.

 After fixing that, xdebug still doesn't compile
 because machine_debug_file
 isn't compiled in for some reason - why isn't
 exactly clear, as
 debugFile.c is wrapped with checks for both
 KAFFE_XPROFILER and
 KAFFE_XDEBUGGING. Rather than try to figure that
 out, I turned also
 xprofiling on, but then the compile breaks with:
 
 ../xprof/.libs/libkaffexprof.a(xprofiler.o): In
 function
 `enableXProfiling':

/home/jsantala/kaffe-build/kaffe/xprof/../../../kaffe/kaffe/xprof/xprofiler.c:243:
 undefined reference to `_gmonparam'

/home/jsantala/kaffe-build/kaffe/xprof/../../../kaffe/kaffe/xprof/xprofiler.c:249:
 undefined reference to `_gmonparam'
 
 ...etc.

While you are at it, you might want to take a look at
xprof patches from Janos VM at
http://www.cs.utah.edu/flux/janos/downloads/kaffe_kaffe_xprof.diff.gz
They might help.

cheers,

dali

__
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe



Re: [kaffe] Problem: gcMalloc: Assertion `fidx nrTypes size != 0' failed.

2002-04-24 Thread Dalibor Topic

Hi Santosh,

--- Santosh Kumar Janmanchi
[EMAIL PROTECTED] wrote:
 Kaffe aborts with following assertion:
 
 Kaffe: mem/gc-incremental.c:864: gcMalloc: Assertion
 `fidx  nrTypes  size
 !=
 0' failed.
 
 Has anybody encountered this problem? Any fix
 available for it?

Thanks for reporting that problem. Could you produce a
small test case that triggers the bug?

cheers,

dalibor topic

__
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe



Re: [kaffe] Some obscure(?) problem...

2002-04-24 Thread Patrick Tullmann

Jukka wrote:
 ../../../kaffe/kaffe/xprof/gmonFile.c: In function `writeGmonRecord':
 ../../../kaffe/kaffe/xprof/gmonFile.c:136: `char' is promoted to `int'
 when passed through `...'
 ../../../kaffe/kaffe/xprof/gmonFile.c:136: (so you should pass `int' not
 `char' to `va_arg')
 
 --- kaffe/xprof/gmonFile.c  23 May 2000 17:55:37 -  1.1
 +++ kaffe/xprof/gmonFile.c  24 Apr 2002 08:12:23 -
 @@ -133,7 +133,7 @@
 strcpy(ghh.dimen, va_arg(args, char *));
 break;
 case GRA_DimensionAbbrev:
 -   ghh.dimen_abbrev = va_arg(args, char);
 +   ghh.dimen_abbrev = va_arg(args, int);
 break;
 case GRA_ProfilingRate:
 *((int *)ghh.prof_rate) = va_arg(args, int);

This is a new one to me... what os/hardware are you running on?  Ah,
maybe you're using a more recent gcc?  


 ../xprof/.libs/libkaffexprof.a(xprofiler.o): In function
 `enableXProfiling':
 /home/jsantala/kaffe-build/kaffe/xprof/../../../kaffe/kaffe/xprof/xprofiler.c:243:
 undefined reference to `_gmonparam'
 /home/jsantala/kaffe-build/kaffe/xprof/../../../kaffe/kaffe/xprof/xprofiler.c:249:
 undefined reference to `_gmonparam'

I get this problem too.  Doesn't happen on FreeBSD.  On Linux, you can
get one step farther by configuring with --enable-staticvm and(?) 
--enable-staticlib.  The static linking seems to resolve the gmonparam
problem (gmonparam is defined in libc).   This isn't unique to kaffe,
a 5-line C program that uses the extern _gmonparam from sys/gmon.h
has the same problems (Linux/x86, Debian Testing).

However, statically linking Kaffe just changes the problem: I then get
a bunch of undefined symbols in libgmp (things like undefined
reference to `__mpn_get_str'.  Somehow libgmp isn't working with
static linkage (?).

Haven't investigated any further.  I won't get a chance to play with
this for a while, so feel free to fix it before then!  :)

-Pat

- -  ---  ---  --   --  - -   -
Pat Tullmann   [EMAIL PROTECTED]
  If Gates got a dime each time Windows crashed... Oh, nevermind...

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe



Re: [kaffe] regression tests failed

2002-04-24 Thread Dalibor Topic

Hi Guillaume,

--- Audeon Guillaume [EMAIL PROTECTED] wrote:
 Hi,
 
 I downloaded today (Wed, 04/24/2002, 15:30
 GMT+02:00) a tarball, did
 configure, make... and finally make check
 (x86/Linux).
 It resulted in 3 tests failed, which are Bean,
 Reflect and ThreadLocalTest.
 IMHO, the output seems to be quite the same as
 expected, only the ordering
 differs (see attached files).
 Did I miss something?
 BR

I looked at Bean.java and this test expects its output
to be sorted. It is probably the case for the other
failed tests as well. Running make check with LANG=C
should fix it.

Cheers,

Dalibor Topic

__
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe



Re: [kaffe] Some obscure(?) problem...

2002-04-24 Thread Timothy Stack

 
 On Wed, 24 Apr 2002, Dalibor Topic wrote:
  While you are at it, you might want to take a look at
  xprof patches from Janos VM at
  http://www.cs.utah.edu/flux/janos/downloads/kaffe_kaffe_xprof.diff.gz
  They might help.
 
 Thanks, I'd forgotten about that. The patch seems to contain a whole lot
 of useful changes, but...
 
 /*
  * Unfortunately, I can't get linux to export a symbol to the gmonparam
  * structure (it doesn't link for some reason)...  So we can't get any
 early
  * recordings.

The last sentence is the important part, basically, if you don't care
about not getting any of the samples taken between the start of main() and
the initialization of xprof, its no big deal.  Actually, i would imagine
the data is still available in the regular gmon file, it just won't be
rolled into xgmon file.

  -Jukka Santala

tim stack

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe