Mercurial > hg > truffle
comparison src/share/vm/c1/c1_GraphBuilder.cpp @ 2318:6f3746e69a78
7021603: crash in fill_sync_handler with ExtendedDTrace probes
Reviewed-by: iveresov
author | never |
---|---|
date | Thu, 24 Feb 2011 11:09:16 -0800 |
parents | aa4b04b68652 |
children | 425688247f3d |
comparison
equal
deleted
inserted
replaced
2316:d411927672ed | 2318:6f3746e69a78 |
---|---|
3306 | 3306 |
3307 block()->set(BlockBegin::was_visited_flag); | 3307 block()->set(BlockBegin::was_visited_flag); |
3308 Value exception = append_with_bci(new ExceptionObject(), SynchronizationEntryBCI); | 3308 Value exception = append_with_bci(new ExceptionObject(), SynchronizationEntryBCI); |
3309 assert(exception->is_pinned(), "must be"); | 3309 assert(exception->is_pinned(), "must be"); |
3310 | 3310 |
3311 int bci = SynchronizationEntryBCI; | |
3311 if (compilation()->env()->dtrace_method_probes()) { | 3312 if (compilation()->env()->dtrace_method_probes()) { |
3312 // Report exit from inline methods | 3313 // Report exit from inline methods. We don't have a stream here |
3314 // so pass an explicit bci of SynchronizationEntryBCI. | |
3313 Values* args = new Values(1); | 3315 Values* args = new Values(1); |
3314 args->push(append(new Constant(new ObjectConstant(method())))); | 3316 args->push(append_with_bci(new Constant(new ObjectConstant(method())), bci)); |
3315 append(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args)); | 3317 append_with_bci(new RuntimeCall(voidType, "dtrace_method_exit", CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit), args), bci); |
3316 } | 3318 } |
3317 | 3319 |
3318 int bci = SynchronizationEntryBCI; | |
3319 if (lock) { | 3320 if (lock) { |
3320 assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing"); | 3321 assert(state()->locks_size() > 0 && state()->lock_at(state()->locks_size() - 1) == lock, "lock is missing"); |
3321 if (!lock->is_linked()) { | 3322 if (!lock->is_linked()) { |
3322 lock = append_with_bci(lock, -1); | 3323 lock = append_with_bci(lock, bci); |
3323 } | 3324 } |
3324 | 3325 |
3325 // exit the monitor in the context of the synchronized method | 3326 // exit the monitor in the context of the synchronized method |
3326 monitorexit(lock, SynchronizationEntryBCI); | 3327 monitorexit(lock, bci); |
3327 | 3328 |
3328 // exit the context of the synchronized method | 3329 // exit the context of the synchronized method |
3329 if (!default_handler) { | 3330 if (!default_handler) { |
3330 pop_scope(); | 3331 pop_scope(); |
3331 bci = _state->caller_state()->bci(); | 3332 bci = _state->caller_state()->bci(); |