Java Support in webOS

From WebOS Internals
Revision as of 16:57, 18 May 2010 by Yannick56 (talk | contribs) (improve the wiki page)
Jump to navigation Jump to search

The JVM

There is a JVM in webOS. His name is OasisVM.

You can have more information when you use this command-line :

root@palm-webos-device:/# javahy --help
OasisVM: Build 107
Copyright 2005, Iventor, Inc. All Rights Reserved
Build options are: Oasis-Linux-WebConsole-LightLocks-Generational-GCC_Goto_Optimizations-SingleSlot
usage: OasisVM [options] [classfile [args]]

Note: OasisVM Build 107 with webos 1.4.1, OasisVM Build 96.2 with webOS 1.1.0 The web server for iventor.com return only 404 errors. We can see a version of this website at www.iventor.com from a couple of years ago. This company was founded by Paul Mercer.

Options in OasisVM Build 107 are :

Options are:
-classpath <path> or -cp <path>
-bootclasspath <path> or -bcp <path>
-h, --help                    Display help and exit
-m, --object-heap-size <num>  Set object heap size
-s, --vm-stack-size <num>     Set java stack size
-t, --nm-stack-size <num>     Set native methods stack size
-Xstacklimit=<num>                     Set java stack limit
-d, run the VM as a daemon
-Xms set object heap size (variant)
-Xmx set object heap size (variant)
-Xnh set native code heap size
-Xint interpreter only (disable the JIT)
-Xpreload=<filename> file containing list of classes to preload before running main
-Xpreloadout=<filename> output file containing list of classes we loaded
-verbose:[class|threads|gc|warnings] print extra debugging info
-Xprofile print periodic profiler stats
-Xgcnocopy use a non-copying garbage collection
-Xconservative use conservative collection
-Xexact use exact collection
-Xtraceall trace all classes (no class unloading)
-Xgcagressive agressive garbage collection
-Xgcdelay      wait X ms before garbage collection begins
-Xnoyank       disable rug yanking
-Xnossa        disable SSA optimizations
-XnoSSA        disable SSA optimizations
-
-nojit synonym for -Xint
-Xrandcomp     random JIT compiles
-Xbreak        debug break after initializing the VM
-Xbootbreak    debug break before initializing the VM
-XX:+HeapDumpOnOutOfMemoryError        dump heap to oom.hprof on OOM error
-Xstackdump=<filename>
-
-ms                    enable memory stats
-Xxray=fifoname        enable xray output
-Xwebconsole   enable web console at 127.0.0.1:8083

The Java process used by webOS :

root@castle:/etc# ps -ax -o user,cmd | grep java 
USER CMD
...
root@palm-webos-device:/# ps -ax -o user,cmd | grep java
root     /usr/lib/jvm/java-1.5-palm/bin/java -Xexact -m 10M -Djava.library.path=/usr/lib/jvm/java-1.5-palm/bin:/usr/lib/jvm/java-1.5-palm/jre/bin:/usr/lib -Dvm.boot.library.path=/usr/lib/jvm/java-1.5-palm/jre/bin -bootclasspath /usr/lib 
/jvm/java-1.5-palm/lib/rt.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/luni.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/nio.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/nio_char.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/security.jar:/usr/lib 
/jvm/java-1.5-palm/jre/lib/boot/archive.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/logging.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/text.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/icu4j_3.8/icu4j-3_8.jar:/usr/lib/jvm/java-1.5-palm 
jre/lib/boot/icu4j_3.8/icu4j-charsets-3_8.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/ext/icu4jni.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/sql.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/regex.jar:/usr/lib/jvm/java-1.5-palm/jre/lib 
boot/math.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/auth.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/crypto.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/x-net.jar:/usr/lib/jvm/java-1.5-palm/jre/lib/boot/annotation.jar:/usr/lib/jvm/java- 
1.5-palm/jre/lib/ext/bcprov.jar -Djava.home=/usr/lib/jvm/java-1.5-palm/jre -Djava.security.properties=/usr/lib/jvm/java-1.5-palm/jre/lib/security/java.security -Xstackdump=/var/log/stackdump.txt -Xms10M -Xmx15M -classpath /usr/lib/luna/java
/Async.jar:/usr/lib/luna/java/CarrierNetworkSettings.jar:/usr/lib/luna/java/Customization.jar:/usr/lib/luna/java/DefaultDatabaseBuilder.jar:/usr/lib/luna/java/Fnmbl-ClientApi.jar:/usr/lib/luna/java/Fnmbl-ClientFramework.jar:/usr/lib 
/luna/java /InterfaceRegistry.jar:/usr/lib/luna/java/MediaEvents.jar:/usr/lib/luna/java/Photos.jar:/usr/lib/luna/java/Utils.jar:/usr/lib/luna/java/accounts.jar:/usr/lib/luna/java/accountservices.jar:/usr/lib/luna/java/activerecord.jar: 
/usr/lib/luna/java/backup.jar:/usr/lib/luna/java/calendar.jar:/usr/lib/luna/java/contacts.jar:/usr/lib/luna/java/dataimport.jar:/usr/lib/luna/java/datamigration.jar:/usr/lib/luna/java/deviceprofile.jar:/usr/lib/luna/java/devicewipe.jar: 
/usr/lib/luna/java/facebook.jar:/usr/lib/luna/java/findapps.jar:/usr/lib/luna/java/gdata.jar:/usr/lib/luna/java/jWAP.jar:/usr/lib/luna/java/java-md5.jar:/usr/lib/luna/java/joda-time-1.5.2.jar:/usr/lib/luna/java/json.jar:/usr/lib/luna/java 
/ksoap2-j2se-full-2.1.1.jar:/usr/lib/luna/java/libmatthew-java-0.7.jar:/usr/lib/luna/java/location.jar:/usr/lib/luna/java/lunaservice.jar:/usr/lib/luna/java/mail.jar:/usr/lib/luna/java/messaging.jar:/usr/lib/luna/java/messagingrouter.jar: 
/usr/lib/luna/java/minidbus-java-2.4.jar:/usr/lib/luna/java/notes.jar:/usr/lib/luna/java/packageinfo.jar:/usr/lib/luna/java/palmipc.jar:/usr/lib/luna/java/pim.jar:/usr/lib/luna/java/pimsync.jar:/usr/lib/luna/java/rfc2445.jar:/usr/lib 
/luna/java/scheduler.jar:/usr/lib/luna/java/serviceboot.jar:/usr/lib/luna/java/serviceframework.jar:/usr/lib/luna/java/sqlitejdbc-v053.jar:/usr/lib/luna/java/superlog.jar:/usr/lib/luna/java/tasks.jar:/usr/lib/luna/java/telephony.jar:/usr/lib 
/luna/java/zone-info.jar -DtimeZoneId=CET -Djava.util.logging.config.file=/etc/logging.properties -verbose:gc -Xwebconsole -Xoomexit -Xoomreport=/var/javaoom/oom.1149.txt com.palm.serviceboot.ServiceBoot start
...

The Java Classes

The OasisVM JVM in webos use Java Classes from Harmony to Implement the Java Platform Standard Edition 5.

In webOS 1.4.1 for Harmony and OasisVM versions, we have :
root@palm-webos-device:/# ipkg list | grep harmony
harmony - 5.0.r603534-67 -
harmonykernel - 1.0.0-21 -
oasisharmonyvm - 1.0-107 -

Note : revision 603534 was commit in the Harmony SVN the 12th December 2007 and Harmony 5.0 M4 stable was release the 2007-12-19 (History relases here).

The revision 603534 for Harmony is old, more than 2 years, and there was improvements in Harmony :

  • 5.0 M6 with new JIT optimizations, improved VM threading design
  • 5.0 M9 with performance: across multiple areas, including class library improvements and JIT compiler global propagation optimizations, integer MUL/DIV/REM strength reduction,


See Also