Mercurial > hg > truffle
comparison src/share/vm/code/codeBlob.cpp @ 7066:7d815d842ee0
Merge.
author | Christian Haeubl <haeubl@ssw.jku.at> |
---|---|
date | Fri, 23 Nov 2012 11:50:27 +0100 |
parents | 8c5333c80cfd b31471cdc53e |
children | 1baf7f1e3f23 |
comparison
equal
deleted
inserted
replaced
7065:cfacf5d5bade | 7066:7d815d842ee0 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
73 size += round_to(cb->total_relocation_size(), oopSize); | 73 size += round_to(cb->total_relocation_size(), oopSize); |
74 // align the size to CodeEntryAlignment | 74 // align the size to CodeEntryAlignment |
75 size = align_code_offset(size); | 75 size = align_code_offset(size); |
76 size += round_to(cb->total_content_size(), oopSize); | 76 size += round_to(cb->total_content_size(), oopSize); |
77 size += round_to(cb->total_oop_size(), oopSize); | 77 size += round_to(cb->total_oop_size(), oopSize); |
78 size += round_to(cb->total_metadata_size(), oopSize); | |
78 return size; | 79 return size; |
79 } | 80 } |
80 | 81 |
81 | 82 |
82 // Creates a simple CodeBlob. Sets up the size of the different regions. | 83 // Creates a simple CodeBlob. Sets up the size of the different regions. |
160 if (stub != NULL) { | 161 if (stub != NULL) { |
161 char stub_id[256]; | 162 char stub_id[256]; |
162 assert(strlen(name1) + strlen(name2) < sizeof(stub_id), ""); | 163 assert(strlen(name1) + strlen(name2) < sizeof(stub_id), ""); |
163 jio_snprintf(stub_id, sizeof(stub_id), "%s%s", name1, name2); | 164 jio_snprintf(stub_id, sizeof(stub_id), "%s%s", name1, name2); |
164 if (PrintStubCode) { | 165 if (PrintStubCode) { |
166 ttyLocker ttyl; | |
165 tty->print_cr("Decoding %s " INTPTR_FORMAT, stub_id, (intptr_t) stub); | 167 tty->print_cr("Decoding %s " INTPTR_FORMAT, stub_id, (intptr_t) stub); |
166 Disassembler::decode(stub->code_begin(), stub->code_end()); | 168 Disassembler::decode(stub->code_begin(), stub->code_end()); |
169 tty->cr(); | |
167 } | 170 } |
168 Forte::register_stub(stub_id, stub->code_begin(), stub->code_end()); | 171 Forte::register_stub(stub_id, stub->code_begin(), stub->code_end()); |
169 | 172 |
170 if (JvmtiExport::should_post_dynamic_code_generated()) { | 173 if (JvmtiExport::should_post_dynamic_code_generated()) { |
171 const char* stub_name = name2; | 174 const char* stub_name = name2; |
550 void RuntimeStub::verify() { | 553 void RuntimeStub::verify() { |
551 // unimplemented | 554 // unimplemented |
552 } | 555 } |
553 | 556 |
554 void RuntimeStub::print_on(outputStream* st) const { | 557 void RuntimeStub::print_on(outputStream* st) const { |
558 ttyLocker ttyl; | |
555 CodeBlob::print_on(st); | 559 CodeBlob::print_on(st); |
556 st->print("Runtime Stub (" INTPTR_FORMAT "): ", this); | 560 st->print("Runtime Stub (" INTPTR_FORMAT "): ", this); |
557 st->print_cr(name()); | 561 st->print_cr(name()); |
558 Disassembler::decode((CodeBlob*)this, st); | 562 Disassembler::decode((CodeBlob*)this, st); |
559 } | 563 } |
565 void SingletonBlob::verify() { | 569 void SingletonBlob::verify() { |
566 // unimplemented | 570 // unimplemented |
567 } | 571 } |
568 | 572 |
569 void SingletonBlob::print_on(outputStream* st) const { | 573 void SingletonBlob::print_on(outputStream* st) const { |
574 ttyLocker ttyl; | |
570 CodeBlob::print_on(st); | 575 CodeBlob::print_on(st); |
571 st->print_cr(name()); | 576 st->print_cr(name()); |
572 Disassembler::decode((CodeBlob*)this, st); | 577 Disassembler::decode((CodeBlob*)this, st); |
573 } | 578 } |
574 | 579 |