I've just created a simple launcher that:
- creates a Java VM
- invokes the main method of a class that throws a RuntimeException
- calls DestroyJavaVM without clearing the pending exception
Both the RI and IBM VMs exit without any complaints, so I think that
drlvm should match this behaviour also.
Regards,
Oliver
>
>>
>> >
>> > (3)
>> > CreateJavaVM can only be called once for now – many internal data
>> > structures in DRLVM are kept as global variables (jni_env, java_vm,
>> > Global_Env e.t.c.). Therefore, it will be hard to organize the
>> > multiple instances of JavaVM unless all these things are
encapsulated
>> > somewhere (into JNIEnv?).
>> >
>> > (4)
>> > Launcher wants the vm dll in the "default" directory unless the
option
>> > is specified. Should we realign the drlvm build output and move all
>> > dll's into the "default" subdir?
>>
>> yup, or put it into a deploy/jdk/jre/bin/drlvm directory and use the
>> launcher
>> options to specify its location.
>>
>> >
>> > (5)
>> > What to do with the "_org.apache.harmony.vmi.portlib" option that
>> > launcher is offering to VM?
>>
>> This passes the classlib port library function table to the VM. I
think
>> this just makes the classlib port library available to the VM for
it to
>> use/query if it wishes. I think it is fine for the drlvm to ignore
this
>> option
>> if it wants to.
>>
>> Regards,
>> Oliver
>>
>> >
>> > Most likely there are more issues that I'm overlooking at the
moment.
>> > Please consider the suggested patch is a workaround to make the
things
>> > working, I'm wondering if there is a more graceful way to do this.
>> >
>> > Thanks,
>> > Andrey.
>> >
>> >
>> > On 7/11/06, Andrey Chernyshev <[EMAIL PROTECTED]> wrote:
>> >> OK, so I'm going to add CreateJavaVM into
vm\vmcore\src\jni\jni.cpp
>> >> and also add implementation into DestroyVM (stub is already seem
>> to be
>> >> present there) based on destroy_vm(). Then we'll see how it works
>> with
>> >> the launcher.
>> >>
>> >> Thanks,
>> >> Andrey.
>> >>
>> >>
>> >> On 7/11/06, Geir Magnusson Jr <[EMAIL PROTECTED]> wrote:
>> >> > This has been my thinking - even if not perfect, lets get it
>> working
>> >> > using the launcher and then fix as required. It's arguable if
that
>> >> > "brokenness" matters at this point, and I think that there's
>> plenty to
>> >> > be gained from having it work via the launcher.
>> >> >
>> >> > geir
>> >> >
>> >> > Rana Dasgupta wrote:
>> >> > > create_vm() looks quite close/complete to being a complete
>> >> prototype for
>> >> > > CreateJavaVM,
>> >> > > but I think more work is needed in DestroyVM which prototypes
>> >> DestroyJavaVM
>> >> > > for functional completeness. It is non waiting on user
threads,
>> >> it does not
>> >> > > send the corresponding JVMTI shutdown events, I also don't
know
>> >> if it
>> >> > > handles shutdown hooks cleanly ( but these "may" not be
critical
>> >> right now
>> >> > > for hooking up to the launcher ). What do you think?
>> >> > >
>> >> > > When I ran a non trivial test.. upto 32 threads
instantiating a
>> >> very large
>> >> > > number of objects with -XcleanupOnExit which uses
>> >> DestroyVM, it
>> >> > > exited cleanly. Maybe OK to hookup and fix bugs as we go.
>> >> > >
>> >> > > Thanks,
>> >> > > Rana
>> >> > >
>> >> > >
>> >> > > On 7/10/06, Andrey Chernyshev <[EMAIL PROTECTED]>
wrote:
>> >> > >
>> >> > >> >Yes, it seems like the launcher will need at least
>> >> JNI_CreateJavaVM
>> >> > >> >and DestroyJavaVM functions.
>> >> > >>
>> >> > >> >I couldn't find implementation for CreateJavaVM in drlvm
>> codebase.
>> >> > >> >Perhaps create_vm() function in
vm\vmcore\src\init\vm_main.cpp
>> >> can be
>> >> > >> >adopted for that purpose?
>> >> > >> >Is there are any tricks and caveats one should be aware of
>> before
>> >> > >> >trying to produce CreateJavaVM from it?
>> >> > >>
>> >> > >> >I've also seen a prototype for DestroyJavaVM in
>> >> > >> >vm\vmcore\src\init\vm.cpp - comment says it needs to be
>> >> improved to
>> >> > >> >wait till all Java threads are completed.
>> >> > >>
>> >> > >> >Any more ideas what needs to be done to implement those?
>> >> > >>
>> >> > >> >Thanks,
>> >> > >> >Andrey.
>> >> > >>
>> >> > >>
>> >> > >>
>> >>
---------------------------------------------------------------------
>> >> > >> Terms of use :
http://incubator.apache.org/harmony/mailing.html
>> >> > >> To unsubscribe, e-mail:
>> >> [EMAIL PROTECTED]
>> >> > >> For additional commands, e-mail:
>> >> [EMAIL PROTECTED]
>> >> > >>
>> >> > >>
>> >> > >
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > Terms of use : http://incubator.apache.org/harmony/mailing.html
>> >> > To unsubscribe, e-mail:
>> [EMAIL PROTECTED]
>> >> > For additional commands, e-mail:
>> [EMAIL PROTECTED]
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> Andrey Chernyshev
>> >> Intel Middleware Products Division
>> >>
>> >
>> >
>>
>> --
>> Oliver Deakin
>> IBM United Kingdom Limited
>>
>>
>
>
--
Oliver Deakin
IBM United Kingdom Limited
---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]