8187280: Remove unused methods from StubQueue

Reviewed-by: kvn, kbarrett
This commit is contained in:
Volker Simonis 2017-11-22 17:57:27 +01:00
parent cd0c6d0fae
commit cc3aabe580
2 changed files with 0 additions and 38 deletions

View file

@ -78,7 +78,6 @@ StubQueue::StubQueue(StubInterface* stub_interface, int buffer_size,
_queue_begin = 0; _queue_begin = 0;
_queue_end = 0; _queue_end = 0;
_number_of_stubs = 0; _number_of_stubs = 0;
register_queue(this);
} }
@ -205,36 +204,6 @@ void StubQueue::remove_all(){
} }
enum { StubQueueLimit = 10 }; // there are only a few in the world
static StubQueue* registered_stub_queues[StubQueueLimit];
void StubQueue::register_queue(StubQueue* sq) {
for (int i = 0; i < StubQueueLimit; i++) {
if (registered_stub_queues[i] == NULL) {
registered_stub_queues[i] = sq;
return;
}
}
ShouldNotReachHere();
}
void StubQueue::queues_do(void f(StubQueue* sq)) {
for (int i = 0; i < StubQueueLimit; i++) {
if (registered_stub_queues[i] != NULL) {
f(registered_stub_queues[i]);
}
}
}
void StubQueue::stubs_do(void f(Stub* s)) {
debug_only(verify();)
MutexLockerEx lock(_mutex);
for (Stub* s = first(); s != NULL; s = next(s)) f(s);
}
void StubQueue::verify() { void StubQueue::verify() {
// verify only if initialized // verify only if initialized
if (_stub_buffer == NULL) return; if (_stub_buffer == NULL) return;

View file

@ -172,8 +172,6 @@ class StubQueue: public CHeapObj<mtCode> {
void stub_verify(Stub* s) { _stub_interface->verify(s); } void stub_verify(Stub* s) { _stub_interface->verify(s); }
void stub_print(Stub* s) { _stub_interface->print(s); } void stub_print(Stub* s) { _stub_interface->print(s); }
static void register_queue(StubQueue*);
public: public:
StubQueue(StubInterface* stub_interface, int buffer_size, Mutex* lock, StubQueue(StubInterface* stub_interface, int buffer_size, Mutex* lock,
const char* name); const char* name);
@ -204,8 +202,6 @@ class StubQueue: public CHeapObj<mtCode> {
void deallocate_unused_tail(); // deallocate the unused tail of the underlying CodeBlob void deallocate_unused_tail(); // deallocate the unused tail of the underlying CodeBlob
// only used from TemplateInterpreter::initialize() // only used from TemplateInterpreter::initialize()
// Iteration // Iteration
static void queues_do(void f(StubQueue* s)); // call f with each StubQueue
void stubs_do(void f(Stub* s)); // call f with all stubs
Stub* first() const { return number_of_stubs() > 0 ? stub_at(_queue_begin) : NULL; } Stub* first() const { return number_of_stubs() > 0 ? stub_at(_queue_begin) : NULL; }
Stub* next(Stub* s) const { int i = index_of(s) + stub_size(s); Stub* next(Stub* s) const { int i = index_of(s) + stub_size(s);
// Only wrap around in the non-contiguous case (see stubss.cpp) // Only wrap around in the non-contiguous case (see stubss.cpp)
@ -213,9 +209,6 @@ class StubQueue: public CHeapObj<mtCode> {
return (i == _queue_end) ? NULL : stub_at(i); return (i == _queue_end) ? NULL : stub_at(i);
} }
address stub_code_begin(Stub* s) const { return _stub_interface->code_begin(s); }
address stub_code_end(Stub* s) const { return _stub_interface->code_end(s); }
// Debugging/printing // Debugging/printing
void verify(); // verifies the stub queue void verify(); // verifies the stub queue
void print(); // prints information about the stub queue void print(); // prints information about the stub queue