提交 0192ed8b 编写于 作者: D Denghui Dong 提交者: D-D-H

[JFR] Fixed build failure on Windows

Summary: fixed build failure on Windows

Test Plan: build successfully on Windows

Reviewed-by: zhengxiaolinX

Issue: https://github.com/alibaba/dragonwell8/issues/112
上级 b8d8a42f
......@@ -89,6 +89,7 @@ inline juint OrderAccess::load_acquire(volatile juint* p) { register juint
inline julong OrderAccess::load_acquire(volatile julong* p) { return (julong)load_acquire((volatile jlong*)p); }
inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { register jfloat t = *p; inlasm_acquire(); return t; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { register jdouble t = *p; inlasm_acquire(); return t; }
inline bool OrderAccess::load_acquire(volatile bool* p) { register bool t = *p; inlasm_acquire_reg(t); return t; }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return (intptr_t)load_acquire((volatile jlong*)p); }
inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return (void*) load_acquire((volatile jlong*)p); }
......
......@@ -73,6 +73,7 @@ inline juint OrderAccess::load_acquire(volatile juint* p) { return *p; }
inline julong OrderAccess::load_acquire(volatile julong* p) { return Atomic::load((volatile jlong*)p); }
inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { return *p; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return jdouble_cast(Atomic::load((volatile jlong*)p)); }
inline bool OrderAccess::load_acquire(volatile bool* p) { return *p; }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return *p; }
inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return *(void* volatile *)p; }
......@@ -88,6 +89,7 @@ inline void OrderAccess::release_store(volatile juint* p, juint v) { *p
inline void OrderAccess::release_store(volatile julong* p, julong v) { Atomic::store((jlong)v, (volatile jlong*)p); }
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { release_store((volatile jlong*)p, jlong_cast(v)); }
inline void OrderAccess::release_store(volatile bool* p, bool v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v) { *(void* volatile *)p = v; }
......
......@@ -110,6 +110,7 @@ inline jdouble OrderAccess::load_acquire(volatile jdouble* p) {
acquire();
return tmp;
}
inline bool OrderAccess::load_acquire(volatile bool* p) { bool data = *p; acquire(); return data; }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) {
intptr_t data = *p;
......@@ -140,6 +141,7 @@ inline void OrderAccess::release_store(volatile julong* p, julong v)
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { release(); *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v)
{ release(); os::atomic_copy64(&v, p); }
inline void OrderAccess::release_store(volatile bool* p, bool v) { release(); *p = v; }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { release(); *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v)
......
......@@ -91,6 +91,7 @@ inline juint OrderAccess::load_acquire(volatile juint* p) { register juint
inline julong OrderAccess::load_acquire(volatile julong* p) { return (julong)load_acquire((volatile jlong*)p); }
inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { register jfloat t = *p; inlasm_acquire(); return t; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { register jdouble t = *p; inlasm_acquire(); return t; }
inline bool OrderAccess::load_acquire(volatile bool* p) { register bool t = *p; inlasm_acquire_reg(t); return t; }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return (intptr_t)load_acquire((volatile jlong*)p); }
inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return (void*) load_acquire((volatile jlong*)p); }
......@@ -106,6 +107,7 @@ inline void OrderAccess::release_store(volatile juint* p, juint v) { inl
inline void OrderAccess::release_store(volatile julong* p, julong v) { inlasm_release(); *p = v; }
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { inlasm_release(); *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { inlasm_release(); *p = v; }
inline void OrderAccess::release_store(volatile bool* p, bool v) { inlasm_release(); *p = v; }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { inlasm_release(); *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v) { inlasm_release(); *(void* volatile *)p = v; }
......
......@@ -60,6 +60,7 @@ inline juint OrderAccess::load_acquire(volatile juint* p) { return *p; }
inline julong OrderAccess::load_acquire(volatile julong* p) { return *p; }
inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { return *p; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return *p; }
inline bool OrderAccess::load_acquire(volatile bool* p) { return *p; }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return *p; }
inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return *(void* volatile *)p; }
......@@ -75,6 +76,7 @@ inline void OrderAccess::release_store(volatile juint* p, juint v) { *p
inline void OrderAccess::release_store(volatile julong* p, julong v) { *p = v; }
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { *p = v; }
inline void OrderAccess::release_store(volatile bool* p, bool v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v) { *(void* volatile *)p = v; }
......
......@@ -73,6 +73,7 @@ inline juint OrderAccess::load_acquire(volatile juint* p) { return *p; }
inline julong OrderAccess::load_acquire(volatile julong* p) { return Atomic::load((volatile jlong*)p); }
inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { return *p; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return jdouble_cast(Atomic::load((volatile jlong*)p)); }
inline bool OrderAccess::load_acquire(volatile bool* p) { return *p; }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return *p; }
inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return *(void* volatile *)p; }
......@@ -88,6 +89,7 @@ inline void OrderAccess::release_store(volatile juint* p, juint v) { *p
inline void OrderAccess::release_store(volatile julong* p, julong v) { Atomic::store((jlong)v, (volatile jlong*)p); }
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { release_store((volatile jlong *)p, jlong_cast(v)); }
inline void OrderAccess::release_store(volatile bool* p, bool v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v) { *(void* volatile *)p = v; }
......
......@@ -109,6 +109,7 @@ inline jdouble OrderAccess::load_acquire(volatile jdouble* p) {
acquire();
return tmp;
}
inline bool OrderAccess::load_acquire(volatile bool* p) { bool data = *p; acquire(); return data; }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) {
intptr_t data = *p;
......@@ -139,6 +140,7 @@ inline void OrderAccess::release_store(volatile julong* p, julong v)
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { release(); *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v)
{ release(); os::atomic_copy64(&v, p); }
inline void OrderAccess::release_store(volatile bool* p, bool v) { release(); *p = v; }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { release(); *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v)
......
......@@ -85,6 +85,7 @@ inline juint OrderAccess::load_acquire(volatile juint* p) { return *p; }
inline julong OrderAccess::load_acquire(volatile julong* p) { return Atomic::load((volatile jlong*)p); }
inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { return *p; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return *p; }
inline bool OrderAccess::load_acquire(volatile bool* p) { return *p; }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return *p; }
inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return *(void* volatile *)p; }
......@@ -100,6 +101,7 @@ inline void OrderAccess::release_store(volatile juint* p, juint v) { *p
inline void OrderAccess::release_store(volatile julong* p, julong v) { Atomic::store((jlong)v, (volatile jlong*)p); }
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { *p = v; }
inline void OrderAccess::release_store(volatile bool* p, bool v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v) { *(void* volatile *)p = v; }
......
......@@ -89,6 +89,7 @@ inline juint OrderAccess::load_acquire(volatile juint* p) { return *p; }
inline julong OrderAccess::load_acquire(volatile julong* p) { return Atomic::load((volatile jlong*)p); }
inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { return *p; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return jdouble_cast(Atomic::load((volatile jlong*)p)); }
inline bool OrderAccess::load_acquire(volatile bool* p) { return *p; }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return *p; }
inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return *(void* volatile *)p; }
......@@ -104,6 +105,7 @@ inline void OrderAccess::release_store(volatile juint* p, juint v) { *p
inline void OrderAccess::release_store(volatile julong* p, julong v) { Atomic::store((jlong)v, (volatile jlong*)p); }
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { release_store((volatile jlong*)p, jlong_cast(v)); }
inline void OrderAccess::release_store(volatile bool* p, bool v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v) { *(void* volatile *)p = v; }
......
......@@ -72,6 +72,7 @@ inline juint OrderAccess::load_acquire(volatile juint* p) { return *p; }
inline julong OrderAccess::load_acquire(volatile julong* p) { return Atomic::load((volatile jlong*)p); }
inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { return *p; }
inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return jdouble_cast(Atomic::load((volatile jlong*)p)); }
inline bool OrderAccess::load_acquire(volatile bool* p) { return *p; }
inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return *p; }
inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return *(void* volatile *)p; }
......@@ -87,6 +88,7 @@ inline void OrderAccess::release_store(volatile juint* p, juint v) { *p
inline void OrderAccess::release_store(volatile julong* p, julong v) { Atomic::store((jlong)v, (volatile jlong*)p); }
inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { *p = v; }
inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { release_store((volatile jlong*)p, jlong_cast(v)); }
inline void OrderAccess::release_store(volatile bool* p, bool v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; }
inline void OrderAccess::release_store_ptr(volatile void* p, void* v) { *(void* volatile *)p = v; }
......
......@@ -62,11 +62,11 @@ class JfrTraceIdEpoch : AllStatic {
static void end_epoch_shift();
static bool changed_tag_state() {
return (bool)OrderAccess::load_acquire((volatile jubyte*)&_changed_tag_state);
return OrderAccess::load_acquire(&_changed_tag_state);
}
static void set_tag_state(bool value) {
OrderAccess::release_store((volatile jubyte*)&_changed_tag_state, (jubyte)value);
OrderAccess::release_store(&_changed_tag_state, value);
}
public:
......@@ -87,7 +87,7 @@ class JfrTraceIdEpoch : AllStatic {
}
static bool is_synchronizing() {
return (bool)OrderAccess::load_acquire((volatile jubyte*)&_synchronizing);
return OrderAccess::load_acquire(&_synchronizing);
}
static traceid in_use_this_epoch_bit() {
......
......@@ -261,6 +261,7 @@ class OrderAccess : AllStatic {
static julong load_acquire(volatile julong* p);
static jfloat load_acquire(volatile jfloat* p);
static jdouble load_acquire(volatile jdouble* p);
static bool load_acquire(volatile bool* p);
static intptr_t load_ptr_acquire(volatile intptr_t* p);
static void* load_ptr_acquire(volatile void* p);
......@@ -276,6 +277,7 @@ class OrderAccess : AllStatic {
static void release_store(volatile julong* p, julong v);
static void release_store(volatile jfloat* p, jfloat v);
static void release_store(volatile jdouble* p, jdouble v);
static void release_store(volatile bool* p, bool v);
static void release_store_ptr(volatile intptr_t* p, intptr_t v);
static void release_store_ptr(volatile void* p, void* v);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册