mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
7190089: NMT ON: NMT failed assertion on thread's stack base address
Solaris only, record stack info to NMT after stack size adjustment was made for primordial threads Reviewed-by: kvn, acorn, coleenp
This commit is contained in:
parent
e91b6584eb
commit
afd497eecc
11 changed files with 30 additions and 17 deletions
|
@ -185,6 +185,7 @@ class MemTracker : AllStatic {
|
|||
static inline void record_malloc(address addr, size_t size, MEMFLAGS flags,
|
||||
address pc = 0, Thread* thread = NULL) {
|
||||
if (NMT_CAN_TRACK(flags)) {
|
||||
assert(size > 0, "Sanity check");
|
||||
create_memory_record(addr, (flags|MemPointerRecord::malloc_tag()), size, pc, thread);
|
||||
}
|
||||
}
|
||||
|
@ -198,6 +199,7 @@ class MemTracker : AllStatic {
|
|||
static inline void record_realloc(address old_addr, address new_addr, size_t size,
|
||||
MEMFLAGS flags, address pc = 0, Thread* thread = NULL) {
|
||||
if (is_on()) {
|
||||
assert(size > 0, "Sanity check");
|
||||
record_free(old_addr, flags, thread);
|
||||
record_malloc(new_addr, size, flags, pc, thread);
|
||||
}
|
||||
|
@ -208,6 +210,7 @@ class MemTracker : AllStatic {
|
|||
// we add a positive offset to arena address, so we can have arena size record
|
||||
// sorted after arena record
|
||||
if (is_on() && !UseMallocOnly) {
|
||||
assert(addr != NULL, "Sanity check");
|
||||
create_memory_record((addr + sizeof(void*)), MemPointerRecord::arena_size_tag(), size,
|
||||
0, NULL);
|
||||
}
|
||||
|
@ -217,7 +220,7 @@ class MemTracker : AllStatic {
|
|||
static inline void record_virtual_memory_reserve(address addr, size_t size,
|
||||
address pc = 0, Thread* thread = NULL) {
|
||||
if (is_on()) {
|
||||
assert(size > 0, "reserve szero size");
|
||||
assert(size > 0, "Sanity check");
|
||||
create_memory_record(addr, MemPointerRecord::virtual_memory_reserve_tag(),
|
||||
size, pc, thread);
|
||||
}
|
||||
|
@ -248,6 +251,7 @@ class MemTracker : AllStatic {
|
|||
static inline void record_virtual_memory_commit(address addr, size_t size,
|
||||
address pc = 0, Thread* thread = NULL) {
|
||||
if (is_on()) {
|
||||
assert(size > 0, "Sanity check");
|
||||
create_memory_record(addr, MemPointerRecord::virtual_memory_commit_tag(),
|
||||
size, DEBUG_CALLER_PC, thread);
|
||||
}
|
||||
|
@ -257,6 +261,7 @@ class MemTracker : AllStatic {
|
|||
static inline void record_virtual_memory_uncommit(address addr, size_t size,
|
||||
Thread* thread = NULL) {
|
||||
if (is_on()) {
|
||||
assert(size > 0, "Sanity check");
|
||||
create_memory_record(addr, MemPointerRecord::virtual_memory_uncommit_tag(),
|
||||
size, DEBUG_CALLER_PC, thread);
|
||||
}
|
||||
|
@ -266,6 +271,7 @@ class MemTracker : AllStatic {
|
|||
static inline void record_virtual_memory_release(address addr, size_t size,
|
||||
Thread* thread = NULL) {
|
||||
if (is_on()) {
|
||||
assert(size > 0, "Sanity check");
|
||||
create_memory_record(addr, MemPointerRecord::virtual_memory_release_tag(),
|
||||
size, DEBUG_CALLER_PC, thread);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue