Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7900641

Jcov expects a pair of CLASS_LOAD_HOOK/CLASS_LOAD events to be atomic

XMLWordPrintable

    • 1.1
    • generic
    • generic
    • Verified



      Name: kbC93603 Date: 12/03/99


      JVMPI-based Jcov implementation incorrectly relies on a specific order of
      generating of JVMPI_EVENT_CLASS_LOAD_HOOK/JVMPI_EVENT_CLASS_LOAD events :
      it assumes that between JVMPI_EVENT_CLASS_LOAD_HOOK/JVMPI_EVENT_CLASS_LOAD events
      generated by JVM for a class there can be no other
      JVMPI_EVENT_CLASS_LOAD_HOOK/JVMPI_EVENT_CLASS_LOAD events generated for
      another class(es). This leads to the loss of profiling data for some classes,
      e.g., if the following sequence of JVMPI events is generated

      JVMPI_EVENT_CLASS_LOAD_HOOK (for class A)
      JVMPI_EVENT_CLASS_LOAD_HOOK (for class B)
      JVMPI_EVENT_CLASS_LOAD (for class B)
      JVMPI_EVENT_CLASS_LOAD (for class A)

      then the profiling data for the class A is lost.
      Since classic VM generates atomic (in the described sense) pairs of
      JVMPI_EVENT_CLASS_LOAD_HOOK/JVMPI_EVENT_CLASS_LOAD events, Jcov works fine
      with it. But with Hotspot VM it is not true.

      ======================================================================

            afedorch Alexey Fedorchenko (Inactive)
            klooney Kevin Looney (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: