提交 31204ad0 编写于 作者: D dholmes

8056183: os::is_MP() always reports true when NMT is enabled

Reviewed-by: shade, coleenp, bdelsart
上级 5d83bc2b
...@@ -214,13 +214,14 @@ class os: AllStatic { ...@@ -214,13 +214,14 @@ class os: AllStatic {
// Interface for detecting multiprocessor system // Interface for detecting multiprocessor system
static inline bool is_MP() { static inline bool is_MP() {
#if !INCLUDE_NMT // During bootstrap if _processor_count is not yet initialized
assert(_processor_count > 0, "invalid processor count"); // we claim to be MP as that is safest. If any platform has a
return _processor_count > 1 || AssumeMP; // stub generator that might be triggered in this phase and for
#else // which being declared MP when in fact not, is a problem - then
// NMT needs atomic operations before this initialization. // the bootstrap routine for the stub generator needs to check
return true; // the processor count directly and leave the bootstrap routine
#endif // in place until called after initialization has ocurred.
return (_processor_count != 1) || AssumeMP;
} }
static julong available_memory(); static julong available_memory();
static julong physical_memory(); static julong physical_memory();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册