Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Automatic merge of jdk:master into master
  • Loading branch information
duke committed Mar 12, 2021
2 parents 79b2f86 + ad1f605 commit 656404eb0a0e1f23b96ba8261f5e036d6b06a376
Showing with 1,734 additions and 408 deletions.
  1. +1 −0 make/autoconf/configure.ac
  2. +25 −1 make/autoconf/jdk-options.m4
  3. +2 −0 make/autoconf/spec.gmk.in
  4. +2 −0 make/conf/jib-profiles.js
  5. +5 −1 make/hotspot/lib/JvmFlags.gmk
  6. +6 −0 src/hotspot/os_cpu/bsd_x86/os_bsd_x86.hpp
  7. +4 −0 src/hotspot/os_cpu/linux_aarch64/os_linux_aarch64.hpp
  8. +8 −1 src/hotspot/share/compiler/compilerOracle.cpp
  9. +3 −3 src/hotspot/share/gc/g1/g1CollectedHeap.cpp
  10. +1 −1 src/hotspot/share/gc/g1/g1CollectedHeap.hpp
  11. +60 −0 src/hotspot/share/gc/g1/g1CollectorState.cpp
  12. +6 −13 src/hotspot/share/gc/g1/g1CollectorState.hpp
  13. +94 −0 src/hotspot/share/gc/g1/g1GCTypes.hpp
  14. +22 −66 src/hotspot/share/gc/g1/g1Policy.cpp
  15. +3 −22 src/hotspot/share/gc/g1/g1Policy.hpp
  16. +6 −6 src/hotspot/share/gc/g1/g1Trace.cpp
  17. +7 −7 src/hotspot/share/gc/g1/g1Trace.hpp
  18. +2 −5 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
  19. +4 −4 src/hotspot/share/memory/archiveBuilder.cpp
  20. +2 −7 src/hotspot/share/memory/archiveBuilder.hpp
  21. +1 −1 src/hotspot/share/memory/archiveUtils.cpp
  22. +1 −7 src/hotspot/share/memory/dynamicArchive.cpp
  23. +11 −13 src/hotspot/share/memory/filemap.cpp
  24. +6 −6 src/hotspot/share/memory/filemap.hpp
  25. +31 −18 src/hotspot/share/memory/metaspaceShared.cpp
  26. +3 −1 src/hotspot/share/memory/metaspaceShared.hpp
  27. +11 −4 src/hotspot/share/oops/generateOopMap.cpp
  28. +1 −1 src/hotspot/share/oops/generateOopMap.hpp
  29. +1 −1 ...jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java
  30. +5 −0 src/jdk.jpackage/share/classes/jdk/jpackage/internal/Arguments.java
  31. +1 −0 src/jdk.jpackage/share/classes/jdk/jpackage/internal/ValidOptions.java
  32. +6 −3 src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources.properties
  33. +18 −1 src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_ja.properties
  34. +18 −1 src/jdk.jpackage/share/classes/jdk/jpackage/internal/resources/HelpResources_zh_CN.properties
  35. +32 −51 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinMsiBundler.java
  36. +75 −79 .../windows/classes/jdk/jpackage/internal/{WixSourcesBuilder.java → WixAppImageFragmentBuilder.java}
  37. +156 −0 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixFragmentBuilder.java
  38. +1 −1 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixPipeline.java
  39. +501 −0 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixUiFragmentBuilder.java
  40. +19 −25 ...share/gc/g1/g1YCTypes.hpp → jdk.jpackage/windows/classes/jdk/jpackage/internal/WixVariables.java}
  41. +56 −0 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/InstallDirNotEmptyDlg.wxs
  42. +8 −0 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_en.wxl
  43. +8 −0 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_ja.wxl
  44. +8 −0 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/MsiInstallerStrings_zh_CN.wxl
  45. +78 −0 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/ShortcutPromptDlg.wxs
  46. +3 −1 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties
  47. +2 −0 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_ja.properties
  48. +2 −0 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources_zh_CN.properties
  49. +2 −52 src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/main.wxs
  50. +1 −1 src/utils/IdealGraphVisualizer/Graph/src/com/sun/hotspot/igv/graph/Figure.java
  51. +8 −0 src/utils/IdealGraphVisualizer/ServerCompiler/nbproject/project.xml
  52. +16 −3 ...raphVisualizer/ServerCompiler/src/com/sun/hotspot/igv/servercompiler/ServerCompilerScheduler.java
  53. +36 −1 test/hotspot/jtreg/compiler/oracle/TestInvalidCompileCommand.java
  54. +102 −0 test/hotspot/jtreg/runtime/cds/appcds/SharedRegionAlignmentTest.java
  55. +5 −0 test/jdk/ProblemList.txt
  56. +124 −0 test/jdk/tools/jpackage/windows/WinInstallerUiTest.java
  57. +114 −0 test/jdk/tools/jpackage/windows/WinShortcutPromptTest.java
