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

Remove excessive inclusion of jvmti.h and jvmtiExport.hpp

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Understanding:
      Fix Understood

      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 jvm.h. Use forward declaration for "typedef struct _jvmtiTimerInfo jvmtiTimerInfo;" instead.

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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                iklam Ioi Lam
                Reporter:
                iklam Ioi Lam
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: