Code review request: three native memory tracking related bugs
zhengyu.gu at oracle.com
Fri Jul 13 12:43:30 PDT 2012
7181989: NMT ON: Assertion failure when NMT checks thread's native
We try to assert Thread's stack base to ensure that
Thread::record_stack_base_and_size() to record native stack to NMT, but
there is scenario that the thread fails to start, which no native stack
is created and should not be asserted.
7181986: NMT ON: Assertion failure when running jdi
This is a racing condition when C/C++ runtime exit handler is ran
before NMT worker thread exits. The exit handler calls _query_lock's
destructor while NMT worker thread is still holding it. The fix is to
make _query_lock a heap object, instead of static object, but the
drawback is that, it does not seem that _query_lock can be safely deleted.
Also, I reassigned MemSnaphot lock and query lock, so they participate
in the deadlock detection logic.
7182543: NMT ON: Aggregate a few NMT related bugs
- Fixed generations_in_used calculation
- Wait MemRecorder instance count to drop to zero before completely
- Added assertion for JavaThread in _thread_blocked state.
More information about the hotspot-dev