Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
2ba3fa88
D
dragonwell8_hotspot
项目概览
openanolis
/
dragonwell8_hotspot
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
D
dragonwell8_hotspot
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2ba3fa88
编写于
12月 20, 2016
作者:
Z
zmajo
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
26663c70
a98ed765
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
42 addition
and
19 deletion
+42
-19
src/os/windows/vm/os_windows.cpp
src/os/windows/vm/os_windows.cpp
+2
-3
src/share/vm/gc_implementation/g1/concurrentMark.cpp
src/share/vm/gc_implementation/g1/concurrentMark.cpp
+3
-4
src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp
src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp
+2
-2
src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp
...hare/vm/gc_implementation/parNew/parCardTableModRefBS.cpp
+8
-3
src/share/vm/memory/cardTableModRefBS.hpp
src/share/vm/memory/cardTableModRefBS.hpp
+1
-1
src/share/vm/runtime/os.cpp
src/share/vm/runtime/os.cpp
+13
-2
src/share/vm/runtime/os.hpp
src/share/vm/runtime/os.hpp
+11
-2
src/share/vm/runtime/vm_version.cpp
src/share/vm/runtime/vm_version.cpp
+2
-2
未找到文件。
src/os/windows/vm/os_windows.cpp
浏览文件 @
2ba3fa88
/*
* Copyright (c) 1997, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
6
, 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
...
...
@@ -1747,8 +1747,7 @@ void os::win32::print_windows_version(outputStream* st) {
if
(
is_workstation
)
{
st
->
print
(
"10"
);
}
else
{
// The server version name of Windows 10 is not known at this time
st
->
print
(
"%d.%d"
,
major_version
,
minor_version
);
st
->
print
(
"Server 2016"
);
}
break
;
...
...
src/share/vm/gc_implementation/g1/concurrentMark.cpp
浏览文件 @
2ba3fa88
/*
* Copyright (c) 2001, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
6
, 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
...
...
@@ -631,11 +631,10 @@ ConcurrentMark::ConcurrentMark(G1CollectedHeap* g1h, G1RegionToSpaceMapper* prev
double
overall_cm_overhead
=
(
double
)
MaxGCPauseMillis
*
marking_overhead
/
(
double
)
GCPauseIntervalMillis
;
double
cpu_ratio
=
1.0
/
(
double
)
os
::
processor_count
();
double
cpu_ratio
=
1.0
/
os
::
initial_active_
processor_count
();
double
marking_thread_num
=
ceil
(
overall_cm_overhead
/
cpu_ratio
);
double
marking_task_overhead
=
overall_cm_overhead
/
marking_thread_num
*
(
double
)
os
::
processor_count
();
overall_cm_overhead
/
marking_thread_num
*
os
::
initial_active_processor_count
();
double
sleep_factor
=
(
1.0
-
marking_task_overhead
)
/
marking_task_overhead
;
...
...
src/share/vm/gc_implementation/g1/dirtyCardQueue.cpp
浏览文件 @
2ba3fa88
/*
* Copyright (c) 2001, 201
0
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 201
6
, 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
...
...
@@ -80,7 +80,7 @@ DirtyCardQueueSet::DirtyCardQueueSet(bool notify_when_complete) :
// Determines how many mutator threads can process the buffers in parallel.
uint
DirtyCardQueueSet
::
num_par_ids
()
{
return
(
uint
)
os
::
processor_count
();
return
(
uint
)
os
::
initial_active_
processor_count
();
}
void
DirtyCardQueueSet
::
initialize
(
CardTableEntryClosure
*
cl
,
Monitor
*
cbl_mon
,
Mutex
*
fl_lock
,
...
...
src/share/vm/gc_implementation/parNew/parCardTableModRefBS.cpp
浏览文件 @
2ba3fa88
...
...
@@ -452,9 +452,13 @@ get_LNC_array_for_space(Space* sp,
// event lock and do the read again in case some other thread had already
// succeeded and done the resize.
int
cur_collection
=
Universe
::
heap
()
->
total_collections
();
if
(
_last_LNC_resizing_collection
[
i
]
!=
cur_collection
)
{
// Updated _last_LNC_resizing_collection[i] must not be visible before
// _lowest_non_clean and friends are visible. Therefore use acquire/release
// to guarantee this on non TSO architecures.
if
(
OrderAccess
::
load_acquire
(
&
_last_LNC_resizing_collection
[
i
])
!=
cur_collection
)
{
MutexLocker
x
(
ParGCRareEvent_lock
);
if
(
_last_LNC_resizing_collection
[
i
]
!=
cur_collection
)
{
// This load_acquire is here for clarity only. The MutexLocker already fences.
if
(
OrderAccess
::
load_acquire
(
&
_last_LNC_resizing_collection
[
i
])
!=
cur_collection
)
{
if
(
_lowest_non_clean
[
i
]
==
NULL
||
n_chunks
!=
_lowest_non_clean_chunk_size
[
i
])
{
...
...
@@ -474,7 +478,8 @@ get_LNC_array_for_space(Space* sp,
_lowest_non_clean
[
i
][
j
]
=
NULL
;
}
}
_last_LNC_resizing_collection
[
i
]
=
cur_collection
;
// Make sure this gets visible only after _lowest_non_clean* was initialized
OrderAccess
::
release_store
(
&
_last_LNC_resizing_collection
[
i
],
cur_collection
);
}
}
// In any case, now do the initialization.
...
...
src/share/vm/memory/cardTableModRefBS.hpp
浏览文件 @
2ba3fa88
...
...
@@ -217,7 +217,7 @@ class CardTableModRefBS: public ModRefBarrierSet {
CardArr
*
_lowest_non_clean
;
size_t
*
_lowest_non_clean_chunk_size
;
uintptr_t
*
_lowest_non_clean_base_chunk_index
;
int
*
_last_LNC_resizing_collection
;
volatile
int
*
_last_LNC_resizing_collection
;
// Initializes "lowest_non_clean" to point to the array for the region
// covering "sp", and "lowest_non_clean_base_chunk_index" to the chunk
...
...
src/share/vm/runtime/os.cpp
浏览文件 @
2ba3fa88
/*
* Copyright (c) 1997, 201
4
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 201
6
, 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
...
...
@@ -78,6 +78,7 @@ volatile int32_t* os::_mem_serialize_page = NULL;
uintptr_t
os
::
_serialize_page_mask
=
0
;
long
os
::
_rand_seed
=
1
;
int
os
::
_processor_count
=
0
;
int
os
::
_initial_active_processor_count
=
0
;
size_t
os
::
_page_sizes
[
os
::
page_sizes_max
];
#ifndef PRODUCT
...
...
@@ -322,6 +323,7 @@ static void signal_thread_entry(JavaThread* thread, TRAPS) {
}
void
os
::
init_before_ergo
()
{
initialize_initial_active_processor_count
();
// We need to initialize large page support here because ergonomics takes some
// decisions depending on large page support and the calculated large page size.
large_page_init
();
...
...
@@ -835,7 +837,11 @@ void os::print_cpu_info(outputStream* st) {
st
->
print
(
"CPU:"
);
st
->
print
(
"total %d"
,
os
::
processor_count
());
// It's not safe to query number of active processors after crash
// st->print("(active %d)", os::active_processor_count());
// st->print("(active %d)", os::active_processor_count()); but we can
// print the initial number of active processors.
// We access the raw value here because the assert in the accessor will
// fail if the crash occurs before initialization of this value.
st
->
print
(
" (initial active %d)"
,
_initial_active_processor_count
);
st
->
print
(
" %s"
,
VM_Version
::
cpu_features
());
st
->
cr
();
pd_print_cpu_info
(
st
);
...
...
@@ -1418,6 +1424,11 @@ bool os::is_server_class_machine() {
return
result
;
}
void
os
::
initialize_initial_active_processor_count
()
{
assert
(
_initial_active_processor_count
==
0
,
"Initial active processor count already set."
);
_initial_active_processor_count
=
active_processor_count
();
}
void
os
::
SuspendedThreadTask
::
run
()
{
assert
(
Threads_lock
->
owned_by_self
()
||
(
_thread
==
VMThread
::
vm_thread
()),
"must have threads lock to call this"
);
internal_do_task
();
...
...
src/share/vm/runtime/os.hpp
浏览文件 @
2ba3fa88
...
...
@@ -151,6 +151,7 @@ class os: AllStatic {
static
size_t
page_size_for_region
(
size_t
region_size
,
size_t
min_pages
,
bool
must_be_aligned
);
static
void
initialize_initial_active_processor_count
();
public:
static
void
init
(
void
);
// Called before command line parsing
static
void
init_before_ergo
(
void
);
// Called after command line parsing
...
...
@@ -238,6 +239,13 @@ class os: AllStatic {
// Note that on some OSes this can change dynamically.
static
int
active_processor_count
();
// At startup the number of active CPUs this process is allowed to run on.
// This value does not change dynamically. May be different from active_processor_count().
static
int
initial_active_processor_count
()
{
assert
(
_initial_active_processor_count
>
0
,
"Initial active processor count not set yet."
);
return
_initial_active_processor_count
;
}
// Bind processes to processors.
// This is a two step procedure:
// first you generate a distribution of processes to processors,
...
...
@@ -975,8 +983,9 @@ class os: AllStatic {
protected:
static
long
_rand_seed
;
// seed for random number generator
static
int
_processor_count
;
// number of processors
static
long
_rand_seed
;
// seed for random number generator
static
int
_processor_count
;
// number of processors
static
int
_initial_active_processor_count
;
// number of active processors during initialization.
static
char
*
format_boot_path
(
const
char
*
format_string
,
const
char
*
home
,
...
...
src/share/vm/runtime/vm_version.cpp
浏览文件 @
2ba3fa88
/*
* Copyright (c) 1998, 201
5
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 201
6
, 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
...
...
@@ -296,7 +296,7 @@ unsigned int Abstract_VM_Version::nof_parallel_worker_threads(
// processor after the first 8. For example, on a 72 cpu machine
// and a chosen fraction of 5/8
// use 8 + (72 - 8) * (5/8) == 48 worker threads.
unsigned
int
ncpus
=
(
unsigned
int
)
os
::
active_processor_count
();
unsigned
int
ncpus
=
(
unsigned
int
)
os
::
initial_
active_processor_count
();
return
(
ncpus
<=
switch_pt
)
?
ncpus
:
(
switch_pt
+
((
ncpus
-
switch_pt
)
*
num
)
/
den
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录