Mercurial > hg > graal-compiler
comparison src/share/vm/graal/graalCodeInstaller.cpp @ 5275:290b3025b66f
added support for disassembling code after installation (so that the result of patching and relocation can be seen)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 23 Apr 2012 15:49:11 +0200 |
parents | af8958fe5a3a |
children | a53162ca8219 |
comparison
equal
deleted
inserted
replaced
5274:e72dd6533eb9 | 5275:290b3025b66f |
---|---|
295 | 295 |
296 method->clear_queued_for_compilation(); | 296 method->clear_queued_for_compilation(); |
297 } | 297 } |
298 | 298 |
299 // constructor used to create a stub | 299 // constructor used to create a stub |
300 CodeInstaller::CodeInstaller(Handle& target_method, jlong& id) { | 300 CodeInstaller::CodeInstaller(Handle& target_method, BufferBlob*& blob, jlong& id) { |
301 No_Safepoint_Verifier no_safepoint; | 301 No_Safepoint_Verifier no_safepoint; |
302 _env = CURRENT_ENV; | 302 _env = CURRENT_ENV; |
303 | 303 |
304 _oop_recorder = new OopRecorder(_env->arena()); | 304 _oop_recorder = new OopRecorder(_env->arena()); |
305 _env->set_oop_recorder(_oop_recorder); | 305 _env->set_oop_recorder(_oop_recorder); |
310 GraalCompiler::initialize_buffer_blob(); | 310 GraalCompiler::initialize_buffer_blob(); |
311 CodeBuffer buffer(JavaThread::current()->get_buffer_blob()); | 311 CodeBuffer buffer(JavaThread::current()->get_buffer_blob()); |
312 initialize_buffer(buffer); | 312 initialize_buffer(buffer); |
313 | 313 |
314 const char* cname = java_lang_String::as_utf8_string(_name); | 314 const char* cname = java_lang_String::as_utf8_string(_name); |
315 BufferBlob* blob = BufferBlob::create(strdup(cname), &buffer); // this is leaking strings... but only a limited number of stubs will be created | 315 blob = BufferBlob::create(strdup(cname), &buffer); // this is leaking strings... but only a limited number of stubs will be created |
316 IF_TRACE_graal_3 Disassembler::decode((CodeBlob*) blob); | 316 IF_TRACE_graal_3 Disassembler::decode((CodeBlob*) blob); |
317 id = VmIds::addStub(blob->code_begin()); | 317 id = VmIds::addStub(blob->code_begin()); |
318 } | 318 } |
319 | 319 |
320 void CodeInstaller::initialize_fields(oop target_method) { | 320 void CodeInstaller::initialize_fields(oop target_method) { |