aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/services/memReporter.cpp
diff options
context:
space:
mode:
authorDana Dahlstrom <dahlstrom@google.com>2020-01-30 12:00:00 -0800
committerDana Dahlstrom <dahlstrom@google.com>2020-01-30 12:00:00 -0800
commit0c613a25e5e544c2743bbfe485295417b845284a (patch)
treed1462f8291586e98e8ef1b97990824fead595797 /src/share/vm/services/memReporter.cpp
parent672904f8c32efa6df2c43470d9ed29c0f334c4af (diff)
parent9db779113bfae4bb0853a5d13c6114133ada6683 (diff)
downloadjdk8u_hotspot-0c613a25e5e544c2743bbfe485295417b845284a.tar.gz
Merge tag jb8u232-b1638.6
Change-Id: I9db779113bfae4bb0853a5d13c6114133ada6683
Diffstat (limited to 'src/share/vm/services/memReporter.cpp')
-rw-r--r--src/share/vm/services/memReporter.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/share/vm/services/memReporter.cpp b/src/share/vm/services/memReporter.cpp
index 8199ee0aa..67e3eea09 100644
--- a/src/share/vm/services/memReporter.cpp
+++ b/src/share/vm/services/memReporter.cpp
@@ -572,9 +572,15 @@ void MemDetailDiffReporter::old_malloc_site(const MallocSite* malloc_site) const
void MemDetailDiffReporter::diff_malloc_site(const MallocSite* early,
const MallocSite* current) const {
- assert(early->flags() == current->flags(), "Must be the same memory type");
- diff_malloc_site(current->call_stack(), current->size(), current->count(),
- early->size(), early->count(), early->flags());
+ if (early->flags() != current->flags()) {
+ // If malloc site type changed, treat it as deallocation of old type and
+ // allocation of new type.
+ old_malloc_site(early);
+ new_malloc_site(current);
+ } else {
+ diff_malloc_site(current->call_stack(), current->size(), current->count(),
+ early->size(), early->count(), early->flags());
+ }
}
void MemDetailDiffReporter::diff_malloc_site(const NativeCallStack* stack, size_t current_size,