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

Remove excessive inclusion of jvmti.h and jvmtiExport.hpp

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 16
    • None
    • hotspot
    • b25

      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.

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

              Created:
              Updated:
              Resolved: