Mercurial > hg > graal-jvmci-8
comparison src/share/vm/code/nmethod.cpp @ 3377:2aa9ddbb9e60
7041789: 30% perf regression with c2/arm following 7017732
Summary: Implement a more accurate is_scavengable()
Reviewed-by: stefank, jcoomes, ysr
author | jmasa |
---|---|
date | Tue, 03 May 2011 10:30:34 -0700 |
parents | 3d58a4983660 |
children | 393e144bb99b |
comparison
equal
deleted
inserted
replaced
3373:688202ef6306 | 3377:2aa9ddbb9e60 |
---|---|
1808 #ifndef PRODUCT | 1808 #ifndef PRODUCT |
1809 nmethod* _print_nm; | 1809 nmethod* _print_nm; |
1810 void maybe_print(oop* p) { | 1810 void maybe_print(oop* p) { |
1811 if (_print_nm == NULL) return; | 1811 if (_print_nm == NULL) return; |
1812 if (!_detected_scavenge_root) _print_nm->print_on(tty, "new scavenge root"); | 1812 if (!_detected_scavenge_root) _print_nm->print_on(tty, "new scavenge root"); |
1813 tty->print_cr(""PTR_FORMAT"[offset=%d] detected non-perm oop "PTR_FORMAT" (found at "PTR_FORMAT")", | 1813 tty->print_cr(""PTR_FORMAT"[offset=%d] detected scavengable oop "PTR_FORMAT" (found at "PTR_FORMAT")", |
1814 _print_nm, (int)((intptr_t)p - (intptr_t)_print_nm), | 1814 _print_nm, (int)((intptr_t)p - (intptr_t)_print_nm), |
1815 (intptr_t)(*p), (intptr_t)p); | 1815 (intptr_t)(*p), (intptr_t)p); |
1816 (*p)->print(); | 1816 (*p)->print(); |
1817 } | 1817 } |
1818 #endif //PRODUCT | 1818 #endif //PRODUCT |
2309 if ((*p) == NULL || !(*p)->is_scavengable()) return; | 2309 if ((*p) == NULL || !(*p)->is_scavengable()) return; |
2310 if (_ok) { | 2310 if (_ok) { |
2311 _nm->print_nmethod(true); | 2311 _nm->print_nmethod(true); |
2312 _ok = false; | 2312 _ok = false; |
2313 } | 2313 } |
2314 tty->print_cr("*** non-perm oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)", | 2314 tty->print_cr("*** scavengable oop "PTR_FORMAT" found at "PTR_FORMAT" (offset %d)", |
2315 (intptr_t)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm)); | 2315 (intptr_t)(*p), (intptr_t)p, (int)((intptr_t)p - (intptr_t)_nm)); |
2316 (*p)->print(); | 2316 (*p)->print(); |
2317 } | 2317 } |
2318 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); } | 2318 virtual void do_oop(narrowOop* p) { ShouldNotReachHere(); } |
2319 }; | 2319 }; |
2322 if (!on_scavenge_root_list()) { | 2322 if (!on_scavenge_root_list()) { |
2323 // Actually look inside, to verify the claim that it's clean. | 2323 // Actually look inside, to verify the claim that it's clean. |
2324 DebugScavengeRoot debug_scavenge_root(this); | 2324 DebugScavengeRoot debug_scavenge_root(this); |
2325 oops_do(&debug_scavenge_root); | 2325 oops_do(&debug_scavenge_root); |
2326 if (!debug_scavenge_root.ok()) | 2326 if (!debug_scavenge_root.ok()) |
2327 fatal("found an unadvertised bad non-perm oop in the code cache"); | 2327 fatal("found an unadvertised bad scavengable oop in the code cache"); |
2328 } | 2328 } |
2329 assert(scavenge_root_not_marked(), ""); | 2329 assert(scavenge_root_not_marked(), ""); |
2330 } | 2330 } |
2331 | 2331 |
2332 #endif // PRODUCT | 2332 #endif // PRODUCT |