1.1 --- a/src/share/vm/c1/c1_IR.cpp Thu Dec 02 01:02:55 2010 -0800 1.2 +++ b/src/share/vm/c1/c1_IR.cpp Thu Dec 02 17:21:12 2010 -0800 1.3 @@ -504,7 +504,12 @@ 1.4 count_edges(start_block, NULL); 1.5 1.6 if (compilation()->is_profiling()) { 1.7 - compilation()->method()->method_data()->set_compilation_stats(_num_loops, _num_blocks); 1.8 + ciMethod *method = compilation()->method(); 1.9 + if (!method->is_accessor()) { 1.10 + ciMethodData* md = method->method_data_or_null(); 1.11 + assert(md != NULL, "Sanity"); 1.12 + md->set_compilation_stats(_num_loops, _num_blocks); 1.13 + } 1.14 } 1.15 1.16 if (_num_loops > 0) {