Mercurial > hg > truffle
comparison src/share/vm/code/codeBlob.cpp @ 8151:b8f261ba79c6
Minimize diff to plain HotSpot version.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Thu, 07 Mar 2013 21:00:29 +0100 |
parents | 5d0bb7d52783 |
children | b9a918201d47 |
comparison
equal
deleted
inserted
replaced
8150:b66f831ac5ab | 8151:b8f261ba79c6 |
---|---|
37 #include "runtime/mutexLocker.hpp" | 37 #include "runtime/mutexLocker.hpp" |
38 #include "runtime/safepoint.hpp" | 38 #include "runtime/safepoint.hpp" |
39 #include "runtime/sharedRuntime.hpp" | 39 #include "runtime/sharedRuntime.hpp" |
40 #include "runtime/vframe.hpp" | 40 #include "runtime/vframe.hpp" |
41 #include "services/memoryService.hpp" | 41 #include "services/memoryService.hpp" |
42 #include "utilities/machineCodePrinter.hpp" | |
43 #ifdef TARGET_ARCH_x86 | 42 #ifdef TARGET_ARCH_x86 |
44 # include "nativeInst_x86.hpp" | 43 # include "nativeInst_x86.hpp" |
45 #endif | 44 #endif |
46 #ifdef TARGET_ARCH_sparc | 45 #ifdef TARGET_ARCH_sparc |
47 # include "nativeInst_sparc.hpp" | 46 # include "nativeInst_sparc.hpp" |
132 assert(_data_offset <= size, "codeBlob is too small"); | 131 assert(_data_offset <= size, "codeBlob is too small"); |
133 | 132 |
134 cb->copy_code_and_locs_to(this); | 133 cb->copy_code_and_locs_to(this); |
135 set_oop_maps(oop_maps); | 134 set_oop_maps(oop_maps); |
136 _frame_size = frame_size; | 135 _frame_size = frame_size; |
137 #if defined(COMPILER1) || defined(GRAAL) | 136 #ifdef COMPILER1 |
138 | |
139 // probably wrong for tiered | 137 // probably wrong for tiered |
140 assert(_frame_size >= -1, "must use frame size or -1 for runtime stubs"); | 138 assert(_frame_size >= -1, "must use frame size or -1 for runtime stubs"); |
141 #endif // COMPILER1 || GRAAL | 139 #endif // COMPILER1 |
142 } | 140 } |
143 | 141 |
144 | 142 |
145 void CodeBlob::set_oop_maps(OopMapSet* p) { | 143 void CodeBlob::set_oop_maps(OopMapSet* p) { |
146 // Danger Will Robinson! This method allocates a big | 144 // Danger Will Robinson! This method allocates a big |
343 stub = new (size) RuntimeStub(stub_name, cb, size, frame_complete, frame_size, oop_maps, caller_must_gc_arguments); | 341 stub = new (size) RuntimeStub(stub_name, cb, size, frame_complete, frame_size, oop_maps, caller_must_gc_arguments); |
344 } | 342 } |
345 | 343 |
346 trace_new_stub(stub, "RuntimeStub - ", stub_name); | 344 trace_new_stub(stub, "RuntimeStub - ", stub_name); |
347 | 345 |
348 if (PrintMachineCodeToFile) { | |
349 MachineCodePrinter::print(stub); | |
350 } | |
351 | |
352 return stub; | 346 return stub; |
353 } | 347 } |
354 | 348 |
355 | 349 |
356 void* RuntimeStub::operator new(size_t s, unsigned size) { | 350 void* RuntimeStub::operator new(size_t s, unsigned size) { |
382 : SingletonBlob("DeoptimizationBlob", cb, sizeof(DeoptimizationBlob), size, frame_size, oop_maps) | 376 : SingletonBlob("DeoptimizationBlob", cb, sizeof(DeoptimizationBlob), size, frame_size, oop_maps) |
383 { | 377 { |
384 _unpack_offset = unpack_offset; | 378 _unpack_offset = unpack_offset; |
385 _unpack_with_exception = unpack_with_exception_offset; | 379 _unpack_with_exception = unpack_with_exception_offset; |
386 _unpack_with_reexecution = unpack_with_reexecution_offset; | 380 _unpack_with_reexecution = unpack_with_reexecution_offset; |
381 #ifdef COMPILER1 | |
387 _unpack_with_exception_in_tls = -1; | 382 _unpack_with_exception_in_tls = -1; |
383 #endif | |
388 } | 384 } |
389 | 385 |
390 | 386 |
391 DeoptimizationBlob* DeoptimizationBlob::create( | 387 DeoptimizationBlob* DeoptimizationBlob::create( |
392 CodeBuffer* cb, | 388 CodeBuffer* cb, |