aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm
diff options
context:
space:
mode:
authornever <none@none>2011-04-01 21:45:33 -0700
committernever <none@none>2011-04-01 21:45:33 -0700
commit871997ce91d16ff9e3a7ec7f95cfe5eddb35b07c (patch)
tree4c5a5bd2e0157644d9d295633caf53cf1b2b0d9b /src/share/vm
parentaf399355befce1329e3fcbcdabcb6cd525e2ea34 (diff)
6909440: C2 fails with assertion (_always_cold->is_cold(),"must always be cold")
Reviewed-by: kvn
Diffstat (limited to 'src/share/vm')
-rw-r--r--src/share/vm/opto/callGenerator.cpp28
-rw-r--r--src/share/vm/opto/callGenerator.hpp16
2 files changed, 22 insertions, 22 deletions
diff --git a/src/share/vm/opto/callGenerator.cpp b/src/share/vm/opto/callGenerator.cpp
index 6d201139e..ed02629d6 100644
--- a/src/share/vm/opto/callGenerator.cpp
+++ b/src/share/vm/opto/callGenerator.cpp
@@ -978,31 +978,19 @@ WarmCallInfo* WarmCallInfo::remove_from(WarmCallInfo* head) {
return head;
}
-WarmCallInfo* WarmCallInfo::_always_hot = NULL;
-WarmCallInfo* WarmCallInfo::_always_cold = NULL;
+WarmCallInfo WarmCallInfo::_always_hot(WarmCallInfo::MAX_VALUE(), WarmCallInfo::MAX_VALUE(),
+ WarmCallInfo::MIN_VALUE(), WarmCallInfo::MIN_VALUE());
+WarmCallInfo WarmCallInfo::_always_cold(WarmCallInfo::MIN_VALUE(), WarmCallInfo::MIN_VALUE(),
+ WarmCallInfo::MAX_VALUE(), WarmCallInfo::MAX_VALUE());
WarmCallInfo* WarmCallInfo::always_hot() {
- if (_always_hot == NULL) {
- static double bits[sizeof(WarmCallInfo) / sizeof(double) + 1] = {0};
- WarmCallInfo* ci = (WarmCallInfo*) bits;
- ci->_profit = ci->_count = MAX_VALUE();
- ci->_work = ci->_size = MIN_VALUE();
- _always_hot = ci;
- }
- assert(_always_hot->is_hot(), "must always be hot");
- return _always_hot;
+ assert(_always_hot.is_hot(), "must always be hot");
+ return &_always_hot;
}
WarmCallInfo* WarmCallInfo::always_cold() {
- if (_always_cold == NULL) {
- static double bits[sizeof(WarmCallInfo) / sizeof(double) + 1] = {0};
- WarmCallInfo* ci = (WarmCallInfo*) bits;
- ci->_profit = ci->_count = MIN_VALUE();
- ci->_work = ci->_size = MAX_VALUE();
- _always_cold = ci;
- }
- assert(_always_cold->is_cold(), "must always be cold");
- return _always_cold;
+ assert(_always_cold.is_cold(), "must always be cold");
+ return &_always_cold;
}
diff --git a/src/share/vm/opto/callGenerator.hpp b/src/share/vm/opto/callGenerator.hpp
index 75e8ba004..4a50f990e 100644
--- a/src/share/vm/opto/callGenerator.hpp
+++ b/src/share/vm/opto/callGenerator.hpp
@@ -215,8 +215,20 @@ class WarmCallInfo : public ResourceObj {
WarmCallInfo* next() const { return _next; }
void set_next(WarmCallInfo* n) { _next = n; }
- static WarmCallInfo* _always_hot;
- static WarmCallInfo* _always_cold;
+ static WarmCallInfo _always_hot;
+ static WarmCallInfo _always_cold;
+
+ // Constructor intitialization of always_hot and always_cold
+ WarmCallInfo(float c, float p, float w, float s) {
+ _call = NULL;
+ _hot_cg = NULL;
+ _next = NULL;
+ _count = c;
+ _profit = p;
+ _work = w;
+ _size = s;
+ _heat = 0;
+ }
public:
// Because WarmInfo objects live over the entire lifetime of the