equal
deleted
inserted
replaced
91 #define DTRACE_METHOD_UNLOAD_PROBE(method) |
91 #define DTRACE_METHOD_UNLOAD_PROBE(method) |
92 |
92 |
93 #endif |
93 #endif |
94 |
94 |
95 bool nmethod::is_compiled_by_c1() const { |
95 bool nmethod::is_compiled_by_c1() const { |
96 if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing |
96 if (compiler() == NULL) { |
97 if (is_native_method()) return false; |
97 return false; |
|
98 } |
98 return compiler()->is_c1(); |
99 return compiler()->is_c1(); |
99 } |
100 } |
100 bool nmethod::is_compiled_by_c2() const { |
101 bool nmethod::is_compiled_by_c2() const { |
101 if (compiler() == NULL || method() == NULL) return false; // can happen during debug printing |
102 if (compiler() == NULL) { |
102 if (is_native_method()) return false; |
103 return false; |
|
104 } |
103 return compiler()->is_c2(); |
105 return compiler()->is_c2(); |
104 } |
106 } |
105 bool nmethod::is_compiled_by_shark() const { |
107 bool nmethod::is_compiled_by_shark() const { |
106 if (is_native_method()) return false; |
108 if (compiler() == NULL) { |
107 assert(compiler() != NULL, "must be"); |
109 return false; |
|
110 } |
108 return compiler()->is_shark(); |
111 return compiler()->is_shark(); |
109 } |
112 } |
110 |
113 |
111 |
114 |
112 |
115 |
1399 #ifdef ASSERT |
1402 #ifdef ASSERT |
1400 // It's no longer safe to access the oops section since zombie |
1403 // It's no longer safe to access the oops section since zombie |
1401 // nmethods aren't scanned for GC. |
1404 // nmethods aren't scanned for GC. |
1402 _oops_are_stale = true; |
1405 _oops_are_stale = true; |
1403 #endif |
1406 #endif |
|
1407 // the Method may be reclaimed by class unloading now that the |
|
1408 // nmethod is in zombie state |
|
1409 set_method(NULL); |
1404 } else { |
1410 } else { |
1405 assert(state == not_entrant, "other cases may need to be handled differently"); |
1411 assert(state == not_entrant, "other cases may need to be handled differently"); |
1406 } |
1412 } |
1407 |
1413 |
1408 if (TraceCreateZombies) { |
1414 if (TraceCreateZombies) { |