Mercurial > hg > truffle
comparison src/share/vm/opto/output.cpp @ 10169:e10e43e58e92
Merge
author | dlong |
---|---|
date | Wed, 24 Apr 2013 21:11:02 -0400 |
parents | a6e09d6dd8e5 a7fb14888912 |
children | 70120f47d403 |
comparison
equal
deleted
inserted
replaced
10168:a6e09d6dd8e5 | 10169:e10e43e58e92 |
---|---|
1041 | 1041 |
1042 // Mark the end of the scope set. | 1042 // Mark the end of the scope set. |
1043 debug_info->end_non_safepoint(pc_offset); | 1043 debug_info->end_non_safepoint(pc_offset); |
1044 } | 1044 } |
1045 | 1045 |
1046 | |
1047 | |
1048 // helper for fill_buffer bailout logic | |
1049 static void turn_off_compiler(Compile* C) { | |
1050 if (CodeCache::largest_free_block() >= CodeCacheMinimumFreeSpace*10) { | |
1051 // Do not turn off compilation if a single giant method has | |
1052 // blown the code cache size. | |
1053 C->record_failure("excessive request to CodeCache"); | |
1054 } else { | |
1055 // Let CompilerBroker disable further compilations. | |
1056 C->record_failure("CodeCache is full"); | |
1057 } | |
1058 } | |
1059 | |
1060 | |
1061 //------------------------------init_buffer------------------------------------ | 1046 //------------------------------init_buffer------------------------------------ |
1062 CodeBuffer* Compile::init_buffer(uint* blk_starts) { | 1047 CodeBuffer* Compile::init_buffer(uint* blk_starts) { |
1063 | 1048 |
1064 // Set the initially allocated size | 1049 // Set the initially allocated size |
1065 int code_req = initial_code_capacity; | 1050 int code_req = initial_code_capacity; |
1155 CodeBuffer* cb = code_buffer(); | 1140 CodeBuffer* cb = code_buffer(); |
1156 cb->initialize(total_req, locs_req); | 1141 cb->initialize(total_req, locs_req); |
1157 | 1142 |
1158 // Have we run out of code space? | 1143 // Have we run out of code space? |
1159 if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { | 1144 if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { |
1160 turn_off_compiler(this); | 1145 C->record_failure("CodeCache is full"); |
1161 return NULL; | 1146 return NULL; |
1162 } | 1147 } |
1163 // Configure the code buffer. | 1148 // Configure the code buffer. |
1164 cb->initialize_consts_size(const_req); | 1149 cb->initialize_consts_size(const_req); |
1165 cb->initialize_stubs_size(stub_req); | 1150 cb->initialize_stubs_size(stub_req); |
1473 } | 1458 } |
1474 | 1459 |
1475 // Verify that there is sufficient space remaining | 1460 // Verify that there is sufficient space remaining |
1476 cb->insts()->maybe_expand_to_ensure_remaining(MAX_inst_size); | 1461 cb->insts()->maybe_expand_to_ensure_remaining(MAX_inst_size); |
1477 if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { | 1462 if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { |
1478 turn_off_compiler(this); | 1463 C->record_failure("CodeCache is full"); |
1479 return; | 1464 return; |
1480 } | 1465 } |
1481 | 1466 |
1482 // Save the offset for the listing | 1467 // Save the offset for the listing |
1483 #ifndef PRODUCT | 1468 #ifndef PRODUCT |
1630 } | 1615 } |
1631 } | 1616 } |
1632 | 1617 |
1633 // One last check for failed CodeBuffer::expand: | 1618 // One last check for failed CodeBuffer::expand: |
1634 if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { | 1619 if ((cb->blob() == NULL) || (!CompileBroker::should_compile_new_jobs())) { |
1635 turn_off_compiler(this); | 1620 C->record_failure("CodeCache is full"); |
1636 return; | 1621 return; |
1637 } | 1622 } |
1638 | 1623 |
1639 #ifndef PRODUCT | 1624 #ifndef PRODUCT |
1640 // Dump the assembly code, including basic-block numbers | 1625 // Dump the assembly code, including basic-block numbers |