RFR: 8439: ArithmeticException thrown when plotting event count histogram with maxDuration set to 0

Aymane Harmaz duke at openjdk.org
Tue Sep 23 10:14:06 UTC 2025


When plotting event count histogram and all event durations are set to 0, the duration range will be evaluated to 0, leading to an ArithmeticException (divid by 0), which stops JMC from plotting that histogram.

This can be shown on the attached screenshot, where only the percentile table is shown and the histogram chart is missing

<img width="1506" height="865" alt="missing-histogram" src="https://github.com/user-attachments/assets/7a02b705-83f3-45e9-9feb-91c5904064e7" />

-------------

Commit messages:
 - 8439: ArithmeticException thrown when plotting event count histogram with maxDuration set to 0

Changes: https://git.openjdk.org/jmc/pull/675/files
  Webrev: https://webrevs.openjdk.org/?repo=jmc&pr=675&range=00
  Issue: https://bugs.openjdk.org/browse/JMC-8439
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jmc/pull/675.diff
  Fetch: git fetch https://git.openjdk.org/jmc.git pull/675/head:pull/675

PR: https://git.openjdk.org/jmc/pull/675


More information about the jmc-dev mailing list