[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-hotspot-runtime-dev
Subject:    RE: RFR(XXS): 8157271: Avoid extra copy of NativeCallStack
From:       Markus Gronlund <markus.gronlund () oracle ! com>
Date:       2016-05-19 17:23:33
Message-ID: ccc96251-4e07-403f-af54-40a00a5dfd06 () default
[Download RAW message or body]

Thanks Zhengyu,

Hope you are well!

Markus

-----Original Message-----
From: Zhengyu Gu [mailto:zgu@redhat.com] 
Sent: den 19 maj 2016 14:09
To: hotspot-runtime-dev@openjdk.java.net
Subject: Re: RFR(XXS): 8157271: Avoid extra copy of NativeCallStack

Change looks good to me.

NativeCallStack always starts with a StackObj,  it can be tricky to decide where to copy or pass through.

-Zhengyu

On 05/18/2016 06:38 PM, David Holmes wrote:
> Seems like a nice enhancement.
>
> I always find it hard to know/determine when copies of objects will be 
> made. Guess that is why I prefer to work with pointers :)
>
> Thanks,
> David
>
> On 19/05/2016 6:40 AM, Markus Gronlund wrote:
>> 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
>>
>>
>>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic