ev3dev-lang-java / ev3dev-lang-java

A project to learn Java and create software for Mindstorms Robots using hardware supported by EV3Dev & the LeJOS way.
http://ev3dev-lang-java.github.io/
MIT License
96 stars 42 forks source link

Compile OpenJDK 9 from Scratch on EV3 Brick #232

Closed jabrena closed 6 years ago

jabrena commented 7 years ago

It is necessary to see if OpenJDK 9, it is possible to be compiled on EV3 Brick.

https://mihail.stoynov.com/2015/01/29/building-openjdk-9-on-a-osx-or-any-linux/

sudo apt-get install mercurial
apt-get --reinstall install python-support
apt-get --reinstall install mercurial mercurial-common
mkdir jkd9
cd jdk9
hg clone http://hg.openjdk.java.net/jdk9/dev jdk9.hg
cd jdk9.hg
chmod u+x get_source.sh
./get_source.sh
chmod u+x configure
./configure
make clean images

http://openjdk.java.net/jtreg/

JakubVanek commented 6 years ago

I am experimenting with the JDK9 source tree now and I've just found a configuration that might work:

bash configure --openjdk-target=arm-linux-gnueabi --enable-headless-only --with-freetype-lib=/usr/lib/arm-linux-gnueabi --with-freetype-include=/usr/include --with-jvm-variants=client --with-extra-cflags="-Os -march=armv5te -mtune=arm926ej-s"

While trying to satisfy all the build requirements, I've made a mess in the jessie-cross container, so I can't post the required packages to install. But otherwise, the trial-and-error method works quite well.

There are also a few interesting options worth thinking about: Minimal JVM and AOT compilation.

JakubVanek commented 6 years ago

Apparently, -Wno-maybe-uninitialized is needed in CFLAGS, as otherwise the compilation stops with and error in c1_LIRGenerator_arm.cpp.

JakubVanek commented 6 years ago

Problem: ASFLAGS does not contain extra CFLAGS Solution: patch common/autoconf/flags.m4 to:

diff -r a08cbfc0e4ec common/autoconf/flags.m4
--- a/common/autoconf/flags.m4  Thu Aug 03 18:56:56 2017 +0000
+++ b/common/autoconf/flags.m4  Tue Dec 26 21:48:34 2017 +0000
@@ -30,7 +30,7 @@
 AC_DEFUN([FLAGS_SETUP_ABI_PROFILE],
 [
   AC_ARG_WITH(abi-profile, [AS_HELP_STRING([--with-abi-profile],
-      [specify ABI profile for ARM builds (arm-vfp-sflt,arm-vfp-hflt,arm-sflt, armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64) @<:@toolchain dependent@:>@ ])])
+      [specify ABI profile for ARM builds (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,arm-ev3,armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64) @<:@toolchain dependent@:>@ ])])

   if test "x$with_abi_profile" != x; then
     if test "x$OPENJDK_TARGET_CPU" != xarm && \
@@ -51,6 +51,9 @@
     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
       ARM_FLOAT_TYPE=sflt
       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
+    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-ev3; then
+      ARM_FLOAT_TYPE=sflt
+      ARM_ARCH_TYPE_FLAGS='-mcpu=arm926ej-s -marm'
     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
       ARM_FLOAT_TYPE=vfp-sflt
       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
@@ -1305,6 +1308,8 @@
   if test "x$OPENJDK_$1_OS" = xlinux; then
     if test "x$OPENJDK_$1_CPU" = xx86; then
       $2JVM_ASFLAGS="[$]$2JVM_ASFLAGS -march=i586"
+    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-ev3; then
+      $2JVM_ASFLAGS="-mcpu=arm926ej-s"
     fi
   elif test "x$OPENJDK_$1_OS" = xmacosx; then
     $2JVM_ASFLAGS="[$]$2JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"

Current configure line:

bash ./configure --openjdk-target=arm-linux-gnueabi --with-abi-profile=arm-ev3 --enable-headless-only --with-freetype-lib=/usr/lib/arm-linux-gnueabi --with-freetype-include=/usr/include --with-jvm-variants=minimal --with-extra-cflags="-Os -Wno-maybe-uninitialized"

The Minimal JVM will be sufficient for the beginning. Also, we have to use the --with-abi-profile option with arm-ev3 value (vanilla would use arm-sflt).

JakubVanek commented 6 years ago

Problem: Java on softfloat fails linking on __aeabi_dsub_glibc and similar. Cause/Solution: http://mail.openjdk.java.net/pipermail/aarch32-port-dev/2016-November/000616.html

jabrena commented 6 years ago

Hi @JakubVanek, nice to read your comments. I was exploring OpenJ9, this project has better support for ARM for EV3. Are you interested to participate?

Cheers

JakubVanek commented 6 years ago

Hi, I'm not sure OpenJ9 has better support for ARM. OpenJDK inherited the ARM port from the Oracle EJDK, which the leJOS JRE is using.

Regards

jabrena commented 6 years ago

Interesting comment :)

Returning to previous point, so are you working to run OpenJDK 9 on EV3? What is the status? The idea is very promising. Run the JShell on the brick could be amazing: https://docs.oracle.com/javase/9/jshell/introduction-jshell.htm#JSHEL-GUID-630F27C8-1195-4989-9F6B-2C51D46F52C8

JakubVanek commented 6 years ago

Yes, I'm trying to get OpenJDK running on the EV3. It looks quite good - the build has finished successfully now. I can't test it at the moment though, because I don't have a spare microSD card. I've uploaded my compressed images folder here, but beware: it might be needed to install libraries from jessie-backports (apt-mess in the container).

How to build:

## preparation:
# <setup docker container>
# <enter docker container>
# <enable backports (for JDK8)>
# <install JDK8>
# <install armel libraries needed by JDK9, roughly these:
#   libcups2-dev:armel, libfreetype6-dev:armel, libasound2-dev:armel>

## build:
hg clone http://hg.openjdk.java.net/jdk9/jdk9 jdk9
cd jdk9
bash get_source.sh

# now save the build.patch and the float.patch to this directory
patch -p1 < build.patch # apply the build.patch to the *root jdk directory*
cd hotspot; patch -p1 < ../float.patch; cd .. # apply the float.patch to the *hotspot subdirectory*

# let's configure it
bash ./configure --openjdk-target=arm-linux-gnueabi \
    --with-abi-profile=arm-ev3 \
    --enable-headless-only \
    --with-freetype-lib=/usr/lib/arm-linux-gnueabi \
    --with-freetype-include=/usr/include \
    --with-jvm-variants=minimal \
    --with-extra-cflags="-Os -Wno-maybe-uninitialized -D__SOFTFP__" \
    --with-version-pre="mindstorms" \
    AR="arm-linux-gnueabi-gcc-ar" \
    NM="arm-linux-gnueabi-gcc-nm" \
    BUILD_AR="gcc-ar" \
    BUILD_NM="gcc-nm"

# let's build it
make clean images # hmm, this sounds nice
# j2sdk images should be in build/linux-arm-normal-minimal-release/images

build.patch:

diff -r a08cbfc0e4ec common/autoconf/flags.m4
--- a/common/autoconf/flags.m4  Thu Aug 03 18:56:56 2017 +0000
+++ b/common/autoconf/flags.m4  Wed Dec 27 00:52:44 2017 +0100
@@ -30,7 +30,7 @@
 AC_DEFUN([FLAGS_SETUP_ABI_PROFILE],
 [
   AC_ARG_WITH(abi-profile, [AS_HELP_STRING([--with-abi-profile],
-      [specify ABI profile for ARM builds (arm-vfp-sflt,arm-vfp-hflt,arm-sflt, armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64) @<:@toolchain dependent@:>@ ])])
+      [specify ABI profile for ARM builds (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,arm-ev3,armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64) @<:@toolchain dependent@:>@ ])])

   if test "x$with_abi_profile" != x; then
     if test "x$OPENJDK_TARGET_CPU" != xarm && \
@@ -51,6 +51,9 @@
     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
       ARM_FLOAT_TYPE=sflt
       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
+    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-ev3; then
+      ARM_FLOAT_TYPE=sflt
+      ARM_ARCH_TYPE_FLAGS='-mcpu=arm926ej-s -marm'
     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
       ARM_FLOAT_TYPE=vfp-sflt
       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
@@ -1305,6 +1308,8 @@
   if test "x$OPENJDK_$1_OS" = xlinux; then
     if test "x$OPENJDK_$1_CPU" = xx86; then
       $2JVM_ASFLAGS="[$]$2JVM_ASFLAGS -march=i586"
+    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-ev3; then
+      $2JVM_ASFLAGS="-mcpu=arm926ej-s"
     fi
   elif test "x$OPENJDK_$1_OS" = xmacosx; then
     $2JVM_ASFLAGS="[$]$2JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"

float.patch:

diff -r b756e7a2ec33 src/cpu/arm/vm/assembler_arm_32.hpp
--- a/src/cpu/arm/vm/assembler_arm_32.hpp   Thu Aug 03 18:56:57 2017 +0000
+++ b/src/cpu/arm/vm/assembler_arm_32.hpp   Wed Dec 27 01:08:37 2017 +0100
@@ -1234,10 +1234,17 @@

 // Imported code from glibc soft-fp bundle for
 // calculation accuracy improvement. See CR 6757269.
-extern double __aeabi_fadd_glibc(float, float);
-extern double __aeabi_fsub_glibc(float, float);
-extern double __aeabi_dadd_glibc(double, double);
-extern double __aeabi_dsub_glibc(double, double);
+
+//extern double __aeabi_fadd_glibc(float, float);
+//extern double __aeabi_fsub_glibc(float, float);
+//extern double __aeabi_dadd_glibc(double, double);
+//extern double __aeabi_dsub_glibc(double, double);
+
+// EV3 hack
+#define __aeabi_fadd_glibc __aeabi_fadd
+#define __aeabi_fsub_glibc __aeabi_fsub
+#define __aeabi_dadd_glibc __aeabi_dadd
+#define __aeabi_dsub_glibc __aeabi_dsub
 };
 #endif // __SOFTFP__

Purpose of float.patch: _glibc overloads are supposed to be more precise. On EV3 this is not worth any better hack, so we redirect them to the default implementation. Additional build flags:

Java version numbers are not handled by default, e.g. now I have 9-mindstorms+0-adhoc..jdk9.

JakubVanek commented 6 years ago

Hmm, haven't heard of JShell yet, but it looks interesting. It should be included in linked build.

jabrena commented 6 years ago

JShell for educational purposes could be nice.

jabrena commented 6 years ago

Welcome to this Java project for Mindstorms!!!

JakubVanek commented 6 years ago

Hi,

Thanks for the admission :)

I've tried running my OpenJDK9 in userspace QEMU, but with disappointing results. When Java is started in the JIT mode, QEMU locks up, utilizes 100% of one core and responds only to SIGKILL.

$ qemu-arm-static -cpu arm926 /lib/arm-linux-gnueabi/ld-linux.so.3 ./java -version

When interpreted mode is activated, everything is OK:

$ qemu-arm-static -cpu arm926 /lib/arm-linux-gnueabi/ld-linux.so.3 ./java -Xint -version
openjdk version "9-mindstorms"
OpenJDK Runtime Environment (build 9-mindstorms+0-adhoc..jdk9)
OpenJDK Minimal VM (build 9-mindstorms+0-adhoc..jdk9, interpreted mode)

It might work on the brick, if it's only QEMU what has problems with the JIT.

I'll try to compile OpenJ9 for ARM to see, whether we have at least some alternative. :smile:

Regards

jabrena commented 6 years ago

Try try, the idea is build a stable version for the whole community. It is a good challenge.

Cheers

JakubVanek commented 6 years ago

YEEAH, it works! JIT-ed version query works:

