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

List:       openjdk-hotspot-runtime-dev
Subject:    Re: [10] RFR: 8179040: Avoid Ticks::now calls when EventClassLoad is not enabled
From:       David Holmes <david.holmes () oracle ! com>
Date:       2017-04-25 20:58:52
Message-ID: ab5db57d-033b-7c20-4d08-d4d7da05d5af () oracle ! com
[Download RAW message or body]

Hi Claes,

On 25/04/2017 11:21 PM, Claes Redestad wrote:
> Hi,
>
> this patch removes calling Ticks::now when EventClassLoad isn't enabled,
> which has an effect on class loading performance:
>
> http://cr.openjdk.java.net/~redestad/8179040/hotspot.01/
>
> When tracing isn't enabled trace/tracing.hpp has dummy
> implementations which are easily optimized away by a compiler, which
> I've verified happens on linux OpenJDK builds with tracing disabled.

What you have done achieves your goal and could be pushed as-is.

That said, I would consider revisiting the conditional versus 
unconditional use of trace-related code in general. So that things like:

  649   EventClassLoad class_load_start_event;
  895   post_class_load_event(&class_load_start_event, k, loader_data);

were done using TRACE_ONLY, so that all trace-related code was 
completely excluded when not using INCLUDE_TRACE.

Thanks,
David

> On builds with tracing enabled then the changes means the call to
> get the time only happen if the event is enabled, which achieves the
> sought after startup optimization. >
> Thanks!
>
> /Claes
[prev in list] [next in list] [prev in thread] [next in thread] 

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