RFR(XXS) 8203635: JFR sampler thread does not record stack info

Zhengyu Gu zgu at redhat.com
Tue May 22 18:39:32 UTC 2018


Thanks, Thomas.

On 05/22/2018 02:16 PM, Thomas Stüfe wrote:
> Hi Zhengyu,
> 
> looks good.
> 
> I wish it would be like this:
> 
> a non-virtual Thread::run() which does common initialization, and then
> calls a virtual protected abstract Thread::run_impl(), which is
> implemented by child classes...

Most of subclasses of Thread, e.g. JavaThread, WorkerThread and etc. 
handle in similar way. I am curious why this Sampler thread can not 
subclass one of them?

-Zhengyu

> 
> Regards, Thomas
> 
> 
> 
> On Tue, May 22, 2018 at 7:57 PM, Zhengyu Gu <zgu at redhat.com> wrote:
>> Thanks for the review, Aleksey.
>>
>> On 05/22/2018 01:45 PM, Aleksey Shipilev wrote:
>>>
>>> On 05/22/2018 07:40 PM, Zhengyu Gu wrote:
>>>>
>>>> Please review this trivial change that added record_stack_base_and_size()
>>>> call to JFR sampler
>>>> thread, so NMT can count it correctly.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8203635
>>>> Webrev: http://cr.openjdk.java.net/~zgu/8203635/webrev.00/
>>>
>>>
>>> Looks good to me. I wish this was handled in superclass initialization, so
>>> no one would miss this.
>>
>>
>> Agree! However, it is a bit tricky, as the call has to be made from
>> *current* thread.
>>
>> Thanks,
>>
>> -Zhengyu
>>
>>>
>>> -Aleksey
>>>
>>


More information about the hotspot-dev mailing list