8333653: Remove MallocHeader::get_stack
Reviewed-by: stuefe
This commit is contained in:
parent
40b2fbd820
commit
486dee2cf4
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2021, 2022 SAP SE. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
@ -64,7 +64,3 @@ void MallocHeader::print_block_on_error(outputStream* st, address bad_address) c
|
||||
os::print_hex_dump(st, from1, to2, 1);
|
||||
}
|
||||
}
|
||||
|
||||
bool MallocHeader::get_stack(NativeCallStack& stack) const {
|
||||
return MallocSiteTable::access_stack(stack, _mst_marker);
|
||||
}
|
||||
|
@ -130,7 +130,6 @@ public:
|
||||
inline size_t size() const { return _size; }
|
||||
inline MEMFLAGS flags() const { return _flags; }
|
||||
inline uint32_t mst_marker() const { return _mst_marker; }
|
||||
bool get_stack(NativeCallStack& stack) const;
|
||||
|
||||
// Return the necessary data to deaccount the block with NMT.
|
||||
FreeInfo free_info() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -131,8 +131,8 @@ class MallocSiteTable : AllStatic {
|
||||
|
||||
// Access and copy a call stack from this table. Shared lock should be
|
||||
// acquired before access the entry.
|
||||
static inline bool access_stack(NativeCallStack& stack, uint32_t marker) {
|
||||
MallocSite* site = malloc_site(marker);
|
||||
static inline bool access_stack(NativeCallStack& stack, const MallocHeader& header) {
|
||||
MallocSite* site = malloc_site(header.mst_marker());
|
||||
if (site != nullptr) {
|
||||
stack = *site->call_stack();
|
||||
return true;
|
||||
|
@ -299,7 +299,7 @@ bool MallocTracker::print_pointer_information(const void* p, outputStream* st) {
|
||||
block->size(), NMTUtil::flag_to_enum_name(block->flags()));
|
||||
if (MemTracker::tracking_level() == NMT_detail) {
|
||||
NativeCallStack ncs;
|
||||
if (block->get_stack(ncs)) {
|
||||
if (MallocSiteTable::access_stack(ncs, *block)) {
|
||||
ncs.print_on(st);
|
||||
st->cr();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user