< prev index next >

make/Main.gmk

Print this page
rev 52573 : 8061281: Microbenchmark suite build support, directory layout and sample benchmarks
8061282: Migrate jmh-jdk-microbenchmarks into the JDK
Reviewed-by: ecaspole, mchung, erikj, ihse
Contributed-by: magnus.ihse.bursie@oracle.com, erik.joelsson@oracle.com, claes.redestad@oracle.com, sfriberg@kth.se


 476   test-$1:
 477         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$1")
 478 
 479   exploded-test-$1:
 480         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
 481             TEST="$1" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
 482 
 483 endef
 484 
 485 # ALL_NAMED_TESTS is defined in FindTests.gmk
 486 $(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t)))
 487 ALL_TEST_TARGETS := $(addprefix test-, $(ALL_NAMED_TESTS))
 488 
 489 # We only support the "exploded-test-gtest" shortcut
 490 ALL_EXPLODED_TESTS := gtest
 491 ALL_EXPLODED_TEST_TARGETS := $(addprefix exploded-test-, $(ALL_EXPLODED_TESTS))
 492 
 493 ALL_TARGETS += $(ALL_TEST_TARGETS) $(ALL_EXPLODED_TEST_TARGETS)
 494 
 495 ################################################################################
 496 # Build tests
 497 #
 498 
 499 prepare-test-image:
 500         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f TestImage.gmk prepare-test-image)
 501 
 502 build-test-hotspot-jtreg-native:
 503         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeHotspot.gmk \
 504             build-test-hotspot-jtreg-native)
 505 
 506 test-image-hotspot-jtreg-native:
 507         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeHotspot.gmk \
 508             test-image-hotspot-jtreg-native)
 509 
 510 build-test-jdk-jtreg-native:
 511         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeJdk.gmk \
 512             build-test-jdk-jtreg-native)
 513 
 514 test-image-jdk-jtreg-native:
 515         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeJdk.gmk \
 516             test-image-jdk-jtreg-native)


 526 ifeq ($(BUILD_GTEST), true)
 527   test-image-hotspot-gtest:
 528         +($(CD) $(TOPDIR)/make/hotspot/test && $(MAKE) $(MAKE_ARGS) -f GtestImage.gmk)
 529 endif
 530 
 531 build-test-lib:
 532         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk)
 533 
 534 ifeq ($(BUILD_FAILURE_HANDLER), true)
 535   # Builds the failure handler jtreg extension
 536   build-test-failure-handler:
 537         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
 538             -f BuildFailureHandler.gmk build)
 539 
 540   # Copies the failure handler jtreg extension into the test image
 541   test-image-failure-handler:
 542         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
 543              -f BuildFailureHandler.gmk images)
 544 endif
 545 



 546 ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
 547     test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
 548     test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \
 549     test-failure-handler test-image-failure-handler test-image-hotspot-gtest \
 550     test-image-hotspot-jtreg-graal build-test-hotspot-jtreg-graal

 551 
 552 ################################################################################
 553 # Run tests
 554 
 555 test:
 556         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$(TEST)")
 557 
 558 exploded-test:
 559         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
 560             TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
 561 
 562 ALL_TARGETS += test exploded-test
 563 
 564 ################################################################################
 565 # Bundles
 566 
 567 product-bundles:
 568         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles)
 569 
 570 test-bundles:


 772       # While actually creating the buildjdk, the default deps applies.
 773       $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): $(DEFAULT_JMOD_DEPS)
 774     endif
 775   else
 776     # The normal non cross compilation case uses the default deps.
 777     # To avoid races with the optimize target, that also needs to happen first.
 778     $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): $(DEFAULT_JMOD_DEPS) \
 779         exploded-image-optimize
 780   endif
 781 
 782   # All modules include the main license files from java.base.
 783   $(JMOD_TARGETS): java.base-copy
 784 
 785   zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
 786       $(filter jdk.crypto%, $(JAVA_TARGETS))
 787 
 788   zip-source: gensrc rmic
 789 
 790   jrtfs-jar: interim-langtools
 791 


 792   ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
 793     ifeq ($(CREATE_BUILDJDK), true)
 794       # If creating a buildjdk, the interim image needs to be based on that.
 795       generate-link-opt-data: create-buildjdk
 796     else ifeq ($(EXTERNAL_BUILDJDK), false)
 797       # If an external buildjdk has been provided, we skip generating an
 798       # interim-image and just use the external buildjdk for generating
 799       # classlist.
 800       generate-link-opt-data: interim-image
 801     endif
 802     generate-link-opt-data: buildtools-jdk
 803 
 804     # The generated classlist needs to go into java.base-jmod.
 805     java.base-jmod jdk.jlink-jmod jdk-image legacy-jre-image: generate-link-opt-data
 806   endif
 807 
 808   release-file: create-source-revision-tracker
 809 
 810   jdk-image: jmods zip-source demos release-file
 811   legacy-jre-image: jmods release-file


