mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-19 10:34:38 +02:00
8269571: NMT should print total malloc bytes and invocation count
Reviewed-by: zgu, xliu
This commit is contained in:
parent
b969136b9f
commit
3ad20fcdfa
3 changed files with 25 additions and 5 deletions
|
@ -60,6 +60,15 @@ size_t MemoryCounter::peak_size() const {
|
|||
}
|
||||
#endif
|
||||
|
||||
// Total malloc invocation count
|
||||
size_t MallocMemorySnapshot::total_count() const {
|
||||
size_t amount = 0;
|
||||
for (int index = 0; index < mt_number_of_types; index ++) {
|
||||
amount += _malloc[index].malloc_count();
|
||||
}
|
||||
return amount;
|
||||
}
|
||||
|
||||
// Total malloc'd memory amount
|
||||
size_t MallocMemorySnapshot::total() const {
|
||||
size_t amount = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue