Request for reviews (XL): 6919934: JSR 292 needs to support x86 C1

Christian Wimmer cwimmer at uci.edu
Wed Mar 24 13:57:32 PDT 2010


Hi Christian, Tom,

This changeset modifies the GraphBuilder such that now every method  
has a synthetic exception handler that covers the whole method.  
Previously, it was only necessary for synchronized methods (and with  
dtrace). I added the relevant diff below - note that the "if" is  
remoed by the patch.
I think this affects the speed of C1 negatively, and perhaps also the  
generated code (it might slow down the exception dispatch). Why is  
this change necessary?

Christian

@@ -2862,20 +2867,18 @@ GraphBuilder::GraphBuilder(Compilation*
_initial_state = state_at_entry();
start_block->merge(_initial_state);
- BlockBegin* sync_handler = NULL;
- if (method()->is_synchronized() || _compilation->env()- 
 >dtrace_method_probes()) {
- // setup an exception handler to do the unlocking and/or notification
- sync_handler = new BlockBegin(-1);
- sync_handler->set(BlockBegin::exception_entry_flag);
- sync_handler->set(BlockBegin::is_on_work_list_flag);
- sync_handler->set(BlockBegin::default_exception_handler_flag);
-
- ciExceptionHandler* desc = new ciExceptionHandler(method()- 
 >holder(), 0, method()->code_size(), -1, 0);
- XHandler* h = new XHandler(desc);
- h->set_entry_block(sync_handler);
- scope_data()->xhandlers()->append(h);
- scope_data()->set_has_handler();
- }
+ // setup an exception handler to do the unlocking and/or
+ // notification and unwind the frame.
+ BlockBegin* sync_handler = new BlockBegin(-1);
+ sync_handler->set(BlockBegin::exception_entry_flag);
+ sync_handler->set(BlockBegin::is_on_work_list_flag);
+ sync_handler->set(BlockBegin::default_exception_handler_flag);
+
+ ciExceptionHandler* desc = new ciExceptionHandler(method()- 
 >holder(), 0, method()->code_size(), -1, 0);
+ XHandler* h = new XHandler(desc);
+ h->set_entry_block(sync_handler);
+ scope_data()->xhandlers()->append(h);
+ scope_data()->set_has_handler();


More information about the hotspot-compiler-dev mailing list