@@ -248,6 +248,7 @@ JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
JDKOPT_EXCLUDE_TRANSLATIONS
JDKOPT_ENABLE_DISABLE_MANPAGES
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT

###############################################################################
#
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -585,6 +585,30 @@ AC_DEFUN([JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE],
AC_SUBST(BUILD_CDS_ARCHIVE)
])

################################################################################
#
# Enable the alternative CDS core region alignment
#
AC_DEFUN([JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT],
[
UTIL_ARG_ENABLE(NAME: compatible-cds-alignment, DEFAULT: false,
RESULT: ENABLE_COMPATIBLE_CDS_ALIGNMENT,
DESC: [enable use alternative compatible cds core region alignment],
DEFAULT_DESC: [disabled],
CHECKING_MSG: [if compatible cds region alignment enabled],
CHECK_AVAILABLE: [
AC_MSG_CHECKING([if CDS archive is available])
if test "x$ENABLE_CDS" = "xfalse"; then
AVAILABLE=false
AC_MSG_RESULT([no (CDS is disabled)])
else
AVAILABLE=true
AC_MSG_RESULT([yes])
fi
])
AC_SUBST(ENABLE_COMPATIBLE_CDS_ALIGNMENT)
])

################################################################################
#
# Disallow any output from containing absolute paths from the build system.
@@ -349,6 +349,8 @@ BUILD_MANPAGES := @BUILD_MANPAGES@

BUILD_CDS_ARCHIVE := @BUILD_CDS_ARCHIVE@

ENABLE_COMPATIBLE_CDS_ALIGNMENT := @ENABLE_COMPATIBLE_CDS_ALIGNMENT@

ALLOW_ABSOLUTE_PATHS_IN_OUTPUT := @ALLOW_ABSOLUTE_PATHS_IN_OUTPUT@

# The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
@@ -441,6 +441,7 @@ var getJibProfilesProfiles = function (input, common, data) {
dependencies: ["devkit", "gtest", "pandoc"],
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
"--with-macosx-version-max=10.12.00",
"--enable-compatible-cds-alignment",
// Use system SetFile instead of the one in the devkit as the
// devkit one may not work on Catalina.
"SETFILE=/usr/bin/SetFile"),
@@ -477,6 +478,7 @@ var getJibProfilesProfiles = function (input, common, data) {
dependencies: ["devkit", "gtest", "build_devkit", "pandoc"],
configure_args: [
"--openjdk-target=aarch64-linux-gnu",
"--enable-compatible-cds-alignment",
],
},

@@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -99,3 +99,7 @@ endif
ifneq ($(HOTSPOT_OVERRIDE_LIBPATH), )
JVM_CFLAGS += -DOVERRIDE_LIBPATH='"$(HOTSPOT_OVERRIDE_LIBPATH)"'
endif

ifeq ($(ENABLE_COMPATIBLE_CDS_ALIGNMENT), true)
JVM_CFLAGS += -DCOMPATIBLE_CDS_ALIGNMENT
endif
@@ -25,6 +25,12 @@
#ifndef OS_CPU_BSD_X86_OS_BSD_X86_HPP
#define OS_CPU_BSD_X86_OS_BSD_X86_HPP

// Core region alignment is 16K to be able to run binaries built on MacOS x64
// on MacOS aarch64.
#if defined(__APPLE__) && defined(COMPATIBLE_CDS_ALIGNMENT)
#define CDS_CORE_REGION_ALIGNMENT (16*K)
#endif

