Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-236711

Starting and stopping JFR profiling multiple times within the same minute overwrites previous JFR results saved during that minute

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 21w37a
    • Fix Version/s: 21w38a
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Category:
      Debug, Performance
    • Mojang Priority:
      Normal

      Description

      The bug

      Starting and stopping JFR profiling multiple times within the same minute overwrites previous JFR results saved during the same minute. Basically, only the report saved most recently is saved, and the older ones saved during the same minute are overwritten by the newest one.

      How to reproduce

      1. Make sure you have enough time to run four commands before the next minute on your computer's clock
      2. Run the command /jfr start
      3. Run the command /jfr stop
      4. Run /jfr start and /jfr stop again
      5. Navigate to your Minecraft folder -> debug
        Notice that only one JFR report (one .jfr and one .txt) was saved

      Expected results

      It would be expected that all reports are saved, even if multiple reports are saved within the same minute. This could be done by appending "-2", "-3", etc. to the end of the file name if a file already exists in the location Minecraft is trying to save the report.

        Attachments

          Activity

            People

            Assignee:
            billy.sjoberg [Mojang] Billy Sjöberg
            Reporter:
            markderickson [Helper] Mark Derickson
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              CHK: