Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8231945

Warn of overhead when using -XX:FlightRecorderOptions=stackdepth=1024

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: tbd
    • Component/s: docs
    • Labels:
      None

      Description

      The following page:

      https://docs.oracle.com/javacomponents/jmc-5-5/jfr-runtime-guide/about.htm

      recommends using

      -XX:FlightRecorderOptions=stackdepth=1024

      but that is not something that has been tested and there could be significant overhead. Customers have complained about this. The cost of walking one additional frame on the stack is abou the same as emitting one more event wthout a stack trace. This is especially problematic if running with G1 and TLABs events enabled. For backrgound, see thsi blog post by the sustaining team.

      https://blogs.oracle.com/poonam/g1-and-flight-recorders-xx:flightrecorderoptionsstackdepth-option

      The text should state that setting the stack depth to a value greater than the default 64 frames could lead to significant overhead and that it is not recommended in production environments if overhead is a concern.

        Attachments

          Activity

            People

            • Assignee:
              jgordon Joni Gordon
              Reporter:
              egahlin Erik Gahlin
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: