27.01.2015 Views

New Tricks for phoneME Advanced - download - Java

New Tricks for phoneME Advanced - download - Java

New Tricks for phoneME Advanced - download - Java

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>New</strong> <strong>Tricks</strong> <strong>for</strong><br />

<strong>phoneME</strong><br />

<strong>Advanced</strong><br />

Hinkmond Wong<br />

Senior Staff Engineer<br />

Sun Microsystems, Inc.<br />

Sun Confidential: CDA Only 1


Agenda<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

Latest VM and Library Features<br />

PalmOS Port<br />

Windows Mobile Port<br />

Inclusion in Jalimo<br />

OpenCable TV Stack<br />

Demo<br />

Summary<br />

2008 Mobile and Embedded Developer Days 2


Agenda<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

Latest VM and Library Features<br />

PalmOS Port<br />

Windows Mobile Port<br />

Inclusion in Jalimo<br />

OpenCable TV Stack<br />

Demo<br />

Summary<br />

2008 Mobile and Embedded Developer Days 3


Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

●<br />

●<br />

●<br />

●<br />

Open source implementation of <strong>Java</strong> ME<br />

CDC<br />

Hosted in Subversion on java.net<br />

●<br />

https://phoneme.dev.java.net/source/browse/phoneme/<br />

Part of Mobile and Embedded Community<br />

●<br />

http://www.mobileandembedded.org<br />

Email lists, <strong>for</strong>ums, wikis, etc.<br />

2008 Mobile and Embedded Developer Days 4


Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

●<br />

●<br />

●<br />

<strong>Advanced</strong> phones and consumer devices<br />

(Ref: Linux/x86)<br />

Contents: CDC/Foundation/Personal Basis/<br />

Personal Profiles<br />

“CDC stack”<br />

● JSRs: 135 (MMAPI) and 172 (Web Serv)<br />

2008 Mobile and Embedded Developer Days 5


Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

● GPL version 2<br />

● http://www.gnu.org/copyleft/gpl.html<br />

●<br />

Dual Licensed with Commercial License<br />

● Proprietary use<br />

● Compatible w/non-GPL licenses<br />

2008 Mobile and Embedded Developer Days 6


Repository Layout –<br />

Components<br />

components<br />

cdc<br />

. . . jsr120 midp jsr135 . . .<br />

cldc<br />

<strong>phoneME</strong> <strong>Advanced</strong><br />

<strong>phoneME</strong> Feature<br />

2008 Mobile and Embedded Developer Days 7


Agenda<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

Latest VM and Library Features<br />

PalmOS Port<br />

Windows Mobile Port<br />

Inclusion in Jalimo<br />

OpenCable TV Stack<br />

Demo<br />

Summary<br />

2008 Mobile and Embedded Developer Days 8


<strong>phoneME</strong> <strong>Advanced</strong> MR3<br />

Latest Features - Part 1<br />

Feature Component<br />

<strong>Java</strong> Virtual Machine<br />

Tools Interface<br />

(JVMTI)<br />

CVM Inspector and<br />

cvmsh<br />

Growable/Shrinkable<br />

<strong>Java</strong> Heap<br />

Split Verifier<br />

Ahead-Of-Time<br />

Compiler (AOTC)<br />

Dual-Stack Support<br />

Description<br />

<strong>Java</strong> SE compatible debugging and<br />

profiling interface<br />

Navigation and inspection of CVM data<br />

structures<br />

Dynamic sizing of memory<br />

CLDC Preverification Optimization<br />

Pre-compilation of <strong>Java</strong> classes<br />

MIDP on CDC support<br />

Sun Confidential: CDA Only 9


<strong>phoneME</strong> <strong>Advanced</strong> MR3<br />

Latest Features - Part 2<br />

Feature Component<br />

Allow Unresolved<br />

Support<br />

TimeZone Data<br />

Updates<br />

Description<br />

ROMization without transitive closure<br />

Latest Olsen DB standard tz2008g<br />

Sun Confidential: CDA Only 10


JVMTI<br />

• JVMTI supported <strong>for</strong> debugging and profiling<br />

> Can be supported in production releases with minimal<br />

per<strong>for</strong>mance and footprint impact.<br />

• Profiling and Debugging using NetBeans supported via<br />

JVMTI<br />

• Debugging using Eclipse should work via JVMTI<br />

• Profiling with Eclipse can be supported with some ef<strong>for</strong>t<br />

• Debugging of JIT’d code not supported<br />

Sun Confidential: CDA Only 11


VM Inspector and cvmsh<br />

• Debug APIs available from C, <strong>Java</strong>, and cvmsh<br />

> Thread dumps<br />

> Heap dumps and snapshots<br />

> Object dumps<br />

> Find all references to objects<br />

• Build with CVM_DEBUG=true or CVM_INSPECTOR=true<br />

• http://wiki.java.net/bin/view/Mobileandembedded/PhoneM<br />

E<strong>Advanced</strong>CVMSH<br />

Sun Confidential: CDA Only 12


Growable/Shrinkable <strong>Java</strong> Heap<br />

• Growable and shrinkable heap using mmap/mcommit on<br />

Linux<br />

> Garbage collector will adjust the size of the heap up or down<br />

after each GC based on current utilization.<br />

> Min size, max size, and start size can be set on the command<br />

line<br />

Sun Confidential: CDA Only 13


Split Verifier<br />

• Provides faster verification of classes containing<br />

StackMap attibutes<br />

> Generated by cldc preverifier tool<br />

> Generated by <strong>Java</strong> 6 version of javac<br />

• Build with CVM_SPLIT_VERIFIER=true<br />

Sun Confidential: CDA Only 14


AOT Compiler<br />

• Faster startup time <strong>for</strong> first application launch<br />