robot@ev3dev:~/images/jre/bin$ ./java -verbose -version
[0.186s][info][class,load] opened: /home/robot/images/jre/lib/modules
[0.270s][info][class,load] java.lang.Object source: jrt:/java.base
[0.282s][info][class,load] java.io.Serializable source: jrt:/java.base
[0.286s][info][class,load] java.lang.Comparable source: jrt:/java.base
[0.293s][info][class,load] java.lang.CharSequence source: jrt:/java.base
[0.305s][info][class,load] java.lang.String source: jrt:/java.base
[0.325s][info][class,load] java.lang.reflect.AnnotatedElement source: jrt:/java.base
[0.331s][info][class,load] java.lang.reflect.GenericDeclaration source: jrt:/java.base
[0.335s][info][class,load] java.lang.reflect.Type source: jrt:/java.base
[0.352s][info][class,load] java.lang.Class source: jrt:/java.base
[0.358s][info][class,load] java.lang.Cloneable source: jrt:/java.base
[0.378s][info][class,load] java.lang.ClassLoader source: jrt:/java.base
[0.391s][info][class,load] java.lang.System source: jrt:/java.base
[0.401s][info][class,load] java.lang.Throwable source: jrt:/java.base
[0.405s][info][class,load] java.lang.Error source: jrt:/java.base
[0.411s][info][class,load] java.lang.ThreadDeath source: jrt:/java.base
[0.416s][info][class,load] java.lang.Exception source: jrt:/java.base
[0.422s][info][class,load] java.lang.RuntimeException source: jrt:/java.base
[0.435s][info][class,load] java.lang.SecurityManager source: jrt:/java.base
[0.443s][info][class,load] java.security.ProtectionDomain source: jrt:/java.base
[0.452s][info][class,load] java.security.AccessControlContext source: jrt:/java.base
[0.458s][info][class,load] java.security.SecureClassLoader source: jrt:/java.base
[0.465s][info][class,load] java.lang.ReflectiveOperationException source: jrt:/java.base
[0.470s][info][class,load] java.lang.ClassNotFoundException source: jrt:/java.base
[0.475s][info][class,load] java.lang.LinkageError source: jrt:/java.base
[0.480s][info][class,load] java.lang.NoClassDefFoundError source: jrt:/java.base
[0.485s][info][class,load] java.lang.ClassCastException source: jrt:/java.base
[0.490s][info][class,load] java.lang.ArrayStoreException source: jrt:/java.base
[0.495s][info][class,load] java.lang.VirtualMachineError source: jrt:/java.base
[0.500s][info][class,load] java.lang.OutOfMemoryError source: jrt:/java.base
[0.507s][info][class,load] java.lang.StackOverflowError source: jrt:/java.base
[0.515s][info][class,load] java.lang.IllegalMonitorStateException source: jrt:/java.base
[0.523s][info][class,load] java.lang.ref.Reference source: jrt:/java.base
[0.528s][info][class,load] java.lang.ref.SoftReference source: jrt:/java.base
[0.533s][info][class,load] java.lang.ref.WeakReference source: jrt:/java.base
[0.538s][info][class,load] java.lang.ref.FinalReference source: jrt:/java.base
[0.543s][info][class,load] java.lang.ref.PhantomReference source: jrt:/java.base
[0.551s][info][class,load] java.lang.ref.Finalizer source: jrt:/java.base
[0.560s][info][class,load] java.lang.Runnable source: jrt:/java.base
[0.571s][info][class,load] java.lang.Thread source: jrt:/java.base
[0.581s][info][class,load] java.lang.Thread$UncaughtExceptionHandler source: jrt:/java.base
[0.588s][info][class,load] java.lang.ThreadGroup source: jrt:/java.base
[0.610s][info][class,load] java.util.Map source: jrt:/java.base
[0.621s][info][class,load] java.util.Dictionary source: jrt:/java.base
[0.625s][info][class,load] java.util.Hashtable source: jrt:/java.base
[0.633s][info][class,load] java.util.Properties source: jrt:/java.base
[0.648s][info][class,load] java.lang.Module source: jrt:/java.base
[0.661s][info][class,load] java.lang.reflect.AccessibleObject source: jrt:/java.base
[0.670s][info][class,load] java.lang.reflect.Member source: jrt:/java.base
[0.679s][info][class,load] java.lang.reflect.Field source: jrt:/java.base
[0.687s][info][class,load] java.lang.reflect.Parameter source: jrt:/java.base
[0.704s][info][class,load] java.lang.reflect.Executable source: jrt:/java.base
[0.710s][info][class,load] java.lang.reflect.Method source: jrt:/java.base
[0.723s][info][class,load] java.lang.reflect.Constructor source: jrt:/java.base
[0.727s][info][class,load] jdk.internal.reflect.MagicAccessorImpl source: jrt:/java.base
[0.733s][info][class,load] jdk.internal.reflect.MethodAccessor source: jrt:/java.base
[0.736s][info][class,load] jdk.internal.reflect.MethodAccessorImpl source: jrt:/java.base
[0.743s][info][class,load] jdk.internal.reflect.ConstructorAccessor source: jrt:/java.base
[0.747s][info][class,load] jdk.internal.reflect.ConstructorAccessorImpl source: jrt:/java.base
[0.752s][info][class,load] jdk.internal.reflect.DelegatingClassLoader source: jrt:/java.base
[0.761s][info][class,load] jdk.internal.reflect.ConstantPool source: jrt:/java.base
[0.774s][info][class,load] jdk.internal.reflect.FieldAccessor source: jrt:/java.base
[0.780s][info][class,load] jdk.internal.reflect.FieldAccessorImpl source: jrt:/java.base
[0.784s][info][class,load] jdk.internal.reflect.UnsafeFieldAccessorImpl source: jrt:/java.base
[0.788s][info][class,load] jdk.internal.reflect.UnsafeStaticFieldAccessorImpl source: jrt:/java.base
[0.794s][info][class,load] java.lang.annotation.Annotation source: jrt:/java.base
[0.798s][info][class,load] jdk.internal.reflect.CallerSensitive source: jrt:/java.base
[0.822s][info][class,load] java.lang.invoke.MethodHandle source: jrt:/java.base
[0.826s][info][class,load] java.lang.invoke.DirectMethodHandle source: jrt:/java.base
[0.839s][info][class,load] java.lang.invoke.VarHandle source: jrt:/java.base
[0.854s][info][class,load] java.lang.invoke.MemberName source: jrt:/java.base
[0.865s][info][class,load] java.lang.invoke.MethodHandleNatives source: jrt:/java.base
[0.885s][info][class,load] java.lang.invoke.LambdaForm source: jrt:/java.base
[0.900s][info][class,load] java.lang.invoke.MethodType source: jrt:/java.base
[0.905s][info][class,load] java.lang.BootstrapMethodError source: jrt:/java.base
[0.913s][info][class,load] java.lang.invoke.CallSite source: jrt:/java.base
[0.920s][info][class,load] java.lang.invoke.MethodHandleNatives$CallSiteContext source: jrt:/java.base
[0.925s][info][class,load] java.lang.invoke.ConstantCallSite source: jrt:/java.base
[0.931s][info][class,load] java.lang.invoke.MutableCallSite source: jrt:/java.base
[0.936s][info][class,load] java.lang.invoke.VolatileCallSite source: jrt:/java.base
[0.954s][info][class,load] java.lang.Appendable source: jrt:/java.base
[0.964s][info][class,load] java.lang.AbstractStringBuilder source: jrt:/java.base
[0.972s][info][class,load] java.lang.StringBuffer source: jrt:/java.base
[0.986s][info][class,load] java.lang.StringBuilder source: jrt:/java.base
[1.040s][info][class,load] jdk.internal.misc.Unsafe source: jrt:/java.base
[1.049s][info][class,load] jdk.internal.module.Modules source: jrt:/java.base
[1.060s][info][class,load] java.lang.AutoCloseable source: jrt:/java.base
[1.064s][info][class,load] java.io.Closeable source: jrt:/java.base
[1.069s][info][class,load] java.io.InputStream source: jrt:/java.base
[1.074s][info][class,load] java.io.ByteArrayInputStream source: jrt:/java.base
[1.088s][info][class,load] java.io.File source: jrt:/java.base
[1.101s][info][class,load] java.net.URL source: jrt:/java.base
[1.109s][info][class,load] java.util.jar.Manifest source: jrt:/java.base
[1.126s][info][class,load] jdk.internal.loader.BuiltinClassLoader source: jrt:/java.base
[1.131s][info][class,load] jdk.internal.loader.ClassLoaders$AppClassLoader source: jrt:/java.base
[1.136s][info][class,load] jdk.internal.loader.ClassLoaders$PlatformClassLoader source: jrt:/java.base
[1.144s][info][class,load] java.security.CodeSource source: jrt:/java.base
[1.155s][info][class,load] sun.net.www.ParseUtil source: jrt:/java.base
[1.163s][info][class,load] java.lang.StackTraceElement source: jrt:/java.base
[1.171s][info][class,load] java.nio.Buffer source: jrt:/java.base
[1.183s][info][class,load] java.lang.StackWalker source: jrt:/java.base
[1.191s][info][class,load] java.lang.StackStreamFactory$AbstractStackWalker source: jrt:/java.base
[1.198s][info][class,load] java.lang.StackWalker$StackFrame source: jrt:/java.base
[1.205s][info][class,load] java.lang.StackFrameInfo source: jrt:/java.base
[1.212s][info][class,load] java.lang.LiveStackFrame source: jrt:/java.base
[1.216s][info][class,load] java.lang.LiveStackFrameInfo source: jrt:/java.base
[1.225s][info][class,load] java.lang.Boolean source: jrt:/java.base
[1.241s][info][class,load] java.lang.Character source: jrt:/java.base
[1.251s][info][class,load] java.lang.Number source: jrt:/java.base
[1.255s][info][class,load] java.lang.Float source: jrt:/java.base
[1.264s][info][class,load] java.lang.Double source: jrt:/java.base
[1.272s][info][class,load] java.lang.Byte source: jrt:/java.base
[1.281s][info][class,load] java.lang.Short source: jrt:/java.base
[1.293s][info][class,load] java.lang.Integer source: jrt:/java.base
[1.304s][info][class,load] java.lang.Long source: jrt:/java.base
[1.355s][info][class,load] java.lang.NullPointerException source: jrt:/java.base
[1.361s][info][class,load] java.lang.ArithmeticException source: jrt:/java.base
[1.444s][info][class,load] java.io.ObjectStreamField source: jrt:/java.base
[1.455s][info][class,load] java.util.Comparator source: jrt:/java.base
[1.461s][info][class,load] java.lang.String$CaseInsensitiveComparator source: jrt:/java.base
[1.507s][info][class,load] java.security.Guard source: jrt:/java.base
[1.512s][info][class,load] java.security.Permission source: jrt:/java.base
[1.516s][info][class,load] java.security.BasicPermission source: jrt:/java.base
[1.520s][info][class,load] java.lang.RuntimePermission source: jrt:/java.base
[1.540s][info][class,load] java.lang.StringUTF16 source: jrt:/java.base
[1.562s][info][class,load] java.security.AccessController source: jrt:/java.base
[1.588s][info][class,load] java.lang.Iterable source: jrt:/java.base
[1.593s][info][class,load] java.util.Collection source: jrt:/java.base
[1.601s][info][class,load] java.util.Set source: jrt:/java.base
[1.618s][info][class,load] java.util.AbstractCollection source: jrt:/java.base
[1.624s][info][class,load] java.util.AbstractSet source: jrt:/java.base
[1.632s][info][class,load] java.util.ImmutableCollections$AbstractImmutableSet source: jrt:/java.base
[1.638s][info][class,load] java.util.ImmutableCollections$Set1 source: jrt:/java.base
[1.652s][info][class,load] java.util.Objects source: jrt:/java.base
[1.661s][info][class,load] java.lang.WeakPairMap source: jrt:/java.base
[1.685s][info][class,load] java.util.concurrent.ConcurrentMap source: jrt:/java.base
[1.702s][info][class,load] java.util.AbstractMap source: jrt:/java.base
[1.708s][info][class,load] java.util.concurrent.ConcurrentHashMap source: jrt:/java.base
[1.736s][info][class,load] java.lang.Runtime source: jrt:/java.base
[1.752s][info][class,load] java.util.concurrent.locks.Lock source: jrt:/java.base
[1.757s][info][class,load] java.util.concurrent.locks.ReentrantLock source: jrt:/java.base
[1.764s][info][class,load] java.util.concurrent.ConcurrentHashMap$Segment source: jrt:/java.base
[1.819s][info][class,load] java.util.Arrays source: jrt:/java.base
[1.848s][info][class,load] java.lang.Math source: jrt:/java.base
[1.897s][info][class,load] java.lang.Class$ReflectionData source: jrt:/java.base
[1.906s][info][class,load] java.lang.ref.Reference$ReferenceHandler source: jrt:/java.base
[1.915s][info][class,load] jdk.internal.ref.Cleaner source: jrt:/java.base
[1.925s][info][class,load] java.lang.ref.ReferenceQueue source: jrt:/java.base
[1.933s][info][class,load] java.lang.ref.ReferenceQueue$Null source: jrt:/java.base
[1.940s][info][class,load] java.lang.ref.ReferenceQueue$Lock source: jrt:/java.base
[1.955s][info][class,load] jdk.internal.misc.JavaLangRefAccess source: jrt:/java.base
[1.962s][info][class,load] java.lang.ref.Reference$1 source: jrt:/java.base
[1.974s][info][class,load] jdk.internal.misc.SharedSecrets source: jrt:/java.base
[1.989s][info][class,load] java.lang.Class$Atomic source: jrt:/java.base
[2.003s][info][class,load] java.lang.reflect.ReflectPermission source: jrt:/java.base
[2.011s][info][class,load] java.security.PrivilegedAction source: jrt:/java.base
[2.015s][info][class,load] jdk.internal.reflect.ReflectionFactory$GetReflectionFactoryAction source: jrt:/java.base
[2.025s][info][class,load] java.security.cert.Certificate source: jrt:/java.base
[2.041s][info][class,load] java.util.List source: jrt:/java.base
[2.045s][info][class,load] java.util.RandomAccess source: jrt:/java.base
[2.061s][info][class,load] java.util.AbstractList source: jrt:/java.base
[2.070s][info][class,load] java.util.Vector source: jrt:/java.base
[2.093s][info][class,load] java.util.Stack source: jrt:/java.base
[2.109s][info][class,load] jdk.internal.reflect.ReflectionFactory source: jrt:/java.base
[2.126s][info][class,load] sun.reflect.generics.repository.AbstractRepository source: jrt:/java.base
[2.131s][info][class,load] sun.reflect.generics.repository.GenericDeclRepository source: jrt:/java.base
[2.134s][info][class,load] sun.reflect.generics.repository.ClassRepository source: jrt:/java.base
[2.142s][info][class,load] java.lang.Class$AnnotationData source: jrt:/java.base
[2.149s][info][class,load] sun.reflect.annotation.AnnotationType source: jrt:/java.base
[2.164s][info][class,load] java.util.WeakHashMap source: jrt:/java.base
[2.171s][info][class,load] java.lang.ClassValue$ClassValueMap source: jrt:/java.base
[2.188s][info][class,load] java.util.Map$Entry source: jrt:/java.base
[2.193s][info][class,load] java.util.concurrent.ConcurrentHashMap$Node source: jrt:/java.base
[2.200s][info][class,load] java.util.concurrent.ConcurrentHashMap$CounterCell source: jrt:/java.base
[2.212s][info][class,load] java.util.concurrent.ConcurrentHashMap$CollectionView source: jrt:/java.base
[2.218s][info][class,load] java.util.concurrent.ConcurrentHashMap$KeySetView source: jrt:/java.base
[2.225s][info][class,load] java.util.concurrent.ConcurrentHashMap$ValuesView source: jrt:/java.base
[2.234s][info][class,load] java.util.concurrent.ConcurrentHashMap$EntrySetView source: jrt:/java.base
[2.243s][info][class,load] jdk.internal.reflect.Reflection source: jrt:/java.base
[2.259s][info][class,load] java.util.HashMap source: jrt:/java.base
[2.274s][info][class,load] java.util.HashMap$Node source: jrt:/java.base
[2.291s][info][class,load] java.lang.reflect.Modifier source: jrt:/java.base
[2.301s][info][class,load] jdk.internal.reflect.LangReflectAccess source: jrt:/java.base
[2.306s][info][class,load] java.lang.reflect.ReflectAccess source: jrt:/java.base
[2.325s][info][class,load] java.util.concurrent.locks.LockSupport source: jrt:/java.base
[2.344s][info][class,load] java.lang.ref.Finalizer$FinalizerThread source: jrt:/java.base
[2.363s][info][class,load] jdk.internal.misc.VM source: jrt:/java.base
[2.403s][info][class,load] java.util.concurrent.ConcurrentHashMap$ForwardingNode source: jrt:/java.base
[2.432s][info][class,load] java.nio.charset.Charset source: jrt:/java.base
[2.451s][info][class,load] java.nio.charset.spi.CharsetProvider source: jrt:/java.base
[2.455s][info][class,load] sun.nio.cs.StandardCharsets source: jrt:/java.base
[2.518s][info][class,load] sun.util.PreHashedMap source: jrt:/java.base
[2.524s][info][class,load] sun.nio.cs.StandardCharsets$Aliases source: jrt:/java.base
[2.576s][info][class,load] sun.nio.cs.StandardCharsets$Classes source: jrt:/java.base
[2.600s][info][class,load] sun.nio.cs.StandardCharsets$Cache source: jrt:/java.base
[2.614s][info][class,load] java.lang.ThreadLocal source: jrt:/java.base
[2.624s][info][class,load] java.util.concurrent.atomic.AtomicInteger source: jrt:/java.base
[2.645s][info][class,load] sun.nio.cs.HistoricallyNamedCharset source: jrt:/java.base
[2.650s][info][class,load] sun.nio.cs.US_ASCII source: jrt:/java.base
[2.668s][info][class,load] java.lang.StringCoding source: jrt:/java.base
[2.681s][info][class,load] sun.nio.cs.ISO_8859_1 source: jrt:/java.base
[2.698s][info][class,load] sun.nio.cs.Unicode source: jrt:/java.base
[2.702s][info][class,load] sun.nio.cs.UTF_8 source: jrt:/java.base
[2.715s][info][class,load] java.lang.ThreadLocal$ThreadLocalMap source: jrt:/java.base
[2.723s][info][class,load] java.lang.ThreadLocal$ThreadLocalMap$Entry source: jrt:/java.base
[2.735s][info][class,load] java.lang.StringCoding$StringDecoder source: jrt:/java.base
[2.744s][info][class,load] sun.nio.cs.ArrayDecoder source: jrt:/java.base
[2.753s][info][class,load] java.nio.charset.CharsetDecoder source: jrt:/java.base
[2.758s][info][class,load] sun.nio.cs.US_ASCII$Decoder source: jrt:/java.base
[2.771s][info][class,load] java.nio.charset.CodingErrorAction source: jrt:/java.base
[2.785s][info][class,load] java.lang.StringCoding$Result source: jrt:/java.base
[2.800s][info][class,load] java.lang.StringLatin1 source: jrt:/java.base
[2.900s][info][class,load] java.util.Properties$EntrySet source: jrt:/java.base
[2.932s][info][class,load] java.util.Collections source: jrt:/java.base
[2.949s][info][class,load] java.util.Collections$EmptySet source: jrt:/java.base
[2.962s][info][class,load] java.util.Collections$EmptyList source: jrt:/java.base
[2.973s][info][class,load] java.util.Collections$EmptyMap source: jrt:/java.base
[2.986s][info][class,load] java.util.Collections$SynchronizedCollection source: jrt:/java.base
[2.992s][info][class,load] java.util.Collections$SynchronizedSet source: jrt:/java.base
[3.006s][info][class,load] java.lang.reflect.Array source: jrt:/java.base
[3.015s][info][class,load] java.util.Iterator source: jrt:/java.base
[3.024s][info][class,load] java.util.concurrent.ConcurrentHashMap$Traverser source: jrt:/java.base
[3.028s][info][class,load] java.util.concurrent.ConcurrentHashMap$BaseIterator source: jrt:/java.base
[3.033s][info][class,load] java.util.concurrent.ConcurrentHashMap$EntryIterator source: jrt:/java.base
[3.048s][info][class,load] java.util.concurrent.ConcurrentHashMap$MapEntry source: jrt:/java.base
[3.065s][info][class,load] java.util.ImmutableCollections$AbstractImmutableMap source: jrt:/java.base
[3.070s][info][class,load] java.util.ImmutableCollections$MapN source: jrt:/java.base
[3.081s][info][class,load] java.util.ImmutableCollections source: jrt:/java.base
[3.099s][info][class,load] java.lang.VersionProps source: jrt:/java.base
[3.114s][info][class,load] java.io.FileInputStream source: jrt:/java.base
[3.125s][info][class,load] java.io.FileDescriptor source: jrt:/java.base
[3.135s][info][class,load] jdk.internal.misc.JavaIOFileDescriptorAccess source: jrt:/java.base
[3.140s][info][class,load] java.io.FileDescriptor$1 source: jrt:/java.base
[3.155s][info][class,load] java.io.Flushable source: jrt:/java.base
[3.161s][info][class,load] java.io.OutputStream source: jrt:/java.base
[3.164s][info][class,load] java.io.FileOutputStream source: jrt:/java.base
[3.180s][info][class,load] java.io.FilterInputStream source: jrt:/java.base
[3.183s][info][class,load] java.io.BufferedInputStream source: jrt:/java.base
[3.193s][info][class,load] java.util.concurrent.atomic.AtomicReferenceFieldUpdater source: jrt:/java.base
[3.203s][info][class,load] java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl source: jrt:/java.base
[3.213s][info][class,load] java.security.PrivilegedExceptionAction source: jrt:/java.base
[3.218s][info][class,load] java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl$1 source: jrt:/java.base
[3.232s][info][class,load] sun.reflect.misc.ReflectUtil source: jrt:/java.base
[3.256s][info][class,load] java.io.FilterOutputStream source: jrt:/java.base
[3.261s][info][class,load] java.io.PrintStream source: jrt:/java.base
[3.271s][info][class,load] java.io.BufferedOutputStream source: jrt:/java.base
[3.284s][info][class,load] java.io.Writer source: jrt:/java.base
[3.288s][info][class,load] java.io.OutputStreamWriter source: jrt:/java.base
[3.302s][info][class,load] sun.nio.cs.StreamEncoder source: jrt:/java.base
[3.312s][info][class,load] sun.security.action.GetPropertyAction source: jrt:/java.base
[3.323s][info][class,load] sun.nio.cs.ArrayEncoder source: jrt:/java.base
[3.332s][info][class,load] java.nio.charset.CharsetEncoder source: jrt:/java.base
[3.337s][info][class,load] sun.nio.cs.US_ASCII$Encoder source: jrt:/java.base
[3.354s][info][class,load] sun.nio.cs.Surrogate$Parser source: jrt:/java.base
[3.361s][info][class,load] sun.nio.cs.Surrogate source: jrt:/java.base
[3.370s][info][class,load] java.nio.charset.CoderResult source: jrt:/java.base
[3.380s][info][class,load] java.nio.charset.CoderResult$Cache source: jrt:/java.base
[3.384s][info][class,load] java.nio.charset.CoderResult$1 source: jrt:/java.base
[3.392s][info][class,load] java.nio.charset.CoderResult$2 source: jrt:/java.base
[3.410s][info][class,load] java.nio.ByteBuffer source: jrt:/java.base
[3.428s][info][class,load] java.nio.HeapByteBuffer source: jrt:/java.base
[3.441s][info][class,load] java.nio.Bits source: jrt:/java.base
[3.449s][info][class,load] java.nio.ByteOrder source: jrt:/java.base
[3.462s][info][class,load] java.util.concurrent.atomic.AtomicLong source: jrt:/java.base
[3.474s][info][class,load] jdk.internal.misc.JavaNioAccess source: jrt:/java.base
[3.479s][info][class,load] java.nio.Bits$1 source: jrt:/java.base
[3.494s][info][class,load] java.io.BufferedWriter source: jrt:/java.base
[3.513s][info][class,load] java.io.DefaultFileSystem source: jrt:/java.base
[3.526s][info][class,load] java.io.FileSystem source: jrt:/java.base
[3.531s][info][class,load] java.io.UnixFileSystem source: jrt:/java.base
[3.551s][info][class,load] java.io.ExpiringCache source: jrt:/java.base
[3.565s][info][class,load] java.util.LinkedHashMap source: jrt:/java.base
[3.571s][info][class,load] java.io.ExpiringCache$1 source: jrt:/java.base
[3.593s][info][class,load] java.lang.Enum source: jrt:/java.base
[3.597s][info][class,load] java.io.File$PathStatus source: jrt:/java.base
[3.605s][info][class,load] java.nio.file.Watchable source: jrt:/java.base
[3.613s][info][class,load] java.nio.file.Path source: jrt:/java.base
[3.638s][info][class,load] java.lang.ClassLoader$2 source: jrt:/java.base
[3.663s][info][class,load] java.io.ExpiringCache$Entry source: jrt:/java.base
[3.671s][info][class,load] java.util.LinkedHashMap$Entry source: jrt:/java.base
[3.687s][info][class,load] java.lang.ClassLoader$NativeLibrary source: jrt:/java.base
[3.704s][info][class,load] java.lang.Terminator source: jrt:/java.base
[3.714s][info][class,load] jdk.internal.misc.Signal$Handler source: jrt:/java.base
[3.719s][info][class,load] java.lang.Terminator$1 source: jrt:/java.base
[3.730s][info][class,load] jdk.internal.misc.Signal source: jrt:/java.base
[3.741s][info][class,load] java.util.Hashtable$Entry source: jrt:/java.base
[3.754s][info][class,load] jdk.internal.misc.Signal$NativeHandler source: jrt:/java.base
[3.761s][info][class,load] java.lang.Integer$IntegerCache source: jrt:/java.base
[3.830s][info][class,load] jdk.internal.misc.OSEnvironment source: jrt:/java.base
[3.842s][info][class,load] jdk.internal.misc.JavaLangAccess source: jrt:/java.base
[3.849s][info][class,load] java.lang.System$2 source: jrt:/java.base
[3.868s][info][class,load] java.lang.IllegalArgumentException source: jrt:/java.base
[3.896s][info][class,load] java.lang.invoke.MethodHandleStatics source: jrt:/java.base
[3.936s][info][class,load] java.lang.CharacterData source: jrt:/java.base
[3.946s][info][class,load] java.lang.CharacterDataLatin1 source: jrt:/java.base
[4.032s][info][class,load] jdk.internal.module.ModuleBootstrap source: jrt:/java.base
[4.051s][info][class,load] jdk.internal.module.ModulePatcher source: jrt:/java.base
[4.066s][info][class,load] java.lang.module.ModuleDescriptor source: jrt:/java.base
[4.081s][info][class,load] jdk.internal.misc.JavaLangModuleAccess source: jrt:/java.base
[4.086s][info][class,load] java.lang.module.ModuleDescriptor$1 source: jrt:/java.base
[4.097s][info][class,load] java.lang.module.ModuleFinder source: jrt:/java.base
[4.105s][info][class,load] java.nio.file.Paths source: jrt:/java.base
[4.113s][info][class,load] java.nio.file.FileSystems source: jrt:/java.base
[4.120s][info][class,load] sun.nio.fs.DefaultFileSystemProvider source: jrt:/java.base
[4.142s][info][class,load] java.nio.file.spi.FileSystemProvider source: jrt:/java.base
[4.145s][info][class,load] sun.nio.fs.AbstractFileSystemProvider source: jrt:/java.base
[4.150s][info][class,load] sun.nio.fs.UnixFileSystemProvider source: jrt:/java.base
[4.154s][info][class,load] sun.nio.fs.LinuxFileSystemProvider source: jrt:/java.base
[4.178s][info][class,load] java.nio.file.FileSystem source: jrt:/java.base
[4.183s][info][class,load] sun.nio.fs.UnixFileSystem source: jrt:/java.base
[4.186s][info][class,load] sun.nio.fs.LinuxFileSystem source: jrt:/java.base
[4.207s][info][class,load] sun.nio.fs.UnixPath source: jrt:/java.base
[4.223s][info][class,load] sun.nio.fs.Util source: jrt:/java.base
[4.242s][info][class,load] sun.nio.fs.UnixNativeDispatcher source: jrt:/java.base
[4.253s][info][class,load] sun.nio.fs.UnixNativeDispatcher$1 source: jrt:/java.base
[4.294s][info][class,load] java.nio.file.attribute.BasicFileAttributes source: jrt:/java.base
[4.299s][info][class,load] java.nio.file.attribute.PosixFileAttributes source: jrt:/java.base
[4.305s][info][class,load] sun.nio.fs.UnixFileAttributes source: jrt:/java.base
[4.314s][info][class,load] sun.nio.fs.UnixFileStoreAttributes source: jrt:/java.base
[4.321s][info][class,load] sun.nio.fs.UnixMountEntry source: jrt:/java.base
[4.336s][info][class,load] java.lang.Readable source: jrt:/java.base
[4.346s][info][class,load] java.nio.CharBuffer source: jrt:/java.base
[4.360s][info][class,load] java.nio.HeapCharBuffer source: jrt:/java.base
[4.378s][info][class,load] java.nio.file.FileSystems$BuiltinFileSystemHolder source: jrt:/java.base
[4.400s][info][class,load] java.net.URI source: jrt:/java.base
[4.430s][info][class,load] jdk.internal.misc.JavaNetUriAccess source: jrt:/java.base
[4.434s][info][class,load] java.net.URI$1 source: jrt:/java.base
[4.445s][info][class,load] java.net.URI$Parser source: jrt:/java.base
[4.474s][info][class,load] java.nio.file.OpenOption source: jrt:/java.base
[4.478s][info][class,load] java.nio.file.CopyOption source: jrt:/java.base
[4.483s][info][class,load] java.nio.file.LinkOption source: jrt:/java.base
[4.501s][info][class,load] java.nio.file.Files source: jrt:/java.base
[4.517s][info][class,load] sun.nio.fs.NativeBuffers source: jrt:/java.base
[4.526s][info][class,load] sun.nio.fs.NativeBuffer source: jrt:/java.base
[4.535s][info][class,load] jdk.internal.ref.CleanerFactory source: jrt:/java.base
[4.541s][info][class,load] java.util.concurrent.ThreadFactory source: jrt:/java.base
[4.545s][info][class,load] jdk.internal.ref.CleanerFactory$1 source: jrt:/java.base
[4.552s][info][class,load] java.lang.ref.Cleaner source: jrt:/java.base
[4.560s][info][class,load] java.util.function.Function source: jrt:/java.base
[4.564s][info][class,load] java.lang.ref.Cleaner$1 source: jrt:/java.base
[4.574s][info][class,load] jdk.internal.ref.CleanerImpl source: jrt:/java.base
[4.585s][info][class,load] java.lang.ref.Cleaner$Cleanable source: jrt:/java.base
[4.590s][info][class,load] jdk.internal.ref.PhantomCleanable source: jrt:/java.base
[4.594s][info][class,load] jdk.internal.ref.CleanerImpl$PhantomCleanableRef source: jrt:/java.base
[4.605s][info][class,load] jdk.internal.ref.WeakCleanable source: jrt:/java.base
[4.610s][info][class,load] jdk.internal.ref.CleanerImpl$WeakCleanableRef source: jrt:/java.base
[4.622s][info][class,load] jdk.internal.ref.SoftCleanable source: jrt:/java.base
[4.625s][info][class,load] jdk.internal.ref.CleanerImpl$SoftCleanableRef source: jrt:/java.base
[4.635s][info][class,load] jdk.internal.ref.CleanerImpl$CleanerCleanable source: jrt:/java.base
[4.643s][info][class,load] jdk.internal.ref.CleanerFactory$1$1 source: jrt:/java.base
[4.653s][info][class,load] jdk.internal.misc.InnocuousThread source: jrt:/java.base
[4.663s][info][class,load] jdk.internal.misc.JavaSecurityAccess source: jrt:/java.base
[4.667s][info][class,load] java.security.ProtectionDomain$JavaSecurityAccessImpl source: jrt:/java.base
[4.676s][info][class,load] jdk.internal.misc.JavaSecurityProtectionDomainAccess source: jrt:/java.base
[4.681s][info][class,load] java.security.ProtectionDomain$1 source: jrt:/java.base
[4.687s][info][class,load] java.security.ProtectionDomain$Key source: jrt:/java.base
[4.694s][info][class,load] java.security.Principal source: jrt:/java.base
[4.704s][info][class,load] sun.nio.ch.Interruptible source: jrt:/java.base
[4.719s][info][class,load] jdk.internal.misc.InnocuousThread$1 source: jrt:/java.base
[4.734s][info][class,load] sun.nio.fs.NativeBuffer$Deallocator source: jrt:/java.base
[4.756s][info][class,load] jdk.internal.module.SystemModuleFinder source: jrt:/java.base
[4.766s][info][class,load] jdk.internal.perf.PerfCounter source: jrt:/java.base
[4.774s][info][class,load] jdk.internal.perf.Perf$GetPerfAction source: jrt:/java.base
[4.783s][info][class,load] jdk.internal.perf.Perf source: jrt:/java.base
[4.793s][info][class,load] sun.nio.ch.DirectBuffer source: jrt:/java.base
[4.809s][info][class,load] java.nio.MappedByteBuffer source: jrt:/java.base
[4.814s][info][class,load] java.nio.DirectByteBuffer source: jrt:/java.base
[4.843s][info][class,load] java.nio.LongBuffer source: jrt:/java.base
[4.846s][info][class,load] java.nio.DirectLongBufferU source: jrt:/java.base
[4.896s][info][class,load] jdk.internal.module.SystemModules source: jrt:/java.base
[4.924s][info][class,load] jdk.internal.module.Builder source: jrt:/java.base
[4.936s][info][class,load] java.lang.module.ModuleDescriptor$Requires source: jrt:/java.base
[4.945s][info][class,load] java.util.ImmutableCollections$Set0 source: jrt:/java.base
[4.955s][info][class,load] java.lang.module.ModuleDescriptor$Exports source: jrt:/java.base
[4.969s][info][class,load] java.util.ImmutableCollections$SetN source: jrt:/java.base
[4.984s][info][class,load] java.util.ImmutableCollections$Set2 source: jrt:/java.base
[5.022s][info][class,load] java.lang.module.ModuleDescriptor$Opens source: jrt:/java.base
[5.035s][info][class,load] java.lang.module.ModuleDescriptor$Provides source: jrt:/java.base
[5.046s][info][class,load] java.util.ImmutableCollections$AbstractImmutableList source: jrt:/java.base
[5.053s][info][class,load] java.util.ImmutableCollections$List1 source: jrt:/java.base
[5.083s][info][class,load] java.lang.module.ModuleDescriptor$Version source: jrt:/java.base
[5.101s][info][class,load] java.util.ArrayList source: jrt:/java.base
[5.121s][info][class,load] java.lang.module.ModuleDescriptor$Modifier source: jrt:/java.base
[5.132s][info][class,load] java.lang.module.ModuleDescriptor$Requires$Modifier source: jrt:/java.base
[5.226s][info][class,load] java.util.ImmutableCollections$ListN source: jrt:/java.base
[5.239s][info][class,load] java.util.ImmutableCollections$List2 source: jrt:/java.base
[5.463s][info][class,load] jdk.internal.module.ModuleTarget source: jrt:/java.base
[5.478s][info][class,load] jdk.internal.module.ModuleHashes source: jrt:/java.base
[5.484s][info][class,load] jdk.internal.module.ModuleHashes$Builder source: jrt:/java.base
[5.496s][info][class,load] java.util.HashMap$TreeNode source: jrt:/java.base
[5.513s][info][class,load] java.util.Collections$UnmodifiableMap source: jrt:/java.base
[5.523s][info][class,load] jdk.internal.module.ModuleResolution source: jrt:/java.base
[5.531s][info][class,load] java.lang.module.ModuleReference source: jrt:/java.base
[5.544s][info][class,load] java.util.function.Supplier source: jrt:/java.base
[5.549s][info][class,load] jdk.internal.module.SystemModuleFinder$1 source: jrt:/java.base
[5.560s][info][class,load] jdk.internal.module.ModuleReferenceImpl source: jrt:/java.base
[5.572s][info][class,load] java.util.KeyValueHolder source: jrt:/java.base
[5.582s][info][class,load] jdk.internal.module.ModuleHashes$HashSupplier source: jrt:/java.base
[5.587s][info][class,load] jdk.internal.module.SystemModuleFinder$2 source: jrt:/java.base
[5.670s][info][class,load] jdk.internal.module.ModuleBootstrap$PerfCounters source: jrt:/java.base
[5.691s][info][class,load] java.util.Optional source: jrt:/java.base
[5.703s][info][class,load] jdk.internal.loader.BootLoader source: jrt:/java.base
[5.714s][info][class,load] jdk.internal.module.ServicesCatalog source: jrt:/java.base
[5.723s][info][class,load] jdk.internal.loader.AbstractClassLoaderValue source: jrt:/java.base
[5.727s][info][class,load] jdk.internal.loader.ClassLoaderValue source: jrt:/java.base
[5.740s][info][class,load] jdk.internal.loader.ClassLoaders source: jrt:/java.base
[5.752s][info][class,load] jdk.internal.loader.URLClassPath source: jrt:/java.base
[5.768s][info][class,load] java.net.URLStreamHandlerFactory source: jrt:/java.base
[5.772s][info][class,load] java.net.URL$DefaultFactory source: jrt:/java.base
[5.789s][info][class,load] jdk.internal.misc.JavaNetURLAccess source: jrt:/java.base
[5.795s][info][class,load] java.net.URL$3 source: jrt:/java.base
[5.852s][info][class,load] java.util.Locale source: jrt:/java.base
[5.870s][info][class,load] sun.util.locale.LocaleObjectCache source: jrt:/java.base
[5.876s][info][class,load] java.util.Locale$Cache source: jrt:/java.base
[5.889s][info][class,load] sun.util.locale.BaseLocale source: jrt:/java.base
[5.895s][info][class,load] sun.util.locale.BaseLocale$Cache source: jrt:/java.base
[5.906s][info][class,load] sun.util.locale.BaseLocale$Key source: jrt:/java.base
[5.916s][info][class,load] sun.util.locale.LocaleObjectCache$CacheEntry source: jrt:/java.base
[5.924s][info][class,load] java.util.Locale$LocaleKey source: jrt:/java.base
[5.947s][info][class,load] sun.util.locale.LocaleUtils source: jrt:/java.base
[5.997s][info][class,load] java.net.URLStreamHandler source: jrt:/java.base
[6.001s][info][class,load] sun.net.www.protocol.file.Handler source: jrt:/java.base
[6.022s][info][class,load] java.lang.Class$1 source: jrt:/java.base
[6.041s][info][class,load] jdk.internal.reflect.NativeConstructorAccessorImpl source: jrt:/java.base
[6.050s][info][class,load] jdk.internal.reflect.DelegatingConstructorAccessorImpl source: jrt:/java.base
[6.071s][info][class,load] jdk.internal.loader.ClassLoaders$BootClassLoader source: jrt:/java.base
[6.083s][info][class,load] java.lang.ClassLoader$ParallelLoaders source: jrt:/java.base
[6.096s][info][class,load] java.util.WeakHashMap$Entry source: jrt:/java.base
[6.106s][info][class,load] java.util.Collections$SetFromMap source: jrt:/java.base
[6.118s][info][class,load] java.util.WeakHashMap$KeySet source: jrt:/java.base
[6.157s][info][class,load] jdk.internal.loader.BuiltinClassLoader$LoadedModule source: jrt:/java.base
[6.168s][info][class,load] sun.net.www.protocol.jrt.Handler source: jrt:/java.base
[6.178s][info][class,load] java.util.ImmutableCollections$SetN$1 source: jrt:/java.base
[6.237s][info][class,load] java.util.HashSet source: jrt:/java.base
[6.251s][info][class,load] java.util.Collections$EmptyIterator source: jrt:/java.base
[6.263s][info][class,load] java.util.ImmutableCollections$Set2$1 source: jrt:/java.base
[6.273s][info][class,load] java.util.Collections$1 source: jrt:/java.base
[6.292s][info][class,load] java.lang.module.Configuration source: jrt:/java.base
[6.310s][info][class,load] java.lang.module.Resolver source: jrt:/java.base
[6.323s][info][class,load] java.lang.module.ModuleFinder$2 source: jrt:/java.base
[6.333s][info][class,load] java.util.AbstractList$Itr source: jrt:/java.base
[6.344s][info][class,load] jdk.internal.util.Preconditions source: jrt:/java.base
[6.360s][info][class,load] java.util.Queue source: jrt:/java.base
[6.369s][info][class,load] java.util.Deque source: jrt:/java.base
[6.381s][info][class,load] java.util.ArrayDeque source: jrt:/java.base
[6.398s][info][class,load] java.util.HashMap$KeySet source: jrt:/java.base
[6.408s][info][class,load] java.util.HashMap$HashIterator source: jrt:/java.base
[6.412s][info][class,load] java.util.HashMap$KeyIterator source: jrt:/java.base
[6.481s][info][class,load] java.lang.ModuleLayer source: jrt:/java.base
[6.493s][info][class,load] java.util.ImmutableCollections$List0 source: jrt:/java.base
[6.506s][info][class,load] java.util.HashMap$Values source: jrt:/java.base
[6.514s][info][class,load] java.util.HashMap$ValueIterator source: jrt:/java.base
[6.538s][info][class,load] java.lang.module.ResolvedModule source: jrt:/java.base
[6.582s][info][class,load] java.util.ArrayList$Itr source: jrt:/java.base
[6.642s][info][class,load] java.util.Collections$UnmodifiableCollection source: jrt:/java.base
[6.647s][info][class,load] java.util.Collections$UnmodifiableList source: jrt:/java.base
[6.654s][info][class,load] java.util.Collections$UnmodifiableRandomAccessList source: jrt:/java.base
[6.672s][info][class,load] jdk.internal.module.ModuleLoaderMap source: jrt:/java.base
[6.691s][info][class,load] jdk.internal.module.ModuleLoaderMap$Mapper source: jrt:/java.base
[6.945s][info][class,load] java.util.Collections$UnmodifiableSet source: jrt:/java.base
[6.954s][info][class,load] java.util.Collections$UnmodifiableCollection$1 source: jrt:/java.base
[7.168s][info][class,load] java.util.concurrent.CopyOnWriteArrayList source: jrt:/java.base
[7.183s][info][class,load] jdk.internal.module.ServicesCatalog$ServiceProvider source: jrt:/java.base
[7.231s][info][class,load] java.lang.ModuleLayer$Controller source: jrt:/java.base
[7.243s][info][class,load] jdk.internal.module.IllegalAccessLogger$Mode source: jrt:/java.base
[7.253s][info][class,load] jdk.internal.module.IllegalAccessLogger$Builder source: jrt:/java.base
[7.290s][info][class,load] jdk.internal.module.ModuleBootstrap$2 source: jrt:/java.base
[7.362s][info][class,load] java.util.HashMap$EntrySet source: jrt:/java.base
[7.383s][info][class,load] java.util.HashMap$EntryIterator source: jrt:/java.base
[7.578s][info][class,load] jdk.internal.module.IllegalAccessLogger source: jrt:/java.base
openjdk version "9-mindstorms"
OpenJDK Runtime Environment (build 9-mindstorms+0-adhoc..jdk9)
OpenJDK Minimal VM (build 9-mindstorms+0-adhoc..jdk9, mixed mode)
[7.660s][info][class,load] java.lang.Shutdown source: jrt:/java.base
[7.666s][info][class,load] java.lang.Shutdown$Lock source: jrt:/java.base

But, there is a problem: missing management subsystem (which I haven't enabled) makes ev3dev-lang-java upset:

Exception in thread "main" java.lang.InternalError: Unsupported Management version
    at java.base/java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.base/java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.base/java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.base/java.lang.System.loadLibrary(Unknown Source)
    at java.management/java.lang.management.ManagementFactory.lambda$static$8(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.management/java.lang.management.ManagementFactory.<clinit>(Unknown Source)
    at ch.qos.logback.classic.joran.action.JMXConfiguratorAction.begin(JMXConfiguratorAction.java:61)
    at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
    at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
    at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
    at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
    at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
    at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
    at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
    at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
    at ev3dev.hardware.EV3DevFileSystem.<clinit>(EV3DevFileSystem.java:15)
    at ev3dev.misc.BumperCar.<clinit>(BumperCar.java:19)

Recompiling with more features enabled should help (and should make more benchmarking data available). Let's try! :smile:

JakubVanek commented 6 years ago

Hmm, JShell refuses to work on minimal JVM as well:

robot@ev3dev:~/images/jdk/bin$ ./jshell 
Jan 03, 2018 6:20:01 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Launching JShell execution engine threw: Debugging agents are not supported in this VM
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
jabrena commented 6 years ago

Do you like if we create a new repo to store the stable version of OpenJDK for EV3 on it? We could have a folder for OpenJ9 and OpenJDK?

jabrena commented 6 years ago

JShell is a nice feature to test on EV3. It is a key feature for Java 9. In few days, I could join for the tests.

jabrena commented 6 years ago

Idea: Using JShell, it could be possible to load latest library and dependencies on JShell to interact with the robot for experiments. It could be nice in terms of education. https://stackoverflow.com/questions/43111018/how-to-import-external-libraries-in-jshell-java-9/43112866

The installer could install everything with the execution of the script: https://github.com/ev3dev-lang-java/installer

Upgrading the java module: https://github.com/ev3dev-lang-java/installer/blob/master/modules/java.sh

we could install OpenJDK 9 or OpenJ9, depending of the results of the JVM benchmark.

Juan Antonio

JakubVanek commented 6 years ago

https://drive.google.com/open?id=1jzRwYsR_Ya4hk-eqVlp0ACNpCo68DiOA But this build is really an overkill. The configure line:

bash ./configure --openjdk-target=arm-linux-gnueabi --with-abi-profile=arm-ev3 --disable-headless-only --with-freetype-lib=/usr/lib/arm-linux-gnueabi --with-freetype-include=/usr/include --with-jvm-variants=server,client,minimal --enable-ccache --with-extra-cflags="-Os -Wno-maybe-uninitialized -D__SOFTFP__" --with-version-pre="mindstorms" AR="arm-linux-gnueabi-gcc-ar" NM="arm-linux-gnueabi-gcc-nm" BUILD_AR="gcc-ar" BUILD_NM="gcc-nm"

Here are results from the JVM benchmark (I haven't averaged the values, so it's mostly useless):

robot@ev3dev:~$ java -client -jar jvm-benchmark-all-0.1.0.jar 
GeneralBench 1.2
       6 byte[16384] manual copies:        97 ms    1013443 bytes/sec
    1220 byte[16384] arraycopies:         151 ms  132374039 bytes/sec
      24 int[4096] manual copies:         105 ms    3744914 bytes/sec
    1220 int[4096] arraycopies:           145 ms  137851586 bytes/sec
  200000 byte add:                        100 ms    2000000 ops/sec
  200000 byte sub:                          2 ms  100000000 ops/sec
  200000 byte mul:                          3 ms   66666666 ops/sec
  200000 byte div:                         34 ms    5882352 ops/sec
  200000 short add:                        97 ms    2061855 ops/sec
  200000 short sub:                         1 ms  200000000 ops/sec
  200000 short mul:                         2 ms  100000000 ops/sec
  200000 short div:                        41 ms    4878048 ops/sec
  200000 char add:                         97 ms    2061855 ops/sec
  200000 char sub:                          2 ms  100000000 ops/sec
  200000 char mul:                          2 ms  100000000 ops/sec
  200000 char div:                         36 ms    5555555 ops/sec
  200000 int add:                          92 ms    2173913 ops/sec
  200000 int sub:                           1 ms  200000000 ops/sec
  200000 int mul:                           1 ms  200000000 ops/sec
  200000 int div:                          76 ms    2631578 ops/sec
  200000 long add:                        299 ms     668896 ops/sec
  200000 long sub:                        167 ms    1197604 ops/sec
  200000 long mul:                          1 ms  200000000 ops/sec
  200000 long div:                        159 ms    1257861 ops/sec
  200000 float add:                       144 ms    1388888 ops/sec
  200000 float sub:                         1 ms  200000000 ops/sec
  200000 float mul:                         1 ms  200000000 ops/sec
  200000 float div:                         1 ms  200000000 ops/sec
  200000 double add:                      169 ms    1183431 ops/sec
  200000 double sub:                        1 ms  200000000 ops/sec
  200000 double mul:                        1 ms  200000000 ops/sec
  200000 double div:                        1 ms  200000000 ops/sec
  200000 method calls:                    103 ms    1941747 ops/sec
  200000 static method calls:             102 ms    1960784 ops/sec
    2000 string concats:                  598 ms       3344 ops/sec
   20000 string compares (easy):          122 ms     163934 ops/sec
    1000 string compares (hard):            6 ms     166666 ops/sec
   20000 object creations:                183 ms     109289 ops/sec
 6242048 Total Loop Executions:          6177 ms    1010530 loops/sec
Note: each Loop Execution includes multiple Java operations
robot@ev3dev:~$ java -minimal -jar jvm-benchmark-all-0.1.0.jar 
GeneralBench 1.2
       6 byte[16384] manual copies:        81 ms    1213629 bytes/sec
    1220 byte[16384] arraycopies:         129 ms  154949457 bytes/sec
      24 int[4096] manual copies:         107 ms    3674915 bytes/sec
    1220 int[4096] arraycopies:           133 ms  150289323 bytes/sec
  200000 byte add:                         96 ms    2083333 ops/sec
  200000 byte sub:                          1 ms  200000000 ops/sec
  200000 byte mul:                          3 ms   66666666 ops/sec
  200000 byte div:                         34 ms    5882352 ops/sec
  200000 short add:                        97 ms    2061855 ops/sec
  200000 short sub:                         2 ms  100000000 ops/sec
  200000 short mul:                         1 ms  200000000 ops/sec
  200000 short div:                        41 ms    4878048 ops/sec
  200000 char add:                         97 ms    2061855 ops/sec
  200000 char sub:                          2 ms  100000000 ops/sec
  200000 char mul:                          1 ms  200000000 ops/sec
  200000 char div:                         40 ms    5000000 ops/sec
  200000 int add:                          92 ms    2173913 ops/sec
  200000 int sub:                           1 ms  200000000 ops/sec
  200000 int mul:                           1 ms  200000000 ops/sec
  200000 int div:                          78 ms    2564102 ops/sec
  200000 long add:                        284 ms     704225 ops/sec
  200000 long sub:                        154 ms    1298701 ops/sec
  200000 long mul:                          1 ms  200000000 ops/sec
  200000 long div:                        157 ms    1273885 ops/sec
  200000 float add:                       143 ms    1398601 ops/sec
  200000 float sub:                         1 ms  200000000 ops/sec
  200000 float mul:                         1 ms  200000000 ops/sec
  200000 float div:                         1 ms  200000000 ops/sec
  200000 double add:                      175 ms    1142857 ops/sec
  200000 double sub:                        1 ms  200000000 ops/sec
  200000 double mul:                        1 ms  200000000 ops/sec
  200000 double div:                        1 ms  200000000 ops/sec
  200000 method calls:                    131 ms    1526717 ops/sec
  200000 static method calls:             128 ms    1562500 ops/sec
    2000 string concats:                  528 ms       3787 ops/sec
   20000 string compares (easy):           89 ms     224719 ops/sec
    1000 string compares (hard):            3 ms     333333 ops/sec
   20000 object creations:                174 ms     114942 ops/sec
 6242048 Total Loop Executions:          6066 ms    1029022 loops/sec
Note: each Loop Execution includes multiple Java operations
robot@ev3dev:~$ java -client -Xint -jar jvm-benchmark-all-0.1.0.jar 
GeneralBench 1.2
       6 byte[16384] manual copies:        90 ms    1092266 bytes/sec
    1220 byte[16384] arraycopies:         141 ms  141762269 bytes/sec
      24 int[4096] manual copies:          77 ms    5106701 bytes/sec
    1220 int[4096] arraycopies:           140 ms  142774857 bytes/sec
  200000 byte add:                         60 ms    3333333 ops/sec
  200000 byte sub:                         61 ms    3278688 ops/sec
  200000 byte mul:                         61 ms    3278688 ops/sec
  200000 byte div:                         92 ms    2173913 ops/sec
  200000 short add:                        60 ms    3333333 ops/sec
  200000 short sub:                        60 ms    3333333 ops/sec
  200000 short mul:                        59 ms    3389830 ops/sec
  200000 short div:                        93 ms    2150537 ops/sec
  200000 char add:                         66 ms    3030303 ops/sec
  200000 char sub:                         61 ms    3278688 ops/sec
  200000 char mul:                         62 ms    3225806 ops/sec
  200000 char div:                         94 ms    2127659 ops/sec
  200000 int add:                          56 ms    3571428 ops/sec
  200000 int sub:                          52 ms    3846153 ops/sec
  200000 int mul:                          52 ms    3846153 ops/sec
  200000 int div:                          83 ms    2409638 ops/sec
  200000 long add:                         61 ms    3278688 ops/sec
  200000 long sub:                         63 ms    3174603 ops/sec
  200000 long mul:                         84 ms    2380952 ops/sec
  200000 long div:                        203 ms     985221 ops/sec
  200000 float add:                       103 ms    1941747 ops/sec
  200000 float sub:                       108 ms    1851851 ops/sec
  200000 float mul:                        89 ms    2247191 ops/sec
  200000 float div:                       161 ms    1242236 ops/sec
  200000 double add:                      141 ms    1418439 ops/sec
  200000 double sub:                      144 ms    1388888 ops/sec
  200000 double mul:                      127 ms    1574803 ops/sec
  200000 double div:                      507 ms     394477 ops/sec
  200000 method calls:                    249 ms     803212 ops/sec
  200000 static method calls:             164 ms    1219512 ops/sec
    2000 string concats:                  880 ms       2272 ops/sec
   20000 string compares (easy):          718 ms      27855 ops/sec
    1000 string compares (hard):            5 ms     200000 ops/sec
   20000 object creations:                103 ms     194174 ops/sec
 6242048 Total Loop Executions:         10760 ms     580115 loops/sec
Note: each Loop Execution includes multiple Java operations
robot@ev3dev:~$ java -minimal -Xint -jar jvm-benchmark-all-0.1.0.jar 
GeneralBench 1.2
       6 byte[16384] manual copies:       141 ms     697191 bytes/sec
    1220 byte[16384] arraycopies:         113 ms  176889203 bytes/sec
      24 int[4096] manual copies:          79 ms    4977417 bytes/sec
    1220 int[4096] arraycopies:           114 ms  175337543 bytes/sec
  200000 byte add:                         57 ms    3508771 ops/sec
  200000 byte sub:                         56 ms    3571428 ops/sec
  200000 byte mul:                         58 ms    3448275 ops/sec
  200000 byte div:                         91 ms    2197802 ops/sec
  200000 short add:                        57 ms    3508771 ops/sec
  200000 short sub:                        57 ms    3508771 ops/sec
  200000 short mul:                        58 ms    3448275 ops/sec
  200000 short div:                        89 ms    2247191 ops/sec
  200000 char add:                         59 ms    3389830 ops/sec
  200000 char sub:                         58 ms    3448275 ops/sec
  200000 char mul:                         60 ms    3333333 ops/sec
  200000 char div:                         91 ms    2197802 ops/sec
  200000 int add:                          47 ms    4255319 ops/sec
  200000 int sub:                          47 ms    4255319 ops/sec
  200000 int mul:                          49 ms    4081632 ops/sec
  200000 int div:                          80 ms    2500000 ops/sec
  200000 long add:                         59 ms    3389830 ops/sec
  200000 long sub:                         59 ms    3389830 ops/sec
  200000 long mul:                         83 ms    2409638 ops/sec
  200000 long div:                        204 ms     980392 ops/sec
  200000 float add:                       102 ms    1960784 ops/sec
  200000 float sub:                       103 ms    1941747 ops/sec
  200000 float mul:                        83 ms    2409638 ops/sec
  200000 float div:                       159 ms    1257861 ops/sec
  200000 double add:                      141 ms    1418439 ops/sec
  200000 double sub:                      147 ms    1360544 ops/sec
  200000 double mul:                      127 ms    1574803 ops/sec
  200000 double div:                      505 ms     396039 ops/sec
  200000 method calls:                    247 ms     809716 ops/sec
  200000 static method calls:             234 ms     854700 ops/sec
    2000 string concats:                  592 ms       3378 ops/sec
   20000 string compares (easy):          405 ms      49382 ops/sec
    1000 string compares (hard):            3 ms     333333 ops/sec
   20000 object creations:                100 ms     200000 ops/sec
 6242048 Total Loop Executions:         10020 ms     622958 loops/sec
Note: each Loop Execution includes multiple Java operations

And the ev3dev samples might work now, it crashes on that it can't find a lego-* class directory in sysfs (I don't have any sensors plugged in, so it's OK).

JakubVanek commented 6 years ago

I agree with the idea of creating a repository for it. I think creating some Dockerfiles and storing builds through Releases might work well.

jabrena commented 6 years ago

any suggestion for the name?, Tomorrow, I will create a repo and I will give grants to upload the distro and for this repo too: https://github.com/ev3dev-lang-java/jvm-benchmark

Did you run JShell finally?

The idea to use a Dockerfile is perfect to automate the process. We could build in automatic way with Travis and create snapshots in the same way that EV3Dev: https://oss.jfrog.org/list/oss-snapshot-local/org/ev3dev/brickstrap/

But little by little.

Juan Antonio

jabrena commented 6 years ago

Questions:

jabrena commented 6 years ago

Fetching the results from Oracle JRE 8 with this configuration:

java -minimal -jar jvm-benchmark-all-0.1.0.jar

Results: https://docs.google.com/spreadsheets/d/1XfGV6FP67L8LtgnMeh2gZKCx1xj23J9dRFGPn58Y9c0/edit?usp=sharing

This new build has better performance that the previous usage of OpenJDK 8 on EV3.

I would like to know what is the flag -minimum

JakubVanek commented 6 years ago

Yay! JShell is working! But there's an issue with it: it takes forever to load. And it takes a lot of memory. start The kills are me losing the patience with slow startup. And... oh... it takes several seconds before the typed letters start to appear on the prompt.

jabrena commented 6 years ago

Do you have Twitter account?

jabrena commented 6 years ago

Can you paste the result of this command when JShell is executed?

ps aux | sort -n -k 4

I have executed many times this command and I know the normal processes. I want to observe one aspect.

jabrena commented 6 years ago

A proposal for the future repository to store the builds about OpenJDK 9 builds: openjdk-9-ev3 What is your opinion @JakubVanek ?

Juan Antonio

jabrena commented 6 years ago

What is the content of the folder /bin after the compilation? How many commands is possible to execute?

jabrena commented 6 years ago

Related issue: https://github.com/ev3dev-lang-java/ev3dev-lang-java/issues/220

JakubVanek commented 6 years ago

any suggestion for the name?

I don't know, but jre sound OK.

EDIT: I'm too slow. :smile: Yeah, openjdk-9-ev3 is more informational.

The server VM doesn't work on ARM < v7. Why?

The VM refuses to start, printing this error (there should be -J-client -R-client or minimal):

robot@ev3dev:~/images/jdk/bin$ ./jshell
Error occurred during initialization of VM
Server VM is only supported on ARMv7+ VFP

The C2 JIT was probably designed with newer server-grade hardware in mind.

What is the difference between client & minimal? I didn´t use that flag in the past.

It uses different JVM variants. I actually don't know the actual difference, but this article gives me some idea. At least one of the flags is needed on this build, because the JVM defaults to the broken server JIT.

We're probably not going to need non-headless configuration. Any Java process running on EV3 will only use non visual elements.

Well, the only option probably would be to tunnel X11 through SSH.

Do you have Twitter account?

Yeah, https://twitter.com/sileny_linuxak.

jshell

I have started it as ./jshell -J-minimal -R-minimal --execution local

robot@ev3dev:~$ ps aux | sort -n -k 4
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
avahi      251  0.0  0.0   3840    44 ?        Ss   22:36   0:00 avahi-daemon: running [ev3dev.local]
avahi      269  0.0  0.0   3840    44 ?        S    22:36   0:00 avahi-daemon: chroot helper
message+   259  0.2  0.0   5688    44 ?        Ss   22:36   0:01 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
robot      490  0.0  0.0   4952    44 ?        Ss   22:39   0:00 /lib/systemd/systemd --user
robot      493  0.0  0.0  25124    40 ?        S    22:39   0:00 (sd-pam)         
robot      496  0.1  0.0  12168    44 ?        S    22:39   0:00 sshd: robot@pts/0   
robot      498  0.0  0.0   5160    20 pts/0    Ss   22:39   0:00 -bash
root         2  0.0  0.0      0     0 ?        S    22:35   0:00 [kthreadd]
root         3  0.5  0.0      0     0 ?        S    22:35   0:03 [ksoftirqd/0]
root         5  0.0  0.0      0     0 ?        S<   22:35   0:00 [kworker/0:0H]
root         6  0.0  0.0      0     0 ?        S    22:35   0:00 [kworker/u2:0]
root         7  0.4  0.0      0     0 ?        S    22:35   0:02 [rcu_preempt]
root         8  0.0  0.0      0     0 ?        S    22:35   0:00 [rcu_sched]
root         9  0.0  0.0      0     0 ?        S    22:35   0:00 [rcu_bh]
root        10  0.0  0.0      0     0 ?        S    22:35   0:00 [kdevtmpfs]
root        11  0.0  0.0      0     0 ?        S<   22:35   0:00 [netns]
root        12  0.0  0.0      0     0 ?        S<   22:35   0:00 [writeback]
root        13  0.0  0.0      0     0 ?        S<   22:35   0:00 [crypto]
root        14  0.0  0.0      0     0 ?        S<   22:35   0:00 [bioset]
root        15  0.0  0.0      0     0 ?        S<   22:35   0:00 [kblockd]
root        16  0.3  0.0      0     0 ?        S    22:35   0:02 [kworker/0:1]
root        17  0.0  0.0      0     0 ?        S<   22:35   0:00 [rpciod]
root        18  4.3  0.0      0     0 ?        S    22:35   0:29 [kswapd0]
root        19  0.0  0.0      0     0 ?        S    22:35   0:00 [fsnotify_mark]
root        20  0.0  0.0      0     0 ?        S<   22:35   0:00 [nfsiod]
root        43  0.0  0.0      0     0 ?        S<   22:35   0:00 [bioset]
root        44  0.0  0.0      0     0 ?        S<   22:35   0:00 [bioset]
root        45  0.0  0.0      0     0 ?        S<   22:35   0:00 [bioset]
root        46  0.0  0.0      0     0 ?        S<   22:35   0:00 [bioset]
root        47  0.0  0.0      0     0 ?        S<   22:35   0:00 [bioset]
root        48  0.0  0.0      0     0 ?        S    22:35   0:00 [irq/56-spi_davi]
root        49  0.0  0.0      0     0 ?        S    22:35   0:00 [spi1]
root        50  0.0  0.0      0     0 ?        S    22:35   0:00 [irq/20-spi_davi]
root        51  5.5  0.0      0     0 ?        S    22:35   0:37 [spi0]
root        52  0.0  0.0      0     0 ?        S    22:35   0:00 [kworker/0:2]
root        54  0.0  0.0      0     0 ?        S<   22:35   0:00 [deferwq]
root        55  0.0  0.0      0     0 ?        S    22:35   0:00 [kworker/u2:2]
root        56  0.0  0.0      0     0 ?        S<   22:35   0:00 [bioset]
root        57  1.7  0.0      0     0 ?        S    22:35   0:11 [mmcqd/0]
root        58  0.0  0.0      0     0 ?        S    22:35   0:00 [jbd2/mmcblk0p2-]
root        59  0.0  0.0      0     0 ?        S<   22:35   0:00 [ext4-rsv-conver]
root       112  0.2  0.0  10844    44 ?        Ss   22:36   0:01 /lib/systemd/systemd-udevd
root       213  0.0  0.0      0     0 ?        S<   22:36   0:00 [kworker/0:1H]
root       321  0.0  0.0      0     0 ?        S<   22:36   0:00 [kworker/u3:0]
root       322  0.0  0.0      0     0 ?        S<   22:36   0:00 [hci0]
root       323  0.0  0.0      0     0 ?        S<   22:36   0:00 [hci0]
root       326  0.0  0.0      0     0 ?        S<   22:36   0:00 [kworker/u3:2]
root       328  0.0  0.0   2004    40 ?        S<   22:36   0:00 /usr/bin/hciattach -t 30 /dev/ttyS2 texas 2000000 flow nosleep
root       330  0.1  0.0   7912    48 ?        Ss   22:36   0:01 /usr/sbin/connmand -n
root       331  0.0  0.0   4996    48 ?        Ss   22:36   0:00 /usr/lib/bluetooth/bluetoothd
root       347  0.0  0.0   7912    44 ?        Ss   22:36   0:00 /usr/sbin/sshd -D
root       355  0.0  0.0   6908    44 ?        Ss   22:36   0:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
root       485  0.1  0.0  12168    44 ?        Ss   22:39   0:00 sshd: robot [priv]  
root       503  0.1  0.0  12168    44 ?        Ss   22:39   0:00 sshd: robot [priv]  
root       596  0.0  0.0      0     0 ?        S    22:45   0:00 [kworker/0:0]
root       613  0.2  0.0      0     0 ?        S    22:46   0:00 [kworker/u2:1]
ntp        383  0.2  0.4   5936   236 ?        Ss   22:36   0:01 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:110
robot      510  0.1  0.6  12168   388 ?        S    22:39   0:00 sshd: robot@pts/1   
root        91  0.6  0.9  20432   564 ?        Ss   22:35   0:04 /lib/systemd/systemd-journald
root       256  0.1  1.1   3816   688 ?        Ss   22:36   0:00 /lib/systemd/systemd-logind
robot      512  0.2  1.3   5160   812 pts/1    Ss   22:39   0:01 -bash
root       343  1.8  1.5  53376   916 tty1     Ssl+ 22:36   0:12 /usr/sbin/brickman
root       457  0.1  1.7  21020  1008 ?        Ss   22:37   0:01 /usr/sbin/nmbd -D
robot      617 12.0  2.3   6772  1404 pts/1    S+   22:47   0:00 sort -n -k 4
root         1  1.4  2.3  23760  1400 ?        Ds   22:35   0:09 /sbin/init splash
robot      616 45.0  2.9   4652  1732 pts/1    R+   22:47   0:00 ps aux
robot      576 73.1 31.4 100664 18420 pts/0    Sl+  22:42   3:27 ./jshell -J-minimal -R-minimal --execution local
jabrena commented 6 years ago

It is true that Jshell consume a lot of memory.

And the result of:

free -m
JakubVanek commented 6 years ago

It is now trying to do something with int x = 0. It has already taken a few minutes.

robot@ev3dev:~$ free -m
             total       used       free     shared    buffers     cached
Mem:            57         55          1          0          1          2
-/+ buffers/cache:         51          5
Swap:           95         43         52

The system is swapping to death, as far as I can tell.

JakubVanek commented 6 years ago

JShell may provide some "split-mode" execution, when the executing JVM would be on the brick, whether the compiling JVM would be on a computer. http://hg.openjdk.java.net/jdk9/jdk9/langtools/file/65bfdabaab9c/src/jdk.jshell/share/classes/jdk/jshell/spi/package-info.java

jabrena commented 6 years ago

I have just created the new repo: https://github.com/ev3dev-lang-java/openjdk-9-ev3

I added permissions to work on in directly.

How many seconds to run a simple example: https://github.com/ev3dev-lang-java/template_project_gradle

JakubVanek commented 6 years ago

I'll take a look tomorrow, I should give myself some sleep.

jabrena commented 6 years ago

Yes, it could be interesting that Split mode, but if you like we should return to the beginning, the execution of Java 9 bytecodes. With Oracle JRE8, the time to run a Hello World example was 8 seconds but now with the fresh OpenJDK 9 for EV3, what is the time?

Good night mate.

You are the man!!!

Cheers

Juan Antonio

JakubVanek commented 6 years ago
robot@ev3dev:~$ echo 3 | sudo tee /proc/sys/vm/drop_caches 
3
robot@ev3dev:~$ time images/jre/bin/java -client -Xshare:on -jar template_project_gradle-all-0.2.0.jar; time images/jre/bin/java -client -Xshare:on -jar template_project_gradle-all-0.2.0.jar; time images/jre/bin/java -client -Xshare:on -jar template_project_gradle-all-0.2.0.jar
Creating Motor A & B
2018-01-04 06:09:55 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 06:09:55 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outA
2018-01-04 06:09:55 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 06:09:56 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port4/address
2018-01-04 06:09:56 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 06:09:56 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 06:09:57 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor4/address
2018-01-04 06:09:57 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 06:09:57 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outB
2018-01-04 06:09:57 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 06:09:57 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port5/address
2018-01-04 06:09:57 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 06:09:57 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 06:09:57 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor5/address
Defining the Stop mode
Defining motor speed
Go Forward with the motors
Stop motors
Go Backward with the motors
Stop motors
Checking Battery
2018-01-04 06:10:02 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
Votage: 8.4038
Emergency Stop

real    1m11.152s
user    0m46.600s
sys 0m2.360s
Creating Motor A & B
2018-01-04 06:11:00 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 06:11:01 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outA
2018-01-04 06:11:01 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 06:11:01 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port4/address
2018-01-04 06:11:01 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 06:11:02 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 06:11:02 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor6/address
2018-01-04 06:11:02 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 06:11:02 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outB
2018-01-04 06:11:02 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 06:11:02 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port5/address
2018-01-04 06:11:02 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 06:11:03 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 06:11:03 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor7/address
Defining the Stop mode
Defining motor speed
Go Forward with the motors
Stop motors
Go Backward with the motors
Stop motors
Checking Battery
2018-01-04 06:11:07 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
Votage: 8.4038
Emergency Stop

real    1m5.363s
user    0m45.070s
sys 0m1.990s
Creating Motor A & B
2018-01-04 06:12:04 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 06:12:05 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outA
2018-01-04 06:12:05 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 06:12:05 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port4/address
2018-01-04 06:12:05 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 06:12:06 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 06:12:06 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor8/address
2018-01-04 06:12:06 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 06:12:06 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outB
2018-01-04 06:12:06 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 06:12:06 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port5/address
2018-01-04 06:12:06 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 06:12:06 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 06:12:07 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor9/address
Defining the Stop mode
Defining motor speed
Go Forward with the motors
Stop motors
Go Backward with the motors
Stop motors
Checking Battery
2018-01-04 06:12:11 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
Votage: 8.4038
Emergency Stop

real    1m3.652s
user    0m44.800s
sys 0m1.830s
robot@ev3dev:~$ 

It takes quite a long time. There's a noticeable delay when loading the motors -- additional classes are loaded. I have to run to school :smile:

jabrena commented 6 years ago

Can you test a Hello World? https://introcs.cs.princeton.edu/java/11hello/HelloWorld.java.html

jabrena commented 6 years ago

Yes, that behaviour is normal, when the jvm begin, it has to load classes. My question is the number of seconds from the execution of the command until the first log message. It should be in 8 seconds or less. This is my question.

jabrena commented 6 years ago

Add this flag to show classes loading: https://stackoverflow.com/questions/10230279/java-verbose-class-loading

JakubVanek commented 6 years ago

Hmm, Minimal JVM is faster: No, the program just fails to start.

robot@ev3dev:~$ echo 3 | sudo tee /proc/sys/vm/drop_caches 
3
robot@ev3dev:~$ time images/jre/bin/java -minimal -jar template_project_gradle-all-0.2.0.jar; time images/jre/bin/java -minimal -jar template_project_gradle-all-0.2.0.jar; time images/jre/bin/java -minimal -jar template_project_gradle-all-0.2.0.jar
Creating Motor A & B
Exception in thread "main" java.lang.InternalError: Unsupported Management version
    at java.base/java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.base/java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.base/java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.base/java.lang.System.loadLibrary(Unknown Source)
    at java.management/java.lang.management.ManagementFactory.lambda$static$8(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.management/java.lang.management.ManagementFactory.<clinit>(Unknown Source)
    at ch.qos.logback.classic.joran.action.JMXConfiguratorAction.begin(JMXConfiguratorAction.java:61)
    at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
    at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
    at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
    at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
    at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
    at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
    at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
    at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
    at ev3dev.hardware.EV3DevFileSystem.<clinit>(EV3DevFileSystem.java:15)
    at examples.MyFirstRobot.main(MyFirstRobot.java:13)

real    0m35.872s
user    0m25.450s
sys 0m1.600s
Creating Motor A & B
Exception in thread "main" java.lang.InternalError: Unsupported Management version
    at java.base/java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.base/java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.base/java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.base/java.lang.System.loadLibrary(Unknown Source)
    at java.management/java.lang.management.ManagementFactory.lambda$static$8(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.management/java.lang.management.ManagementFactory.<clinit>(Unknown Source)
    at ch.qos.logback.classic.joran.action.JMXConfiguratorAction.begin(JMXConfiguratorAction.java:61)
    at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
    at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
    at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
    at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
    at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
    at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
    at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
    at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
    at ev3dev.hardware.EV3DevFileSystem.<clinit>(EV3DevFileSystem.java:15)
    at examples.MyFirstRobot.main(MyFirstRobot.java:13)

real    0m34.040s
user    0m25.590s
sys 0m1.340s
Creating Motor A & B
Exception in thread "main" java.lang.InternalError: Unsupported Management version
    at java.base/java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.base/java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.base/java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.base/java.lang.System.loadLibrary(Unknown Source)
    at java.management/java.lang.management.ManagementFactory.lambda$static$8(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.management/java.lang.management.ManagementFactory.<clinit>(Unknown Source)
    at ch.qos.logback.classic.joran.action.JMXConfiguratorAction.begin(JMXConfiguratorAction.java:61)
    at ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:269)
    at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:145)
    at ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:128)
    at ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:165)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:152)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:110)
    at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:53)
    at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:75)
    at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:150)
    at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:84)
    at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55)
    at org.slf4j.LoggerFactory.bind(LoggerFactory.java:150)
    at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:124)
    at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:412)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:357)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:383)
    at ev3dev.hardware.EV3DevFileSystem.<clinit>(EV3DevFileSystem.java:15)
    at examples.MyFirstRobot.main(MyFirstRobot.java:13)

