[vmkit-commits] [vmkit] r180514 - Integrating Incinerator work into master.
Peter Senna Tschudin
peter.senna at gmail.com
Thu Apr 25 10:20:21 PDT 2013
Author: peter.senna
Date: Thu Apr 25 12:18:47 2013
New Revision: 180514
URL: http://llvm.org/viewvc/llvm-project?rev=180514&view=rev
Log:
Integrating Incinerator work into master.
(cherry picked from commit 16ae3c5eae03ac161fa31dfb21f9d0abddfc5313)
Added:
vmkit/trunk/incinerator/tests/BundleReloader/.classpath
vmkit/trunk/incinerator/tests/BundleReloader/bundle.manifest
vmkit/trunk/incinerator/tests/BundleReloader/src/
vmkit/trunk/incinerator/tests/BundleReloader/src/BundleReloader/
vmkit/trunk/incinerator/tests/BundleReloader/src/BundleReloader/Activator.java
vmkit/trunk/incinerator/tests/BundleReloader/src/j3/
vmkit/trunk/incinerator/tests/BundleReloader/src/j3/vm/
vmkit/trunk/incinerator/tests/BundleReloader/src/j3/vm/OSGi.java
Modified:
vmkit/trunk/configure
vmkit/trunk/incinerator/knopflerfish.patch
vmkit/trunk/incinerator/osgi/src/j3/J3Mgr.java
vmkit/trunk/incinerator/osgi/src/j3/vm/OSGi.java
vmkit/trunk/incinerator/osgi/src/j3mgr/J3MgrImpl.java
vmkit/trunk/incinerator/tests/BundleReloader/.bundle-pack
vmkit/trunk/incinerator/tests/benchmarks/scenarios.odt
vmkit/trunk/incinerator/tests/debug.txt
vmkit/trunk/incinerator/tests/ijvm.tests.AImpl/src/ijvm/tests/AImpl/AImpl.java
vmkit/trunk/incinerator/tests/ijvm.tests.AImpl/src/ijvm/tests/AImpl/Activator.java
vmkit/trunk/incinerator/tests/ijvm.tests.BImpl/src/ijvm/tests/BImpl/Activator.java
vmkit/trunk/incinerator/tests/ijvm.tests.BImpl/src/ijvm/tests/BImpl/BImpl.java
vmkit/trunk/incinerator/tests/ijvm.tests.BundleMgmtStress/src/ijvm/tests/BundleMgmtStress/Activator.java
vmkit/trunk/incinerator/tests/ijvm.tests.CImpl/src/ijvm/tests/CImpl/Activator.java
vmkit/trunk/incinerator/tests/ijvm.tests.CImpl/src/ijvm/tests/CImpl/CImpl.java
vmkit/trunk/incinerator/tests/ijvm.tests.DImpl/src/ijvm/tests/DImpl/Activator.java
vmkit/trunk/incinerator/tests/ijvm.tests.DImpl/src/ijvm/tests/DImpl/DImpl.java
vmkit/trunk/incinerator/tests/minimal.xargs
vmkit/trunk/lib/j3/ClassLib/GNUClasspath/ClasspathReflect.h
vmkit/trunk/lib/j3/ClassLib/OpenJDK/ClasspathReflect.h
vmkit/trunk/lib/j3/Compiler/JavaJIT.cpp
vmkit/trunk/lib/j3/VMCore/JavaArray.h
vmkit/trunk/lib/j3/VMCore/JavaClass.cpp
vmkit/trunk/lib/j3/VMCore/JavaClass.h
vmkit/trunk/lib/j3/VMCore/JavaObject.cpp
vmkit/trunk/lib/j3/VMCore/JavaObject.h
vmkit/trunk/lib/j3/VMCore/JavaString.cpp
vmkit/trunk/lib/j3/VMCore/JavaString.h
vmkit/trunk/lib/j3/VMCore/JavaThread.cpp
vmkit/trunk/lib/j3/VMCore/Jnjvm.cpp
vmkit/trunk/lib/j3/VMCore/Jnjvm.h
vmkit/trunk/lib/j3/VMCore/JnjvmClassLoader.cpp
vmkit/trunk/lib/j3/VMCore/JnjvmClassLoader.h
vmkit/trunk/lib/j3/VMCore/JnjvmIntOSGi.cpp
vmkit/trunk/lib/j3/VMCore/JnjvmStaleRef.cpp
vmkit/trunk/lib/j3/VMCore/VirtualTables.cpp
vmkit/trunk/lib/vmkit/CommonThread/ObjectLocks.cpp
vmkit/trunk/lib/vmkit/MMTk/VmkitGC.cpp
vmkit/trunk/lib/vmkit/MMTk/VmkitGC.h
vmkit/trunk/lib/vmkit/Runtime/MethodInfo.cpp
vmkit/trunk/mmtk/mmtk-alloc/Selected.cpp
vmkit/trunk/tests/dacapo/dacapo-avg-overhead.csv
vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on-overhead.plot
vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on.plot
vmkit/trunk/tests/dacapo/stats-incinerator-dacapo-2006-10-MR2.csv
Modified: vmkit/trunk/configure
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/configure?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/configure (original)
+++ vmkit/trunk/configure Thu Apr 25 12:18:47 2013
@@ -1,11 +1,13 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for vmkit 0.32svn.
+# Generated by GNU Autoconf 2.67 for vmkit 0.32svn.
#
# Report bugs to <vmkit2-development at lists.gforge.inria.fr>.
#
#
-# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
#
#
# This configure script is free software; the Free Software Foundation
@@ -91,7 +93,6 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -136,31 +137,6 @@ export LANGUAGE
# CDPATH.
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-# Use a proper internal environment variable to ensure we don't fall
- # into an infinite loop, continuously re-executing ourselves.
- if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
- _as_can_reexec=no; export _as_can_reexec;
- # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-as_fn_exit 255
- fi
- # We don't want this to propagate to other subprocesses.
- { _as_can_reexec=; unset _as_can_reexec;}
if test "x$CONFIG_SHELL" = x; then
as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
emulate sh
@@ -194,8 +170,7 @@ if ( set x; as_fn_ret_success y && test
else
exitcode=1; echo positional parameters were not saved.
fi
-test x\$exitcode = x0 || exit 1
-test -x / || exit 1"
+test x\$exitcode = x0 || exit 1"
as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -240,25 +215,14 @@ IFS=$as_save_IFS
if test "x$CONFIG_SHELL" != x; then :
- export CONFIG_SHELL
- # We cannot yet assume a decent shell, so we have to provide a
-# neutralization value for shells without unset; and this also
-# works around shells that cannot unset nonexistent variables.
-# Preserve -v and -x to the replacement shell.
-BASH_ENV=/dev/null
-ENV=/dev/null
-(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-case $- in # ((((
- *v*x* | *x*v* ) as_opts=-vx ;;
- *v* ) as_opts=-v ;;
- *x* ) as_opts=-x ;;
- * ) as_opts= ;;
-esac
-exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
-# Admittedly, this is quite paranoid, since all the known shells bail
-# out after a failed `exec'.
-$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
-exit 255
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
@@ -361,14 +325,6 @@ $as_echo X"$as_dir" |
} # as_fn_mkdir_p
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
- test -f "$1" && test -x "$1"
-} # as_fn_executable_p
# as_fn_append VAR VALUE
# ----------------------
# Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -490,10 +446,6 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
- # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
- # already done that, so ensure we don't try to do so again and fall
- # in an infinite loop. This has already happened in practice.
- _as_can_reexec=no; export _as_can_reexec
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
@@ -528,16 +480,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
+ # In both cases, we have to default to `cp -p'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
fi
else
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -549,8 +501,28 @@ else
as_mkdir_p=false
fi
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -1148,7 +1120,7 @@ Try \`$0 --help' for more information"
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
@@ -1199,6 +1171,8 @@ target=$target_alias
if test "x$host_alias" != x; then
if test "x$build_alias" = x; then
cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
elif test "x$build_alias" != "x$host_alias"; then
cross_compiling=yes
fi
@@ -1460,9 +1434,9 @@ test -n "$ac_init_help" && exit $ac_stat
if $ac_init_version; then
cat <<\_ACEOF
vmkit configure 0.32svn
-generated by GNU Autoconf 2.69
+generated by GNU Autoconf 2.67
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
@@ -1508,7 +1482,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1540,7 +1514,7 @@ $as_echo "$ac_try_echo"; } >&5
test ! -s conftest.err
} && test -s conftest$ac_exeext && {
test "$cross_compiling" = yes ||
- test -x conftest$ac_exeext
+ $as_test_x conftest$ac_exeext
}; then :
ac_retval=0
else
@@ -1554,7 +1528,7 @@ fi
# interfere with the next link command; also delete a directory that is
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_link
@@ -1591,7 +1565,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -1604,10 +1578,10 @@ fi
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval \${$3+:} false; then :
+ if eval "test \"\${$3+set}\"" = set; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -1674,7 +1648,7 @@ $as_echo "$as_me: WARNING: $2: proceedin
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -1683,7 +1657,7 @@ eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_header_mongrel
@@ -1724,7 +1698,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -1738,7 +1712,7 @@ ac_fn_c_check_header_compile ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1756,7 +1730,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_header_compile
@@ -1769,7 +1743,7 @@ ac_fn_c_check_type ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -1810,7 +1784,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_type
@@ -1822,7 +1796,7 @@ ac_fn_c_check_func ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
+if eval "test \"\${$3+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1877,7 +1851,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
} # ac_fn_c_check_func
cat >config.log <<_ACEOF
@@ -1885,7 +1859,7 @@ This file contains any messages produced
running configure, to aid debugging if configure makes a mistake.
It was created by vmkit $as_me 0.32svn, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+generated by GNU Autoconf 2.67. Invocation command line was
$ $0 $@
@@ -2143,7 +2117,7 @@ $as_echo "$as_me: loading site script $a
|| { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
done
@@ -2286,7 +2260,7 @@ $SHELL "$ac_aux_dir/config.sub" sun4 >/d
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
+if test "${ac_cv_build+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_build_alias=$build_alias
@@ -2302,7 +2276,7 @@ fi
$as_echo "$ac_cv_build" >&6; }
case $ac_cv_build in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
esac
build=$ac_cv_build
ac_save_IFS=$IFS; IFS='-'
@@ -2320,7 +2294,7 @@ case $build_os in *\ *) build_os=`echo "
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
+if test "${ac_cv_host+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "x$host_alias" = x; then
@@ -2335,7 +2309,7 @@ fi
$as_echo "$ac_cv_host" >&6; }
case $ac_cv_host in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
esac
host=$ac_cv_host
ac_save_IFS=$IFS; IFS='-'
@@ -2353,7 +2327,7 @@ case $host_os in *\ *) host_os=`echo "$h
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
$as_echo_n "checking target system type... " >&6; }
-if ${ac_cv_target+:} false; then :
+if test "${ac_cv_target+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test "x$target_alias" = x; then
@@ -2368,7 +2342,7 @@ fi
$as_echo "$ac_cv_target" >&6; }
case $ac_cv_target in
*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;;
esac
target=$ac_cv_target
ac_save_IFS=$IFS; IFS='-'
@@ -2393,7 +2367,7 @@ test -n "$target_alias" &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking type of operating system we're going to host on" >&5
$as_echo_n "checking type of operating system we're going to host on... " >&6; }
-if ${vmkit_cv_os_type+:} false; then :
+if test "${vmkit_cv_os_type+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $host in
@@ -2498,7 +2472,7 @@ case "$enableval" in
;;
no) OPTIMIZED=0
;;
- *) as_fn_error $? "Invalid setting for --enable-optimized. Use \"yes\" or \"no\"" "$LINENO" 5 ;;
+ *) as_fn_error $? "Invalid setting for --enable-optimized. Use \"yes\" or \"no\"" "$LINENO" 5 ;;
esac
# Check whether --enable-debug was given.
@@ -2513,7 +2487,7 @@ case "$enableval" in
;;
no) DEBUG=0
;;
- *) as_fn_error $? "Invalid setting for --enable-debug. Use \"yes\" or \"no\"" "$LINENO" 5 ;;
+ *) as_fn_error $? "Invalid setting for --enable-debug. Use \"yes\" or \"no\"" "$LINENO" 5 ;;
esac
# Check whether --enable-assert was given.
@@ -2529,7 +2503,7 @@ case "$enableval" in
;;
no) ASSERT=0
;;
- *) as_fn_error $? "Invalid setting for --enable-assert. Use \"yes\" or \"no\"" "$LINENO" 5 ;;
+ *) as_fn_error $? "Invalid setting for --enable-assert. Use \"yes\" or \"no\"" "$LINENO" 5 ;;
esac
@@ -2616,7 +2590,7 @@ $as_echo "$as_me: Validating GNU Classpa
as_ac_File=`$as_echo "ac_cv_file_${classpathlibs}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${classpathlibs}" >&5
$as_echo_n "checking for ${classpathlibs}... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
@@ -2642,7 +2616,7 @@ fi
as_ac_File=`$as_echo "ac_cv_file_${classpathlibs}/libjavaio.$DYLIB_EXTENSION" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${classpathlibs}/libjavaio.$DYLIB_EXTENSION" >&5
$as_echo_n "checking for ${classpathlibs}/libjavaio.$DYLIB_EXTENSION... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
@@ -2668,7 +2642,7 @@ fi
as_ac_File=`$as_echo "ac_cv_file_${classpathlibs}/libjavalang.$DYLIB_EXTENSION" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${classpathlibs}/libjavalang.$DYLIB_EXTENSION" >&5
$as_echo_n "checking for ${classpathlibs}/libjavalang.$DYLIB_EXTENSION... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
@@ -2694,7 +2668,7 @@ fi
as_ac_File=`$as_echo "ac_cv_file_${classpathlibs}/libjavalangreflect.$DYLIB_EXTENSION" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${classpathlibs}/libjavalangreflect.$DYLIB_EXTENSION" >&5
$as_echo_n "checking for ${classpathlibs}/libjavalangreflect.$DYLIB_EXTENSION... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
@@ -2720,7 +2694,7 @@ fi
as_ac_File=`$as_echo "ac_cv_file_${classpathlibs}/libjavanet.$DYLIB_EXTENSION" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${classpathlibs}/libjavanet.$DYLIB_EXTENSION" >&5
$as_echo_n "checking for ${classpathlibs}/libjavanet.$DYLIB_EXTENSION... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
@@ -2746,7 +2720,7 @@ fi
as_ac_File=`$as_echo "ac_cv_file_${classpathlibs}/libjavanio.$DYLIB_EXTENSION" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${classpathlibs}/libjavanio.$DYLIB_EXTENSION" >&5
$as_echo_n "checking for ${classpathlibs}/libjavanio.$DYLIB_EXTENSION... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
@@ -2772,7 +2746,7 @@ fi
as_ac_File=`$as_echo "ac_cv_file_${classpathlibs}/libjavautil.$DYLIB_EXTENSION" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${classpathlibs}/libjavautil.$DYLIB_EXTENSION" >&5
$as_echo_n "checking for ${classpathlibs}/libjavautil.$DYLIB_EXTENSION... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
@@ -2799,7 +2773,7 @@ fi
as_ac_File=`$as_echo "ac_cv_file_${classpathglibj}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${classpathglibj}" >&5
$as_echo_n "checking for ${classpathglibj}... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
@@ -2826,7 +2800,7 @@ $as_echo "$as_me: Validating OpenJDK ins
as_ac_File=`$as_echo "ac_cv_file_${openjdkpath}" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${openjdkpath}" >&5
$as_echo_n "checking for ${openjdkpath}... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
@@ -2852,7 +2826,7 @@ fi
as_ac_File=`$as_echo "ac_cv_file_${openjdkpath}/jre/lib/rt.jar" | $as_tr_sh`
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${openjdkpath}/jre/lib/rt.jar" >&5
$as_echo_n "checking for ${openjdkpath}/jre/lib/rt.jar... " >&6; }
-if eval \${$as_ac_File+:} false; then :
+if eval "test \"\${$as_ac_File+set}\"" = set; then :
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
@@ -2895,7 +2869,7 @@ case "$enableval" in
yes) $as_echo "#define RESET_STALE_REFERENCES 1" >>confdefs.h
;;
no) ;; #AC_DEFINE(RESET_STALE_REFERENCES,[0]) ;;
- *) as_fn_error $? "Invalid setting for --enable-incinerator. Use \"yes\" or \"no\"" "$LINENO" 5 ;;
+ *) as_fn_error $? "Invalid setting for --enable-incinerator. Use \"yes\" or \"no\"" "$LINENO" 5 ;;
esac
@@ -2903,7 +2877,7 @@ esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD-compatible nm" >&5
$as_echo_n "checking for BSD-compatible nm... " >&6; }
-if ${lt_cv_path_NM+:} false; then :
+if test "${lt_cv_path_NM+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$NM"; then
@@ -2960,7 +2934,7 @@ NM="$lt_cv_path_NM"
set dummy ld; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LD+:} false; then :
+if test "${ac_cv_path_LD+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $LD in
@@ -2974,7 +2948,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_LD="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3001,7 +2975,7 @@ fi
set dummy ar; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_AR+:} false; then :
+if test "${ac_cv_path_AR+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $AR in
@@ -3015,7 +2989,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3040,7 +3014,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
+if test "${ac_cv_path_GREP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
@@ -3054,7 +3028,7 @@ do
for ac_prog in grep ggrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_GREP" || continue
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
# Check for GNU ac_path_GREP and select it if it is found.
# Check for GNU $ac_path_GREP
case `"$ac_path_GREP" --version 2>&1` in
@@ -3104,7 +3078,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if ${ac_cv_path_mkdir+:} false; then :
+ if test "${ac_cv_path_mkdir+set}" = set; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3114,7 +3088,7 @@ do
test -z "$as_dir" && as_dir=.
for ac_prog in mkdir gmkdir; do
for ac_exec_ext in '' $ac_executable_extensions; do
- as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
'mkdir (GNU coreutils) '* | \
'mkdir (coreutils) '* | \
@@ -3147,7 +3121,7 @@ $as_echo "$MKDIR_P" >&6; }
set dummy mv; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_MV+:} false; then :
+if test "${ac_cv_path_MV+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $MV in
@@ -3161,7 +3135,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3188,7 +3162,7 @@ fi
set dummy rm; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_RM+:} false; then :
+if test "${ac_cv_path_RM+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $RM in
@@ -3202,7 +3176,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3229,7 +3203,7 @@ fi
set dummy cp; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_CP+:} false; then :
+if test "${ac_cv_path_CP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $CP in
@@ -3243,7 +3217,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3270,7 +3244,7 @@ fi
set dummy touch; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_TOUCH+:} false; then :
+if test "${ac_cv_path_TOUCH+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $TOUCH in
@@ -3284,7 +3258,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3312,7 +3286,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_RANLIB+:} false; then :
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
@@ -3324,7 +3298,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3352,7 +3326,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
set dummy ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
@@ -3364,7 +3338,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_RANLIB="ranlib"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3404,7 +3378,7 @@ fi
set dummy ant; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ANT+:} false; then :
+if test "${ac_cv_path_ANT+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $ANT in
@@ -3418,7 +3392,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ANT="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3444,7 +3418,7 @@ fi
set dummy javac; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_JAVAC+:} false; then :
+if test "${ac_cv_path_JAVAC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $JAVAC in
@@ -3458,7 +3432,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3485,7 +3459,7 @@ fi
set dummy zip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ZIP+:} false; then :
+if test "${ac_cv_path_ZIP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $ZIP in
@@ -3499,7 +3473,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3527,7 +3501,7 @@ fi
set dummy llvm-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_LLVM_CONFIG+:} false; then :
+if test "${ac_cv_path_LLVM_CONFIG+set}" = set; then :
$as_echo_n "(cached) " >&6
else
case $LLVM_CONFIG in
@@ -3564,7 +3538,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_path_LLVM_CONFIG="$as_dir/$ac_word$ac_exec_ext"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3610,7 +3584,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if ${ac_cv_path_install+:} false; then :
+if test "${ac_cv_path_install+set}" = set; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -3630,7 +3604,7 @@ case $as_dir/ in #((
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
if test $ac_prog = install &&
grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
# AIX install. It has an incompatible calling convention.
@@ -3698,7 +3672,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3710,7 +3684,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3738,7 +3712,7 @@ if test -z "$ac_cv_prog_CC"; then
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -3750,7 +3724,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="gcc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3791,7 +3765,7 @@ if test -z "$CC"; then
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3803,7 +3777,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="${ac_tool_prefix}cc"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3831,7 +3805,7 @@ if test -z "$CC"; then
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3844,7 +3818,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
ac_prog_rejected=yes
continue
@@ -3890,7 +3864,7 @@ if test -z "$CC"; then
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
+if test "${ac_cv_prog_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -3902,7 +3876,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3934,7 +3908,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -3946,7 +3920,7 @@ do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
- if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
ac_cv_prog_ac_ct_CC="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
@@ -3989,7 +3963,7 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4104,7 +4078,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -4147,7 +4121,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -4206,7 +4180,7 @@ $as_echo "$ac_try_echo"; } >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
fi
fi
@@ -4217,7 +4191,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_ex
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
+if test "${ac_cv_objext+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4258,7 +4232,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -4268,7 +4242,7 @@ OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4305,7 +4279,7 @@ ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
+if test "${ac_cv_prog_cc_g+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4383,7 +4357,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
@@ -4392,7 +4366,8 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_
/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
-struct stat;
+#include <sys/types.h>
+#include <sys/stat.h>
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
struct buf { int x; };
FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4480,7 +4455,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inflate in -lz" >&5
$as_echo_n "checking for inflate in -lz... " >&6; }
-if ${ac_cv_lib_z_inflate+:} false; then :
+if test "${ac_cv_lib_z_inflate+set}" = set; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
@@ -4514,7 +4489,7 @@ LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_inflate" >&5
$as_echo "$ac_cv_lib_z_inflate" >&6; }
-if test "x$ac_cv_lib_z_inflate" = xyes; then :
+if test "x$ac_cv_lib_z_inflate" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBZ 1
_ACEOF
@@ -4542,7 +4517,7 @@ if test -n "$CPP" && test -d "$CPP"; the
CPP=
fi
if test -z "$CPP"; then
- if ${ac_cv_prog_CPP+:} false; then :
+ if test "${ac_cv_prog_CPP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -4658,7 +4633,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
+See \`config.log' for more details" "$LINENO" 5 ; }
fi
ac_ext=c
@@ -4670,7 +4645,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
+if test "${ac_cv_path_EGREP+set}" = set; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4687,7 +4662,7 @@ do
for ac_prog in egrep; do
for ac_exec_ext in '' $ac_executable_extensions; do
ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
- as_fn_executable_p "$ac_path_EGREP" || continue
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
# Check for GNU ac_path_EGREP and select it if it is found.
# Check for GNU $ac_path_EGREP
case `"$ac_path_EGREP" --version 2>&1` in
@@ -4737,7 +4712,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
+if test "${ac_cv_header_stdc+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4865,7 +4840,7 @@ done
ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
-if test "x$ac_cv_header_zlib_h" = xyes; then :
+if test "x$ac_cv_header_zlib_h" = x""yes; then :
else
\
@@ -4877,7 +4852,7 @@ fi
ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
-if test "x$ac_cv_type_pid_t" = xyes; then :
+if test "x$ac_cv_type_pid_t" = x""yes; then :
else
@@ -4888,7 +4863,7 @@ _ACEOF
fi
ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = xyes; then :
+if test "x$ac_cv_type_size_t" = x""yes; then :
else
@@ -4900,7 +4875,7 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
-if ${ac_cv_struct_tm+:} false; then :
+if test "${ac_cv_struct_tm+set}" = set; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4934,7 +4909,7 @@ $as_echo "#define TM_IN_SYS_TIME 1" >>co
fi
ac_fn_c_check_type "$LINENO" "int64_t" "ac_cv_type_int64_t" "$ac_includes_default"
-if test "x$ac_cv_type_int64_t" = xyes; then :
+if test "x$ac_cv_type_int64_t" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_INT64_T 1
@@ -4946,7 +4921,7 @@ else
fi
ac_fn_c_check_type "$LINENO" "uint64_t" "ac_cv_type_uint64_t" "$ac_includes_default"
-if test "x$ac_cv_type_uint64_t" = xyes; then :
+if test "x$ac_cv_type_uint64_t" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_UINT64_T 1
@@ -4955,7 +4930,7 @@ _ACEOF
else
ac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default"
-if test "x$ac_cv_type_u_int64_t" = xyes; then :
+if test "x$ac_cv_type_u_int64_t" = x""yes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_U_INT64_T 1
@@ -5069,21 +5044,10 @@ $as_echo "$as_me: WARNING: cache variabl
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- if test "x$cache_file" != "x/dev/null"; then
+ test "x$cache_file" != "x/dev/null" &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
- if test ! -f "$cache_file" || test -h "$cache_file"; then
- cat confcache >"$cache_file"
- else
- case $cache_file in #(
- */* | ?:*)
- mv -f confcache "$cache_file"$$ &&
- mv -f "$cache_file"$$ "$cache_file" ;; #(
- *)
- mv -f confcache "$cache_file" ;;
- esac
- fi
- fi
+ cat confcache >$cache_file
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -5115,7 +5079,7 @@ LTLIBOBJS=$ac_ltlibobjs
-: "${CONFIG_STATUS=./config.status}"
+: ${CONFIG_STATUS=./config.status}
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -5216,7 +5180,6 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
-as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -5412,16 +5375,16 @@ if (echo >conf$$.file) 2>/dev/null; then
# ... but there are two gotchas:
# 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
# 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
- # In both cases, we have to default to `cp -pR'.
+ # In both cases, we have to default to `cp -p'.
ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
elif ln conf$$.file conf$$ 2>/dev/null; then
as_ln_s=ln
else
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
fi
else
- as_ln_s='cp -pR'
+ as_ln_s='cp -p'
fi
rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
rmdir conf$$.dir 2>/dev/null
@@ -5481,16 +5444,28 @@ else
as_mkdir_p=false
fi
-
-# as_fn_executable_p FILE
-# -----------------------
-# Test if FILE is an executable regular file.
-as_fn_executable_p ()
-{
- test -f "$1" && test -x "$1"
-} # as_fn_executable_p
-as_test_x='test -x'
-as_executable_p=as_fn_executable_p
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
# Sed expression to map a string onto a valid CPP name.
as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -5512,7 +5487,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri
# values after options handling.
ac_log="
This file was extended by vmkit $as_me 0.32svn, which was
-generated by GNU Autoconf 2.69. Invocation command line was
+generated by GNU Autoconf 2.67. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -5574,10 +5549,10 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_writ
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
vmkit config.status 0.32svn
-configured by $0, generated by GNU Autoconf 2.69,
+configured by $0, generated by GNU Autoconf 2.67,
with options \\"\$ac_cs_config\\"
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
@@ -5667,7 +5642,7 @@ fi
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
if \$ac_cs_recheck; then
- set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
shift
\$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
CONFIG_SHELL='$SHELL'
@@ -5703,7 +5678,7 @@ do
"mmtk/java/src/org/j3/config/Selected.java") CONFIG_FILES="$CONFIG_FILES mmtk/java/src/org/j3/config/Selected.java" ;;
"mmtk/java/build.xml") CONFIG_FILES="$CONFIG_FILES mmtk/java/build.xml" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
esac
done
@@ -5725,10 +5700,9 @@ fi
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp= ac_tmp=
+ tmp=
trap 'exit_status=$?
- : "${ac_tmp:=$tmp}"
- { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
@@ -5736,13 +5710,12 @@ $debug ||
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -d "$tmp"
+ test -n "$tmp" && test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
-ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -5764,7 +5737,7 @@ else
ac_cs_awk_cr=$ac_cr
fi
-echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
_ACEOF
@@ -5792,7 +5765,7 @@ done
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
@@ -5840,7 +5813,7 @@ t delim
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
-cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
@@ -5872,7 +5845,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/n
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
-fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
|| as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
@@ -5906,7 +5879,7 @@ fi # test -n "$CONFIG_FILES"
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
-cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
+cat >"$tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
@@ -5918,8 +5891,8 @@ _ACEOF
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
- ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_tt"; then
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
break
elif $ac_last_try; then
as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -6020,7 +5993,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -6039,7 +6012,7 @@ do
for ac_f
do
case $ac_f in
- -) ac_f="$ac_tmp/stdin";;
+ -) ac_f="$tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -6048,7 +6021,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -6074,8 +6047,8 @@ $as_echo "$as_me: creating $ac_file" >&6
esac
case $ac_tag in
- *:-:* | *:-) cat >"$ac_tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -6211,22 +6184,21 @@ s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
- >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
- "$ac_tmp/out"`; test -z "$ac_out"; } &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
- rm -f "$ac_tmp/stdin"
+ rm -f "$tmp/stdin"
case $ac_file in
- -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
- *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
@@ -6237,20 +6209,20 @@ which seems to be undefined. Please mak
if test x"$ac_file" != x-; then
{
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
- } >"$ac_tmp/config.h" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
- mv "$ac_tmp/config.h" "$ac_file" \
+ mv "$tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
;;
Modified: vmkit/trunk/incinerator/knopflerfish.patch
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/knopflerfish.patch?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/knopflerfish.patch (original)
+++ vmkit/trunk/incinerator/knopflerfish.patch Thu Apr 25 12:18:47 2013
@@ -13,7 +13,7 @@ Index: knopflerfish/osgi/framework/src/o
===================================================================
--- knopflerfish/osgi/framework/src/org/knopflerfish/framework/BundleClassLoader.java 2012-10-27 02:29:49.852807353 +0200
+++ knopflerfish/osgi/framework/src/org/knopflerfish/framework/BundleClassLoader.java 2012-10-27 02:36:22.287024825 +0200
-@@ -819,9 +819,12 @@
+@@ -821,9 +821,12 @@
}
Vector av = classPath.componentExists(path, onlyFirst);
if (av != null) {
Modified: vmkit/trunk/incinerator/osgi/src/j3/J3Mgr.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/src/j3/J3Mgr.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/osgi/src/j3/J3Mgr.java (original)
+++ vmkit/trunk/incinerator/osgi/src/j3/J3Mgr.java Thu Apr 25 12:18:47 2013
@@ -1,14 +1,20 @@
package j3;
-import org.osgi.framework.Bundle;
-
public interface J3Mgr
{
- public void resetReferencesToBundle(Bundle bundle) throws Exception;
+ public void setBundleStaleReferenceCorrected(
+ long bundleID, boolean corrected) throws Throwable;
+ public boolean isBundleStaleReferenceCorrected(
+ long bundleID) throws Throwable;
// THE FOLLOWING METHODS ARE DEBUGGING HELPERS
// THEY SHOULD BE REMOVED IN PRODUCTION
- public void dumpClassLoaderBundles();
- public void resetReferencesToBundle(String bundleName) throws Exception;
+ public void dumpClassLoaderBundles() throws Throwable;
+ public void setBundleStaleReferenceCorrected(
+ String bundleNameOrID, String corrected) throws Throwable;
+ public void isBundleStaleReferenceCorrected(
+ String bundleNameOrID) throws Throwable;
+ public void dumpReferencesToObject(
+ String objectPointer) throws Throwable;
}
Modified: vmkit/trunk/incinerator/osgi/src/j3/vm/OSGi.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/src/j3/vm/OSGi.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/osgi/src/j3/vm/OSGi.java (original)
+++ vmkit/trunk/incinerator/osgi/src/j3/vm/OSGi.java Thu Apr 25 12:18:47 2013
@@ -4,9 +4,13 @@ public class OSGi
{
// OSGi hooks and information gathering
public static native void associateBundleClass(long bundleID, Class classObject);
- public static native void notifyBundleUninstalled(long bundleID);
+ public static native void notifyBundleUninstalled(long bundleID);
+
+ public static native long[] getReferencesToObject(long objectPointer);
+ public static native String dumpObject(long objectPointer);
// Commands
- public static native void resetReferencesToBundle(long bundleID);
+ public static native void setBundleStaleReferenceCorrected(long bundleID, boolean corrected);
+ public static native boolean isBundleStaleReferenceCorrected(long bundleID);
public static native void dumpClassLoaderBundles();
}
Modified: vmkit/trunk/incinerator/osgi/src/j3mgr/J3MgrImpl.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/osgi/src/j3mgr/J3MgrImpl.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/osgi/src/j3mgr/J3MgrImpl.java (original)
+++ vmkit/trunk/incinerator/osgi/src/j3mgr/J3MgrImpl.java Thu Apr 25 12:18:47 2013
@@ -1,94 +1,174 @@
package j3mgr;
-import java.util.LinkedList;
+import java.util.Set;
+import java.util.TreeSet;
import j3.J3Mgr;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
-import org.osgi.framework.FrameworkEvent;
-import org.osgi.framework.FrameworkListener;
+import org.osgi.framework.BundleEvent;
+import org.osgi.framework.BundleListener;
import org.osgi.framework.ServiceReference;
import org.osgi.service.packageadmin.PackageAdmin;
public class J3MgrImpl
- implements J3Mgr, FrameworkListener
+ implements J3Mgr, BundleListener
{
BundleContext context;
- LinkedList<Long> bundlesToKill;
public void open(BundleContext bundleContext)
{
context = bundleContext;
- bundlesToKill = new LinkedList<Long>();
-
- // We need to know when packages are refreshed
- context.addFrameworkListener(this);
+ context.addBundleListener(this);
}
public void close()
{
- context.removeFrameworkListener(this);
+ context.removeBundleListener(this);
context = null;
-
- bundlesToKill = null;
}
- public void resetReferencesToBundle(Bundle bundle) throws Exception
+ public void setBundleStaleReferenceCorrected(
+ long bundleID, boolean corrected) throws Throwable
{
- System.out.println("resetReferencesToBundle: #" + bundle.getBundleId() + " " + bundle.getSymbolicName());
+ j3.vm.OSGi.setBundleStaleReferenceCorrected(bundleID, corrected);
- System.out.println("Stopping bundle: " + bundle.getSymbolicName());
- bundle.stop();
- System.out.println("Uninstalling bundle: " + bundle.getSymbolicName());
- bundle.uninstall();
-
- bundlesToKill.addFirst(new Long(bundle.getBundleId()));
+ if (!corrected || (context.getBundle(bundleID) != null))
+ return; // Bundle ignored, or still installed
- System.out.println("Refreshing framework...");
- refreshFramework(bundle);
+ // Inexistent bundle to be corrected, probably uninstalled,
+ // Notify the VM now.
+ j3.vm.OSGi.notifyBundleUninstalled(bundleID);
+ refreshFramework();
}
-
- void refreshFramework(Bundle bundle)
+
+ public boolean isBundleStaleReferenceCorrected(
+ long bundleID) throws Throwable
{
- ServiceReference<?> pkgAdminRef = (ServiceReference<?>)context.getServiceReference(
- "org.osgi.service.packageadmin.PackageAdmin");
- PackageAdmin pkgAdmin = (PackageAdmin)context.getService(pkgAdminRef);
- pkgAdmin.refreshPackages(null);
+ return j3.vm.OSGi.isBundleStaleReferenceCorrected(bundleID);
}
- public void frameworkEvent(FrameworkEvent event)
+ public void bundleChanged(BundleEvent event)
{
- if (event.getType() != FrameworkEvent.PACKAGES_REFRESHED) return;
-
- if (bundlesToKill.isEmpty()) return;
- long bundleID = bundlesToKill.removeLast().longValue();
+ if (event.getType() != BundleEvent.UNINSTALLED) return;
- System.out.println("Resetting stale references to bundle #" + bundleID);
- j3.vm.OSGi.resetReferencesToBundle(bundleID);
+ try {
+ j3.vm.OSGi.notifyBundleUninstalled(event.getBundle().getBundleId());
+ refreshFramework();
+ } catch (Throwable e) {}
+ }
+
+ void refreshFramework()
+ {
+ ServiceReference<?> pkgAdminRef =
+ (ServiceReference<?>)context.getServiceReference(
+ "org.osgi.service.packageadmin.PackageAdmin");
+ PackageAdmin pkgAdmin = (PackageAdmin)context.getService(pkgAdminRef);
+ pkgAdmin.refreshPackages(null);
+ context.ungetService(pkgAdminRef);
}
// THE FOLLOWING METHODS ARE DEBUGGING HELPERS
// THEY SHOULD BE REMOVED IN PRODUCTION
- public void resetReferencesToBundle(String bundleName) throws Exception
+ public void setBundleStaleReferenceCorrected(
+ String bundleNameOrID, String corrected) throws Throwable
{
- resetReferencesToBundle(getBundle(bundleName));
- }
+ long bundleID = getBundleID(bundleNameOrID);
+ if (bundleID == -1) throw new IllegalArgumentException(bundleNameOrID);
- Bundle getBundle(String symbolicName)
+ setBundleStaleReferenceCorrected(bundleID, corrected.equals("yes"));
+ }
+
+ public void isBundleStaleReferenceCorrected(
+ String bundleNameOrID) throws Throwable
{
+ long bundleID = getBundleID(bundleNameOrID);
+ if (bundleID == -1) throw new IllegalArgumentException(bundleNameOrID);
+
+ boolean value = isBundleStaleReferenceCorrected(bundleID);
+ System.out.println(
+ "isBundleStaleReferenceCorrected(bundleID=" + bundleID + ") = " +
+ (value ? "yes" : "no"));
+ }
+
+ long getBundleID(String symbolicNameOrID)
+ {
+ try {
+ long bundleID = Long.parseLong(symbolicNameOrID);
+
+ if (context.getBundle(bundleID) == null) {
+ System.out.println(
+ "WARNING: bundleID=" + bundleID +
+ " is invalid, probably already uninstalled.");
+ }
+
+ return (bundleID < 0) ? -1 : bundleID;
+ } catch (NumberFormatException e) {
+ // This is not a bundle ID, it must be a symbolic name
+ }
+
Bundle[] bundles = context.getBundles();
for (int i=0; i < bundles.length; ++i) {
- if (symbolicName.equals(bundles[i].getSymbolicName()))
- return bundles[i];
+ if (symbolicNameOrID.equals(bundles[i].getSymbolicName()))
+ return bundles[i].getBundleId();
}
- return null;
+ return -1;
}
- public void dumpClassLoaderBundles()
+ public void dumpClassLoaderBundles() throws Throwable
{
j3.vm.OSGi.dumpClassLoaderBundles();
}
+
+ public void dumpReferencesToObject(String objectPointer) throws Throwable
+ {
+ int radix = 10;
+ if (objectPointer.startsWith("0x")) {
+ objectPointer = objectPointer.substring(2);
+ radix = 16;
+ }
+
+ long obj = Long.parseLong(objectPointer, radix);
+
+ dumpReferencesToObject(obj, null, 4);
+ System.out.println(";");
+ }
+
+ public void dumpReferencesToObject(long obj, Set<Long> objects, int depth) throws Throwable
+ {
+ if (obj == 0) {
+ System.out.print("0x0");
+ return;
+ }
+/*
+ if (objects == null)
+ objects = new TreeSet<Long>();
+
+ Long Obj = new Long(obj);
+ if ((depth <= 0) || objects.contains(Obj)) {
+ System.out.print(j3.vm.OSGi.dumpObject(obj));
+ return; // Already dumped or depth reached
+ }
+ objects.add(Obj);
+*/
+ if (depth <= 0) {
+ System.out.print(j3.vm.OSGi.dumpObject(obj));
+ return; // Already dumped or depth reached
+ }
+
+ System.out.print(j3.vm.OSGi.dumpObject(obj) + "<<{");
+ long[] refs = j3.vm.OSGi.getReferencesToObject(obj);
+ if (refs != null && refs.length > 0) {
+ dumpReferencesToObject(refs[0], objects, depth - 1);
+
+ for (int i=1; i < refs.length; ++i) {
+ System.out.print(",");
+ dumpReferencesToObject(refs[i], objects, depth - 1);
+ }
+ }
+ System.out.print("}");
+ }
}
Modified: vmkit/trunk/incinerator/tests/BundleReloader/.bundle-pack
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/BundleReloader/.bundle-pack?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/BundleReloader/.bundle-pack (original)
+++ vmkit/trunk/incinerator/tests/BundleReloader/.bundle-pack Thu Apr 25 12:18:47 2013
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<bundlejar>
-<resource dst="" pattern=".*\.class" src="/BundleReloader/bin" type="0"/>
+<resource dst="" pattern=".*\.class" src="/BundleReloader/out" type="0"/>
</bundlejar>
Added: vmkit/trunk/incinerator/tests/BundleReloader/.classpath
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/BundleReloader/.classpath?rev=180514&view=auto
==============================================================================
--- vmkit/trunk/incinerator/tests/BundleReloader/.classpath (added)
+++ vmkit/trunk/incinerator/tests/BundleReloader/.classpath Thu Apr 25 12:18:47 2013
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry excluding="**/.svn/**|**/CVS/**" including="**/*.java" kind="src" path="src"/>
+ <classpathentry kind="con" path="org.knopflerfish.eclipse.core.EXECUTION_ENVIRONMENT_CONTAINER"/>
+ <classpathentry kind="con" path="org.knopflerfish.eclipse.core.FRAMEWORK_CONTAINER">
+ <accessrules>
+ <accessrule kind="accessible" pattern="org/osgi/service/packageadmin/"/>
+ <accessrule kind="accessible" pattern="org/osgi/framework/"/>
+ <accessrule kind="nonaccessible" pattern="**/*"/>
+ </accessrules>
+ </classpathentry>
+ <classpathentry kind="output" path="out"/>
+</classpath>
Added: vmkit/trunk/incinerator/tests/BundleReloader/bundle.manifest
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/BundleReloader/bundle.manifest?rev=180514&view=auto
==============================================================================
--- vmkit/trunk/incinerator/tests/BundleReloader/bundle.manifest (added)
+++ vmkit/trunk/incinerator/tests/BundleReloader/bundle.manifest Thu Apr 25 12:18:47 2013
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Bundle-Vendor: Koutheir Attouchi
+Bundle-Version: 1.0.0
+Bundle-Name: BundleReloader
+Bundle-ManifestVersion: 2
+Bundle-Activator: BundleReloader.Activator
+Import-Package: org.osgi.framework, org.osgi.service.packageadmin
+Bundle-SymbolicName: BundleReloader
+
Added: vmkit/trunk/incinerator/tests/BundleReloader/src/BundleReloader/Activator.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/BundleReloader/src/BundleReloader/Activator.java?rev=180514&view=auto
==============================================================================
--- vmkit/trunk/incinerator/tests/BundleReloader/src/BundleReloader/Activator.java (added)
+++ vmkit/trunk/incinerator/tests/BundleReloader/src/BundleReloader/Activator.java Thu Apr 25 12:18:47 2013
@@ -0,0 +1,128 @@
+package BundleReloader;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+public class Activator
+ implements BundleActivator, Runnable
+{
+ static final String targetBundle = "file:///home/koutheir/PhD/VMKit/knopflerfish/osgi/jars/http/http_all-3.1.2.jar";
+
+ BundleContext context;
+ ServiceReference pkgAdminRef;
+ PackageAdmin pkgAdmin;
+ boolean onIncinerator;
+
+ Thread worker;
+ volatile boolean cancelWork;
+ volatile long loopCount;
+
+ public void start(BundleContext context) throws Exception
+ {
+ this.context = context;
+ cancelWork = false;
+
+ onIncinerator = isRunningOnIncinerator();
+
+ pkgAdminRef = context.getServiceReference(
+ "org.osgi.service.packageadmin.PackageAdmin");
+ pkgAdmin = (PackageAdmin)context.getService(pkgAdminRef);
+
+ worker = new Thread(this, "BundleReloader");
+ worker.start();
+ }
+
+ public void stop(BundleContext context) throws Exception
+ {
+ if (!cancelWork) {
+ cancelWork = true;
+ worker.join();
+ }
+ worker = null;
+
+ context.ungetService(pkgAdminRef);
+
+ this.context = null;
+ System.out.println("Bundle reinstallation count: " + loopCount);
+ }
+
+ public void run()
+ {
+ System.out.println("Bundle reinstallation running...");
+ System.out.println("Running on Incinerator: " + (onIncinerator ? "yes" : "no"));
+
+ try {Thread.sleep(2000);}
+ catch (Exception e) {}
+
+ try {
+ for (loopCount = 0; !cancelWork; ++loopCount)
+ reinstallBundle(targetBundle);
+ } catch (Throwable e) {e.printStackTrace();}
+
+ cancelWork = true;
+
+ System.out.println("Bundle reinstallation done.");
+
+ try {stopThisBundle();}
+ catch (Throwable e) {e.printStackTrace();}
+ }
+
+ void reinstallBundle(String bundle_location) throws Throwable
+ {
+ Bundle[] bundles = new Bundle[] {
+ context.installBundle(bundle_location)
+ };
+
+ long bundleID = bundles[0].getBundleId();
+ try {
+ bundles[0].start();
+ Thread.sleep(100);
+
+ if (onIncinerator)
+ j3.vm.OSGi.setBundleStaleReferenceCorrected(bundleID, true);
+
+ bundles[0].stop();
+ bundles[0].uninstall();
+
+ pkgAdmin.refreshPackages(bundles);
+ System.gc();
+
+ if (onIncinerator)
+ j3.vm.OSGi.notifyBundleUninstalled(bundleID);
+ } catch (Throwable e) {
+ try {
+ bundles[0].uninstall();
+ pkgAdmin.refreshPackages(bundles);
+ } catch (Exception ignore) {}
+
+ throw e;
+ }
+ }
+
+ void stopThisBundle() throws Exception
+ {
+ Bundle thisBundle = context.getBundle();
+ int currentState = thisBundle.getState();
+
+ if (currentState != Bundle.ACTIVE && currentState != Bundle.STARTING)
+ return;
+
+ thisBundle.stop();
+ }
+
+ boolean isRunningOnIncinerator()
+ {
+ boolean r = false;
+ try {
+ j3.vm.OSGi.isBundleStaleReferenceCorrected(
+ context.getBundle().getBundleId());
+ r = true;
+ }
+ catch (UnsatisfiedLinkError ignore) {}
+ catch (Throwable ignore) {r = true;}
+ return r;
+ }
+}
Added: vmkit/trunk/incinerator/tests/BundleReloader/src/j3/vm/OSGi.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/BundleReloader/src/j3/vm/OSGi.java?rev=180514&view=auto
==============================================================================
--- vmkit/trunk/incinerator/tests/BundleReloader/src/j3/vm/OSGi.java (added)
+++ vmkit/trunk/incinerator/tests/BundleReloader/src/j3/vm/OSGi.java Thu Apr 25 12:18:47 2013
@@ -0,0 +1,16 @@
+package j3.vm;
+
+public class OSGi
+{
+ // OSGi hooks and information gathering
+ public static native void associateBundleClass(long bundleID, Class classObject);
+ public static native void notifyBundleUninstalled(long bundleID);
+
+ public static native long[] getReferencesToObject(long objectPointer);
+ public static native String dumpObject(long objectPointer);
+
+ // Commands
+ public static native void setBundleStaleReferenceCorrected(long bundleID, boolean corrected);
+ public static native boolean isBundleStaleReferenceCorrected(long bundleID);
+ public static native void dumpClassLoaderBundles();
+}
Modified: vmkit/trunk/incinerator/tests/benchmarks/scenarios.odt
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/benchmarks/scenarios.odt?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
Binary files vmkit/trunk/incinerator/tests/benchmarks/scenarios.odt (original) and vmkit/trunk/incinerator/tests/benchmarks/scenarios.odt Thu Apr 25 12:18:47 2013 differ
Modified: vmkit/trunk/incinerator/tests/debug.txt
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/debug.txt?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/debug.txt (original)
+++ vmkit/trunk/incinerator/tests/debug.txt Thu Apr 25 12:18:47 2013
@@ -1,12 +1,24 @@
/home/koutheir/PhD/VMKit/vmkit_stale_ref/Debug+Asserts/bin/j3 -jar framework.jar -xargs /home/koutheir/PhD/VMKit/vmkit_stale_ref/tests/minimal.xargs
-framework call j3.J3Mgr resetReferencesToBundle ijvm.tests.AImpl
+framework call j3.J3Mgr setBundleStaleReferenceCorrected ijvm.tests.AImpl yes
+framework call j3.J3Mgr setBundleStaleReferenceCorrected ijvm.tests.BImpl yes
+framework call j3.J3Mgr setBundleStaleReferenceCorrected ijvm.tests.CImpl yes
+stop 12
+stop 13
+stop 14
-framework call j3.J3Mgr resetReferencesToBundle ijvm.tests.Runner
+start 12 13 14
+stop 12
-framework meminfo -gc
+framework call j3.J3Mgr isBundleStaleReferenceCorrected 39
+framework call j3.J3Mgr setBundleStaleReferenceCorrected 8 yes
-bundles
-start 18
+call j3.J3Mgr dumpClassLoaderBundles
-framework call j3.J3Mgr dumpClassLoaderBundles
+enter framework
+stop 8
+uninstall 8
+refresh
+meminfo -gc
+call j3.J3Mgr setBundleStaleReferenceCorrected 8 yes
+call j3.J3Mgr dumpReferencesToObject 0x51934ab4
Modified: vmkit/trunk/incinerator/tests/ijvm.tests.AImpl/src/ijvm/tests/AImpl/AImpl.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/ijvm.tests.AImpl/src/ijvm/tests/AImpl/AImpl.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/ijvm.tests.AImpl/src/ijvm/tests/AImpl/AImpl.java (original)
+++ vmkit/trunk/incinerator/tests/ijvm.tests.AImpl/src/ijvm/tests/AImpl/AImpl.java Thu Apr 25 12:18:47 2013
@@ -1,11 +1,21 @@
package ijvm.tests.AImpl;
+import java.util.ArrayList;
+
import ijvm.tests.A.A;
import ijvm.tests.A.Token;
+import ijvm.tests.C.C;
public class AImpl
implements A
{
+ public ArrayList<C> c;
+
+ public AImpl()
+ {
+ c = new ArrayList<C>();
+ }
+
public void performA()
{
System.out.println("AImpl.performA");
Modified: vmkit/trunk/incinerator/tests/ijvm.tests.AImpl/src/ijvm/tests/AImpl/Activator.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/ijvm.tests.AImpl/src/ijvm/tests/AImpl/Activator.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/ijvm.tests.AImpl/src/ijvm/tests/AImpl/Activator.java (original)
+++ vmkit/trunk/incinerator/tests/ijvm.tests.AImpl/src/ijvm/tests/AImpl/Activator.java Thu Apr 25 12:18:47 2013
@@ -1,7 +1,5 @@
package ijvm.tests.AImpl;
-import java.util.ArrayList;
-
import ijvm.tests.A.A;
import ijvm.tests.C.C;
@@ -16,33 +14,27 @@ public class Activator
{
private BundleContext context;
private ServiceTracker cST;
- private ArrayList<C> c;
- private A a;
-
- public Activator()
- {
- c = new ArrayList<C>();
- }
+ private AImpl a;
public void start(BundleContext bundleContext) throws Exception
{
System.out.println("AImpl provides A");
context = bundleContext;
+ a = new AImpl();
+
cST = new ServiceTracker(context, C.class.getName(), null);
cST.open();
-
+
C service = (C)cST.getService();
if (service != null) {
System.out.println("AImpl got C @ startup");
- c.add(service);
+ a.c.add(service);
this.registerMyself();
}
context.addServiceListener(this, "(objectclass=" + C.class.getName() + ")");
-
- a = new AImpl();
context.registerService(A.class.getName(), a, null);
}
@@ -69,7 +61,7 @@ public class Activator
case ServiceEvent.REGISTERED:
if (C.class.isInstance(service)) {
System.out.println("AImpl got C");
- c.add((C)service);
+ a.c.add((C)service);
this.registerMyself();
}
@@ -85,7 +77,7 @@ public class Activator
private void registerMyself()
{
- C oneC = c.get(c.size() - 1);
+ C oneC = a.c.get(a.c.size() - 1);
oneC.registerObject(this);
}
Modified: vmkit/trunk/incinerator/tests/ijvm.tests.BImpl/src/ijvm/tests/BImpl/Activator.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/ijvm.tests.BImpl/src/ijvm/tests/BImpl/Activator.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/ijvm.tests.BImpl/src/ijvm/tests/BImpl/Activator.java (original)
+++ vmkit/trunk/incinerator/tests/ijvm.tests.BImpl/src/ijvm/tests/BImpl/Activator.java Thu Apr 25 12:18:47 2013
@@ -18,21 +18,15 @@ public class Activator
private BundleContext context;
private ServiceTracker aST;
- private ArrayList<A> a;
- private ArrayList<Token> tokens;
private BImpl b;
- public Activator()
- {
- a = new ArrayList<A>();
- tokens = new ArrayList<Token>();
- }
-
public void start(BundleContext bundleContext) throws Exception
{
System.out.println("BImpl exports and provides B");
context = bundleContext;
+ b = new BImpl();
+
aST = new ServiceTracker(context, A.class.getName(), null);
aST.open();
@@ -40,13 +34,11 @@ public class Activator
if (service != null) {
System.out.println("BImpl got A @ startup");
- a.add(service);
+ b.a.add(service);
this.useA();
}
context.addServiceListener(this, "(objectclass=" + A.class.getName() + ")");
-
- b = new BImpl();
context.registerService(B.class.getName(), b, null);
}
@@ -73,7 +65,7 @@ public class Activator
case ServiceEvent.REGISTERED:
if (A.class.isInstance(service)) {
System.out.println("BImpl got A");
- a.add((A)service);
+ b.a.add((A)service);
this.useA();
}
@@ -89,11 +81,11 @@ public class Activator
private void useA()
{
- A oneA = a.get(a.size() - 1);
+ A oneA = b.a.get(b.a.size() - 1);
Token token = oneA.getToken();
token.getValue();
- tokens.add(token);
+ b.tokens.add(token);
System.out.println("BImpl got Token from A");
}
Modified: vmkit/trunk/incinerator/tests/ijvm.tests.BImpl/src/ijvm/tests/BImpl/BImpl.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/ijvm.tests.BImpl/src/ijvm/tests/BImpl/BImpl.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/ijvm.tests.BImpl/src/ijvm/tests/BImpl/BImpl.java (original)
+++ vmkit/trunk/incinerator/tests/ijvm.tests.BImpl/src/ijvm/tests/BImpl/BImpl.java Thu Apr 25 12:18:47 2013
@@ -1,10 +1,23 @@
package ijvm.tests.BImpl;
+import java.util.ArrayList;
+
+import ijvm.tests.A.A;
+import ijvm.tests.A.Token;
import ijvm.tests.B.B;
public class BImpl
implements B
{
+ public ArrayList<A> a;
+ public ArrayList<Token> tokens;
+
+ public BImpl()
+ {
+ a = new ArrayList<A>();
+ tokens = new ArrayList<Token>();
+ }
+
public void performB()
{
System.out.println("BImpl.performB");
Modified: vmkit/trunk/incinerator/tests/ijvm.tests.BundleMgmtStress/src/ijvm/tests/BundleMgmtStress/Activator.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/ijvm.tests.BundleMgmtStress/src/ijvm/tests/BundleMgmtStress/Activator.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/ijvm.tests.BundleMgmtStress/src/ijvm/tests/BundleMgmtStress/Activator.java (original)
+++ vmkit/trunk/incinerator/tests/ijvm.tests.BundleMgmtStress/src/ijvm/tests/BundleMgmtStress/Activator.java Thu Apr 25 12:18:47 2013
@@ -12,11 +12,12 @@ public class Activator
implements BundleActivator, Runnable
{
static final boolean correctStaleReferences = false;
+ static final String targetBundle = "file:///home/koutheir/PhD/VMKit/knopflerfish/osgi/jars/http/http_all-3.1.2.jar";
+ static final long firstBundleID = 8;
BundleContext context;
Thread worker;
- boolean cancelWork;
- long firstBundleID;
+ volatile boolean cancelWork;
ServiceTracker j3mgrST;
J3Mgr j3mgr;
long loopCount;
@@ -28,11 +29,12 @@ public class Activator
j3mgrST = new ServiceTracker(context, J3Mgr.class.getName(), null);
j3mgrST.open();
j3mgr = (J3Mgr)j3mgrST.getService();
- if (j3mgr == null)
- throw new BundleException("J3 Management service must be started before this service.");
+ if (j3mgr == null) {
+ throw new BundleException(
+ "J3 Management service must be started before this service.");
+ }
loopCount = 0;
- firstBundleID = 13;
cancelWork = false;
worker = new Thread(this, "Stresser");
@@ -41,11 +43,13 @@ public class Activator
public void stop(BundleContext bundleContext) throws Exception
{
- cancelWork = true;
-
- if (worker != null) {
- worker.join();
- worker = null;
+ if (!cancelWork) {
+ cancelWork = true;
+
+ if (worker != null) {
+ worker.join();
+ worker = null;
+ }
}
System.out.println("Bundle reinstallation count: " + loopCount);
@@ -55,41 +59,60 @@ public class Activator
public void run()
{
System.out.println("Bundle management stress running...");
+ try {
+ Thread.sleep(2000);
+ } catch (Exception e) {}
try {
uninstallBundle(context.getBundle(firstBundleID));
-
+
while (!cancelWork) {
- Bundle bundle = context.installBundle("file:///home/koutheir/PhD/VMKit/vmkit/incinerator/tests/plugins/ijvm.tests.AImpl_1.0.0.jar");
+ Bundle bundle = context.installBundle(targetBundle);
bundle.start();
- Thread.sleep(20);
-
- System.out.println("Bundle started: " + bundle.getBundleId());
-
+ Thread.sleep(100);
+
uninstallBundle(bundle);
}
- } catch (Exception e) {
+ } catch (Throwable e) {
+ cancelWork = true;
e.printStackTrace();
}
System.out.println("Bundle management stress done.");
- }
-
- void uninstallBundle(Bundle bundle)
- {
+
try {
- if (correctStaleReferences) {
- j3mgr.resetReferencesToBundle(bundle);
- } else {
- bundle.stop();
- bundle.uninstall();
- }
+ cancelWork = true;
+ Bundle thisBundle = context.getBundle();
+ int currentState = thisBundle.getState();
- loopCount++;
-
- System.gc();
- } catch (Exception e) {
+ if (currentState == Bundle.ACTIVE ||
+ currentState == Bundle.STARTING) {
+ thisBundle.stop();
+ }
+ worker = null;
+ } catch (BundleException e) {
e.printStackTrace();
}
}
+
+ void uninstallBundle(Bundle bundle) throws Throwable
+ {
+ if (bundle == null) return;
+
+ try {
+ j3mgr.setBundleStaleReferenceCorrected(
+ bundle.getBundleId(), correctStaleReferences);
+ } catch (UnsatisfiedLinkError e) {
+ if (correctStaleReferences)
+ throw e;
+ }
+
+ bundle.stop();
+ bundle.uninstall();
+ System.out.println("Uninstalled: bundleID=" + bundle.getBundleId());
+
+ loopCount++;
+
+ System.gc();
+ }
}
Modified: vmkit/trunk/incinerator/tests/ijvm.tests.CImpl/src/ijvm/tests/CImpl/Activator.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/ijvm.tests.CImpl/src/ijvm/tests/CImpl/Activator.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/ijvm.tests.CImpl/src/ijvm/tests/CImpl/Activator.java (original)
+++ vmkit/trunk/incinerator/tests/ijvm.tests.CImpl/src/ijvm/tests/CImpl/Activator.java Thu Apr 25 12:18:47 2013
@@ -1,7 +1,5 @@
package ijvm.tests.CImpl;
-import java.util.ArrayList;
-
import ijvm.tests.B.B;
import ijvm.tests.C.C;
@@ -17,19 +15,15 @@ public class Activator
private BundleContext context;
private ServiceTracker bST;
- private ArrayList<B> b;
private CImpl c;
-
- public Activator()
- {
- b = new ArrayList<B>();
- }
public void start(BundleContext bundleContext) throws Exception
{
System.out.println("CImpl exports and provides C");
context = bundleContext;
+ c = new CImpl();
+
bST = new ServiceTracker(context, B.class.getName(), null);
bST.open();
@@ -37,12 +31,10 @@ public class Activator
if (service != null) {
System.out.println("CImpl got B @ startup");
- b.add(service);
+ c.b.add(service);
}
context.addServiceListener(this, "(objectclass=" + B.class.getName() + ")");
-
- c = new CImpl();
context.registerService(C.class.getName(), c, null);
}
@@ -69,7 +61,7 @@ public class Activator
case ServiceEvent.REGISTERED:
if (B.class.isInstance(service)) {
System.out.println("CImpl got B");
- b.add((B)service);
+ c.b.add((B)service);
}
break;
Modified: vmkit/trunk/incinerator/tests/ijvm.tests.CImpl/src/ijvm/tests/CImpl/CImpl.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/ijvm.tests.CImpl/src/ijvm/tests/CImpl/CImpl.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/ijvm.tests.CImpl/src/ijvm/tests/CImpl/CImpl.java (original)
+++ vmkit/trunk/incinerator/tests/ijvm.tests.CImpl/src/ijvm/tests/CImpl/CImpl.java Thu Apr 25 12:18:47 2013
@@ -2,15 +2,18 @@ package ijvm.tests.CImpl;
import java.util.ArrayList;
+import ijvm.tests.B.B;
import ijvm.tests.C.C;
public class CImpl
implements C
{
ArrayList<Object> registeredObjects;
+ public ArrayList<B> b;
CImpl()
{
+ b = new ArrayList<B>();
registeredObjects = new ArrayList<Object>();
}
Modified: vmkit/trunk/incinerator/tests/ijvm.tests.DImpl/src/ijvm/tests/DImpl/Activator.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/ijvm.tests.DImpl/src/ijvm/tests/DImpl/Activator.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/ijvm.tests.DImpl/src/ijvm/tests/DImpl/Activator.java (original)
+++ vmkit/trunk/incinerator/tests/ijvm.tests.DImpl/src/ijvm/tests/DImpl/Activator.java Thu Apr 25 12:18:47 2013
@@ -1,7 +1,5 @@
package ijvm.tests.DImpl;
-import java.util.ArrayList;
-
import ijvm.tests.C.C;
import ijvm.tests.D.D;
@@ -17,19 +15,15 @@ public class Activator
private BundleContext context;
private ServiceTracker cST;
- private ArrayList<C> c;
private DImpl d;
- public Activator()
- {
- c = new ArrayList<C>();
- }
-
public void start(BundleContext bundleContext) throws Exception
{
System.out.println("DImpl exports and provides D");
context = bundleContext;
+ d = new DImpl();
+
cST = new ServiceTracker(context, C.class.getName(), null);
cST.open();
@@ -37,12 +31,10 @@ public class Activator
if (service != null) {
System.out.println("DImpl got C @ startup");
- c.add(service);
+ d.c.add(service);
}
context.addServiceListener(this, "(objectclass=" + C.class.getName() + ")");
-
- d = new DImpl();
context.registerService(D.class.getName(), d, null);
}
@@ -69,7 +61,7 @@ public class Activator
case ServiceEvent.REGISTERED:
if (C.class.isInstance(service)) {
System.out.println("DImpl got C");
- c.add((C)service);
+ d.c.add((C)service);
}
break;
Modified: vmkit/trunk/incinerator/tests/ijvm.tests.DImpl/src/ijvm/tests/DImpl/DImpl.java
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/ijvm.tests.DImpl/src/ijvm/tests/DImpl/DImpl.java?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/ijvm.tests.DImpl/src/ijvm/tests/DImpl/DImpl.java (original)
+++ vmkit/trunk/incinerator/tests/ijvm.tests.DImpl/src/ijvm/tests/DImpl/DImpl.java Thu Apr 25 12:18:47 2013
@@ -1,10 +1,20 @@
package ijvm.tests.DImpl;
+import java.util.ArrayList;
+
+import ijvm.tests.C.C;
import ijvm.tests.D.D;
public class DImpl
implements D
{
+ public ArrayList<C> c;
+
+ public DImpl()
+ {
+ c = new ArrayList<C>();
+ }
+
public void performD()
{
System.out.println("DImpl.performB");
Modified: vmkit/trunk/incinerator/tests/minimal.xargs
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/incinerator/tests/minimal.xargs?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/incinerator/tests/minimal.xargs (original)
+++ vmkit/trunk/incinerator/tests/minimal.xargs Thu Apr 25 12:18:47 2013
@@ -1,46 +1,51 @@
--Dorg.knopflerfish.framework.main.verbosity=0
+#-Dorg.knopflerfish.framework.bundlestorage=memory
+-Dorg.knopflerfish.framework.system.export.all_13=false
+-Dorg.knopflerfish.framework.verbosity=0
-Forg.knopflerfish.framework.debug.errors=true
-Forg.knopflerfish.framework.debug.packages=false
-Forg.knopflerfish.framework.debug.classloader=false
--Forg.knopflerfish.framework.debug.permissions=false
+#-Forg.knopflerfish.framework.debug.permissions=false
--Forg.osgi.framework.system.packages.extra=
+#-Forg.osgi.framework.system.packages.extra=
--Dhttp.proxyHost=goodway
--Dhttp.proxyPort=3128
+-Forg.knopflerfish.http.dnslookup=true
+-Forg.osgi.service.http.port=8080
--Dosgi.signedcontent.support=true
--Forg.osgi.framework.security=osgi
--Forg.knopflerfish.framework.all_signed=false
--Djava.security.policy=file:///home/koutheir/PhD/VMKit/vmkit/incinerator/tests/java-grant-all.policy
+#-Dhttp.proxyHost=proxy
+#-Dhttp.proxyPort=3128
--Dorg.knopflerfish.gosg.jars=file:jars/;file:///home/koutheir/PhD/VMKit/vmkit/incinerator/tests/plugins/
+#-Forg.knopflerfish.framework.all_signed=false
+
+-Dorg.knopflerfish.gosg.jars=file:///home/koutheir/PhD/VMKit/knopflerfish/osgi/jars/;file:///home/koutheir/PhD/VMKit/vmkit/incinerator/tests/plugins/
-Forg.knopflerfish.startlevel.use=true
-init
--install log/log_all-3.1.2.jar
+-install log/log_all-3.1.3.jar
-install cm/cm_all-3.0.4.jar
-install util/util-2.0.1.jar
--istart console/console_all-3.0.3.jar
--istart frameworkcommands/frameworkcommands-3.1.0.jar
+-istart console/console_all-3.0.4.jar
+-istart frameworkcommands/frameworkcommands-3.2.0.jar
-istart logcommands/logcommands-3.1.1.jar
-istart cm_cmd/cm_cmd-3.0.2.jar
-istart consoletty/consoletty-3.0.1.jar
+-istart useradmin/useradmin_api-3.0.3.jar
+-istart util/util-2.0.1.jar
+-install jsdk/jsdk_api-2.5.0.kf3-2.jar
-launch
-istart j3mgr_1.0.0.jar
--istart ijvm.tests.A_1.0.0.jar
--istart ijvm.tests.C_1.0.0.jar
--istart ijvm.tests.AImpl_1.0.0.jar
--istart ijvm.tests.BImpl_1.0.0.jar
--istart ijvm.tests.CImpl_1.0.0.jar
--istart ijvm.tests.DImpl_1.0.0.jar
+-install ijvm.tests.A_1.0.0.jar
+-install ijvm.tests.C_1.0.0.jar
+-install ijvm.tests.AImpl_1.0.0.jar
+-install ijvm.tests.BImpl_1.0.0.jar
+-install ijvm.tests.CImpl_1.0.0.jar
+-install ijvm.tests.DImpl_1.0.0.jar
-install ijvm.tests.Runner_1.0.0.jar
--install ijvm.tests.BundleMgmtStress_1.0.0.jar
+-install BundleReloader-1.0.0.jar
Modified: vmkit/trunk/lib/j3/ClassLib/GNUClasspath/ClasspathReflect.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/ClassLib/GNUClasspath/ClasspathReflect.h?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/ClassLib/GNUClasspath/ClasspathReflect.h (original)
+++ vmkit/trunk/lib/j3/ClassLib/GNUClasspath/ClasspathReflect.h Thu Apr 25 12:18:47 2013
@@ -214,7 +214,7 @@ public:
};
class JavaObjectVMThread : public JavaObject {
-private:
+public:
JavaObject* thread;
bool running;
JavaThread* vmdata;
@@ -232,8 +232,6 @@ public:
}
static JavaThread* getVmdata(JavaObjectVMThread* vmthread) {return vmthread->vmdata;}
-
- friend std::ostream& operator << (std::ostream&, JavaObjectVMThread&);
};
Modified: vmkit/trunk/lib/j3/ClassLib/OpenJDK/ClasspathReflect.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/ClassLib/OpenJDK/ClasspathReflect.h?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/ClassLib/OpenJDK/ClasspathReflect.h (original)
+++ vmkit/trunk/lib/j3/ClassLib/OpenJDK/ClasspathReflect.h Thu Apr 25 12:18:47 2013
@@ -29,7 +29,6 @@ namespace j3 {
class JavaObjectVMThread : public JavaObject {
private:
JavaThread* vmdata;
- friend std::ostream& operator << (std::ostream&, JavaObjectVMThread&);
};
class JavaObjectClass : public JavaObject {
@@ -111,7 +110,7 @@ public:
UserCommonClass * cl = getClass(obj);
if (cl) {
JavaObject** Obj = cl->classLoader->getJavaClassLoaderPtr();
- if (*Obj) vmkit::Collector::markAndTraceRoot(Obj, Obj, closure);
+ if (*Obj) vmkit::Collector::markAndTraceRoot(obj, Obj, closure);
}
}
Modified: vmkit/trunk/lib/j3/Compiler/JavaJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/Compiler/JavaJIT.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/Compiler/JavaJIT.cpp (original)
+++ vmkit/trunk/lib/j3/Compiler/JavaJIT.cpp Thu Apr 25 12:18:47 2013
@@ -686,7 +686,7 @@ void JavaJIT::monitorEnter(Value* obj) {
BranchInst::Create(OK, NotOK, cmp, currentBlock);
- // The atomic cast did not work.
+ // The atomic CAS did not work.
currentBlock = NotOK;
CallInst::Create(intrinsics->AquireObjectFunction, obj, "", currentBlock);
BranchInst::Create(OK, currentBlock);
Modified: vmkit/trunk/lib/j3/VMCore/JavaArray.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JavaArray.h?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JavaArray.h (original)
+++ vmkit/trunk/lib/j3/VMCore/JavaArray.h Thu Apr 25 12:18:47 2013
@@ -45,6 +45,8 @@ public:
/// in JnJVM code. The size should be set to zero, but this is invalid C99.
T elements[1];
+ typedef T ElementType;
+
public:
static int32_t getSize(const TJavaArray* self) __attribute__((always_inline)) {
llvm_gcroot(self, 0);
Modified: vmkit/trunk/lib/j3/VMCore/JavaClass.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JavaClass.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JavaClass.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/JavaClass.cpp Thu Apr 25 12:18:47 2013
@@ -2335,13 +2335,13 @@ void JavaField::setStaticField(JavaObjec
FieldSetter<JavaObject*>::setStaticField(this, val);
}
+std::ostream& j3::operator << (std::ostream& os, const CommonClass& ccl)
+{
+ os << *ccl.name;
+ return (!ccl.super) ? (os << ';') : (os << ':' << *ccl.super);
+}
+
void CommonClass::dump() const
{
- cerr << *name;
- if (!super)
- cerr << ';' << endl;
- else {
- cerr << ':';
- super->dump();
- }
+ cerr << *this << endl;
}
Modified: vmkit/trunk/lib/j3/VMCore/JavaClass.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JavaClass.h?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JavaClass.h (original)
+++ vmkit/trunk/lib/j3/VMCore/JavaClass.h Thu Apr 25 12:18:47 2013
@@ -399,6 +399,7 @@ public:
bool doClinit);
void dump() const __attribute__((noinline));
+ friend std::ostream& operator << (std::ostream& os, const CommonClass& ccl);
};
/// ClassPrimitive - This class represents internal classes for primitive
Modified: vmkit/trunk/lib/j3/VMCore/JavaObject.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JavaObject.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JavaObject.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/JavaObject.cpp Thu Apr 25 12:18:47 2013
@@ -15,6 +15,7 @@
#include "JavaClass.h"
#include "JavaObject.h"
#include "JavaThread.h"
+#include "JavaString.h"
#include "JavaTypes.h"
#include "JavaUpcalls.h"
#include "Jnjvm.h"
@@ -381,26 +382,12 @@ bool JavaObject::instanceOf(JavaObject*
else return getClass(self)->isSubclassOf(cl);
}
-std::ostream& j3::operator << (std::ostream& os, JavaObjectVMThread& threadObj)
-{
- JavaObject *obj = &threadObj;
- llvm_gcroot(obj, 0);
-
- for (int retries = 10; (!threadObj.vmdata) && (retries >= 0); --retries)
- usleep(100);
-
- if (threadObj.vmdata != NULL)
- os << *threadObj.vmdata;
-
- return os;
-}
-
std::ostream& j3::operator << (std::ostream& os, const JavaObject& obj)
{
JavaObject* javaLoader = NULL;
- JavaObject *o = const_cast<JavaObject*>(&obj);
+ const JavaString* threadNameObj = NULL;
llvm_gcroot(javaLoader, 0);
- llvm_gcroot(o, 0);
+ llvm_gcroot(threadNameObj, 0);
if (VMClassLoader::isVMClassLoader(&obj)) {
JnjvmClassLoader* loader = ((const VMClassLoader&)obj).getClassLoader();
@@ -422,9 +409,28 @@ std::ostream& j3::operator << (std::ostr
')';
} else {
CommonClass* ccl = JavaObject::getClass(&obj);
- os << &obj <<
- "(class=" << *ccl->name <<
- ')';
+ Jnjvm* vm = ccl->classLoader->getJVM();
+
+ os << &obj << "(class=" << *ccl;
+
+ if (ccl == vm->upcalls->newThread) {
+ threadNameObj = static_cast<const JavaString*>(
+ vm->upcalls->threadName->getInstanceObjectField(
+ const_cast<JavaObject*>(&obj)));
+
+ char *threadName = JavaString::strToAsciiz(threadNameObj);
+ os << ",name=\"" << threadName << '\"';
+ delete [] threadName;
+ } else if (ccl == vm->upcalls->newVMThread) {
+ const JavaObjectVMThread& vmthObj = (const JavaObjectVMThread&)obj;
+ for (int retries = 10; (!vmthObj.vmdata) && (retries >= 0); --retries)
+ usleep(100);
+
+ if (const JavaObject* thObj = vmthObj.vmdata->currentThread())
+ os << ",thread=" << *thObj;
+ }
+
+ os << ')';
}
return os;
Modified: vmkit/trunk/lib/j3/VMCore/JavaObject.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JavaObject.h?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JavaObject.h (original)
+++ vmkit/trunk/lib/j3/VMCore/JavaObject.h Thu Apr 25 12:18:47 2013
@@ -246,11 +246,8 @@ public:
/// operator new - Optimized operator new for VT based objects
///
void* operator new(size_t sz, VirtualTable *VT) {
- gc* obj = NULL;
- llvm_gcroot(obj, 0);
- obj = (gc*) VTgcmallocUnresolved(sz, VT);
- return obj;
- }
+ return VTgcmallocUnresolved(sz, VT);
+ }
/// getVirtualTable - Returns the java virtual table of this object.
///
Modified: vmkit/trunk/lib/j3/VMCore/JavaString.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JavaString.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JavaString.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/JavaString.cpp Thu Apr 25 12:18:47 2013
@@ -34,7 +34,7 @@ JavaString* JavaString::create(const Arr
return res;
}
-char* JavaString::strToAsciiz(JavaString* self) {
+char* JavaString::strToAsciiz(const JavaString* self) {
const ArrayUInt16* value = NULL;
llvm_gcroot(self, 0);
llvm_gcroot(value, 0);
@@ -47,7 +47,7 @@ char* JavaString::strToAsciiz(JavaString
return buf;
}
-char* JavaString::strToAsciiz(JavaString* self,
+char* JavaString::strToAsciiz(const JavaString* self,
vmkit::ThreadAllocator* allocator) {
const ArrayUInt16* value = NULL;
llvm_gcroot(self, 0);
Modified: vmkit/trunk/lib/j3/VMCore/JavaString.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JavaString.h?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JavaString.h (original)
+++ vmkit/trunk/lib/j3/VMCore/JavaString.h Thu Apr 25 12:18:47 2013
@@ -56,8 +56,8 @@ class JavaString : public JavaObject {
///
static JavaString* internalToJava(const UTF8* utf8, Jnjvm* vm);
- static char* strToAsciiz(JavaString* self);
- static char* strToAsciiz(JavaString* self, vmkit::ThreadAllocator* allocator);
+ static char* strToAsciiz(const JavaString* self);
+ static char* strToAsciiz(const JavaString* self, vmkit::ThreadAllocator* allocator);
static const ArrayUInt16* strToArray(JavaString* self, Jnjvm* vm);
/// javaToInternal - Replaces all '/' into '.'.
Modified: vmkit/trunk/lib/j3/VMCore/JavaThread.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JavaThread.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JavaThread.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/JavaThread.cpp Thu Apr 25 12:18:47 2013
@@ -171,24 +171,7 @@ void JNILocalReferences::removeJNIRefere
std::ostream& j3::operator << (std::ostream& os, const JavaThread& thread)
{
- JavaObject* jThread = NULL;
- JavaString* threadNameObj = NULL;
- llvm_gcroot(jThread, 0);
- llvm_gcroot(threadNameObj, 0);
-
- os << '[' << (void*)(&thread);
-
- Jnjvm* vm = thread.getJVM();
- jThread = thread.currentThread();
- if (vm && jThread) {
- threadNameObj = static_cast<JavaString*>(
- vm->upcalls->threadName->getInstanceObjectField(jThread));
- char *threadName = JavaString::strToAsciiz(threadNameObj);
- os << '(' << threadName << ')';
- delete [] threadName;
- }
-
- return os << ']';
+ return os << *thread.currentThread();
}
void JavaThread::dump() const
Modified: vmkit/trunk/lib/j3/VMCore/Jnjvm.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/Jnjvm.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/Jnjvm.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/Jnjvm.cpp Thu Apr 25 12:18:47 2013
@@ -8,6 +8,7 @@
//===----------------------------------------------------------------------===//
#define JNJVM_LOAD 1
+#define DEBUG_VERBOSE_STALE_REF 1
#include <cfloat>
#include <climits>
@@ -1351,7 +1352,7 @@ Jnjvm::Jnjvm(vmkit::BumpPtrAllocator& Al
JnjvmBootstrapLoader* loader) :
VirtualMachine(Alloc, frames), lockSystem(Alloc)
#if RESET_STALE_REFERENCES
- , scanStaleReferences(false)
+ , scanStaleReferences(false), findReferencesToObject(NULL)
#endif
{
@@ -1391,6 +1392,20 @@ void Jnjvm::startCollection() {
fflush(stdout);
#endif
+#if RESET_STALE_REFERENCES
+
+#if DEBUG_VERBOSE_STALE_REF
+
+ if (scanStaleReferences)
+ std::cerr << "Looking for stale references..." << std::endl;
+
+#endif
+
+ if (findReferencesToObject != NULL)
+ foundReferencerObjects.clear();
+
+#endif
+
finalizerThread->FinalizationQueueLock.acquire();
referenceThread->ToEnqueueLock.acquire();
referenceThread->SoftReferencesQueue.acquire();
@@ -1401,9 +1416,16 @@ void Jnjvm::startCollection() {
void Jnjvm::endCollectionBeforeUnlockingWorld()
{
#if RESET_STALE_REFERENCES
+#if DEBUG_VERBOSE_STALE_REF
+
+ if (scanStaleReferences)
+ std::cerr << "Looking for stale references done." << std::endl;
+
+#endif
// Stale references can no more exist, until a bundle is uninstalled later.
scanStaleReferences = false;
+ findReferencesToObject = NULL;
#endif
}
Modified: vmkit/trunk/lib/j3/VMCore/Jnjvm.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/Jnjvm.h?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/Jnjvm.h (original)
+++ vmkit/trunk/lib/j3/VMCore/Jnjvm.h Thu Apr 25 12:18:47 2013
@@ -368,9 +368,12 @@ public:
#if RESET_STALE_REFERENCES
public:
- void resetReferencesToBundle(int64_t bundleID);
- virtual void resetReferenceIfStale(const void* source, void** ref);
+ void setBundleStaleReferenceCorrected(int64_t bundleID, bool corrected);
+ bool isBundleStaleReferenceCorrected(int64_t bundleID);
void dumpClassLoaderBundles();
+ class ArrayLong* getReferencesToObject(const JavaObject* obj);
+
+ void notifyBundleUninstalled(int64_t bundleID);
int64_t getClassLoaderBundleID(JnjvmClassLoader* loader);
JnjvmClassLoader* getBundleClassLoader(int64_t bundleID);
@@ -378,6 +381,8 @@ public:
typedef std::map<int64_t, JnjvmClassLoader*> bundleClassLoadersType;
+ virtual void resetReferenceIfStale(const void* source, void** ref);
+
protected:
void resetReferenceIfStale(const JavaObject *source, class VMClassLoader** ref);
void resetReferenceIfStale(const JavaObject *source, class VMStaticInstance** ref);
@@ -387,6 +392,8 @@ protected:
vmkit::LockRecursive bundleClassLoadersLock;
bundleClassLoadersType bundleClassLoaders;
volatile bool scanStaleReferences;
+ const JavaObject* findReferencesToObject;
+ std::vector<const JavaObject*> foundReferencerObjects;
#endif
};
Modified: vmkit/trunk/lib/j3/VMCore/JnjvmClassLoader.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JnjvmClassLoader.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JnjvmClassLoader.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/JnjvmClassLoader.cpp Thu Apr 25 12:18:47 2013
@@ -215,7 +215,7 @@ JnjvmBootstrapLoader::JnjvmBootstrapLoad
JnjvmClassLoader::JnjvmClassLoader(vmkit::BumpPtrAllocator& Alloc) :
allocator(Alloc)
#if RESET_STALE_REFERENCES
- ,zombie(false)
+ ,staleRefCorrected(false), zombie(false)
#endif
{
}
@@ -225,7 +225,7 @@ JnjvmClassLoader::JnjvmClassLoader(vmkit
VMClassLoader* vmdata,
Jnjvm* VM) : allocator(Alloc)
#if RESET_STALE_REFERENCES
- , zombie(false)
+ ,staleRefCorrected(false), zombie(false)
#endif
{
llvm_gcroot(loader, 0);
Modified: vmkit/trunk/lib/j3/VMCore/JnjvmClassLoader.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JnjvmClassLoader.h?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JnjvmClassLoader.h (original)
+++ vmkit/trunk/lib/j3/VMCore/JnjvmClassLoader.h Thu Apr 25 12:18:47 2013
@@ -332,13 +332,14 @@ public:
#if RESET_STALE_REFERENCES
protected:
- // A zombie class loader is one whose defining bundle was uninstalled, but it is
- // still loaded because some references to it still exist in memory.
+ bool staleRefCorrected;
bool zombie;
public:
bool isZombie() const {return zombie;}
void markZombie(bool becomeZombie = true) {zombie = becomeZombie;}
+ bool isStaleReferencesCorrectionEnabled() {return staleRefCorrected;}
+ void setStaleReferencesCorrectionEnabled(bool enable) {staleRefCorrected = enable;}
// This bridges the OSGi world (bundles) to the Java world (class loaders).
int64_t getAssociatedBundleID();
Modified: vmkit/trunk/lib/j3/VMCore/JnjvmIntOSGi.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JnjvmIntOSGi.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JnjvmIntOSGi.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/JnjvmIntOSGi.cpp Thu Apr 25 12:18:47 2013
@@ -1,19 +1,69 @@
#include <algorithm>
#include <iostream>
+#include <sstream>
#include "VmkitGC.h"
#include "Jnjvm.h"
#include "ClasspathReflect.h"
+#include "JavaUpcalls.h"
#include "j3/jni.h"
+#include "JavaArray.h"
using namespace std;
#if RESET_STALE_REFERENCES
+#define DEBUG_VERBOSE_STALE_REF 1
+
namespace j3 {
+void Jnjvm::setBundleStaleReferenceCorrected(int64_t bundleID, bool corrected)
+{
+ JnjvmClassLoader* loader = this->getBundleClassLoader(bundleID);
+ if (!loader) {
+ this->illegalArgumentException("Invalid bundle ID"); return;}
+
+#if DEBUG_VERBOSE_STALE_REF
+ cerr << "Stale references to bundleID=" << bundleID << " are ";
+ if (corrected)
+ cerr << "corrected." << endl;
+ else
+ cerr << "no more corrected." << endl;
+#endif
+
+ loader->setStaleReferencesCorrectionEnabled(corrected);
+}
+
+bool Jnjvm::isBundleStaleReferenceCorrected(int64_t bundleID)
+{
+ JnjvmClassLoader* loader = this->getBundleClassLoader(bundleID);
+ if (!loader) {
+ this->illegalArgumentException("Invalid bundle ID"); return false;}
+
+ return loader->isStaleReferencesCorrectionEnabled();
+}
+
+void Jnjvm::notifyBundleUninstalled(int64_t bundleID)
+{
+ JnjvmClassLoader* loader = this->getBundleClassLoader(bundleID);
+ if (!loader) return;
+
+ if (!loader->isStaleReferencesCorrectionEnabled()) return;
+
+ // Mark this class loader as a zombie.
+ // Strong references to all its loaded classes will be reset in the next garbage collection.
+ loader->markZombie(true);
+
+#if DEBUG_VERBOSE_STALE_REF
+ cerr << "Bundle uninstalled: bundleID=" << bundleID << endl;
+#endif
+
+ scanStaleReferences = true; // Enable stale references scanning
+ vmkit::Collector::collect(); // Start a garbage collection now
+}
+
void Jnjvm::dumpClassLoaderBundles()
{
for (bundleClassLoadersType::const_iterator i = bundleClassLoaders.begin(), e = bundleClassLoaders.end(); i != e; ++i) {
@@ -21,6 +71,25 @@ void Jnjvm::dumpClassLoaderBundles()
}
}
+ArrayLong* Jnjvm::getReferencesToObject(const JavaObject* obj)
+{
+ if (!obj) return NULL;
+
+ findReferencesToObject = obj;
+ vmkit::Collector::collect();
+
+ size_t count = foundReferencerObjects.size();
+ ArrayLong* r = static_cast<ArrayLong*>(upcalls->ArrayOfLong->doNew(count, this));
+ if (!r) {this->outOfMemoryError(); return r;}
+
+ ArrayLong::ElementType* elements = ArrayLong::getElements(r);
+ for (size_t i=0; i < count; ++i) {
+ elements[i] = reinterpret_cast<ArrayLong::ElementType>(foundReferencerObjects[i]);
+ }
+
+ return r;
+}
+
JnjvmClassLoader* Jnjvm::getBundleClassLoader(int64_t bundleID)
{
if (bundleID == -1) return NULL;
@@ -84,18 +153,35 @@ extern "C" void Java_j3_vm_OSGi_associat
#endif
}
-/*
- The VM manager bundle calls this method to reset all references to a given bundle. This enables
- resetting stale references that would otherwise prohibit the bundle from being unloaded from
- memory due to some stale references.
-*/
-extern "C" void Java_j3_vm_OSGi_resetReferencesToBundle(jlong bundleID)
+extern "C" void Java_j3_vm_OSGi_notifyBundleUninstalled(jlong bundleID)
+{
+#if RESET_STALE_REFERENCES
+
+ Jnjvm* vm = JavaThread::get()->getJVM();
+ vm->notifyBundleUninstalled(bundleID);
+
+#endif
+}
+
+extern "C" void Java_j3_vm_OSGi_setBundleStaleReferenceCorrected(jlong bundleID, jboolean corrected)
+{
+#if RESET_STALE_REFERENCES
+
+ Jnjvm* vm = JavaThread::get()->getJVM();
+ vm->setBundleStaleReferenceCorrected(bundleID, corrected);
+
+#endif
+}
+
+extern "C" jboolean Java_j3_vm_OSGi_isBundleStaleReferenceCorrected(jlong bundleID)
{
#if RESET_STALE_REFERENCES
Jnjvm* vm = JavaThread::get()->getJVM();
- vm->resetReferencesToBundle(bundleID);
+ return vm->isBundleStaleReferenceCorrected(bundleID);
+#else
+ return false;
#endif
}
@@ -108,3 +194,28 @@ extern "C" void Java_j3_vm_OSGi_dumpClas
#endif
}
+
+extern "C" ArrayLong* Java_j3_vm_OSGi_getReferencesToObject(jlong objectPointer)
+{
+#if RESET_STALE_REFERENCES
+
+ Jnjvm* vm = JavaThread::get()->getJVM();
+ return vm->getReferencesToObject(reinterpret_cast<const JavaObject*>((intptr_t)objectPointer));
+
+#endif
+}
+
+extern "C" JavaString* Java_j3_vm_OSGi_dumpObject(jlong objectPointer)
+{
+#if RESET_STALE_REFERENCES
+
+ if (!objectPointer) return NULL;
+ const JavaObject& obj = *reinterpret_cast<const JavaObject*>((intptr_t)objectPointer);
+ std::ostringstream ss;
+ ss << obj;
+
+ Jnjvm* vm = JavaThread::get()->getJVM();
+ return vm->asciizToStr(ss.str().c_str());
+
+#endif
+}
Modified: vmkit/trunk/lib/j3/VMCore/JnjvmStaleRef.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/JnjvmStaleRef.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/JnjvmStaleRef.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/JnjvmStaleRef.cpp Thu Apr 25 12:18:47 2013
@@ -13,30 +13,20 @@ using namespace std;
namespace j3 {
-void Jnjvm::resetReferencesToBundle(int64_t bundleID)
-{
- JnjvmClassLoader* loader = this->getBundleClassLoader(bundleID);
- assert(loader && "No class loader is associated with the bundle");
-
- // Mark this class loader as a zombie. Its references will be reset in the next
- // garbage collection phase.
- loader->markZombie();
-
- scanStaleReferences = true; // Enable stale references scanning
- vmkit::Collector::collect(); // Start a garbage collection now
-}
-
void Jnjvm::resetReferenceIfStale(const void* source, void** ref)
{
JavaObject *src = NULL;
llvm_gcroot(src, 0);
- if (!scanStaleReferences) return; // Stale references scanning disabled
if (!ref || !(*ref)) return; // Invalid or null reference
-
src = const_cast<JavaObject*>(reinterpret_cast<const JavaObject*>(source));
JavaObject **objRef = reinterpret_cast<JavaObject**>(ref);
+ if (findReferencesToObject == *objRef)
+ foundReferencerObjects.push_back(src);
+
+ if (!scanStaleReferences) return; // Stale references scanning disabled
+
// Check the type of Java object. Some Java objects are not real object, but
// are bridges between Java and the VM objects.
if (VMClassLoader::isVMClassLoader(*objRef))
@@ -58,11 +48,11 @@ void Jnjvm::resetReferenceIfStale(const
JnjvmClassLoader* loader = (**ref).getClassLoader();
if (!loader->isZombie()) return;
-
+/*
cerr << "WARNING: Ignored stale reference ref=" << ref << " obj=" << **ref;
if (source) cerr << " source=" << *source;
cerr << endl;
-
+*/
#endif
}
@@ -77,11 +67,11 @@ void Jnjvm::resetReferenceIfStale(const
JnjvmClassLoader* loader = (**ref).getOwningClass()->classLoader;
if (!loader->isZombie()) return;
-
+/*
cerr << "WARNING: Ignored stale reference ref=" << ref << " obj=" << **ref;
if (source) cerr << " source=" << *source;
cerr << endl;
-
+*/
#endif
}
Modified: vmkit/trunk/lib/j3/VMCore/VirtualTables.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/j3/VMCore/VirtualTables.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/j3/VMCore/VirtualTables.cpp (original)
+++ vmkit/trunk/lib/j3/VMCore/VirtualTables.cpp Thu Apr 25 12:18:47 2013
@@ -272,6 +272,9 @@ void JnjvmBootstrapLoader::tracer(word_t
void Jnjvm::tracer(word_t closure) {
+ JavaObject* jThread = NULL;
+ llvm_gcroot(jThread, 0);
+
// (1) Trace the bootstrap loader.
bootstrapLoader->tracer(closure);
@@ -310,7 +313,12 @@ void Jnjvm::tracer(word_t closure) {
for (; j < vmkit::LockSystem::IndexSize; j++) {
if (array[j] == NULL) break;
vmkit::FatLock* lock = array[j];
- vmkit::Collector::markAndTraceRoot(NULL, lock->getAssociatedObjectPtr(), closure);
+ jThread = NULL;
+ if (vmkit::Thread *th = lock->getOwner()) {
+ if (th->isVmkitThread())
+ jThread = ((JavaThread*)th)->currentThread();
+ }
+ vmkit::Collector::markAndTraceRoot(jThread, lock->getAssociatedObjectPtr(), closure);
}
for (j = j + 1; j < vmkit::LockSystem::IndexSize; j++) {
assert(array[j] == NULL);
Modified: vmkit/trunk/lib/vmkit/CommonThread/ObjectLocks.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/vmkit/CommonThread/ObjectLocks.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/vmkit/CommonThread/ObjectLocks.cpp (original)
+++ vmkit/trunk/lib/vmkit/CommonThread/ObjectLocks.cpp Thu Apr 25 12:18:47 2013
@@ -46,6 +46,8 @@ void ThinLock::overflowThinLock(gc* obje
/// initialise - Initialise the value of the lock.
///
#if 0
+// Disable fat lock deflation code in ObjectLocks.cpp
+// Fixes occasional assertion failure when running on multi-core machine.
void ThinLock::removeFatLock(FatLock* fatLock, LockSystem& table) {
gc* object = fatLock->associatedObject;
llvm_gcroot(object, 0);
@@ -302,6 +304,8 @@ void FatLock::release(gc* obj, LockSyste
assert(associatedObject && "No associated object when releasing");
assert(associatedObject == obj && "Mismatch object in lock");
#if 0
+ // Disable fat lock deflation code in ObjectLocks.cpp
+ // Fixes occasional assertion failure when running on multi-core machine.
if (!waitingThreads && !lockingThreads &&
internalLock.recursionCount() == 1) {
vmkit::ThinLock::removeFatLock(this, table);
Modified: vmkit/trunk/lib/vmkit/MMTk/VmkitGC.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/vmkit/MMTk/VmkitGC.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/vmkit/MMTk/VmkitGC.cpp (original)
+++ vmkit/trunk/lib/vmkit/MMTk/VmkitGC.cpp Thu Apr 25 12:18:47 2013
@@ -130,7 +130,7 @@ bool Collector::isLive(gc* ptr, word_t c
return false;
}
-void Collector::scanObject(void** ptr, word_t closure) {
+void Collector::scanObject(FrameInfo* FI, void** ptr, word_t closure) {
abort();
}
Modified: vmkit/trunk/lib/vmkit/MMTk/VmkitGC.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/vmkit/MMTk/VmkitGC.h?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/vmkit/MMTk/VmkitGC.h (original)
+++ vmkit/trunk/lib/vmkit/MMTk/VmkitGC.h Thu Apr 25 12:18:47 2013
@@ -42,7 +42,7 @@ public:
static int verbose;
static bool isLive(gc* ptr, word_t closure) __attribute__ ((always_inline));
- static void scanObject(void** ptr, word_t closure) __attribute__ ((always_inline));
+ static void scanObject(FrameInfo* FI, void** ptr, word_t closure) __attribute__ ((always_inline));
static void markAndTrace(void* source, void* ptr, word_t closure) __attribute__ ((always_inline));
static void markAndTraceRoot(void* source, void* ptr, word_t closure) __attribute__ ((always_inline));
static gc* retainForFinalize(gc* val, word_t closure) __attribute__ ((always_inline));
Modified: vmkit/trunk/lib/vmkit/Runtime/MethodInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/vmkit/Runtime/MethodInfo.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/lib/vmkit/Runtime/MethodInfo.cpp (original)
+++ vmkit/trunk/lib/vmkit/Runtime/MethodInfo.cpp Thu Apr 25 12:18:47 2013
@@ -26,7 +26,7 @@ void MethodInfoHelper::scan(word_t closu
word_t obj = *(word_t*)(spaddr + FI->LiveOffsets[i]);
// Verify that obj does not come from a JSR bytecode.
if (!(obj & 1)) {
- Collector::scanObject((void**)(spaddr + FI->LiveOffsets[i]), closure);
+ Collector::scanObject(FI, (void**)(spaddr + FI->LiveOffsets[i]), closure);
}
}
}
Modified: vmkit/trunk/mmtk/mmtk-alloc/Selected.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/mmtk/mmtk-alloc/Selected.cpp?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/mmtk/mmtk-alloc/Selected.cpp (original)
+++ vmkit/trunk/mmtk/mmtk-alloc/Selected.cpp Thu Apr 25 12:18:47 2013
@@ -180,7 +180,7 @@ bool Collector::isLive(gc* ptr, word_t c
return JnJVM_org_j3_bindings_Bindings_isLive__Lorg_mmtk_plan_TraceLocal_2Lorg_vmmagic_unboxed_ObjectReference_2(closure, ptr);
}
-void Collector::scanObject(void** ptr, word_t closure) {
+void Collector::scanObject(FrameInfo* FI, void** ptr, word_t closure) {
if ((*ptr) != NULL) {
assert(vmkit::Thread::get()->MyVM->isCorruptedType((gc*)(*ptr)));
}
Modified: vmkit/trunk/tests/dacapo/dacapo-avg-overhead.csv
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tests/dacapo/dacapo-avg-overhead.csv?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/tests/dacapo/dacapo-avg-overhead.csv (original)
+++ vmkit/trunk/tests/dacapo/dacapo-avg-overhead.csv Thu Apr 25 12:18:47 2013
@@ -1,12 +1,12 @@
#bench_suite,benchmark,vm,avg_overhead
-2006-10-MR2,antlr,j3,-0.43
-2006-10-MR2,bloat,j3,2.30
-2006-10-MR2,chart,j3,1.94
-2006-10-MR2,eclipse,j3,-1.16
-2006-10-MR2,fop,j3,4.03
-2006-10-MR2,hsqldb,j3,8.93
-2006-10-MR2,jython,j3,1.66
-2006-10-MR2,luindex,j3,1.30
-2006-10-MR2,lusearch,j3,8.98
-2006-10-MR2,pmd,j3,7.47
-2006-10-MR2,xalan,j3,8.89
+2006-10-MR2,antlr,j3,20.81
+2006-10-MR2,bloat,j3,6.44
+2006-10-MR2,chart,j3,7.42
+2006-10-MR2,eclipse,j3,-4.30
+2006-10-MR2,fop,j3,5.36
+2006-10-MR2,hsqldb,j3,7.44
+2006-10-MR2,jython,j3,2.78
+2006-10-MR2,luindex,j3,-9.91
+2006-10-MR2,lusearch,j3,-30.56
+2006-10-MR2,pmd,j3,-10.74
+2006-10-MR2,xalan,j3,9.06
Modified: vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on-overhead.plot
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on-overhead.plot?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on-overhead.plot (original)
+++ vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on-overhead.plot Thu Apr 25 12:18:47 2013
@@ -5,7 +5,7 @@ set datafile missing '_'
set datafile commentschars "#"
set ylabel "Average relative overhead (lower is better)"
-set ytics 1 border nomirror
+set ytics border nomirror
set grid ytics
set format y "%.0f %%"
@@ -17,8 +17,7 @@ set boxwidth 1
# set title "Incinerator overhead in Dacapo benchmarks"
-set xtics axis nomirror rotate by 20 offset -2,graph -0.1
-#set xtics axis nomirror rotate by 20 offset -2,graph -0.03
+set xtics axis nomirror rotate by 20 offset -2,graph -0.5
set border 3
#set term svg
Modified: vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on.plot
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on.plot?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on.plot (original)
+++ vmkit/trunk/tests/dacapo/dacapo-incinerator-off-on.plot Thu Apr 25 12:18:47 2013
@@ -26,7 +26,10 @@ set boxwidth 1
#set term svg
#set term postscript clip 12
#set term latex
-set term wxt 0
+set term epslatex
+#set term wxt 0
+#set output "dacapo-incinerator-off-on.tex"
+set output "dacapo-incinerator-off-on.eps"
plot \
'stats-j3-dacapo-2006-10-MR2.csv' using (column(4)/1000.0):(column(7)/1000.0):xtic(2) linecolor rgb "grey" title "J3, powerful computer", \
'stats-incinerator-dacapo-2006-10-MR2.csv' using (column(4)/1000.0):(column(7)/1000.0):xtic(2) linecolor rgb "orange" title "Incinerator, powerful computer"
Modified: vmkit/trunk/tests/dacapo/stats-incinerator-dacapo-2006-10-MR2.csv
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/tests/dacapo/stats-incinerator-dacapo-2006-10-MR2.csv?rev=180514&r1=180513&r2=180514&view=diff
==============================================================================
--- vmkit/trunk/tests/dacapo/stats-incinerator-dacapo-2006-10-MR2.csv (original)
+++ vmkit/trunk/tests/dacapo/stats-incinerator-dacapo-2006-10-MR2.csv Thu Apr 25 12:18:47 2013
@@ -1,12 +1,12 @@
#bench_suite,benchmark,vm,avg_duration_ms,min_duration_ms,max_duration_ms,std_dev_duration_ms
-2006-10-MR2,antlr,j3,19652.10,17615.00,27332.00,2248.77
-2006-10-MR2,bloat,j3,43040.47,38777.00,46606.00,1503.30
-2006-10-MR2,chart,j3,121454.95,90114.00,137105.00,11513.67
-2006-10-MR2,eclipse,j3,158202.62,136726.00,182058.00,8597.38
-2006-10-MR2,fop,j3,103006.12,78002.00,114097.00,8931.45
-2006-10-MR2,hsqldb,j3,31539.78,26758.00,34946.00,1880.57
-2006-10-MR2,jython,j3,57339.60,52566.00,59797.00,1720.84
-2006-10-MR2,luindex,j3,37254.55,30240.00,49588.00,4037.17
-2006-10-MR2,lusearch,j3,18871.15,12641.00,24093.00,3315.06
-2006-10-MR2,pmd,j3,46988.35,37216.00,62281.00,5648.83
-2006-10-MR2,xalan,j3,17236.15,12539.00,19815.00,1893.30
+2006-10-MR2,antlr,j3,23844.12,21628.00,30792.00,2089.37
+2006-10-MR2,bloat,j3,44784.18,41862.00,51632.00,1888.43
+2006-10-MR2,chart,j3,127983.77,93646.00,153582.00,14994.01
+2006-10-MR2,eclipse,j3,153188.67,134362.00,165685.00,6405.52
+2006-10-MR2,fop,j3,104318.48,79760.00,116871.00,9762.53
+2006-10-MR2,hsqldb,j3,31109.70,26858.00,33444.00,1640.83
+2006-10-MR2,jython,j3,57968.65,53826.00,63947.00,1865.41
+2006-10-MR2,luindex,j3,33129.62,28667.00,38861.00,2626.92
+2006-10-MR2,lusearch,j3,12023.73,9457.00,15939.00,1380.69
+2006-10-MR2,pmd,j3,39026.12,33250.00,45380.00,3067.13
+2006-10-MR2,xalan,j3,17262.50,12479.00,20394.00,2136.92
More information about the vmkit-commits
mailing list