• Smoother startups (don’t get any pauses waiting <strong>for</strong><br />

methods to compile).<br />

• Compilation done at runtime the first time VM is launched.<br />

> Compiled code is then mapped into memory the next time VM<br />

is launched.<br />

• Need to build with CVM_AOT=true. Must also build with<br />

CVM_PRELOAD_LIB=true or<br />

CVM_PRELOAD_SET=libfull.<br />

Sun Confidential: CDA Only 15


Dual Stack / API Hiding<br />

• Dual stack with API hiding supported<br />

> 1st stack is CDC/FP/SecOP<br />

> 2nd stack can be CLDC/MIDP/JSRs<br />

• CDC stack can be used <strong>for</strong> the AMS and by the<br />

implementation of MIDP and JSRs<br />

• API Hiding<br />

> Midlets do not have access to CDC/<strong>Java</strong>SE stack<br />

> CDC/<strong>Java</strong>SE stack does not have access to MIDP<br />

• Build with CVM_DUAL_STACK=true<br />

Sun Confidential: CDA Only 16


JCC -allowUnresolved Support<br />

• In CDC-HI 1.1.1, romized classes could only contain<br />

references to other romized classes<br />

> All constant pool references fully resolved at build time<br />

> This is known as “full transitive closure”<br />

• CDC-HI 1.1.2 supports unresolved constant pool entries<br />

> Romized classes can contain references to classes that are<br />

later dynamically loaded.<br />

> A much smaller set of classes can now be romized<br />

• CVM_PRELOAD_SET build option determines classes to<br />

be romized<br />

Sun Confidential: CDA Only 17


Timezone Data Update<br />

• Sync’d timezone data in CDC/FP source bundles to be<br />

same as what <strong>Java</strong> SE has released<br />

• Raw timzezone data files updated to latest Olsen DB set<br />

standard data files<br />

> tz2008g - ftp://elsie.nci.nih.gov/pub/<br />

> CDC/FP subset (j2meref: Los Angeles/Novosibirsk/Calcutta)<br />

which is what is built by default, updated with new Russia<br />

tables from tz2008g<br />

Sun Confidential: CDA Only 18


Agenda<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

Latest VM and Library Features<br />

PalmOS Port<br />

Windows Mobile Port<br />

Inclusion in Jalimo<br />

OpenCable TV Stack<br />

Demo<br />

Summary<br />

2008 Mobile and Embedded Developer Days 19


PalmOS Port<br />

• Volunteers <strong>for</strong> PalmOS Port<br />

• No Full C Standard Library<br />

• No Multithreading Library Support<br />

• PRC-tools on PalmOS<br />

• LibC changes to compile on PalmOS<br />

• Evolution of PalmOS<br />

Sun Confidential: CDA Only 20


Agenda<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

Latest VM and Library Features<br />

PalmOS Port<br />

Windows Mobile Port<br />

Inclusion in Jalimo<br />

OpenCable TV Stack<br />

Demo<br />

Summary<br />

2008 Mobile and Embedded Developer Days 21


Windows Mobile Port<br />

• Davy P.'s latest Windows Mobile Port<br />

• JSRs supported<br />

• MIDP<br />

• Personal Basis Profile and Personal Profile<br />

• Works in progress<br />

Sun Confidential: CDA Only 22


Agenda<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

Latest VM and Library Features<br />

PalmOS Port<br />

Windows Mobile Port<br />

Inclusion in Jalimo<br />

OpenCable TV Stack<br />

Demo<br />

Summary<br />

2008 Mobile and Embedded Developer Days 23


<strong>phoneME</strong> <strong>Advanced</strong> in Jalimo<br />

• Jalimo: free <strong>Java</strong> stack <strong>for</strong> mobile Linux devices<br />

• Develop APIs and tools<br />

• Maemo and OpenMoko<br />

• Robert Schuster and Ken Gilmer: OpenEmbedded<br />

receipts<br />

• Fast startup<br />

• Running on Nokia N800<br />

Sun Confidential: CDA Only 24


Agenda<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

Latest VM and Library Features<br />

PalmOS Port<br />

Windows Mobile Port<br />

Inclusion in Jalimo<br />

OpenCable TV Stack<br />

Demo<br />

Summary<br />

2008 Mobile and Embedded Developer Days 25


<strong>phoneME</strong> <strong>Advanced</strong> in OpenCable<br />

• <strong>New</strong> OpenCable project<br />

> https://opencable.dev.java.net<br />

• Middleware <strong>for</strong> OCAP spec.<br />

• TV set-top box or receiver software<br />

• Interoperability using open source<br />

• Tru2Way: interactive programming guides<br />

Sun Confidential: CDA Only 26


Agenda<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

Latest VM and Library Features<br />

PalmOS Port<br />

Windows Mobile Port<br />

Inclusion in Jalimo<br />

OpenCable TV Stack<br />

Demo<br />

Summary<br />

2008 Mobile and Embedded Developer Days 27


Demos<br />

• PhoneME <strong>Advanced</strong><br />

Sun Confidential: CDA Only 28


Agenda<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

●<br />

Review of <strong>phoneME</strong> <strong>Advanced</strong><br />

Latest VM and Library Features<br />

PalmOS Port<br />

Windows Mobile Port<br />

Inclusion in Jalimo<br />

OpenCable TV Stack<br />

Demo<br />

Summary<br />

2008 Mobile and Embedded Developer Days 29


Summary<br />

●<br />

●<br />

●<br />

●<br />

Faster, better VM and libraries<br />

More ports to more devices<br />

Core used in other open source projects<br />

Growing use in more plat<strong>for</strong>ms<br />

2008 Mobile and Embedded Developer Days 30


Thank You!<br />

Q & A<br />

Sun Confidential: CDA Only 31

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!