hotspot/src/share/vm/code/codeBlob.cpp
changeset 5924 dc9d04930c82
parent 5702 201c5cde25bb
child 6065 26016b8ed869
equal deleted inserted replaced
5915:406168b53eb0 5924:dc9d04930c82
   208   AdapterBlob* blob = NULL;
   208   AdapterBlob* blob = NULL;
   209   unsigned int size = allocation_size(cb, sizeof(AdapterBlob));
   209   unsigned int size = allocation_size(cb, sizeof(AdapterBlob));
   210   {
   210   {
   211     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
   211     MutexLockerEx mu(CodeCache_lock, Mutex::_no_safepoint_check_flag);
   212     blob = new (size) AdapterBlob(size, cb);
   212     blob = new (size) AdapterBlob(size, cb);
       
   213     CodeCache::commit(blob);
   213   }
   214   }
   214   // Track memory usage statistic after releasing CodeCache_lock
   215   // Track memory usage statistic after releasing CodeCache_lock
   215   MemoryService::track_code_cache_memory_usage();
   216   MemoryService::track_code_cache_memory_usage();
   216 
   217 
   217   return blob;
   218   return blob;
   279     jio_snprintf(stub_id, sizeof(stub_id), "RuntimeStub - %s", stub_name);
   280     jio_snprintf(stub_id, sizeof(stub_id), "RuntimeStub - %s", stub_name);
   280     if (PrintStubCode) {
   281     if (PrintStubCode) {
   281       tty->print_cr("Decoding %s " INTPTR_FORMAT, stub_id, stub);
   282       tty->print_cr("Decoding %s " INTPTR_FORMAT, stub_id, stub);
   282       Disassembler::decode(stub->instructions_begin(), stub->instructions_end());
   283       Disassembler::decode(stub->instructions_begin(), stub->instructions_end());
   283     }
   284     }
   284     VTune::register_stub(stub_id, stub->instructions_begin(), stub->instructions_end());
       
   285     Forte::register_stub(stub_id, stub->instructions_begin(), stub->instructions_end());
   285     Forte::register_stub(stub_id, stub->instructions_begin(), stub->instructions_end());
   286 
   286 
   287     if (JvmtiExport::should_post_dynamic_code_generated()) {
   287     if (JvmtiExport::should_post_dynamic_code_generated()) {
   288       JvmtiExport::post_dynamic_code_generated(stub_name, stub->instructions_begin(), stub->instructions_end());
   288       JvmtiExport::post_dynamic_code_generated(stub_name, stub->instructions_begin(), stub->instructions_end());
   289     }
   289     }
   354     jio_snprintf(blob_id, sizeof(blob_id), "DeoptimizationBlob@" PTR_FORMAT, blob->instructions_begin());
   354     jio_snprintf(blob_id, sizeof(blob_id), "DeoptimizationBlob@" PTR_FORMAT, blob->instructions_begin());
   355     if (PrintStubCode) {
   355     if (PrintStubCode) {
   356       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
   356       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
   357       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
   357       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
   358     }
   358     }
   359     VTune::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
       
   360     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
   359     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
   361 
   360 
   362     if (JvmtiExport::should_post_dynamic_code_generated()) {
   361     if (JvmtiExport::should_post_dynamic_code_generated()) {
   363       JvmtiExport::post_dynamic_code_generated("DeoptimizationBlob",
   362       JvmtiExport::post_dynamic_code_generated("DeoptimizationBlob",
   364                                                blob->instructions_begin(),
   363                                                blob->instructions_begin(),
   412     jio_snprintf(blob_id, sizeof(blob_id), "UncommonTrapBlob@" PTR_FORMAT, blob->instructions_begin());
   411     jio_snprintf(blob_id, sizeof(blob_id), "UncommonTrapBlob@" PTR_FORMAT, blob->instructions_begin());
   413     if (PrintStubCode) {
   412     if (PrintStubCode) {
   414       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
   413       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
   415       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
   414       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
   416     }
   415     }
   417     VTune::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
       
   418     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
   416     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
   419 
   417 
   420     if (JvmtiExport::should_post_dynamic_code_generated()) {
   418     if (JvmtiExport::should_post_dynamic_code_generated()) {
   421       JvmtiExport::post_dynamic_code_generated("UncommonTrapBlob",
   419       JvmtiExport::post_dynamic_code_generated("UncommonTrapBlob",
   422                                                blob->instructions_begin(),
   420                                                blob->instructions_begin(),
   472     jio_snprintf(blob_id, sizeof(blob_id), "ExceptionBlob@" PTR_FORMAT, blob->instructions_begin());
   470     jio_snprintf(blob_id, sizeof(blob_id), "ExceptionBlob@" PTR_FORMAT, blob->instructions_begin());
   473     if (PrintStubCode) {
   471     if (PrintStubCode) {
   474       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
   472       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
   475       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
   473       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
   476     }
   474     }
   477     VTune::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
       
   478     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
   475     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
   479 
   476 
   480     if (JvmtiExport::should_post_dynamic_code_generated()) {
   477     if (JvmtiExport::should_post_dynamic_code_generated()) {
   481       JvmtiExport::post_dynamic_code_generated("ExceptionBlob",
   478       JvmtiExport::post_dynamic_code_generated("ExceptionBlob",
   482                                                blob->instructions_begin(),
   479                                                blob->instructions_begin(),
   531     jio_snprintf(blob_id, sizeof(blob_id), "SafepointBlob@" PTR_FORMAT, blob->instructions_begin());
   528     jio_snprintf(blob_id, sizeof(blob_id), "SafepointBlob@" PTR_FORMAT, blob->instructions_begin());
   532     if (PrintStubCode) {
   529     if (PrintStubCode) {
   533       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
   530       tty->print_cr("Decoding %s " INTPTR_FORMAT, blob_id, blob);
   534       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
   531       Disassembler::decode(blob->instructions_begin(), blob->instructions_end());
   535     }
   532     }
   536     VTune::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
       
   537     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
   533     Forte::register_stub(blob_id, blob->instructions_begin(), blob->instructions_end());
   538 
   534 
   539     if (JvmtiExport::should_post_dynamic_code_generated()) {
   535     if (JvmtiExport::should_post_dynamic_code_generated()) {
   540       JvmtiExport::post_dynamic_code_generated("SafepointBlob",
   536       JvmtiExport::post_dynamic_code_generated("SafepointBlob",
   541                                                blob->instructions_begin(),
   537                                                blob->instructions_begin(),