--- a/hotspot/src/share/vm/c1/c1_IR.cpp Thu Dec 02 01:02:55 2010 -0800
+++ b/hotspot/src/share/vm/c1/c1_IR.cpp Thu Dec 02 17:21:12 2010 -0800
@@ -504,7 +504,12 @@
count_edges(start_block, NULL);
if (compilation()->is_profiling()) {
- compilation()->method()->method_data()->set_compilation_stats(_num_loops, _num_blocks);
+ ciMethod *method = compilation()->method();
+ if (!method->is_accessor()) {
+ ciMethodData* md = method->method_data_or_null();
+ assert(md != NULL, "Sanity");
+ md->set_compilation_stats(_num_loops, _num_blocks);
+ }
}
if (_num_loops > 0) {