equal
deleted
inserted
replaced
1960 } |
1960 } |
1961 |
1961 |
1962 // This class provides a simple wrapper over the internal structure of |
1962 // This class provides a simple wrapper over the internal structure of |
1963 // exception backtrace to insulate users of the backtrace from needing |
1963 // exception backtrace to insulate users of the backtrace from needing |
1964 // to know what it looks like. |
1964 // to know what it looks like. |
|
1965 // The code of this class is not GC safe. Allocations can only happen |
|
1966 // in expand(). |
1965 class BacktraceBuilder: public StackObj { |
1967 class BacktraceBuilder: public StackObj { |
1966 friend class BacktraceIterator; |
1968 friend class BacktraceIterator; |
1967 private: |
1969 private: |
1968 Handle _backtrace; |
1970 Handle _backtrace; |
1969 objArrayOop _head; |
1971 objArrayOop _head; |
2108 _index++; |
2110 _index++; |
2109 } |
2111 } |
2110 |
2112 |
2111 void set_has_hidden_top_frame(TRAPS) { |
2113 void set_has_hidden_top_frame(TRAPS) { |
2112 if (_has_hidden_top_frame == NULL) { |
2114 if (_has_hidden_top_frame == NULL) { |
2113 jvalue prim; |
2115 // It would be nice to add java/lang/Boolean::TRUE here |
2114 prim.z = 1; |
2116 // to indicate that this backtrace has a hidden top frame. |
2115 PauseNoSafepointVerifier pnsv(&_nsv); |
2117 // But this code is used before TRUE is allocated. |
2116 _has_hidden_top_frame = java_lang_boxing_object::create(T_BOOLEAN, &prim, CHECK); |
2118 // Therefor let's just use an arbitrary legal oop |
|
2119 // available right here. We only test for != null |
|
2120 // anyways. _methods is a short[]. |
|
2121 assert(_methods != NULL, "we need a legal oop"); |
|
2122 _has_hidden_top_frame = _methods; |
2117 _head->obj_at_put(trace_hidden_offset, _has_hidden_top_frame); |
2123 _head->obj_at_put(trace_hidden_offset, _has_hidden_top_frame); |
2118 } |
2124 } |
2119 } |
2125 } |
2120 |
2126 |
2121 }; |
2127 }; |