On Thu, 12 Nov 2026 18:10:47 GMT, Christopher Schnick <[email protected]> wrote:
> The pulse loggers assumed that a pulse rendering finishes before the next > pulse rendering starts. That isn't true anymore when multithreaded is enabled > (the default now), and causes a NullPointerException in the print logger and > breaks the application completely. > > Problems > - Both loggers kept a single pulse currently rendering field. When the next > pulse started rendering early, it overwrote that field > - The end notification relied on counting completed scenes. When a scene was > skipped, the notification never came > - The print logger measured each pulse duration up to when it was printed. A > pulse that had to wait behind a previous pulse render showed a wrong time > > Changes > - PaintCollector: sends the end notification as an extra render job after > each render pass. Render jobs run in order on one thread, so every render > start now has exactly one matching end > - PrintLogger: tracks pulses being rendered in a queue instead of one field. > And each pulse duration is measured up to when it completed. > - JFRPulseLogger: uses the same queue now, so events get the correct pulse ID > instead of the next pulse ID orĀ 0. > > A note about reviewing: Even though those are some larger changes, there > isn't a need to be very rigorous when reviewing. > Any code that is changed is not running in normal apps, only when the pulse > logger is enabled. And since that feature is broken right now (and has been > for many years), it can only get better. > > --------- > - [x] I confirm that I make this contribution in accordance with the [OpenJDK > Interim AI Policy](https://openjdk.org/legal/ai). I don't think it is possible to create tests for this case, especially since the trigger on how pulses overlap when the renderer has to do more work. It can't be reproduced with a simple app, and running it in a headless environment will also change the timings. It needs to be run with a more heavy application that is actually displayed. ------------- PR Comment: https://git.openjdk.org/jfx/pull/2368#issuecomment-6857909458
