Skip to content

Commit

Permalink
[JFR] Fixed build failure on Windows
Browse files Browse the repository at this point in the history
Summary: fixed build failure on Windows

Test Plan: build successfully on Windows

Reviewed-by: zhengxiaolinX

Issue: dragonwell-project/dragonwell8#112
  • Loading branch information
D-D-H committed Aug 1, 2020
1 parent b8d8a42 commit 0192ed8
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/os_cpu/aix_ppc/vm/orderAccess_aix_ppc.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand Down
2 changes: 2 additions & 0 deletions src/os_cpu/bsd_x86/vm/orderAccess_bsd_x86.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down
2 changes: 2 additions & 0 deletions src/os_cpu/bsd_zero/vm/orderAccess_bsd_zero.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/os_cpu/linux_ppc/vm/orderAccess_linux_ppc.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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); }
Expand All @@ -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; }
Expand Down
2 changes: 2 additions & 0 deletions src/os_cpu/linux_sparc/vm/orderAccess_linux_sparc.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down
2 changes: 2 additions & 0 deletions src/os_cpu/linux_x86/vm/orderAccess_linux_x86.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down
2 changes: 2 additions & 0 deletions src/os_cpu/linux_zero/vm/orderAccess_linux_zero.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down
2 changes: 2 additions & 0 deletions src/os_cpu/solaris_x86/vm/orderAccess_solaris_x86.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down
2 changes: 2 additions & 0 deletions src/os_cpu/windows_x86/vm/orderAccess_windows_x86.inline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand All @@ -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; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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() {
Expand Down
2 changes: 2 additions & 0 deletions src/share/vm/runtime/orderAccess.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 0192ed8

Please sign in to comment.