comparison src/share/vm/code/nmethod.cpp @ 7125:1baf7f1e3f23

decoupled C++ Graal runtime from C1
author Doug Simon <doug.simon@oracle.com>
date Mon, 03 Dec 2012 15:32:17 +0100
parents 60bef2672469
children 5d0bb7d52783
comparison
equal deleted inserted replaced
7124:ab65fa23f8e9 7125:1baf7f1e3f23
99 99
100 bool nmethod::is_compiled_by_c1() const { 100 bool nmethod::is_compiled_by_c1() const {
101 if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing 101 if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing
102 if (is_native_method()) return false; 102 if (is_native_method()) return false;
103 return compiler()->is_c1(); 103 return compiler()->is_c1();
104 }
105 bool nmethod::is_compiled_by_graal() const {
106 if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing
107 if (is_native_method()) return false;
108 return compiler()->is_graal();
104 } 109 }
105 bool nmethod::is_compiled_by_c2() const { 110 bool nmethod::is_compiled_by_c2() const {
106 if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing 111 if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing
107 if (is_native_method()) return false; 112 if (is_native_method()) return false;
108 return compiler()->is_c2(); 113 return compiler()->is_c2();
862 _stub_offset = content_offset() + code_buffer->total_offset_of(code_buffer->stubs()); 867 _stub_offset = content_offset() + code_buffer->total_offset_of(code_buffer->stubs());
863 868
864 #ifdef GRAAL 869 #ifdef GRAAL
865 _graal_installed_code = installed_code(); 870 _graal_installed_code = installed_code();
866 871
867 // graal produces no (!) stub section 872 // Graal might not produce any stub sections
868 if (offsets->value(CodeOffsets::Exceptions) != -1) { 873 if (offsets->value(CodeOffsets::Exceptions) != -1) {
869 _exception_offset = code_offset() + offsets->value(CodeOffsets::Exceptions); 874 _exception_offset = code_offset() + offsets->value(CodeOffsets::Exceptions);
870 } else { 875 } else {
871 _exception_offset = -1; 876 _exception_offset = -1;
872 } 877 }
2550 tty->print("(c1) "); 2555 tty->print("(c1) ");
2551 } else if (is_compiled_by_c2()) { 2556 } else if (is_compiled_by_c2()) {
2552 tty->print("(c2) "); 2557 tty->print("(c2) ");
2553 } else if (is_compiled_by_shark()) { 2558 } else if (is_compiled_by_shark()) {
2554 tty->print("(shark) "); 2559 tty->print("(shark) ");
2560 } else if (is_compiled_by_graal()) {
2561 tty->print("(Graal) ");
2555 } else { 2562 } else {
2556 tty->print("(nm) "); 2563 tty->print("(nm) ");
2557 } 2564 }
2558 2565
2559 print_on(tty, NULL); 2566 print_on(tty, NULL);