real    0m34.194s
user    0m25.520s
sys 0m1.460s

And Client JVM without CDS is the worst:

robot@ev3dev:~$ echo 3 | sudo tee /proc/sys/vm/drop_caches 
[sudo] password for robot: 
3
robot@ev3dev:~$ time images/jre/bin/java -client -Xshare:off -jar template_project_gradle-all-0.2.0.jar; time images/jre/bin/java -client -Xshare:off -jar template_project_gradle-all-0.2.0.jar; time images/jre/bin/java -client -Xshare:off -jar template_project_gradle-all-0.2.0.jar
Creating Motor A & B
2018-01-04 14:41:23 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 14:41:23 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outA
2018-01-04 14:41:23 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 14:41:24 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port4/address
2018-01-04 14:41:24 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 14:41:24 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 14:41:24 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor10/address
2018-01-04 14:41:24 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 14:41:24 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outB
2018-01-04 14:41:24 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 14:41:25 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port5/address
2018-01-04 14:41:25 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 14:41:25 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 14:41:25 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor11/address
Defining the Stop mode
Defining motor speed
Go Forward with the motors
Stop motors
Go Backward with the motors
Stop motors
Checking Battery
2018-01-04 14:41:30 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
Votage: 8.3938
Emergency Stop

real    1m17.309s
user    0m51.090s
sys 0m2.980s
Creating Motor A & B
2018-01-04 14:42:36 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 14:42:37 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outA
2018-01-04 14:42:37 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 14:42:37 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port4/address
2018-01-04 14:42:37 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 14:42:38 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 14:42:38 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor12/address
2018-01-04 14:42:38 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 14:42:38 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outB
2018-01-04 14:42:38 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 14:42:38 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port5/address
2018-01-04 14:42:38 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 14:42:39 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 14:42:39 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor13/address
Defining the Stop mode
Defining motor speed
Go Forward with the motors
Stop motors
Go Backward with the motors
Stop motors
Checking Battery
2018-01-04 14:42:43 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
Votage: 8.3938
Emergency Stop

real    1m13.373s
user    0m50.930s
sys 0m2.310s
Creating Motor A & B
2018-01-04 14:43:47 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 14:43:48 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outA
2018-01-04 14:43:48 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 14:43:48 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port4/address
2018-01-04 14:43:48 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 14:43:49 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outA
2018-01-04 14:43:49 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor14/address
2018-01-04 14:43:49 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
2018-01-04 14:43:49 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Detecting motor on port: outB
2018-01-04 14:43:49 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 14:43:49 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/lego-port/port5/address
2018-01-04 14:43:49 [main] DEBUG e.a.lego.motors.BaseRegulatedMotor - Setting port in mode: tacho-motor
2018-01-04 14:43:50 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detecting device on port: outB
2018-01-04 14:43:50 [main] DEBUG ev3dev.hardware.EV3DevDevice - Detected port on path: /sys/class/tacho-motor/motor15/address
Defining the Stop mode
Defining motor speed
Go Forward with the motors
Stop motors
Go Backward with the motors
Stop motors
Checking Battery
2018-01-04 14:43:54 [main] DEBUG ev3dev.hardware.EV3DevFileSystem - Root Path: /sys/class
Votage: 8.3938
Emergency Stop

real    1m11.123s
user    0m49.770s
sys 0m2.260s
robot@ev3dev:~$ 
JakubVanek commented 6 years ago
robot@ev3dev:~$ time images/jre/bin/java -client -Xshare:on -verbose:class -jar template_project_gradle-all-0.2.0.jar; time images/jre/bin/java -client -Xshare:on -verbose:class -jar template_project_gradle-all-0.2.0.jar; time images/jre/bin/java -client -Xshare:on -verbose:class -jar template_project_gradle-all-0.2.0.jar

