integrating the arm bytecode interpreter into IcedTea - gcc version portability issue

Xerxes Rånby xerxes at zafena.se
Thu Jul 16 03:09:31 PDT 2009


Andrew Haley skrev:
>
>> Portability issue:
>>
>> The code contains some lines that makes function calls using c++ mangled
>> method names. These lines will cause linking failures when using most
>> c++ compilers. The code currently work using gcc 4.3.3 and possibly some
>> gcc 4.4 versions.
>> Are these some better way to do these calls with portability presered to
>> work with any c++ compiler?
>
> Sure: it should easy enough to write a script to mangle the names.  But I
> would question whether it's really worth doing.  I think this was just a
> gcc bug that caused volatile not to be properly encoded in a mangled
> name.
> It's not as if the mangling algorithm is going to change.
>
>> some parts of the code contains gcc version specific code to deal with
>> selected gcc versions.
>
> Maybe we should just declare unmangled equivalents.  Can you provide a
> list
> of the entry points it uses?
>
> Andrew.
Hopefully complete list of entrypoints

xerxes at labbserver:/usr/src/openembedded/verdexpro/tmp/work/armv5te-angstrom-linux-gnueabi/openjdk-6-jre-6b16-r4/hg/icedtea6/openjdk-ecj/build/linux-arm/hotspot/outputdir/linux_zero_core$
cat
/usr/src/openembedded/verdexpro/tmp/work/armv5te-angstrom-linux-gnueabi/openjdk-6-jre-6b16-r4/hg/icedtea6/openjdk/hotspot/src/cpu/zero/vm/cppInterpreter_arm.S
| c++filt | grep bl | grep \( | grep \)
    bl    JavaThread::check_special_condition_for_native_trans(JavaThread*)
    bl    JavaThread::check_special_condition_for_native_trans(JavaThread*)
    bl    HandleMark::initialize(Thread*)
    bl    InterpreterRuntime::monitorexit(JavaThread*, BasicObjectLock*)
    bl    HandleMark::~HandleMark()
    bl    InterpreterRuntime::throw_StackOverflowError(JavaThread*)
    bl    InterpreterRuntime::monitorenter(JavaThread*, BasicObjectLock*)
    bl    methodOopDesc::result_type() const
    bl    methodOopDesc::result_type() const
    bl    InterpreterRuntime::prepare_native_call(JavaThread*,
methodOopDesc*)
    bl    InterpreterRuntime::slow_signature_handler(JavaThread*,
methodOopDesc*, int*, int*)
    bl    InterpreterRuntime::prepare_native_call(JavaThread*,
methodOopDesc*)
    bl    InterpreterRuntime::slow_signature_handler(JavaThread*,
methodOopDesc*, int*, int*)
    bl    InterpreterRuntime::throw_StackOverflowError(JavaThread*)
    bl    JavaThread::check_special_condition_for_native_trans(JavaThread*)
    bl    HandleMarkCleaner::~HandleMarkCleaner()
    bl    SafepointSynchronize::block(JavaThread*)
    bl    HandleMarkCleaner::~HandleMarkCleaner()
    bl    SafepointSynchronize::block(JavaThread*)
           bl      InterpreterRuntime::resolve_get_put(JavaThread*,
Bytecodes::Code)
           bl      InterpreterRuntime::resolve_get_put(JavaThread*,
Bytecodes::Code)
           bl      InterpreterRuntime::resolve_get_put(JavaThread*,
Bytecodes::Code)
    bl    InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)
    bl    InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)
    bl    InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)
    bl    InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)
    bl    InterpreterRuntime::_new(JavaThread*, constantPoolOopDesc*, int)
    bl    Atomic::cmpxchg_ptr(void*, void volatile*, void*)
    bl    InterpreterRuntime::newarray(JavaThread*, BasicType, int)
    bl    InterpreterRuntime::anewarray(JavaThread*,
constantPoolOopDesc*, int, int)
    bl    ThreadShadow::set_pending_exception(oopDesc*, char const*, int)
    bl    Klass::is_subtype_of(klassOopDesc*) const
    bl    Klass::external_name() const
    bl    Klass::external_name() const
    bl    SharedRuntime::generate_class_cast_message(char const*, char
const*)
    bl    Exceptions::_throw_msg(Thread*, char const*, int,
symbolOopDesc*, char const*)
    bl    ThreadInVMfromJava::~ThreadInVMfromJava()
    bl    Chunk::next_chop()
    bl    InterpreterRuntime::quicken_io_cc(JavaThread*)
    bl    InterpreterRuntime::quicken_io_cc(JavaThread*)
    bl    Klass::is_subtype_of(klassOopDesc*) const
    bl    Atomic::cmpxchg_ptr(void*, void volatile*, void*)
    bl    InterpreterRuntime::monitorenter(JavaThread*, BasicObjectLock*)
    bl    Atomic::cmpxchg_ptr(void*, void volatile*, void*)
    bl    InterpreterRuntime::monitorenter(JavaThread*, BasicObjectLock*)
    bl    Atomic::cmpxchg_ptr(void*, void volatile*, void*)
    bl    InterpreterRuntime::monitorexit(JavaThread*, BasicObjectLock*)
    bl   
