diff options
author | Alexey Ushakov <alexey.v.ushakov@gmail.com> | 2020-01-20 12:26:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-20 12:26:37 +0300 |
commit | 63388d7cef8a6b2d2fd1c64ee4e612e514e21409 (patch) | |
tree | 40924405498e32d269acb4295c9625efb5f471cc /src/share/vm/services/mallocSiteTable.cpp | |
parent | 9db779113bfae4bb0853a5d13c6114133ada6683 (diff) | |
parent | 19256756bcd043698ee64bd800f3da39ddbef3a7 (diff) | |
download | jdk8u_hotspot-jetbrains-master-mirror.tar.gz |
Merge pull request #6 from bell-sw/update_8u242jb8u242-b1644.3jb8u242-b1644jb8u242-b1641jb8u242-b1640jb8u232-b1644.2jetbrains-master-mirror
jdk8u242 update
Diffstat (limited to 'src/share/vm/services/mallocSiteTable.cpp')
-rw-r--r-- | src/share/vm/services/mallocSiteTable.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/share/vm/services/mallocSiteTable.cpp b/src/share/vm/services/mallocSiteTable.cpp index 94fe1b96f..cb80b3e18 100644 --- a/src/share/vm/services/mallocSiteTable.cpp +++ b/src/share/vm/services/mallocSiteTable.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2019, 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 @@ -84,12 +84,18 @@ bool MallocSiteTable::initialize() { // Create pseudo call stack for hashtable entry allocation address pc[3]; if (NMT_TrackingStackDepth >= 3) { - pc[2] = (address)MallocSiteTable::allocation_at; + uintx *fp = (uintx*)MallocSiteTable::allocation_at; + // On ppc64, 'fp' is a pointer to a function descriptor which is a struct of + // three native pointers where the first pointer is the real function address. + // See: http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi-1.9.html#FUNC-DES + pc[2] = (address)(fp PPC64_ONLY(BIG_ENDIAN_ONLY([0]))); } if (NMT_TrackingStackDepth >= 2) { - pc[1] = (address)MallocSiteTable::lookup_or_add; + uintx *fp = (uintx*)MallocSiteTable::lookup_or_add; + pc[1] = (address)(fp PPC64_ONLY(BIG_ENDIAN_ONLY([0]))); } - pc[0] = (address)MallocSiteTable::new_entry; + uintx *fp = (uintx*)MallocSiteTable::new_entry; + pc[0] = (address)(fp PPC64_ONLY(BIG_ENDIAN_ONLY([0]))); // Instantiate NativeCallStack object, have to use placement new operator. (see comments above) NativeCallStack* stack = ::new ((void*)_hash_entry_allocation_stack) @@ -158,7 +164,7 @@ MallocSite* MallocSiteTable::lookup_or_add(const NativeCallStack& key, size_t* b MallocSiteHashtableEntry* head = _table[index]; while (head != NULL && (*pos_idx) <= MAX_BUCKET_LENGTH) { MallocSite* site = head->data(); - if (site->flags() == flags && site->equals(key)) { + if (site->flag() == flags && site->equals(key)) { return head->data(); } |