static void setup_fpu();
static bool supports_sse();
static juint cpu_microcode_revision();
@@ -26,6 +26,10 @@
#ifndef OS_CPU_LINUX_AARCH64_OS_LINUX_AARCH64_HPP
#define OS_CPU_LINUX_AARCH64_OS_LINUX_AARCH64_HPP

#if defined(COMPATIBLE_CDS_ALIGNMENT)
#define CDS_CORE_REGION_ALIGNMENT (64*K)
#endif

static void setup_fpu();

static bool is_allocatable(size_t bytes);
@@ -781,7 +781,14 @@ void CompilerOracle::parse_from_line(char* line) {
print_parse_error(error_buf, original.get());
return;
}
register_command(typed_matcher, option, true);
if (option2type(option) == OptionType::Bool) {
register_command(typed_matcher, option, true);
} else {
jio_snprintf(error_buf, sizeof(error_buf), " Missing type '%s' before option '%s'",
optiontype2name(option2type(option)), option2name(option));
print_parse_error(error_buf, original.get());
return;
}
}
assert(typed_matcher != NULL, "sanity");
assert(*error_buf == '\0', "No error here");
@@ -43,6 +43,7 @@
#include "gc/g1/g1FullCollector.hpp"
#include "gc/g1/g1GCParPhaseTimesTracker.hpp"
#include "gc/g1/g1GCPhaseTimes.hpp"
#include "gc/g1/g1GCTypes.hpp"
#include "gc/g1/g1HeapSizingPolicy.hpp"
#include "gc/g1/g1HeapTransition.hpp"
#include "gc/g1/g1HeapVerifier.hpp"
@@ -63,7 +64,6 @@
#include "gc/g1/g1StringDedup.hpp"
#include "gc/g1/g1ThreadLocalData.hpp"
#include "gc/g1/g1Trace.hpp"
#include "gc/g1/g1YCTypes.hpp"
#include "gc/g1/g1ServiceThread.hpp"
#include "gc/g1/g1UncommitRegionTask.hpp"
#include "gc/g1/g1VMOperations.hpp"
@@ -2926,7 +2926,7 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus
{
G1EvacuationInfo evacuation_info;

_gc_tracer_stw->report_yc_type(collector_state()->yc_type());
_gc_tracer_stw->report_yc_phase(collector_state()->young_gc_phase());

GCTraceCPUTime tcpu;

@@ -2940,7 +2940,7 @@ void G1CollectedHeap::do_collection_pause_at_safepoint_helper(double target_paus

G1MonitoringScope ms(g1mm(),
false /* full_gc */,
collector_state()->yc_type() == Mixed /* all_memory_pools_affected */);
collector_state()->young_gc_phase() == Mixed /* all_memory_pools_affected */);

G1HeapTransition heap_transition(this);

@@ -36,6 +36,7 @@
#include "gc/g1/g1EvacStats.hpp"
#include "gc/g1/g1EvacuationInfo.hpp"
#include "gc/g1/g1GCPhaseTimes.hpp"
#include "gc/g1/g1GCTypes.hpp"
#include "gc/g1/g1HeapTransition.hpp"
#include "gc/g1/g1HeapVerifier.hpp"
#include "gc/g1/g1HRPrinter.hpp"
@@ -44,7 +45,6 @@
#include "gc/g1/g1NUMA.hpp"
#include "gc/g1/g1RedirtyCardsQueue.hpp"
#include "gc/g1/g1SurvivorRegions.hpp"
#include "gc/g1/g1YCTypes.hpp"
#include "gc/g1/heapRegionManager.hpp"
#include "gc/g1/heapRegionSet.hpp"
#include "gc/shared/barrierSet.hpp"
@@ -0,0 +1,60 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/

#include "precompiled.hpp"
#include "gc/g1/g1CollectorState.hpp"
#include "gc/g1/g1GCTypes.hpp"

G1GCPauseType G1CollectorState::young_gc_pause_type(bool concurrent_operation_is_full_mark) const {
assert(!in_full_gc(), "must be");
if (in_concurrent_start_gc()) {
assert(!in_young_gc_before_mixed(), "must be");
return concurrent_operation_is_full_mark ? ConcurrentStartMarkGC : ConcurrentStartUndoGC;
} else if (in_young_gc_before_mixed()) {
assert(!in_concurrent_start_gc(), "must be");
return LastYoungGC;
} else if (in_mixed_phase()) {
assert(!in_concurrent_start_gc(), "must be");
assert(!in_young_gc_before_mixed(), "must be");
return MixedGC;
} else {
assert(!in_concurrent_start_gc(), "must be");
assert(!in_young_gc_before_mixed(), "must be");
return YoungGC;
}
}

G1GCYoungPhase G1CollectorState::young_gc_phase() const {
assert(!in_full_gc(), "must be");

if (in_concurrent_start_gc()) {
return ConcurrentStart;
} else if (mark_or_rebuild_in_progress()) {
return DuringMarkOrRebuild;
} else if (in_young_only_phase()) {
return Normal;
} else {
return Mixed;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,7 @@
#ifndef SHARE_GC_G1_G1COLLECTORSTATE_HPP
#define SHARE_GC_G1_G1COLLECTORSTATE_HPP

#include "gc/g1/g1YCTypes.hpp"
#include "gc/g1/g1GCTypes.hpp"
#include "utilities/globalDefinitions.hpp"

// State of the G1 collection.
@@ -110,17 +110,10 @@ class G1CollectorState {
bool mark_or_rebuild_in_progress() const { return _mark_or_rebuild_in_progress; }
bool clearing_next_bitmap() const { return _clearing_next_bitmap; }

G1YCType yc_type() const {
if (in_concurrent_start_gc()) {
return ConcurrentStart;
} else if (mark_or_rebuild_in_progress()) {
return DuringMarkOrRebuild;
} else if (in_young_only_phase()) {
return Normal;
} else {
return Mixed;
}
}
// Calculate GC Pause Type from internal state.
G1GCPauseType young_gc_pause_type(bool concurrent_operation_is_full_mark) const;
G1GCYoungPhase young_gc_phase() const;

};

#endif // SHARE_GC_G1_G1COLLECTORSTATE_HPP
@@ -0,0 +1,94 @@
/*
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/

#ifndef SHARE_GC_G1_G1GCTYPES_HPP
#define SHARE_GC_G1_G1GCTYPES_HPP

#include "utilities/debug.hpp"

// Enumarate the phases in which the collection cycle can be.
enum G1GCYoungPhase {
Normal,
ConcurrentStart,
DuringMarkOrRebuild,
Mixed,
G1GCYoungPhaseEndSentinel
};

enum G1GCPauseType {
YoungGC,
LastYoungGC,
ConcurrentStartMarkGC,
ConcurrentStartUndoGC,
Cleanup,
Remark,
MixedGC,
FullGC,
G1GCPauseTypeEndSentinel
};

class G1GCTypeHelper {
public:

static void assert_is_young_pause(G1GCPauseType type) {
assert(type != FullGC, "must be");
assert(type != Remark, "must be");
assert(type != Cleanup, "must be");
}

static bool is_young_only_pause(G1GCPauseType type) {
assert_is_young_pause(type);
return type == ConcurrentStartUndoGC ||
type == ConcurrentStartMarkGC ||
type == LastYoungGC ||
type == YoungGC;
}

static bool is_mixed_pause(G1GCPauseType type) {
assert_is_young_pause(type);
return type == MixedGC;
}

static bool is_last_young_pause(G1GCPauseType type) {
assert_is_young_pause(type);
return type == LastYoungGC;
}

static bool is_concurrent_start_pause(G1GCPauseType type) {
assert_is_young_pause(type);
return type == ConcurrentStartMarkGC || type == ConcurrentStartUndoGC;
}

static const char* to_string(G1GCYoungPhase type) {
switch(type) {
case Normal: return "Normal";
case ConcurrentStart: return "Concurrent Start";
case DuringMarkOrRebuild: return "During Mark";
case Mixed: return "Mixed";
default: ShouldNotReachHere(); return NULL;
}
}
};

#endif // SHARE_GC_G1_G1GCTYPES_HPP

0 comments on commit 656404e

Please sign in to comment.