Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
dragonwell8_hotspot
提交
bfb1829b
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看板
提交
bfb1829b
编写于
9月 05, 2013
作者:
T
tschatzl
浏览文件
操作
浏览文件
下载
差异文件
Merge
上级
3911dd92
20bbf65c
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
56 addition
and
40 deletion
+56
-40
src/os/linux/vm/os_linux.cpp
src/os/linux/vm/os_linux.cpp
+15
-0
src/os/linux/vm/os_linux.hpp
src/os/linux/vm/os_linux.hpp
+8
-0
src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp
src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp
+1
-1
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
+2
-2
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
+9
-1
src/share/vm/gc_implementation/g1/heapRegion.cpp
src/share/vm/gc_implementation/g1/heapRegion.cpp
+3
-10
src/share/vm/gc_implementation/g1/heapRegion.hpp
src/share/vm/gc_implementation/g1/heapRegion.hpp
+1
-1
src/share/vm/gc_implementation/shared/gcTraceSend.cpp
src/share/vm/gc_implementation/shared/gcTraceSend.cpp
+17
-10
src/share/vm/runtime/arguments.cpp
src/share/vm/runtime/arguments.cpp
+0
-13
src/share/vm/runtime/arguments.hpp
src/share/vm/runtime/arguments.hpp
+0
-2
未找到文件。
src/os/linux/vm/os_linux.cpp
浏览文件 @
bfb1829b
...
...
@@ -2767,7 +2767,19 @@ void os::numa_make_global(char *addr, size_t bytes) {
Linux
::
numa_interleave_memory
(
addr
,
bytes
);
}
// Define for numa_set_bind_policy(int). Setting the argument to 0 will set the
// bind policy to MPOL_PREFERRED for the current thread.
#define USE_MPOL_PREFERRED 0
void
os
::
numa_make_local
(
char
*
addr
,
size_t
bytes
,
int
lgrp_hint
)
{
// To make NUMA and large pages more robust when both enabled, we need to ease
// the requirements on where the memory should be allocated. MPOL_BIND is the
// default policy and it will force memory to be allocated on the specified
// node. Changing this to MPOL_PREFERRED will prefer to allocate the memory on
// the specified node, but will not force it. Using this policy will prevent
// getting SIGBUS when trying to allocate large pages on NUMA nodes with no
// free large pages.
Linux
::
numa_set_bind_policy
(
USE_MPOL_PREFERRED
);
Linux
::
numa_tonode_memory
(
addr
,
bytes
,
lgrp_hint
);
}
...
...
@@ -2869,6 +2881,8 @@ bool os::Linux::libnuma_init() {
libnuma_dlsym
(
handle
,
"numa_tonode_memory"
)));
set_numa_interleave_memory
(
CAST_TO_FN_PTR
(
numa_interleave_memory_func_t
,
libnuma_dlsym
(
handle
,
"numa_interleave_memory"
)));
set_numa_set_bind_policy
(
CAST_TO_FN_PTR
(
numa_set_bind_policy_func_t
,
libnuma_dlsym
(
handle
,
"numa_set_bind_policy"
)));
if
(
numa_available
()
!=
-
1
)
{
...
...
@@ -2935,6 +2949,7 @@ os::Linux::numa_max_node_func_t os::Linux::_numa_max_node;
os
::
Linux
::
numa_available_func_t
os
::
Linux
::
_numa_available
;
os
::
Linux
::
numa_tonode_memory_func_t
os
::
Linux
::
_numa_tonode_memory
;
os
::
Linux
::
numa_interleave_memory_func_t
os
::
Linux
::
_numa_interleave_memory
;
os
::
Linux
::
numa_set_bind_policy_func_t
os
::
Linux
::
_numa_set_bind_policy
;
unsigned
long
*
os
::
Linux
::
_numa_all_nodes
;
bool
os
::
pd_uncommit_memory
(
char
*
addr
,
size_t
size
)
{
...
...
src/os/linux/vm/os_linux.hpp
浏览文件 @
bfb1829b
...
...
@@ -235,6 +235,7 @@ private:
typedef
int
(
*
numa_available_func_t
)(
void
);
typedef
int
(
*
numa_tonode_memory_func_t
)(
void
*
start
,
size_t
size
,
int
node
);
typedef
void
(
*
numa_interleave_memory_func_t
)(
void
*
start
,
size_t
size
,
unsigned
long
*
nodemask
);
typedef
void
(
*
numa_set_bind_policy_func_t
)(
int
policy
);
static
sched_getcpu_func_t
_sched_getcpu
;
static
numa_node_to_cpus_func_t
_numa_node_to_cpus
;
...
...
@@ -242,6 +243,7 @@ private:
static
numa_available_func_t
_numa_available
;
static
numa_tonode_memory_func_t
_numa_tonode_memory
;
static
numa_interleave_memory_func_t
_numa_interleave_memory
;
static
numa_set_bind_policy_func_t
_numa_set_bind_policy
;
static
unsigned
long
*
_numa_all_nodes
;
static
void
set_sched_getcpu
(
sched_getcpu_func_t
func
)
{
_sched_getcpu
=
func
;
}
...
...
@@ -250,6 +252,7 @@ private:
static
void
set_numa_available
(
numa_available_func_t
func
)
{
_numa_available
=
func
;
}
static
void
set_numa_tonode_memory
(
numa_tonode_memory_func_t
func
)
{
_numa_tonode_memory
=
func
;
}
static
void
set_numa_interleave_memory
(
numa_interleave_memory_func_t
func
)
{
_numa_interleave_memory
=
func
;
}
static
void
set_numa_set_bind_policy
(
numa_set_bind_policy_func_t
func
)
{
_numa_set_bind_policy
=
func
;
}
static
void
set_numa_all_nodes
(
unsigned
long
*
ptr
)
{
_numa_all_nodes
=
ptr
;
}
static
int
sched_getcpu_syscall
(
void
);
public:
...
...
@@ -267,6 +270,11 @@ public:
_numa_interleave_memory
(
start
,
size
,
_numa_all_nodes
);
}
}
static
void
numa_set_bind_policy
(
int
policy
)
{
if
(
_numa_set_bind_policy
!=
NULL
)
{
_numa_set_bind_policy
(
policy
);
}
}
static
int
get_node_by_cpu
(
int
cpu_id
);
};
...
...
src/os_cpu/solaris_x86/vm/globals_solaris_x86.hpp
浏览文件 @
bfb1829b
...
...
@@ -44,6 +44,6 @@ define_pd_global(uintx,JVMInvokeMethodSlack, 10*K);
define_pd_global
(
intx
,
CompilerThreadStackSize
,
0
);
// Used on 64 bit platforms for UseCompressedOops base address
define_pd_global
(
uintx
,
HeapBaseMinAddress
,
2
56
*
M
);
define_pd_global
(
uintx
,
HeapBaseMinAddress
,
2
*
G
);
#endif // OS_CPU_SOLARIS_X86_VM_GLOBALS_SOLARIS_X86_HPP
src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
浏览文件 @
bfb1829b
...
...
@@ -2493,11 +2493,11 @@ void G1CollectedHeap::register_concurrent_cycle_start(jlong start_time) {
void
G1CollectedHeap
::
register_concurrent_cycle_end
()
{
if
(
_concurrent_cycle_started
)
{
_gc_timer_cm
->
register_gc_end
(
os
::
elapsed_counter
());
if
(
_cm
->
has_aborted
())
{
_gc_tracer_cm
->
report_concurrent_mode_failure
();
}
_gc_timer_cm
->
register_gc_end
(
os
::
elapsed_counter
());
_gc_tracer_cm
->
report_gc_end
(
_gc_timer_cm
->
gc_end
(),
_gc_timer_cm
->
time_partitions
());
_concurrent_cycle_started
=
false
;
...
...
src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp
浏览文件 @
bfb1829b
...
...
@@ -168,7 +168,15 @@ G1CollectorPolicy::G1CollectorPolicy() :
// Set up the region size and associated fields. Given that the
// policy is created before the heap, we have to set this up here,
// so it's done as soon as possible.
HeapRegion
::
setup_heap_region_size
(
Arguments
::
min_heap_size
());
// It would have been natural to pass initial_heap_byte_size() and
// max_heap_byte_size() to setup_heap_region_size() but those have
// not been set up at this point since they should be aligned with
// the region size. So, there is a circular dependency here. We base
// the region size on the heap size, but the heap size should be
// aligned with the region size. To get around this we use the
// unaligned values for the heap.
HeapRegion
::
setup_heap_region_size
(
InitialHeapSize
,
MaxHeapSize
);
HeapRegionRemSet
::
setup_remset_size
();
G1ErgoVerbose
::
initialize
();
...
...
src/share/vm/gc_implementation/g1/heapRegion.cpp
浏览文件 @
bfb1829b
...
...
@@ -149,18 +149,11 @@ void HeapRegionDCTOC::walk_mem_region_with_cl(MemRegion mr,
// many regions in the heap (based on the min heap size).
#define TARGET_REGION_NUMBER 2048
void
HeapRegion
::
setup_heap_region_size
(
uintx
min_heap_size
)
{
// region_size in bytes
void
HeapRegion
::
setup_heap_region_size
(
size_t
initial_heap_size
,
size_t
max_heap_size
)
{
uintx
region_size
=
G1HeapRegionSize
;
if
(
FLAG_IS_DEFAULT
(
G1HeapRegionSize
))
{
// We base the automatic calculation on the min heap size. This
// can be problematic if the spread between min and max is quite
// wide, imagine -Xms128m -Xmx32g. But, if we decided it based on
// the max size, the region size might be way too large for the
// min size. Either way, some users might have to set the region
// size manually for some -Xms / -Xmx combos.
region_size
=
MAX2
(
min_heap_size
/
TARGET_REGION_NUMBER
,
size_t
average_heap_size
=
(
initial_heap_size
+
max_heap_size
)
/
2
;
region_size
=
MAX2
(
average_heap_size
/
TARGET_REGION_NUMBER
,
(
uintx
)
MIN_REGION_SIZE
);
}
...
...
src/share/vm/gc_implementation/g1/heapRegion.hpp
浏览文件 @
bfb1829b
...
...
@@ -361,7 +361,7 @@ class HeapRegion: public G1OffsetTableContigSpace {
// CardsPerRegion). All those fields are considered constant
// throughout the JVM's execution, therefore they should only be set
// up once during initialization time.
static
void
setup_heap_region_size
(
uintx
min
_heap_size
);
static
void
setup_heap_region_size
(
size_t
initial_heap_size
,
size_t
max
_heap_size
);
enum
ClaimValues
{
InitialClaimValue
=
0
,
...
...
src/share/vm/gc_implementation/shared/gcTraceSend.cpp
浏览文件 @
bfb1829b
...
...
@@ -28,6 +28,7 @@
#include "gc_implementation/shared/gcTrace.hpp"
#include "gc_implementation/shared/gcWhen.hpp"
#include "gc_implementation/shared/copyFailedInfo.hpp"
#include "runtime/os.hpp"
#include "trace/tracing.hpp"
#include "trace/traceBackend.hpp"
#if INCLUDE_ALL_GCS
...
...
@@ -54,11 +55,12 @@ void GCTracer::send_garbage_collection_event() const {
}
void
GCTracer
::
send_reference_stats_event
(
ReferenceType
type
,
size_t
count
)
const
{
EventGCReferenceStatistics
e
;
EventGCReferenceStatistics
e
(
UNTIMED
)
;
if
(
e
.
should_commit
())
{
e
.
set_gcId
(
_shared_gc_info
.
id
());
e
.
set_type
((
u1
)
type
);
e
.
set_count
(
count
);
e
.
set_endtime
(
os
::
elapsed_counter
());
e
.
commit
();
}
}
...
...
@@ -105,20 +107,22 @@ static TraceStructCopyFailed to_trace_struct(const CopyFailedInfo& cf_info) {
}
void
YoungGCTracer
::
send_promotion_failed_event
(
const
PromotionFailedInfo
&
pf_info
)
const
{
EventPromotionFailed
e
;
EventPromotionFailed
e
(
UNTIMED
)
;
if
(
e
.
should_commit
())
{
e
.
set_gcId
(
_shared_gc_info
.
id
());
e
.
set_data
(
to_trace_struct
(
pf_info
));
e
.
set_thread
(
pf_info
.
thread
()
->
thread_id
());
e
.
set_endtime
(
os
::
elapsed_counter
());
e
.
commit
();
}
}
// Common to CMS and G1
void
OldGCTracer
::
send_concurrent_mode_failure_event
()
{
EventConcurrentModeFailure
e
;
EventConcurrentModeFailure
e
(
UNTIMED
)
;
if
(
e
.
should_commit
())
{
e
.
set_gcId
(
_shared_gc_info
.
id
());
e
.
set_endtime
(
os
::
elapsed_counter
());
e
.
commit
();
}
}
...
...
@@ -136,7 +140,7 @@ void G1NewTracer::send_g1_young_gc_event() {
}
void
G1NewTracer
::
send_evacuation_info_event
(
EvacuationInfo
*
info
)
{
EventEvacuationInfo
e
;
EventEvacuationInfo
e
(
UNTIMED
)
;
if
(
e
.
should_commit
())
{
e
.
set_gcId
(
_shared_gc_info
.
id
());
e
.
set_cSetRegions
(
info
->
collectionset_regions
());
...
...
@@ -147,15 +151,17 @@ void G1NewTracer::send_evacuation_info_event(EvacuationInfo* info) {
e
.
set_allocRegionsUsedAfter
(
info
->
alloc_regions_used_before
()
+
info
->
bytes_copied
());
e
.
set_bytesCopied
(
info
->
bytes_copied
());
e
.
set_regionsFreed
(
info
->
regions_freed
());
e
.
set_endtime
(
os
::
elapsed_counter
());
e
.
commit
();
}
}
void
G1NewTracer
::
send_evacuation_failed_event
(
const
EvacuationFailedInfo
&
ef_info
)
const
{
EventEvacuationFailed
e
;
EventEvacuationFailed
e
(
UNTIMED
)
;
if
(
e
.
should_commit
())
{
e
.
set_gcId
(
_shared_gc_info
.
id
());
e
.
set_data
(
to_trace_struct
(
ef_info
));
e
.
set_endtime
(
os
::
elapsed_counter
());
e
.
commit
();
}
}
...
...
@@ -189,12 +195,13 @@ class GCHeapSummaryEventSender : public GCHeapSummaryVisitor {
void
visit
(
const
GCHeapSummary
*
heap_summary
)
const
{
const
VirtualSpaceSummary
&
heap_space
=
heap_summary
->
heap
();
EventGCHeapSummary
e
;
EventGCHeapSummary
e
(
UNTIMED
)
;
if
(
e
.
should_commit
())
{
e
.
set_gcId
(
_id
);
e
.
set_when
((
u1
)
_when
);
e
.
set_heapSpace
(
to_trace_struct
(
heap_space
));
e
.
set_heapUsed
(
heap_summary
->
used
());
e
.
set_endtime
(
os
::
elapsed_counter
());
e
.
commit
();
}
}
...
...
@@ -209,7 +216,7 @@ class GCHeapSummaryEventSender : public GCHeapSummaryVisitor {
const
SpaceSummary
&
from_space
=
ps_heap_summary
->
from
();
const
SpaceSummary
&
to_space
=
ps_heap_summary
->
to
();
EventPSHeapSummary
e
;
EventPSHeapSummary
e
(
UNTIMED
)
;
if
(
e
.
should_commit
())
{
e
.
set_gcId
(
_id
);
e
.
set_when
((
u1
)
_when
);
...
...
@@ -220,6 +227,7 @@ class GCHeapSummaryEventSender : public GCHeapSummaryVisitor {
e
.
set_edenSpace
(
to_trace_struct
(
ps_heap_summary
->
eden
()));
e
.
set_fromSpace
(
to_trace_struct
(
ps_heap_summary
->
from
()));
e
.
set_toSpace
(
to_trace_struct
(
ps_heap_summary
->
to
()));
e
.
set_endtime
(
os
::
elapsed_counter
());
e
.
commit
();
}
}
...
...
@@ -241,13 +249,14 @@ static TraceStructMetaspaceSizes to_trace_struct(const MetaspaceSizes& sizes) {
}
void
GCTracer
::
send_meta_space_summary_event
(
GCWhen
::
Type
when
,
const
MetaspaceSummary
&
meta_space_summary
)
const
{
EventMetaspaceSummary
e
;
EventMetaspaceSummary
e
(
UNTIMED
)
;
if
(
e
.
should_commit
())
{
e
.
set_gcId
(
_shared_gc_info
.
id
());
e
.
set_when
((
u1
)
when
);
e
.
set_metaspace
(
to_trace_struct
(
meta_space_summary
.
meta_space
()));
e
.
set_dataSpace
(
to_trace_struct
(
meta_space_summary
.
data_space
()));
e
.
set_classSpace
(
to_trace_struct
(
meta_space_summary
.
class_space
()));
e
.
set_endtime
(
os
::
elapsed_counter
());
e
.
commit
();
}
}
...
...
@@ -282,8 +291,6 @@ class PhaseSender : public PhaseVisitor {
default:
/* Ignore sending this phase */
break
;
}
}
#undef send_phase
};
void
GCTracer
::
send_phase_events
(
TimePartitions
*
time_partitions
)
const
{
...
...
src/share/vm/runtime/arguments.cpp
浏览文件 @
bfb1829b
...
...
@@ -1605,17 +1605,6 @@ julong Arguments::limit_by_allocatable_memory(julong limit) {
return
result
;
}
void
Arguments
::
set_heap_base_min_address
()
{
if
(
FLAG_IS_DEFAULT
(
HeapBaseMinAddress
)
&&
UseG1GC
&&
HeapBaseMinAddress
<
1
*
G
)
{
// By default HeapBaseMinAddress is 2G on all platforms except Solaris x86.
// G1 currently needs a lot of C-heap, so on Solaris we have to give G1
// some extra space for the C-heap compared to other collectors.
// Use FLAG_SET_DEFAULT here rather than FLAG_SET_ERGO to make sure that
// code that checks for default values work correctly.
FLAG_SET_DEFAULT
(
HeapBaseMinAddress
,
1
*
G
);
}
}
void
Arguments
::
set_heap_size
()
{
if
(
!
FLAG_IS_DEFAULT
(
DefaultMaxRAMFraction
))
{
// Deprecated flag
...
...
@@ -3537,8 +3526,6 @@ jint Arguments::parse(const JavaVMInitArgs* args) {
}
}
set_heap_base_min_address
();
// Set heap size based on available physical memory
set_heap_size
();
...
...
src/share/vm/runtime/arguments.hpp
浏览文件 @
bfb1829b
...
...
@@ -334,8 +334,6 @@ class Arguments : AllStatic {
// limits the given memory size by the maximum amount of memory this process is
// currently allowed to allocate or reserve.
static
julong
limit_by_allocatable_memory
(
julong
size
);
// Setup HeapBaseMinAddress
static
void
set_heap_base_min_address
();
// Setup heap size
static
void
set_heap_size
();
// Based on automatic selection criteria, should the
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录