comparison src/cpu/sparc/vm/frame_sparc.cpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 1d7922586cf6
children 59c790074993
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
24 24
25 #include "precompiled.hpp" 25 #include "precompiled.hpp"
26 #include "interpreter/interpreter.hpp" 26 #include "interpreter/interpreter.hpp"
27 #include "memory/resourceArea.hpp" 27 #include "memory/resourceArea.hpp"
28 #include "oops/markOop.hpp" 28 #include "oops/markOop.hpp"
29 #include "oops/methodOop.hpp" 29 #include "oops/method.hpp"
30 #include "oops/oop.inline.hpp" 30 #include "oops/oop.inline.hpp"
31 #include "prims/methodHandles.hpp" 31 #include "prims/methodHandles.hpp"
32 #include "runtime/frame.inline.hpp" 32 #include "runtime/frame.inline.hpp"
33 #include "runtime/handles.inline.hpp" 33 #include "runtime/handles.inline.hpp"
34 #include "runtime/javaCalls.hpp" 34 #include "runtime/javaCalls.hpp"
610 610
611 611
612 void frame::pd_gc_epilog() { 612 void frame::pd_gc_epilog() {
613 if (is_interpreted_frame()) { 613 if (is_interpreted_frame()) {
614 // set constant pool cache entry for interpreter 614 // set constant pool cache entry for interpreter
615 methodOop m = interpreter_frame_method(); 615 Method* m = interpreter_frame_method();
616 616
617 *interpreter_frame_cpoolcache_addr() = m->constants()->cache(); 617 *interpreter_frame_cpoolcache_addr() = m->constants()->cache();
618 } 618 }
619 } 619 }
620 620
643 } 643 }
644 // do some validation of frame elements 644 // do some validation of frame elements
645 645
646 // first the method 646 // first the method
647 647
648 methodOop m = *interpreter_frame_method_addr(); 648 Method* m = *interpreter_frame_method_addr();
649 649
650 // validate the method we'd find in this potential sender 650 // validate the method we'd find in this potential sender
651 if (!Universe::heap()->is_valid_method(m)) return false; 651 if (!Universe::heap()->is_valid_method(m)) return false;
652 652
653 // stack frames shouldn't be much larger than max_stack elements 653 // stack frames shouldn't be much larger than max_stack elements
661 intptr_t bcx = interpreter_frame_bcx(); 661 intptr_t bcx = interpreter_frame_bcx();
662 if (m->validate_bci_from_bcx(bcx) < 0) { 662 if (m->validate_bci_from_bcx(bcx) < 0) {
663 return false; 663 return false;
664 } 664 }
665 665
666 // validate constantPoolCacheOop 666 // validate ConstantPoolCache*
667 667 ConstantPoolCache* cp = *interpreter_frame_cache_addr();
668 constantPoolCacheOop cp = *interpreter_frame_cache_addr(); 668 if (cp == NULL || !cp->is_metadata()) return false;
669
670 if (cp == NULL ||
671 !Space::is_aligned(cp) ||
672 !Universe::heap()->is_permanent((void*)cp)) return false;
673 669
674 // validate locals 670 // validate locals
675 671
676 address locals = (address) *interpreter_frame_locals_addr(); 672 address locals = (address) *interpreter_frame_locals_addr();
677 673
727 } 723 }
728 724
729 725
730 BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) { 726 BasicType frame::interpreter_frame_result(oop* oop_result, jvalue* value_result) {
731 assert(is_interpreted_frame(), "interpreted frame expected"); 727 assert(is_interpreted_frame(), "interpreted frame expected");
732 methodOop method = interpreter_frame_method(); 728 Method* method = interpreter_frame_method();
733 BasicType type = method->result_type(); 729 BasicType type = method->result_type();
734 730
735 if (method->is_native()) { 731 if (method->is_native()) {
736 // Prior to notifying the runtime of the method_exit the possible result 732 // Prior to notifying the runtime of the method_exit the possible result
737 // value is saved to l_scratch and d_scratch. 733 // value is saved to l_scratch and d_scratch.