Run 1:

[...]
[11.762s][info][class,load] java.lang.PublicMethods$Key source: shared objects file
Creating Motor A & B
[...]
[73.049s][info][class,load] examples.MyFirstRobot$1 source: file:/home/robot/template_project_gradle-all-0.2.0.jar
Defining the Stop mode
[...]
real    1m18.496s
user    0m47.930s
sys 0m3.020s

Run 2:

[...]
[10.517s][info][class,load] java.lang.PublicMethods$Key source: shared objects file
Creating Motor A & B
[...]
[68.642s][info][class,load] examples.MyFirstRobot$1 source: file:/home/robot/template_project_gradle-all-0.2.0.jar
Defining the Stop mode
[...]
real    1m13.617s
user    0m47.500s
sys 0m2.710s

Run 3:

[...]
[10.613s][info][class,load] java.lang.PublicMethods$Key source: shared objects file
Creating Motor A & B
[...]
[69.769s][info][class,load] examples.MyFirstRobot$1 source: file:/home/robot/template_project_gradle-all-0.2.0.jar
Defining the Stop mode
[...]
real    1m14.663s
user    0m47.900s
sys 0m2.500s

I hope that it's only the -verbose:class switch that made it to slow down.

JakubVanek commented 6 years ago
robot@ev3dev:~$ time ./images/jdk/bin/java -client HelloWorld; time ./images/jdk/bin/java -client HelloWorld; time ./images/jdk/bin/java -client HelloWorld
Hello, World

