Mercurial > hg > graal-jvmci-8
comparison src/share/vm/c1/c1_GraphBuilder.cpp @ 2166:403dc4c1d7f5
6809483: hotspot:::method_entry are not correctly generated for "method()V"
Reviewed-by: iveresov, twisti
author | never |
---|---|
date | Fri, 21 Jan 2011 13:01:02 -0800 |
parents | 5ddfcf4b079e |
children | aa4b04b68652 |
comparison
equal
deleted
inserted
replaced
2093:7514897db238 | 2166:403dc4c1d7f5 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
1393 | 1393 |
1394 // Check to see whether we are inlining. If so, Return | 1394 // Check to see whether we are inlining. If so, Return |
1395 // instructions become Gotos to the continuation point. | 1395 // instructions become Gotos to the continuation point. |
1396 if (continuation() != NULL) { | 1396 if (continuation() != NULL) { |
1397 assert(!method()->is_synchronized() || InlineSynchronizedMethods, "can not inline synchronized methods yet"); | 1397 assert(!method()->is_synchronized() || InlineSynchronizedMethods, "can not inline synchronized methods yet"); |
1398 | |
1399 if (compilation()->env()->dtrace_method_probes()) { | |
1400 // Report exit from inline methods | |
1401 Values* args = new Values(1); | |
1402 args->push(append(new Constant(new ObjectConstant(method())))); | |
1403 append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args)); | |
1404 } | |
1398 | 1405 |
1399 // If the inlined method is synchronized, the monitor must be | 1406 // If the inlined method is synchronized, the monitor must be |
1400 // released before we jump to the continuation block. | 1407 // released before we jump to the continuation block. |
1401 if (method()->is_synchronized()) { | 1408 if (method()->is_synchronized()) { |
1402 assert(state()->locks_size() == 1, "receiver must be locked here"); | 1409 assert(state()->locks_size() == 1, "receiver must be locked here"); |
3299 | 3306 |
3300 block()->set(BlockBegin::was_visited_flag); | 3307 block()->set(BlockBegin::was_visited_flag); |
3301 Value exception = append_with_bci(new ExceptionObject(), SynchronizationEntryBCI); | 3308 Value exception = append_with_bci(new ExceptionObject(), SynchronizationEntryBCI); |
3302 assert(exception->is_pinned(), "must be"); | 3309 assert(exception->is_pinned(), "must be"); |
3303 | 3310 |
3311 if (compilation()->env()->dtrace_method_probes()) { | |
3312 // Report exit from inline methods | |
3313 Values* args = new Values(1); | |
3314 args->push(append(new Constant(new ObjectConstant(method())))); | |
3315 append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args)); | |
3316 } | |
3317 | |
3304 int bci = SynchronizationEntryBCI; | 3318 int bci = SynchronizationEntryBCI; |
3305 if (lock) { | 3319 if (lock) { |
3306 assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing"); | 3320 assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing"); |
3307 if (!lock->is_linked()) { | 3321 if (!lock->is_linked()) { |
3308 lock = append_with_bci(lock, -1); | 3322 lock = append_with_bci(lock, -1); |
3484 : state()->local_at(0); | 3498 : state()->local_at(0); |
3485 sync_handler = new BlockBegin(SynchronizationEntryBCI); | 3499 sync_handler = new BlockBegin(SynchronizationEntryBCI); |
3486 inline_sync_entry(lock, sync_handler); | 3500 inline_sync_entry(lock, sync_handler); |
3487 } | 3501 } |
3488 | 3502 |
3503 if (compilation()->env()->dtrace_method_probes()) { | |
3504 Values* args = new Values(1); | |
3505 args->push(append(new Constant(new ObjectConstant(method())))); | |
3506 append(new RuntimeCall(voidType, "dtrace_method_entry", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry), args)); | |
3507 } | |
3489 | 3508 |
3490 BlockBegin* callee_start_block = block_at(0); | 3509 BlockBegin* callee_start_block = block_at(0); |
3491 if (callee_start_block != NULL) { | 3510 if (callee_start_block != NULL) { |
3492 assert(callee_start_block->is_set(BlockBegin::parser_loop_header_flag), "must be loop header"); | 3511 assert(callee_start_block->is_set(BlockBegin::parser_loop_header_flag), "must be loop header"); |
3493 Goto* goto_callee = new Goto(callee_start_block, false); | 3512 Goto* goto_callee = new Goto(callee_start_block, false); |