1005 endif
1006 
1007 ifeq ($(OPENJDK_TARGET_OS), macosx)
1008   product-images: mac-jdk-bundle
1009 endif
1010 
1011 # This target builds the documentation image
1012 docs-image: docs-jdk
1013 
1014 # If not already set, set the JVM specific targets to build the test image
1015 JVM_TEST_IMAGE_TARGETS ?= test-image-hotspot-jtreg-native test-image-hotspot-gtest
1016 
1017 ifeq ($(INCLUDE_GRAAL), true)
1018   JVM_TEST_IMAGE_TARGETS += test-image-hotspot-jtreg-graal
1019 endif
1020 
1021 # This target builds the test image
1022 test-image: prepare-test-image \
1023     test-image-jdk-jtreg-native test-image-failure-handler \
1024     test-image-demos-jdk $(JVM_TEST_IMAGE_TARGETS)




1025 
1026 ################################################################################
1027 
1028 # all-images builds all our deliverables as images.
1029 all-images: product-images test-image docs-image
1030 
1031 # all-bundles packages all our deliverables as tar.gz bundles.
1032 all-bundles: product-bundles test-bundles docs-bundles
1033 
1034 ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
1035     copy java rmic libs launchers jmods \
1036     jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
1037     exploded-image-base exploded-image \
1038     create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
1039     docs-javase docs-reference docs-javadoc mac-bundles product-images \
1040     docs-image test-image all-images \
1041     all-bundles
1042 
1043 ################################################################################
1044 




 476   test-$1:
 477         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$1")
 478 
 479   exploded-test-$1:
 480         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
 481             TEST="$1" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
 482 
 483 endef
 484 
 485 # ALL_NAMED_TESTS is defined in FindTests.gmk
 486 $(foreach t, $(ALL_NAMED_TESTS), $(eval $(call DeclareRunTestRecipe,$t)))
 487 ALL_TEST_TARGETS := $(addprefix test-, $(ALL_NAMED_TESTS))
 488 
 489 # We only support the "exploded-test-gtest" shortcut
 490 ALL_EXPLODED_TESTS := gtest
 491 ALL_EXPLODED_TEST_TARGETS := $(addprefix exploded-test-, $(ALL_EXPLODED_TESTS))
 492 
 493 ALL_TARGETS += $(ALL_TEST_TARGETS) $(ALL_EXPLODED_TEST_TARGETS)
 494 
 495 ################################################################################
 496 # Build tests and microbenchmarks
 497 #
 498 
 499 prepare-test-image:
 500         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f TestImage.gmk prepare-test-image)
 501 
 502 build-test-hotspot-jtreg-native:
 503         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeHotspot.gmk \
 504             build-test-hotspot-jtreg-native)
 505 
 506 test-image-hotspot-jtreg-native:
 507         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeHotspot.gmk \
 508             test-image-hotspot-jtreg-native)
 509 
 510 build-test-jdk-jtreg-native:
 511         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeJdk.gmk \
 512             build-test-jdk-jtreg-native)
 513 
 514 test-image-jdk-jtreg-native:
 515         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f JtregNativeJdk.gmk \
 516             test-image-jdk-jtreg-native)


 526 ifeq ($(BUILD_GTEST), true)
 527   test-image-hotspot-gtest:
 528         +($(CD) $(TOPDIR)/make/hotspot/test && $(MAKE) $(MAKE_ARGS) -f GtestImage.gmk)
 529 endif
 530 
 531 build-test-lib:
 532         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) -f BuildTestLib.gmk)
 533 
 534 ifeq ($(BUILD_FAILURE_HANDLER), true)
 535   # Builds the failure handler jtreg extension
 536   build-test-failure-handler:
 537         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
 538             -f BuildFailureHandler.gmk build)
 539 
 540   # Copies the failure handler jtreg extension into the test image
 541   test-image-failure-handler:
 542         +($(CD) $(TOPDIR)/make/test && $(MAKE) $(MAKE_ARGS) \
 543              -f BuildFailureHandler.gmk images)
 544 endif
 545 
 546 build-microbenchmark:
 547         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f test/BuildMicrobenchmark.gmk)
 548 
 549 ALL_TARGETS += prepare-test-image build-test-hotspot-jtreg-native \
 550     test-image-hotspot-jtreg-native build-test-jdk-jtreg-native \
 551     test-image-jdk-jtreg-native build-test-lib build-test-failure-handler \
 552     test-failure-handler test-image-failure-handler test-image-hotspot-gtest \
 553     test-image-hotspot-jtreg-graal build-test-hotspot-jtreg-graal \
 554     build-microbenchmark
 555 
 556 ################################################################################
 557 # Run tests
 558 
 559 test:
 560         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test TEST="$(TEST)")
 561 
 562 exploded-test:
 563         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f RunTests.gmk run-test \
 564             TEST="$(TEST)" JDK_IMAGE_DIR=$(JDK_OUTPUTDIR))
 565 
 566 ALL_TARGETS += test exploded-test
 567 
 568 ################################################################################
 569 # Bundles
 570 
 571 product-bundles:
 572         +($(CD) $(TOPDIR)/make && $(MAKE) $(MAKE_ARGS) -f Bundles.gmk product-bundles)
 573 
 574 test-bundles:


 776       # While actually creating the buildjdk, the default deps applies.
 777       $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): $(DEFAULT_JMOD_DEPS)
 778     endif
 779   else
 780     # The normal non cross compilation case uses the default deps.
 781     # To avoid races with the optimize target, that also needs to happen first.
 782     $(JMOD_TARGETS) $(INTERIM_JMOD_TARGETS): $(DEFAULT_JMOD_DEPS) \
 783         exploded-image-optimize
 784   endif
 785 
 786   # All modules include the main license files from java.base.
 787   $(JMOD_TARGETS): java.base-copy
 788 
 789   zip-security: java.base-java java.security.jgss-java java.security.jgss-libs \
 790       $(filter jdk.crypto%, $(JAVA_TARGETS))
 791 
 792   zip-source: gensrc rmic
 793 
 794   jrtfs-jar: interim-langtools
 795 
 796   build-microbenchmark: interim-langtools jdk.unsupported java.management
 797 
 798   ifeq ($(ENABLE_GENERATE_CLASSLIST), true)
 799     ifeq ($(CREATE_BUILDJDK), true)
 800       # If creating a buildjdk, the interim image needs to be based on that.
 801       generate-link-opt-data: create-buildjdk
 802     else ifeq ($(EXTERNAL_BUILDJDK), false)
 803       # If an external buildjdk has been provided, we skip generating an
 804       # interim-image and just use the external buildjdk for generating
 805       # classlist.
 806       generate-link-opt-data: interim-image
 807     endif
 808     generate-link-opt-data: buildtools-jdk
 809 
 810     # The generated classlist needs to go into java.base-jmod.
 811     java.base-jmod jdk.jlink-jmod jdk-image legacy-jre-image: generate-link-opt-data
 812   endif
 813 
 814   release-file: create-source-revision-tracker
 815 
 816   jdk-image: jmods zip-source demos release-file
 817   legacy-jre-image: jmods release-file


