[8u] 8218558: NMT stack traces in output should show mt component for virtual memory allocations
Andrew John Hughes
gnu.andrew at redhat.com
Mon Nov 11 17:28:35 UTC 2019
On 22/08/2019 12:40, Zhengyu Gu wrote:
> Hi,
>
> I would like to backport this patch to 8u.
>
> It is the counterpart of JDK-8139673, that improves usability of NMT
> detail tracking, by associating every virtual memory allocation site
> with its memory type.
>
> 11u patch does not apply cleanly, but conflicts are minors. There are a
> couple of conflicts with copyright years, also a new include file in 11u
> patch that already added in 8u, and indents.
>
> Original bug: https://bugs.openjdk.java.net/browse/JDK-8218558
> Original code review thread:
> https://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2019-February/032428.html
>
>
> 8u Webrev:
> http://cr.openjdk.java.net/~zgu/JDK-8218558-8u/webrev.00/index.html
>
>
> Thanks,
>
> -Zhengyu
There is another conflict you didn't mention, visible when comparing the
two patches:
@@ -160,15 +152,20 @@
void MemDetailDiffReporter::diff_malloc_site(const MallocSite* early,
const MallocSite* current) const {
-- assert(early->flags() == current->flags(), "Must be the same memory
type");
-+ assert(early->flag() == current->flag(), "Must be the same memory
type");
- diff_malloc_site(current->call_stack(), current->size(),
current->count(),
-- early->size(), early->count(), early->flags());
-+ early->size(), early->count(), early->flag());
+- if (early->flags() != current->flags()) {
++ if (early->flag() != current->flag()) {
+ // 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());
++ early->size(), early->count(), early->flag());
+ }
}
- void MemDetailDiffReporter::diff_malloc_site(const NativeCallStack*
stack, size_t current_size,
This is a sequencing issue. 8u already has '8200109: NMT:
diff_malloc_site assert(early->flags() == current->flags(), "Must be the
same memory type")', which was applied after 8218558. Once both patches
are applied to 8u, the function looks the same in both 8u & 13u.
Reviewed & approved.
Thanks,
--
Andrew :)
Senior Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04 C5A0 CFDA 0F9B 3596 4222
https://keybase.io/gnu_andrew
More information about the jdk8u-dev
mailing list