Skip to main content

JIT and ARM926

7 replies [Last post]
drakou
Offline
Joined: 2007-10-22

Hi,
I am actually using PhoneME Advanced on an ARM926 with success. But everything is slow. Since i would like to use some graphical functions I think i should enable some optimisations like JIT.
But when i try to compile with JIT enabled , I get this error :
cc ../../src/share/native/java/lang/fdlibm/src/w_sqrt.c
lib ../../build/linux-arm-imx21/./obj/fdlibm.a
Linking ../../build/linux-arm-imx21/./bin/cvm
../../build/linux-arm-imx21/./obj/globals.o(.text+0x8f8): In function `CVMdestroyVMGlobalState':
: undefined reference to `CVMzutilDestroyZip'
followed by a serie of undifined references to symbols related to java util zip.

So my questions are : Is it possible to get JIT enabled on arm platforms ? How can I get a successful build ?
And : Is there other optimisations to speed up the system ?( I know Jazelle is here but unusable without a license from sun .. )

This is my makefile :
CC_ARCH_FLAGS = -mcpu=arm920
CVM_DEFINES += -DAAPCS
CVM_JIT ?= true
CVM_HOST_TOOLS_PREFIX=/usr/bin/
CVM_TARGET_TOOLS_PREFIX=/opt/freescale/ltib/usr/spoof/
# For the LTIB build
HOST_CC := $(BUILDCC)
HOST_CCC := $(BUILDCXX)
CVM_JAVA_TOOLS_PREFIX=/usr/java/j2sdk/bin/
JDK_HOME=/usr/java/j2sdk/bin/
J2ME_CLASSLIB=basis
AWT_IMPLEMENTATION=qt
QT_TARGET_DIR=$(DEV_IMAGE)/usr
QT_VERSION=2
QTEMBEDDED=true
QTOPIA=false
USE_QVFB=false
USE_QT_FB=true
AWT_LIB_LIBS = -L$(DEV_IMAGE)/usr/lib -lqte -lm

Thank you in advance

Regards
Arnaud Derasse

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
sethkurtzberg
Offline
Joined: 2007-12-05

Arnaud,

I have (finally) been able to get this to compile for ARM with JIT true. You can contact me if you wish at seth@buglabs.net.

Seth

drakou
Offline
Joined: 2007-10-22

Hi , I finally managed to compile this...
It was a problem with zconf.h, and the JIT parameter had no influence on this in fact.
There was another zconf.h in my include path, and the wrong one was kept by gcc.

Thank you for your help.
Arnaud

jackzhao1980
Offline
Joined: 2007-12-26

Have anyone successded in compiling the cdc with JIT=true on mips ??

cjplummer
Offline
Joined: 2006-10-16

> Have anyone successded in compiling the cdc with
> JIT=true on mips ??

Yes. If you are having problems, please start up a new thread and post details.

thanks,

Chris

cjplummer
Offline
Joined: 2006-10-16

Have you made any changes to the phoneme source or makefiles? I'm guessing you have a header file conflict that causes the the phoneme zconf.h to not get used. It includes jzconf.h, which does a "#define DestroyZip CVMzutilDestroyZip". There is usually a version of zconf.h in your toolchain or linux includes. If it gets pulled in, then this #define does not happen, and you end up with a function called DestroyZip instead of CVMzutilDestroyZip. What I can't explain is why enabling the JIT would cause this to start happening. The inclusion of this header file and the call to CVMzutilDestroyZip have nothing to do with the JIT.

Chris

drakou
Offline
Joined: 2007-10-22

I did not change anything to the sources or makefiles ( appart from setting some env variables in the makefile) .
If I put false for JIT, the build succed, with true the build fails.

Is there anybody who succed in building CVM with JIT enabled for an ARM platform ?

Thanks

cjplummer
Offline
Joined: 2006-10-16

> If I put false for JIT, the build succed, with true
> the build fails.
>
> Is there anybody who succed in building CVM with JIT
> enabled for an ARM platform ?

That is pretty much the only way anyone builds. It's on by default in all the linux and win32 ARM GNUmakefiles that are supplied with CDC.

Try building with USE_VERBOSE_MAKE=true. This will trace the full gcc command used in the compilation. Look at the trace for the compilation of zip_util.c. Compare the compilation trace with and without the JIT and see if there is a difference. Also, use nm to dump the symbols in both the wokring and non-working zip_util.o.

BTW, you can use CVM_BUILD_SUBDIR_NAME= if you want to keep more than one build of CDC with different build options around at the same time. Just change for each build.