1011 endif
1012 
1013 ifeq ($(OPENJDK_TARGET_OS), macosx)
1014   product-images: mac-jdk-bundle
1015 endif
1016 
1017 # This target builds the documentation image
1018 docs-image: docs-jdk
1019 
1020 # If not already set, set the JVM specific targets to build the test image
1021 JVM_TEST_IMAGE_TARGETS ?= test-image-hotspot-jtreg-native test-image-hotspot-gtest
1022 
1023 ifeq ($(INCLUDE_GRAAL), true)
1024   JVM_TEST_IMAGE_TARGETS += test-image-hotspot-jtreg-graal
1025 endif
1026 
1027 # This target builds the test image
1028 test-image: prepare-test-image \
1029     test-image-jdk-jtreg-native test-image-failure-handler \
1030     test-image-demos-jdk $(JVM_TEST_IMAGE_TARGETS)
1031 
1032 ifneq ($(JMH_CORE_JAR), )
1033   test-image: build-microbenchmark
1034 endif
1035 
1036 ################################################################################
1037 
1038 # all-images builds all our deliverables as images.
1039 all-images: product-images test-image docs-image
1040 
1041 # all-bundles packages all our deliverables as tar.gz bundles.
1042 all-bundles: product-bundles test-bundles docs-bundles
1043 
1044 ALL_TARGETS += buildtools hotspot hotspot-libs hotspot-gensrc gensrc gendata \
1045     copy java rmic libs launchers jmods \
1046     jdk.jdwp.agent-gensrc $(ALL_MODULES) demos \
1047     exploded-image-base exploded-image \
1048     create-buildjdk docs-jdk-api docs-javase-api docs-reference-api docs-jdk \
1049     docs-javase docs-reference docs-javadoc mac-bundles product-images \
1050     docs-image test-image all-images \
1051     all-bundles
1052 
1053 ################################################################################
1054 


< prev index next >