# HG changeset patch # User Doug Simon # Date 1402682804 -7200 # Node ID ed7a88f43dc3929be56fe5e8f6654069ef329bad # Parent 1a6746681b43d08fd356cc507f11f0ef227bc062# Parent 64d8c6c8a00cbca2d2cef969428b2834305145ce Merge. diff -r 1a6746681b43 -r ed7a88f43dc3 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java Fri Jun 13 18:44:55 2014 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/FrameMap.java Fri Jun 13 20:06:44 2014 +0200 @@ -67,6 +67,8 @@ */ protected int outgoingSize; + protected int freeSpill4 = -1; + /** * Determines if this frame has values on the stack for outgoing calls. */ @@ -295,8 +297,19 @@ } } int size = spillSlotSize(kind); - spillSize = NumUtil.roundUp(spillSize + size, size); - return allocateNewSpillSlot(kind, 0); + if (size == 4 && freeSpill4 != -1) { + int offset = spillSize - freeSpill4 - size; + freeSpill4 = -1; + return allocateNewSpillSlot(kind, offset); + } else { + int origSpillSize = spillSize; + spillSize = NumUtil.roundUp(spillSize + size, size); + int waste = (spillSize - origSpillSize) - size; + if (waste == 4 && freeSpill4 == -1) { + freeSpill4 = origSpillSize; + } + return allocateNewSpillSlot(kind, 0); + } } private Set freedSlots; diff -r 1a6746681b43 -r ed7a88f43dc3 src/share/vm/compiler/compileBroker.cpp --- a/src/share/vm/compiler/compileBroker.cpp Fri Jun 13 18:44:55 2014 +0200 +++ b/src/share/vm/compiler/compileBroker.cpp Fri Jun 13 20:06:44 2014 +0200 @@ -1031,7 +1031,7 @@ char name_buffer[256]; for (int i = 0; i < c2_compiler_count; i++) { // Create a name for our thread. - sprintf(name_buffer, "C2 CompilerThread%d", i); + sprintf(name_buffer, "%s CompilerThread%d", _compilers[1]->name(), i); CompilerCounters* counters = new CompilerCounters("compilerThread", i, CHECK); // Shark and C2 CompilerThread* new_thread = make_compiler_thread(name_buffer, _c2_method_queue, counters, _compilers[1], CHECK);