mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 08:34:30 +02:00
6918185: Remove unused code for lost card-marking optimization in BacktraceBuilder
Removed dead code Reviewed-by: ysr, coleenp, dholmes
This commit is contained in:
parent
9ca97e4c78
commit
c0d64ac595
1 changed files with 1 additions and 28 deletions
|
@ -1258,7 +1258,6 @@ class BacktraceBuilder: public StackObj {
|
||||||
objArrayOop _methods;
|
objArrayOop _methods;
|
||||||
typeArrayOop _bcis;
|
typeArrayOop _bcis;
|
||||||
int _index;
|
int _index;
|
||||||
bool _dirty;
|
|
||||||
No_Safepoint_Verifier _nsv;
|
No_Safepoint_Verifier _nsv;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -1272,37 +1271,13 @@ class BacktraceBuilder: public StackObj {
|
||||||
};
|
};
|
||||||
|
|
||||||
// constructor for new backtrace
|
// constructor for new backtrace
|
||||||
BacktraceBuilder(TRAPS): _methods(NULL), _bcis(NULL), _head(NULL), _dirty(false) {
|
BacktraceBuilder(TRAPS): _methods(NULL), _bcis(NULL), _head(NULL) {
|
||||||
expand(CHECK);
|
expand(CHECK);
|
||||||
_backtrace = _head;
|
_backtrace = _head;
|
||||||
_index = 0;
|
_index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void flush() {
|
|
||||||
// The following appears to have been an optimization to save from
|
|
||||||
// doing a barrier for each individual store into the _methods array,
|
|
||||||
// but rather to do it for the entire array after the series of writes.
|
|
||||||
// That optimization seems to have been lost when compressed oops was
|
|
||||||
// implemented. However, the extra card-marks below was left in place,
|
|
||||||
// but is now redundant because the individual stores into the
|
|
||||||
// _methods array already execute the barrier code. CR 6918185 has
|
|
||||||
// been filed so the original code may be restored by deferring the
|
|
||||||
// barriers until after the entire sequence of stores, thus re-enabling
|
|
||||||
// the intent of the original optimization. In the meantime the redundant
|
|
||||||
// card mark below is now disabled.
|
|
||||||
if (_dirty && _methods != NULL) {
|
|
||||||
#if 0
|
|
||||||
BarrierSet* bs = Universe::heap()->barrier_set();
|
|
||||||
assert(bs->has_write_ref_array_opt(), "Barrier set must have ref array opt");
|
|
||||||
bs->write_ref_array((HeapWord*)_methods->base(), _methods->length());
|
|
||||||
#endif
|
|
||||||
_dirty = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void expand(TRAPS) {
|
void expand(TRAPS) {
|
||||||
flush();
|
|
||||||
|
|
||||||
objArrayHandle old_head(THREAD, _head);
|
objArrayHandle old_head(THREAD, _head);
|
||||||
Pause_No_Safepoint_Verifier pnsv(&_nsv);
|
Pause_No_Safepoint_Verifier pnsv(&_nsv);
|
||||||
|
|
||||||
|
@ -1328,7 +1303,6 @@ class BacktraceBuilder: public StackObj {
|
||||||
}
|
}
|
||||||
|
|
||||||
oop backtrace() {
|
oop backtrace() {
|
||||||
flush();
|
|
||||||
return _backtrace();
|
return _backtrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1342,7 +1316,6 @@ class BacktraceBuilder: public StackObj {
|
||||||
_methods->obj_at_put(_index, method);
|
_methods->obj_at_put(_index, method);
|
||||||
_bcis->ushort_at_put(_index, bci);
|
_bcis->ushort_at_put(_index, bci);
|
||||||
_index++;
|
_index++;
|
||||||
_dirty = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
methodOop current_method() {
|
methodOop current_method() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue