Buqi,
Please check the
"helper_inliner.cpp"<http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/helper_inliner.cpp?view=log>file.
+ AFAIR helper inlining is enabled only in 'server' mode.
--
Mikhail Fursov
On Mon, Nov 17, 2008 at 9:21 AM, bu qi cheng <[EMAIL PROTECTED]> wrote:
> Hi Mikhail:
>
> I can not find there is magic for the monitorEnter monitorExit. A test
> case is done like following:
>
> public class Btest5710 {
>
> Object obj;
> int j = 0;
> public static void main(String [] args) {
> (new Btest5710()).test();
> }
> public void test() {
> int i;
> System.err.println("Start Btest5710 test...");
> try {
> for (i = 0; i < 10000000; i++) {
> sync();
> }
> System.err.println("FAILED: NullPointerException was expected");
> System.exit(-99);
> } catch (NullPointerException e) {
> System.err.println("PASSED: " + e);
> } catch (Throwable e) {
> System.err.println("Unexpected exception was thrown:");
> e.printStackTrace();
> System.err.println("FAILED");
> System.exit(-99);
> }
> }
> void sync() {
> int i;
> //chknull
> for (i = 0; i < 10; i++) {
> j++;
> if (j == 90000000) {
> synchronized (obj) {
> obj = new Object();
> }
> }
> }
> }
> }
>
> Command is like following:
>
> $
> ../harmony/working_vm/build/windows_x86_msvc_debug/deploy/jdk/jre/bin/java
> -Xem:client -XX:jit.p.filter=Btest5710. -XX:jit.p.arg.log=ct,irdump,info
> Btest5710
> Same bug will happen and we see no magic code is generated. SD2 code for
> sync() is generated also, and we can see that the chknull is still not
> work,
> same as the monenter.
>
>
> Regards!
>
> Buqi
>