Lines Matching defs:nmethod

29 #include "code/nmethod.hpp"
95 bool nmethod::is_compiled_by_c1() const {
100 bool nmethod::is_compiled_by_c2() const {
105 bool nmethod::is_compiled_by_shark() const {
137 void note_nmethod(nmethod* nm) {
172 void note_native_nmethod(nmethod* nm) {
189 int pc_desc_queries; // queries to nmethod::find_pc_desc
273 ExceptionCache* nmethod::exception_cache_entry_for_exception(Handle exception) {
370 void nmethod::add_exception_cache_entry(ExceptionCache* new_entry) {
381 void nmethod::remove_from_exception_cache(ExceptionCache* ec) {
404 address nmethod::handler_for_exception_and_pc(Handle exception, address pc) {
407 // the first few exception lookups for a given nmethod.
420 void nmethod::add_handler_for_exception_and_pc(Handle exception, address pc, address handler) {
440 int nmethod::total_size() const {
451 const char* nmethod::compile_kind() const {
458 void nmethod::init_defaults() {
490 nmethod* nmethod::new_native_nmethod(methodHandle method,
499 // create nmethod
500 nmethod* nm = NULL;
503 int native_nmethod_size = allocation_size(code_buffer, sizeof(nmethod));
508 nmethod(method(), native_nmethod_size, compile_id, &offsets,
516 // verify nmethod
527 nmethod* nmethod::new_dtrace_nmethod(methodHandle method,
533 // create nmethod
534 nmethod* nm = NULL;
537 int nmethod_size = allocation_size(code_buffer, sizeof(nmethod));
543 nm = new (nmethod_size) nmethod(method(), nmethod_size, &offsets, code_buffer, frame_size);
549 // verify nmethod
561 nmethod* nmethod::new_nmethod(methodHandle method,
577 // create nmethod
578 nmethod* nm = NULL;
581 allocation_size(code_buffer, sizeof(nmethod))
588 nmethod(method(), nmethod_size, compile_id, entry_bci, offsets,
597 // the nmethod dependencies in the classes it is dependent on.
601 // check every nmethod for dependencies which makes it linear in
608 // record this nmethod as dependent on this klass
617 // verify nmethod
630 nmethod::nmethod(
640 : CodeBlob("native nmethod", code_buffer, sizeof(nmethod),
653 // values something that will never match a pc like the nmethod vtable entry
715 nmethod::nmethod(
721 : CodeBlob("dtrace nmethod", code_buffer, sizeof(nmethod),
734 // values something that will never match a pc like the nmethod vtable entry
790 void* nmethod::operator new(size_t size, int nmethod_size) {
797 nmethod::nmethod(
814 : CodeBlob("nmethod", code_buffer, sizeof(nmethod),
866 // Copy contents of ScopeDescRecorder to nmethod
877 // Copy contents of ExceptionHandlerTable to nmethod
897 // Print a short set of xml attributes to identify this nmethod. The
899 void nmethod::log_identity(xmlStream* log) const {
918 void nmethod::log_new_nmethod() const {
922 xtty->begin_elem("nmethod");
947 // Print out more verbose output usually for a newly created nmethod.
948 void nmethod::print_on(outputStream* st, const char* msg) const {
961 void nmethod::print_nmethod(bool printmethod) {
998 inline void nmethod::initialize_immediate_oop(oop* dest, jobject handle) {
1009 void nmethod::copy_oops(GrowableArray<jobject>* array) {
1027 bool nmethod::is_at_poll_return(address pc) {
1037 bool nmethod::is_at_poll_or_poll_return(address pc) {
1048 void nmethod::fix_oop_relocations(address begin, address end, bool initialize_immediates) {
1070 void nmethod::verify_oop_relocations() {
1084 ScopeDesc* nmethod::scope_desc_at(address pc) {
1093 void nmethod::clear_inline_caches() {
1106 void nmethod::cleanup_inline_caches() {
1123 // Find all calls in an nmethod, and clear the ones that points to zombie methods
1134 nmethod* nm = (nmethod*)cb;
1144 nmethod* nm = (nmethod*)cb;
1155 void nmethod::mark_as_seen_on_stack() {
1165 bool nmethod::can_not_entrant_be_converted() {
1168 // Since the nmethod sweeper only does partial sweep the sweeper's traversal
1170 // nmethod for the second time.
1175 void nmethod::inc_decompile_count() {
1186 void nmethod::make_unloaded(BoolObjectClosure* is_alive, oop cause) {
1190 // Since this nmethod is being unloaded, make sure that dependencies
1198 // Break cycle between nmethod & method
1200 tty->print_cr("[Class unloading: Making nmethod " INTPTR_FORMAT
1213 // have the methodOop live here, in case we unload the nmethod because
1221 _method = NULL; // Clear the method of this dead nmethod
1244 void nmethod::invalidate_osr_method() {
1245 assert(_entry_bci != InvocationEntryBci, "wrong kind of nmethod");
1253 void nmethod::log_state_change() const {
1276 bool nmethod::make_not_entrant_or_zombie(unsigned int state) {
1280 // Make sure neither the nmethod nor the method is flushed in case of a safepoint in code below.
1286 // invalidate osr nmethod before acquiring the patching lock since
1291 // this effectively makes the osr nmethod not entrant
1323 // Remove nmethod from method.
1325 // refer to this nmethod because there is a race in setting these two fields
1327 // If the vep() points to the zombie nmethod, the memory for the nmethod
1342 // When the nmethod becomes zombie it is no longer alive so the
1356 // event and it hasn't already been reported for this nmethod then
1372 tty->print_cr("nmethod <" INTPTR_FORMAT "> code made %s", this, (state == not_entrant) ? "not entrant" : "zombie");
1381 void nmethod::flush() {
1382 // Note that there are no valid oops in the nmethod anymore.
1390 Events::log(JavaThread::current(), "flushing nmethod " INTPTR_FORMAT, this);
1392 tty->print_cr("*flushing nmethod %3d/" INTPTR_FORMAT ". Live blobs:" UINT32_FORMAT "/Free CodeCache:" SIZE_FORMAT "Kb",
1397 // Note that we do not need to grab the nmethod lock for this, it
1426 // Notify all classes this nmethod is dependent on that it is no
1428 // First, when a nmethod transitions to a zombie all dependents need
1434 // dependencies in the unloaded nmethod won't be updated, so
1439 void nmethod::flush_dependencies(BoolObjectClosure* is_alive) {
1459 // If this oop is not live, the nmethod can be unloaded.
1460 bool nmethod::can_unload(BoolObjectClosure* is_alive,
1478 // If ScavengeRootsInCode is true, an nmethod might be unloaded
1490 void nmethod::post_compiled_method_load_event() {
1526 jmethodID nmethod::get_and_cache_jmethod_id() {
1535 void nmethod::post_compiled_method_unload() {
1546 // post the event. Sometime later this nmethod will be made a zombie
1569 // any time. As the nmethod is being unloaded now we mark it has
1572 // event is enabled at the time the nmethod is made a zombie.
1577 // GC to unload an nmethod if it contains otherwise unreachable
1580 void nmethod::do_unloading(BoolObjectClosure* is_alive,
1584 "should not call follow on zombie or unloaded nmethod");
1604 // of this nmethod is reported.
1683 // This nmethod was not unloaded; check below that all CompiledICs
1692 "Found unmarked ic_oop in reachable nmethod");
1705 // case. We want to walk the weak roots in the nmethod
1706 // only in the second case. The weak roots in the nmethod
1709 void nmethod::oops_do(OopClosure* f, bool do_strong_roots_only) {
1712 "should not call follow on zombie or unloaded nmethod");
1760 #define NMETHOD_SENTINEL ((nmethod*)badAddress)
1762 nmethod* volatile nmethod::_oops_do_mark_nmethods;
1764 // An nmethod is "marked" if its _mark_link is set non-null.
1768 bool nmethod::test_set_oops_do_mark() {
1769 assert(nmethod::oops_do_marking_is_active(), "oops_do_marking_prologue must be called");
1770 nmethod* observed_mark_link = _oops_do_mark_link;
1772 // Claim this nmethod for this thread to mark.
1773 observed_mark_link = (nmethod*)
1777 // Atomically append this nmethod (now claimed) to the head of the list:
1778 nmethod* observed_mark_nmethods = _oops_do_mark_nmethods;
1780 nmethod* required_mark_nmethods = observed_mark_nmethods;
1782 observed_mark_nmethods = (nmethod*)
1792 // On fall through, another racing thread marked this nmethod before we did.
1796 void nmethod::oops_do_marking_prologue() {
1805 void nmethod::oops_do_marking_epilogue() {
1807 nmethod* cur = _oops_do_mark_nmethods;
1810 nmethod* next = cur->_oops_do_mark_link;
1837 nmethod* _print_nm;
1849 bool nmethod::detect_scavenge_root_oops() {
1858 void nmethod::preserve_callee_argument_oops(frame fr, const RegisterMap *reg_map, OopClosure* f) {
1873 oop nmethod::embeddedOop_at(u_char* p) {
1888 void nmethod::copy_scopes_pcs(PcDesc* pcs, int count) {
1905 // Search for MethodHandle invokes and tag the nmethod.
1933 void nmethod::copy_scopes_data(u_char* buffer, int size) {
1940 static PcDesc* linear_search(nmethod* nm, int pc_offset, bool approximate) {
1960 PcDesc* nmethod::find_pc_desc_internal(address pc, bool approximate) {
2042 bool nmethod::check_all_dependencies() {
2054 bool nmethod::check_dependency_on(DepChange& changes) {
2069 bool nmethod::is_evol_dependent_on(klassOop dependee) {
2079 ("Found evol dependency of nmethod %s.%s(%s) compile_id=%d on method %s.%s(%s)",
2097 bool nmethod::is_dependent_on_method(methodOop dependee) {
2108 bool nmethod::is_patchable_at(address instr_addr) {
2109 assert(insts_contains(instr_addr), "wrong nmethod used");
2118 address nmethod::continuation_for_implicit_exception(address pc) {
2120 // an active nmethod => use cpc to determine a return address
2149 assert(sizeof(nmethod) % oopSize == 0, "nmethod size must be multiple of a word");
2159 guarantee(cb != NULL && cb->is_nmethod(), "bad pc for a nmethod found");
2160 _nm = (nmethod*)cb;
2166 void nmethodLocker::lock_nmethod(nmethod* nm, bool zombie_ok) {
2172 void nmethodLocker::unlock_nmethod(nmethod* nm) {
2175 guarantee(nm->_lock_count >= 0, "unmatched nmethod lock/unlock");
2180 // nmethod::get_deopt_original_pc
2183 // (a) the given PC belongs to a nmethod and
2185 address nmethod::get_deopt_original_pc(const frame* fr) {
2188 nmethod* nm = fr->cb()->as_nmethod_or_null();
2199 bool nmethod::is_method_handle_return(address return_pc) {
2212 nmethod* _nm;
2215 VerifyOopsClosure(nmethod* nm) : _nm(nm), _ok(true) { }
2229 void nmethod::verify() {
2245 fatal(err_msg("nmethod at " INTPTR_FORMAT " not in zone", this));
2251 nmethod* nm = CodeCache::find_nmethod(verified_entry_point());
2253 fatal(err_msg("findNMethod did not find this nmethod (" INTPTR_FORMAT ")",
2259 tty->print_cr("\t\tin nmethod at " INTPTR_FORMAT " (pcs)", this);
2272 void nmethod::verify_interrupt_point(address call_site) {
2296 void nmethod::verify_scopes() {
2301 RelocIterator iter((nmethod*)this);
2333 nmethod* _nm;
2336 DebugScavengeRoot(nmethod* nm) : _nm(nm), _ok(true) { }
2351 void nmethod::verify_scavenge_root_oops() {
2366 void nmethod::print() const {
2385 tty->print("((nmethod*) "INTPTR_FORMAT ") ", this);
2441 void nmethod::print_code() {
2450 void nmethod::print_scopes() {
2462 void nmethod::print_dependencies() {
2472 tty->print_cr(" [nmethod<=klass]%s", k->external_name());
2480 void nmethod::print_relocations() {
2507 void nmethod::print_pcs() {
2517 const char* nmethod::reloc_string_for(u_char* begin, u_char* end) {
2551 ScopeDesc* nmethod::scope_desc_in(address begin, address end) {
2561 void nmethod::print_nmethod_labels(outputStream* stream, address block_begin) const {
2668 void nmethod::print_code_comment_on(outputStream* st, int column, u_char* begin, u_char* end) {
2769 void nmethod::print_value_on(outputStream* st) const {
2770 st->print("nmethod");
2774 void nmethod::print_calls(outputStream* st) {
2792 void nmethod::print_handler_table() {
2796 void nmethod::print_nul_chk_table() {
2800 void nmethod::print_statistics() {
2802 if (xtty != NULL) xtty->head("statistics type='nmethod'");