InterpreterRuntime::throw_illegal_monitor_state_exception(JavaThread*)
    bl    report_should_not_reach_here(char const*, int)
    bl    Klass::is_subtype_of(klassOopDesc*) const
    bl    BytecodeInterpreter::astore(int*, int, int*, int)
    bl    InterpreterRuntime::multianewarray(JavaThread*, int*)
    bl    HandleMarkCleaner::~HandleMarkCleaner()
    bl    SafepointSynchronize::block(JavaThread*)
    bl    InterpreterRuntime::get_original_bytecode_at(JavaThread*,
methodOopDesc*, unsigned char*)
    bl    InterpreterRuntime::_breakpoint(JavaThread*, methodOopDesc*,
unsigned char*)
    bl    report_fatal_vararg(char const*, int, char const*, ...)
    bl    InterpreterRuntime::register_finalizer(JavaThread*, oopDesc*)
    bl    Atomic::cmpxchg_ptr(void*, void volatile*, void*)
    bl    InterpreterRuntime::prepare_native_call(JavaThread*,
methodOopDesc*)
    bl    InterpreterRuntime::slow_signature_handler(JavaThread*,
methodOopDesc*, int*, int*)
    bl    InterpreterRuntime::throw_StackOverflowError(JavaThread*)
    bl    JavaThread::check_special_condition_for_native_trans(JavaThread*)
    bl    Atomic::cmpxchg_ptr(void*, void volatile*, void*)
    bl    HandleMark::initialize(Thread*)
    bl    InterpreterRuntime::monitorexit(JavaThread*, BasicObjectLock*)
    bl    HandleMark::~HandleMark()
    bl    HandleMark::initialize(Thread*)
    bl   
InterpreterRuntime::throw_illegal_monitor_state_exception(JavaThread*)
    bl    HandleMark::~HandleMark()
    bl    InterpreterRuntime::throw_StackOverflowError(JavaThread*)
           bl      Exceptions::_throw_msg(Thread*, char const*, int,
symbolOopDesc*, char const*)
           bl      ThreadInVMfromJava::~ThreadInVMfromJava()
    bl    Arena::grow(unsigned int)
    bl    HandleMark::initialize(Thread*)
    bl    ThreadShadow::clear_pending_exception()
    bl   
InterpreterRuntime::exception_handler_for_exception(JavaThread*, oopDesc*)
    bl    HandleMark::~HandleMark()
    bl    Chunk::next_chop()
    bl    Arena::grow(unsigned int)
    bl    HandleMark::~HandleMark()
    bl    Chunk::next_chop()
    bl    ThreadShadow::set_pending_exception(oopDesc*, char const*, int)
    bl    Arena::grow(unsigned int)
    bl    ThreadShadow::clear_pending_exception()
    bl    ThreadShadow::set_pending_exception(oopDesc*, char const*, int)
    bl    HandleMark::~HandleMark()
    bl    Chunk::next_chop()
    bl    HandleMark::initialize(Thread*)
    bl    InterpreterRuntime::monitorexit(JavaThread*, BasicObjectLock*)
    bl    HandleMark::~HandleMark()
    bl    Atomic::cmpxchg_ptr(void*, void volatile*, void*)
    bl    HandleMark::initialize(Thread*)
    bl    InterpreterRuntime::monitorexit(JavaThread*, BasicObjectLock*)
    bl    HandleMark::~HandleMark()
    bl    Handle::Handle(oopDesc*)
    bl    ThreadShadow::clear_pending_exception()
    bl    HandleMark::initialize(Thread*)
    bl   
InterpreterRuntime::throw_illegal_monitor_state_exception(JavaThread*)
    bl    HandleMark::~HandleMark()
    bl    Handle::Handle(oopDesc*)
    bl    ThreadShadow::clear_pending_exception()
    bl    InterpreterRuntime::monitorenter(JavaThread*, BasicObjectLock*)
    bl    HandleMark::initialize(Thread*)
    bl   
InterpreterRuntime::throw_illegal_monitor_state_exception(JavaThread*)
    bl    HandleMark::~HandleMark()
    bl    Handle::Handle(oopDesc*)
    bl    ThreadShadow::clear_pending_exception()
xerxes at labbserver:/usr/src/openembedded/verdexpro/tmp/work/armv5te-angstrom-linux-gnueabi/openjdk-6-jre-6b16-r4/hg/icedtea6/openjdk-ecj/build/linux-arm/hotspot/outputdir/linux_zero_core$

Cheers
Xerxes



More information about the distro-pkg-dev mailing list