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

Remove excessive inclusion of jvmti.h and jvmtiExport.hpp

    XMLWordPrintable

Details

    • Enhancement
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • 16
    • hotspot
    • b25

    Description

      jvmti.h is included 905 times and jvmtiExport.hpp is included 776 times (by 971 hotspot .o files). Most of these are unnecessarily included by the following 3 popular header files:

      javaClasses.hpp: ThreadStatus is rarely used, and should be moved to a separate header file. The enum is also changed to an enum class for better type safety (see JDK-8247938).

      os.hpp: No need to include jvmti.h. Use forward declaration for "struct jvmtiTimerInfo;" instead.

      thread.hpp: No need to include jvmExport.hpp. Use forward declaration for JvmtiSampledObjectAllocEventCollector and JvmtiVMObjectAllocEventCollector instead.

      Attachments

        Issue Links

          Activity

            People

              iklam Ioi Lam
              iklam Ioi Lam
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: