提交 f91cbf28 编写于 作者: C Chuansheng Lu 提交者: Jonathan Lu

[MultiTenant] Fixed build failure on Windows

Summary: Fixed build failure on Windows by disabling CPU related features

Test Plan: hotspot/test/sanity

Reviewed-by: kuaiwei, yuleil

Issue: https://github.com/alibaba/dragonwell8/issues/92
上级 0834cf41
......@@ -3353,7 +3353,7 @@ bool com_alibaba_tenant_TenantContainer::is_dead(oop obj) {
oop com_alibaba_tenant_TenantContainer::get_tenant_state(oop obj) {
assert(obj != NULL, "TenantContainer object cannot be NULL");
obj->obj_field(_tenant_state_offset);
return obj->obj_field(_tenant_state_offset);
}
// Support for com.alibaba.tenant.TenantState
......@@ -3380,6 +3380,7 @@ int com_alibaba_tenant_TenantState::state_of(oop tenant_obj) {
}
ShouldNotReachHere();
return -1;
}
#endif // INCLUDE_ALL_GCS
......
......@@ -20,6 +20,7 @@
*
*/
#include "precompiled.hpp"
#include "gc_implementation/g1/g1AllocationContext.hpp"
#include "runtime/thread.hpp"
......
......@@ -372,7 +372,7 @@ JVM_DestroyTenantAllocationContext(JNIEnv *env, jobject ignored, jlong context);
JNIEXPORT jobject JNICALL
JVM_TenantContainerOf(JNIEnv *env, jclass tenantContainerClass, jobject obj);
JNIEXPORT long JNICALL
JNIEXPORT jlong JNICALL
JVM_GetTenantOccupiedMemory(JNIEnv *env, jobject ignored, jlong context);
/*
......
......@@ -19,6 +19,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include "precompiled.hpp"
#include "prims/tenantenv.h"
#include "runtime/globals.hpp"
......
......@@ -20,11 +20,18 @@
*
*/
#include "precompiled.hpp"
#include "runtime/arguments_ext.hpp"
#include "runtime/java.hpp"
void ArgumentsExt::set_tenant_flags() {
// order is critical here, please be careful
#if !(defined(LINUX) && defined(AMD64))
if (TenantCpuThrottling || TenantCpuAccounting
|| TenantHeapIsolation || TenantHeapThrottling || MultiTenant) {
vm_exit_during_initialization("MultiTenant only works on Linux x64 platform");
}
#endif
// TenantHeapThrottling directly depends on TenantHeapIsolation
if (TenantHeapThrottling) {
......
......@@ -3974,11 +3974,13 @@ jint Threads::create_vm(JavaVMInitArgs* args, bool* canTryAgain) {
}
}
#if (defined(LINUX) && defined(AMD64))
if (MultiTenant && (TenantCpuThrottling || TenantCpuAccounting)) {
// JGroup initialization may involve complex steps
// have to do that after full JVM initialization
call_initializeJGroupClass(CHECK_0);
}
#endif
create_vm_timer.end();
#ifdef ASSERT
......
......@@ -22,6 +22,8 @@
/*
* @test
* @requires os.family == "Linux"
* @requires os.arch == "amd64"
* @summary Test TenantContainer.containOf() to retrieve tenant container of a Java object
* @library /testlibrary
* @build TestContainerOf
......
......@@ -23,6 +23,8 @@
/*
* @test
* @requires os.family == "Linux"
* @requires os.arch == "amd64"
* @summary Test isolation of per-tenant Java heap space
* @library /testlibrary /testlibrary/whitebox
* @build TestHeapIsolation
......
......@@ -22,6 +22,8 @@
#
# @test TestParGCAllocatorLeak.sh
# @requires os.family == "Linux"
# @requires os.arch == "amd64"
# @summary test memory leak of G1ParGCAllocator
# @run shell TestParGCAllocatorLeak.sh
#
......
......@@ -22,6 +22,8 @@
/*
* @test
* @requires os.family == "Linux"
* @requires os.arch == "amd64"
* @summary Test retain and reuse of TLAB
* @library /testlibrary /testlibrary/whitebox
* @build TestPerTenantTLAB
......
......@@ -23,6 +23,8 @@
/*
* @test
* @requires os.family == "Linux"
* @requires os.arch == "amd64"
* @summary Test heap limit on tenant
* @library /testlibrary /testlibrary/whitebox
* @build TestTenantHeapLimit
......
......@@ -22,6 +22,8 @@
#
# @test TestTenantJVMOptions
# @requires os.family == "Linux"
# @requires os.arch == "amd64"
# @summary Test the dependencies of multi-tenant JVM options
# @run shell TestTenantJVMOptions.sh
#
......
......@@ -23,6 +23,8 @@
/*
* @test
* @requires os.family == "Linux"
* @requires os.arch == "amd64"
* @summary TestTenantMemoryMTSafe
* @library /testlibrary /testlibrary/whitebox
* @build TestTenantMemoryMTSafe sun.hotspot.WhiteBox
......
......@@ -23,6 +23,8 @@
/*
* @test
* @requires os.family == "Linux"
* @requires os.arch == "amd64"
* @summary Verify PrintNMTStatistics with TenantHeapThrottling enabled
* @library /testlibrary
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册