real    0m9.323s
user    0m5.240s
sys 0m0.570s
Hello, World

real    0m7.060s
user    0m5.120s
sys 0m0.510s
Hello, World

real    0m6.894s
user    0m5.040s
sys 0m0.450s

Cached third run:

[0.301s][info][class,load] opened: /home/robot/images/jdk/lib/modules
[...]
[8.765s][info][class,load] java.lang.Void source: shared objects file
Hello, World
[8.817s][info][class,load] java.lang.Shutdown source: shared objects file
[8.823s][info][class,load] java.lang.Shutdown$Lock source: shared objects file

real    0m8.999s
user    0m5.440s
sys 0m0.530s

Minimal VM:

robot@ev3dev:~$ time ./images/jdk/bin/java -minimal HelloWorld; time ./images/jdk/bin/java -minimal HelloWorld; time ./images/jdk/bin/java -minimal HelloWorld
Hello, World

real    0m11.680s
user    0m7.950s
sys 0m0.750s
Hello, World

real    0m10.919s
user    0m8.160s
sys 0m0.580s
Hello, World

real    0m10.843s
user    0m8.090s
sys 0m0.470s
jabrena commented 6 years ago

The times is similar to Oracle JRE8. I have to test.

The build allow compiling? What is the content of the folder where is the command java? jps? javac?

JakubVanek commented 6 years ago

The zipped build is a complete built image, including a JRE as a subset. Compiling on the brick works, HelloWorld was compiled on the brick. JDK directory:

appletviewer,idlj,jar,jarsigner,java,javac,javadoc,javah,javap,jcmd,jconsole,jdb,jdeprscan,jdeps,jhsdb,jimage,jinfo,jjs,jlink,jmap,jmod,jps,jrunscript,jshell,jstack,jstat,jstatd,keytool,orbd,pack200,policytool,rmic,rmid,rmiregistry,serialver,servertool,schemagen,tnameserv,unpack200,wsgen,wsimport,xjc

JRE:

appletviewer,idlj,java,jjs,jrunscript,keytool,orbd,pack200,rmid,rmiregistry,servertool,tnameserv,unpack200
jabrena commented 6 years ago

How many seconds to compile a Hello World?

jabrena commented 6 years ago

Hi, is it possible if you commit the build in the new repo? I could upgrade the installer to start using the new openjdk build?

JakubVanek commented 6 years ago

Hi, yes, I'll do it during the weekend (maybe even today). Regarding javac on the brick, these are the measurements: Run 1:

real    1m5.669s
user    0m53.230s
sys 0m2.730s

Run 2:

real    1m4.061s
user    0m53.890s
sys 0m2.510s

Run 3:

real    1m2.507s
user    0m54.290s
sys 0m2.300s

Regards EDIT: I've used this to measure the build time: time images/jdk/bin/javac -client HelloWorld.java

jabrena commented 6 years ago

In my case, I will upgrade this project. https://github.com/ev3dev-lang-java/installer

With your development, now the process could be full automated.

I will explain:

  1. Install ev3dev
  2. Install installer in the brick.

The installer will manage: jvm, native libraries, battery-monitor...

XD

JakubVanek commented 6 years ago

Hmmm, it might be even better to prepare a debian package for it.