aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/opto
diff options
context:
space:
mode:
authorkvn <none@none>2012-07-30 09:49:25 -0700
committerkvn <none@none>2012-07-30 09:49:25 -0700
commit7f9f8adcff572ac452d37e8fa50b6dc3bfebf187 (patch)
treee9174f0c633257d4c2a6c0dd1227ea0c1454770e /src/share/vm/opto
parentfec39d74addfac0a32705def0669cba43d74508b (diff)
7187454: stack overflow in C2 compiler thread on Solaris x86
Summary: Added new FormatBufferResource class to use thread's resource area for error message buffer. Reviewed-by: twisti
Diffstat (limited to 'src/share/vm/opto')
-rw-r--r--src/share/vm/opto/callGenerator.cpp2
-rw-r--r--src/share/vm/opto/chaitin.cpp2
-rw-r--r--src/share/vm/opto/compile.cpp6
-rw-r--r--src/share/vm/opto/doCall.cpp6
-rw-r--r--src/share/vm/opto/escape.cpp2
-rw-r--r--src/share/vm/opto/idealGraphPrinter.cpp4
-rw-r--r--src/share/vm/opto/node.hpp4
-rw-r--r--src/share/vm/opto/parse1.cpp2
8 files changed, 14 insertions, 14 deletions
diff --git a/src/share/vm/opto/callGenerator.cpp b/src/share/vm/opto/callGenerator.cpp
index 41298ee16..cb4be976a 100644
--- a/src/share/vm/opto/callGenerator.cpp
+++ b/src/share/vm/opto/callGenerator.cpp
@@ -737,7 +737,7 @@ CallGenerator* CallGenerator::for_method_handle_inline(JVMState* jvms, ciMethod*
break;
default:
- fatal(err_msg("unexpected intrinsic %d: %s", iid, vmIntrinsics::name_at(iid)));
+ fatal(err_msg_res("unexpected intrinsic %d: %s", iid, vmIntrinsics::name_at(iid)));
break;
}
return NULL;
diff --git a/src/share/vm/opto/chaitin.cpp b/src/share/vm/opto/chaitin.cpp
index 00cabcf23..6ee1393a8 100644
--- a/src/share/vm/opto/chaitin.cpp
+++ b/src/share/vm/opto/chaitin.cpp
@@ -1536,7 +1536,7 @@ Node *PhaseChaitin::find_base_for_derived( Node **derived_base_map, Node *derive
// Check for AddP-related opcodes
if( !derived->is_Phi() ) {
- assert(derived->as_Mach()->ideal_Opcode() == Op_AddP, err_msg("but is: %s", derived->Name()));
+ assert(derived->as_Mach()->ideal_Opcode() == Op_AddP, err_msg_res("but is: %s", derived->Name()));
Node *base = derived->in(AddPNode::Base);
derived_base_map[derived->_idx] = base;
return base;
diff --git a/src/share/vm/opto/compile.cpp b/src/share/vm/opto/compile.cpp
index 5331d033f..0836fc205 100644
--- a/src/share/vm/opto/compile.cpp
+++ b/src/share/vm/opto/compile.cpp
@@ -3138,7 +3138,7 @@ void Compile::ConstantTable::emit(CodeBuffer& cb) {
default: ShouldNotReachHere();
}
assert(constant_addr, "consts section too small");
- assert((constant_addr - _masm.code()->consts()->start()) == con.offset(), err_msg("must be: %d == %d", constant_addr - _masm.code()->consts()->start(), con.offset()));
+ assert((constant_addr - _masm.code()->consts()->start()) == con.offset(), err_msg_res("must be: %d == %d", constant_addr - _masm.code()->consts()->start(), con.offset()));
}
}
@@ -3199,7 +3199,7 @@ void Compile::ConstantTable::fill_jump_table(CodeBuffer& cb, MachConstantNode* n
if (Compile::current()->in_scratch_emit_size()) return;
assert(labels.is_nonempty(), "must be");
- assert((uint) labels.length() == n->outcnt(), err_msg("must be equal: %d == %d", labels.length(), n->outcnt()));
+ assert((uint) labels.length() == n->outcnt(), err_msg_res("must be equal: %d == %d", labels.length(), n->outcnt()));
// Since MachConstantNode::constant_offset() also contains
// table_base_offset() we need to subtract the table_base_offset()
@@ -3211,7 +3211,7 @@ void Compile::ConstantTable::fill_jump_table(CodeBuffer& cb, MachConstantNode* n
for (uint i = 0; i < n->outcnt(); i++) {
address* constant_addr = &jump_table_base[i];
- assert(*constant_addr == (((address) n) + i), err_msg("all jump-table entries must contain adjusted node pointer: " INTPTR_FORMAT " == " INTPTR_FORMAT, *constant_addr, (((address) n) + i)));
+ assert(*constant_addr == (((address) n) + i), err_msg_res("all jump-table entries must contain adjusted node pointer: " INTPTR_FORMAT " == " INTPTR_FORMAT, *constant_addr, (((address) n) + i)));
*constant_addr = cb.consts()->target(*labels.at(i), (address) constant_addr);
cb.consts()->relocate((address) constant_addr, relocInfo::internal_word_type);
}
diff --git a/src/share/vm/opto/doCall.cpp b/src/share/vm/opto/doCall.cpp
index ac668e5aa..61d8d5e7c 100644
--- a/src/share/vm/opto/doCall.cpp
+++ b/src/share/vm/opto/doCall.cpp
@@ -523,10 +523,10 @@ void Parse::do_call() {
retnode = _gvn.transform( new (C, 3) LShiftINode(retnode, intcon(16)) );
retnode = _gvn.transform( new (C, 3) RShiftINode(retnode, intcon(16)) );
} else {
- assert(ct == T_INT, err_msg("rt=%d, ct=%d", rt, ct));
+ assert(ct == T_INT, err_msg_res("rt=%d, ct=%d", rt, ct));
}
} else if (rt == T_OBJECT) {
- assert(ct == T_OBJECT, err_msg("rt=T_OBJECT, ct=%d", ct));
+ assert(ct == T_OBJECT, err_msg_res("rt=T_OBJECT, ct=%d", ct));
if (ctype->is_loaded()) {
Node* if_fail = top();
retnode = gen_checkcast(retnode, makecon(TypeKlassPtr::make(ctype->as_klass())), &if_fail);
@@ -539,7 +539,7 @@ void Parse::do_call() {
push(retnode);
}
} else {
- assert(ct == rt, err_msg("unexpected mismatch rt=%d, ct=%d", rt, ct));
+ assert(ct == rt, err_msg_res("unexpected mismatch rt=%d, ct=%d", rt, ct));
// push a zero; it's better than getting an oop/int mismatch
retnode = pop_node(rt);
retnode = zerocon(ct);
diff --git a/src/share/vm/opto/escape.cpp b/src/share/vm/opto/escape.cpp
index 264e00a03..49206f7ab 100644
--- a/src/share/vm/opto/escape.cpp
+++ b/src/share/vm/opto/escape.cpp
@@ -1055,7 +1055,7 @@ bool ConnectionGraph::complete_connection_graph(
C->log()->text("%s", (iterations >= CG_BUILD_ITER_LIMIT) ? "iterations" : "time");
C->log()->end_elem(" limit'");
}
- assert(false, err_msg("infinite EA connection graph build (%f sec, %d iterations) with %d nodes and worklist size %d",
+ assert(false, err_msg_res("infinite EA connection graph build (%f sec, %d iterations) with %d nodes and worklist size %d",
time.seconds(), iterations, nodes_size(), ptnodes_worklist.length()));
// Possible infinite build_connection_graph loop,
// bailout (no changes to ideal graph were made).
diff --git a/src/share/vm/opto/idealGraphPrinter.cpp b/src/share/vm/opto/idealGraphPrinter.cpp
index 3344ce29c..b3919a654 100644
--- a/src/share/vm/opto/idealGraphPrinter.cpp
+++ b/src/share/vm/opto/idealGraphPrinter.cpp
@@ -155,8 +155,8 @@ IdealGraphPrinter::IdealGraphPrinter() {
} else {
// It would be nice if we could shut down cleanly but it should
// be an error if we can't connect to the visualizer.
- fatal(err_msg("Couldn't connect to visualizer at %s:%d",
- PrintIdealGraphAddress, PrintIdealGraphPort));
+ fatal(err_msg_res("Couldn't connect to visualizer at %s:%d",
+ PrintIdealGraphAddress, PrintIdealGraphPort));
}
}
diff --git a/src/share/vm/opto/node.hpp b/src/share/vm/opto/node.hpp
index 9e5fc69cd..759c0bcd6 100644
--- a/src/share/vm/opto/node.hpp
+++ b/src/share/vm/opto/node.hpp
@@ -363,7 +363,7 @@ protected:
#endif
// Reference to the i'th input Node. Error if out of bounds.
- Node* in(uint i) const { assert(i < _max, err_msg("oob: i=%d, _max=%d", i, _max)); return _in[i]; }
+ Node* in(uint i) const { assert(i < _max, err_msg_res("oob: i=%d, _max=%d", i, _max)); return _in[i]; }
// Reference to the i'th output Node. Error if out of bounds.
// Use this accessor sparingly. We are going trying to use iterators instead.
Node* raw_out(uint i) const { assert(i < _outcnt,"oob"); return _out[i]; }
@@ -394,7 +394,7 @@ protected:
void ins_req( uint i, Node *n ); // Insert a NEW required input
void set_req( uint i, Node *n ) {
assert( is_not_dead(n), "can not use dead node");
- assert( i < _cnt, err_msg("oob: i=%d, _cnt=%d", i, _cnt));
+ assert( i < _cnt, err_msg_res("oob: i=%d, _cnt=%d", i, _cnt));
assert( !VerifyHashTableKeys || _hash_lock == 0,
"remove node from hash table before modifying it");
Node** p = &_in[i]; // cache this._in, across the del_out call
diff --git a/src/share/vm/opto/parse1.cpp b/src/share/vm/opto/parse1.cpp
index cce50afa0..79fab69c1 100644
--- a/src/share/vm/opto/parse1.cpp
+++ b/src/share/vm/opto/parse1.cpp
@@ -1399,7 +1399,7 @@ void Parse::do_one_block() {
int pre_bc_sp = sp();
int inputs, depth;
bool have_se = !stopped() && compute_stack_effects(inputs, depth, /*for_parse*/ true);
- assert(!have_se || pre_bc_sp >= inputs, err_msg("have enough stack to execute this BC: pre_bc_sp=%d, inputs=%d", pre_bc_sp, inputs));
+ assert(!have_se || pre_bc_sp >= inputs, err_msg_res("have enough stack to execute this BC: pre_bc_sp=%d, inputs=%d", pre_bc_sp, inputs));
#endif //ASSERT
do_one_bytecode();