src/share/vm/services/memTracker.cpp

Print this page
rev 6314 : imported patch nmtfix

*** 783,793 **** void MemTracker::Tracker::record(address old_addr, address new_addr, size_t size, MEMFLAGS flags, address pc) { assert(old_addr != NULL && new_addr != NULL, "Sanity check"); assert(_op == Realloc || _op == NoOp, "Wrong call"); ! if (MemTracker::is_on() && NMT_CAN_TRACK(flags) && _op != NoOp) { assert(_seq > 0, "Need pre-reserve sequence number"); if (_need_thread_critical_lock) { ThreadCritical tc; // free old address, use pre-reserved sequence number MemTracker::write_tracking_record(old_addr, MemPointerRecord::free_tag(), --- 783,793 ---- void MemTracker::Tracker::record(address old_addr, address new_addr, size_t size, MEMFLAGS flags, address pc) { assert(old_addr != NULL && new_addr != NULL, "Sanity check"); assert(_op == Realloc || _op == NoOp, "Wrong call"); ! if (MemTracker::is_on() && NMT_CAN_TRACK(flags) && _op != NoOp && !MemTracker::shutdown_in_progress()) { assert(_seq > 0, "Need pre-reserve sequence number"); if (_need_thread_critical_lock) { ThreadCritical tc; // free old address, use pre-reserved sequence number MemTracker::write_tracking_record(old_addr, MemPointerRecord::free_tag(),
*** 809,819 **** void MemTracker::Tracker::record(address addr, size_t size, MEMFLAGS flags, address pc) { // OOM already? if (addr == NULL) return; ! if (MemTracker::is_on() && NMT_CAN_TRACK(flags) && _op != NoOp) { bool pre_reserved_seq = (_seq != 0); address pc = CALLER_CALLER_PC; MEMFLAGS orig_flags = flags; // or the tagging flags --- 809,819 ---- void MemTracker::Tracker::record(address addr, size_t size, MEMFLAGS flags, address pc) { // OOM already? if (addr == NULL) return; ! if (MemTracker::is_on() && NMT_CAN_TRACK(flags) && _op != NoOp && !MemTracker::shutdown_in_progress()) { bool pre_reserved_seq = (_seq != 0); address pc = CALLER_CALLER_PC; MEMFLAGS orig_flags = flags; // or the tagging flags