Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/vframeArray.hpp @ 20705:d3f3f7677537
6898462: The escape analysis with G1 cause crash assertion src/share/vm/runtime/vframeArray.cpp:94
Summary: OOM during reallocation of scalar replaced objects in deoptimization causes crashes
Reviewed-by: kvn, jrose
author | roland |
---|---|
date | Tue, 25 Nov 2014 17:33:59 +0100 |
parents | 0bf37f737702 |
children | 7848fc12602b |
comparison
equal
deleted
inserted
replaced
20704:8c08b28b7eee | 20705:d3f3f7677537 |
---|---|
56 bool _reexecute; // whether sould we reexecute this bytecode | 56 bool _reexecute; // whether sould we reexecute this bytecode |
57 Method* _method; // the method for this vframe | 57 Method* _method; // the method for this vframe |
58 MonitorChunk* _monitors; // active monitors for this vframe | 58 MonitorChunk* _monitors; // active monitors for this vframe |
59 StackValueCollection* _locals; | 59 StackValueCollection* _locals; |
60 StackValueCollection* _expressions; | 60 StackValueCollection* _expressions; |
61 #ifdef ASSERT | |
62 bool _removed_monitors; | |
63 #endif | |
61 | 64 |
62 public: | 65 public: |
63 | 66 |
64 frame* iframe(void) { return &_frame; } | 67 frame* iframe(void) { return &_frame; } |
65 | 68 |
76 | 79 |
77 StackValueCollection* locals(void) const { return _locals; } | 80 StackValueCollection* locals(void) const { return _locals; } |
78 | 81 |
79 StackValueCollection* expressions(void) const { return _expressions; } | 82 StackValueCollection* expressions(void) const { return _expressions; } |
80 | 83 |
81 void fill_in(compiledVFrame* vf); | 84 void fill_in(compiledVFrame* vf, bool realloc_failures); |
82 | 85 |
83 // Formerly part of deoptimizedVFrame | 86 // Formerly part of deoptimizedVFrame |
84 | 87 |
85 | 88 |
86 // Returns the on stack word size for this frame | 89 // Returns the on stack word size for this frame |
96 int callee_locals, | 99 int callee_locals, |
97 frame* caller, | 100 frame* caller, |
98 bool is_top_frame, | 101 bool is_top_frame, |
99 bool is_bottom_frame, | 102 bool is_bottom_frame, |
100 int exec_mode); | 103 int exec_mode); |
104 | |
105 #ifdef ASSERT | |
106 void set_removed_monitors() { | |
107 _removed_monitors = true; | |
108 } | |
109 #endif | |
101 | 110 |
102 #ifndef PRODUCT | 111 #ifndef PRODUCT |
103 void print(outputStream* st); | 112 void print(outputStream* st); |
104 #endif /* PRODUCT */ | 113 #endif /* PRODUCT */ |
105 }; | 114 }; |
158 | 167 |
159 // Accessores for instance variable | 168 // Accessores for instance variable |
160 int frames() const { return _frames; } | 169 int frames() const { return _frames; } |
161 | 170 |
162 static vframeArray* allocate(JavaThread* thread, int frame_size, GrowableArray<compiledVFrame*>* chunk, | 171 static vframeArray* allocate(JavaThread* thread, int frame_size, GrowableArray<compiledVFrame*>* chunk, |
163 RegisterMap* reg_map, frame sender, frame caller, frame self); | 172 RegisterMap* reg_map, frame sender, frame caller, frame self, |
173 bool realloc_failures); | |
164 | 174 |
165 | 175 |
166 vframeArrayElement* element(int index) { assert(is_within_bounds(index), "Bad index"); return &_elements[index]; } | 176 vframeArrayElement* element(int index) { assert(is_within_bounds(index), "Bad index"); return &_elements[index]; } |
167 | 177 |
168 // Allocates a new vframe in the array and fills the array with vframe information in chunk | 178 // Allocates a new vframe in the array and fills the array with vframe information in chunk |
169 void fill_in(JavaThread* thread, int frame_size, GrowableArray<compiledVFrame*>* chunk, const RegisterMap *reg_map); | 179 void fill_in(JavaThread* thread, int frame_size, GrowableArray<compiledVFrame*>* chunk, const RegisterMap *reg_map, bool realloc_failures); |
170 | 180 |
171 // Returns the owner of this vframeArray | 181 // Returns the owner of this vframeArray |
172 JavaThread* owner_thread() const { return _owner_thread; } | 182 JavaThread* owner_thread() const { return _owner_thread; } |
173 | 183 |
174 // Accessors for next | 184 // Accessors for next |