RFR: 8237499: JFR event for the location where a new thread starts

Erik Gahlin erik.gahlin at oracle.com
Thu Jan 23 13:44:41 UTC 2020


Hi Denghui,

Would it be possible to set stackTrace="true" in metadata.xml instead of 
adding a new field explicitly?

This allows users to turn on and off stack traces. You could check if 
stack trace is enabled and only record if needed.

I think it would be good to change the label of the thread field from 
"Java Thread" to "New Thread".

Thanks
Erik

On 2020-01-19 09:13, Denghui Dong wrote:
> Hi Erik
>   The webrev has been updated.
>   I reuse the event type "EventThreadStart" to report the location 
> where a new thread starts.
>   Add two fields "stackTrace" and "parentThread" to EventThreadStart.
> Please help review it, thanks.
>
> Best Regards
> Denghui Dong
>
>     ------------------------------------------------------------------
>     From:董登辉(卓昂) <denghui.ddh at alibaba-inc.com>
>     Send Time:2020年1月18日(星期六) 21:25
>     To:Erik Gahlin <erik.gahlin at oracle.com>; hotspot-jfr-dev
>     <hotspot-jfr-dev at openjdk.java.net>
>     Subject:Re: RFR: 8237499: JFR event for the location where a new
>     thread starts
>
>     Hi Erik,
>     Do you mean that we should reuse EventThreadStart rather than a
>     new event? It's a good idea, I will try it.
>
>     Thanks
>     Denghui Dong
>     ------------------------------------------------------------------
>     From:Erik Gahlin <erik.gahlin at oracle.com>
>     Send Time:2020年1月18日(星期六) 21:12
>     To:董登辉(卓昂) <denghui.ddh at alibaba-inc.com>
>     Cc:hotspot-jfr-dev <hotspot-jfr-dev at openjdk.java.net>
>     Subject:Re: RFR: 8237499: JFR event for the location where a new
>     thread starts
>
>     Hi Denghui,
>
>     This will be useful, but I wonder if we shouldn’t extend the Thread Start event with stack trace and the parent thread? It will require some additional logic, but it would be a cleaner solution.
>
>     Thanks
>     Erik
>
>     > On 18 Jan 2020, at 12:19, Denghui Dong <denghui.ddh at alibaba-inc.com> wrote:
>     >
>     > Hi,
>     >
>     > Could I have a review of a change that introduces an event for the location where a new thread starts.
>     >
>     > Summary:
>     > There is already an event for thread start(EventThreadStart), but this event is committed in the new thread,
>     > so users can't know the location where the thread starts, hence, it's necessary to introduce another event,
>
>     > it would be useful if the application exists thread leak problem.
>     >
>     > Bug: https://bugs.openjdk.java.net/browse/JDK-8237499
>     > Webrev: http://cr.openjdk.java.net/~ddong/8237499/
>     >
>     > Thanks
>     > Denghui Dong
>     > 
>


More information about the hotspot-jfr-dev mailing list