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

[JVMCI] Re-examine the source layout of jdk.vm.ci module

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P3 P3
    • 9
    • 9
    • hotspot

      The source layout of jdk.vm.ci doesn't work with the modular build. We currently workaround it in jake (see the patch below).

      It has one subdirectory for almost each package and it also contains the source files of build tool (annotation processor) to generate source (that are explicitly excluded when building jdk.vm.ci module). In addition, looks like share/classes contains platform-specific code that I'm not sure if it's intentional to have jdk.vm.ci module to contain classes for all platforms.

      Here is the list of directories of source files to compile for jdk.vm.ci module:

      jdk.vm.ci/share/classes//jdk.vm.ci.amd64/src/jdk/vm/ci/amd64
      jdk.vm.ci/share/classes//jdk.vm.ci.code/src/jdk/vm/ci/code/stack
      jdk.vm.ci/share/classes//jdk.vm.ci.common/src/jdk/vm/ci/common
      jdk.vm.ci/share/classes//jdk.vm.ci.compiler/src/jdk/vm/ci/compiler
      jdk.vm.ci/share/classes//jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot
      jdk.vm.ci/share/classes//jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/events
      jdk.vm.ci/share/classes//jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/logging
      jdk.vm.ci/share/classes//jdk.vm.ci.hotspot.amd64/src/jdk/vm/ci/hotspot/amd64
      jdk.vm.ci/share/classes//jdk.vm.ci.hotspot.sparc/src/jdk/vm/ci/hotspot/sparc
      jdk.vm.ci/share/classes//jdk.vm.ci.hotspotvmconfig/src/jdk/vm/ci/hotspotvmconfig
      jdk.vm.ci/share/classes//jdk.vm.ci.inittimer/src/jdk/vm/ci/inittimer
      jdk.vm.ci/share/classes//jdk.vm.ci.meta/src/jdk/vm/ci/meta
      jdk.vm.ci/share/classes//jdk.vm.ci.options/src/jdk/vm/ci/options
      jdk.vm.ci/share/classes//jdk.vm.ci.service.processor/src/jdk/vm/ci/service
      jdk.vm.ci/share/classes//jdk.vm.ci.sparc/src/jdk/vm/ci/sparc

      The source layout should be re-examined and remove the "<PACKAGE-NAME>/src" from the file hierarchy.

      The build tool should be moved to the proper home.
      jdk.vm.ci/share/classes//jdk.vm.ci.service.processor/src/jdk/vm/ci/service/processor
      jdk.vm.ci/share/classes//jdk.vm.ci.options.processor/src/jdk/vm/ci/options/processor

      --- old/make/CompileJavaModules.gmk 2015-11-12 20:32:54.000000000 -0800
      +++ new/make/CompileJavaModules.gmk 2015-11-12 20:32:54.000000000 -0800
      @@ -523,6 +523,28 @@
       # Add imported modules to the moduleclasspath
       MODULECLASSPATH := $(subst $(SPACE),$(PATH_SEP), $(IMPORT_MODULES_CLASSES))
       
      +ifneq ($(findstring $(MODULE), jdk.vm.ci jdk.jfr), )
      + ## WORKAROUND jdk.vm.ci source structure issue
      + HOTSPOT_JVMCI_SRC := $(subst $(MODULE),*,$(HOTSPOT_TOPDIR)/src/jdk.vm.ci/share/classes)
      + JVMCI_SUBDIRS := \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.amd64/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.code/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.common/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.compiler/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.hotspot/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.hotspot.amd64/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.hotspot.sparc/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.hotspotvmconfig/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.inittimer/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.meta/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.options/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.runtime/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.service/src \
      + $(HOTSPOT_JVMCI_SRC)/jdk.vm.ci.sparc/src
      +
      + MODULESOURCEPATH += $(subst $(SPACE),$(PATH_SEP), $(JVMCI_SUBDIRS))
      +endif
      +
       # Make sure the generated source base dirs exist. Not all modules have generated
       # source in all of these directories and because of timing, all of them might not
       # exist at the time this makefile gets called. Javac will complain if there are

            Unassigned Unassigned
            mchung Mandy Chung
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: