Mercurial > hg > graal-compiler
changeset 16109:ed7a88f43dc3
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 13 Jun 2014 20:06:44 +0200 |
parents | 1a6746681b43 (current diff) 64d8c6c8a00c (diff) |
children | 0c0bc9ce40f2 |
files | |
diffstat | 2 files changed, 16 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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<StackSlot> freedSlots;
--- 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);