RFR(XXS): 8157271: Avoid extra copy of NativeCallStack

Markus Gronlund markus.gronlund at oracle.com
Wed May 18 20:40:43 UTC 2016


Greetings,

 

Minor improvement found when reading up on NMT:

 

Description:

 

Pass through a const NativeCallStack& instead of a copy in:


MallocSiteHashtableEntry(const NativeCallStack& stack) 


and let AllocationSite<MemoryCounter> accomplish the single copy into the _call_site member.

 

Change:

 

# HG changeset patch

# User mgronlun

# Date 1463598559 -7200

#      Wed May 18 21:09:19 2016 +0200

# Node ID c806533e436f7a1e3fac38101b766ea3d5a5405b

# Parent  da110ff6c0e271ded14b015ec7de2e2f85d58e73

[mq]: MallocSiteHashtableEntry

 

diff --git a/src/share/vm/services/mallocSiteTable.hpp b/src/share/vm/services/mallocSiteTable.hpp

--- a/src/share/vm/services/mallocSiteTable.hpp

+++ b/src/share/vm/services/mallocSiteTable.hpp

@@ -62,7 +62,7 @@

  public:

   MallocSiteHashtableEntry() : _next(NULL) { }

-  MallocSiteHashtableEntry(NativeCallStack stack):

+  MallocSiteHashtableEntry(const NativeCallStack& stack):

     _malloc_site(stack), _next(NULL) { }

   inline const MallocSiteHashtableEntry* next() const {

 

 

Bug:

https://bugs.openjdk.java.net/browse/JDK-8157271

 

Thanks in advance

Markus

 


More information about the hotspot-runtime-dev mailing list