void ThreadProfiler::unknown_compiled_update(const CodeBlob* cb, TickPosition where) { int index = 0; if (!table[index]) { table[index] = new (this) unknown_compiledNode(cb, where); } else { ProfilerNode* prev = table[index]; for(ProfilerNode* node = prev; node; node = node->next()) { if (node->unknown_compiled_match(cb)) { node->update(where); return; } prev = node; } prev->set_next(new (this) unknown_compiledNode(cb, where)); } }
void ThreadProfiler::runtime_stub_update(const CodeBlob* stub, const char* name, TickPosition where) { int index = 0; if (!table[index]) { table[index] = new (this) runtimeStubNode(stub, name, where); } else { ProfilerNode* prev = table[index]; for(ProfilerNode* node = prev; node; node = node->next()) { if (node->runtimeStub_match(stub, name)) { node->update(where); return; } prev = node; } prev->set_next(new (this) runtimeStubNode(stub, name, where)); } }
void ThreadProfiler::adapter_update(TickPosition where) { int index = 0; if (!table[index]) { table[index] = new (this) adapterNode(where); } else { ProfilerNode* prev = table[index]; for(ProfilerNode* node = prev; node; node = node->next()) { if (node->adapter_match()) { node->update(where); return; } prev = node; } prev->set_next(new (this) adapterNode(where)); } }
void ThreadProfiler::stub_update(Method* method, const char* name, TickPosition where) { int index = entry(ProfilerNode::hash(method)); if (!table[index]) { table[index] = new (this) stubNode(method, name, where); } else { ProfilerNode* prev = table[index]; for(ProfilerNode* node = prev; node; node = node->next()) { if (node->stub_match(method, name)) { node->update(where); return; } prev = node; } prev->set_next(new (this) stubNode(method, name, where)); } }
void ThreadProfiler::compiled_update(methodOop method, TickPosition where) { int index = entry(ProfilerNode::hash(method)); if (!table[index]) { table[index] = new (this) compiledNode(method, where); } else { ProfilerNode* prev = table[index]; for(ProfilerNode* node = prev; node; node = node->next()) { if (node->compiled_match(method)) { node->update(where); return; } prev = node; } prev->set_next(new (this) compiledNode(method, where)); } }
void ThreadProfiler::vm_update(const char* name, TickPosition where) { int index = entry(vmNode::hash(name)); assert(index >= 0, "Must be positive"); // Note that we call strdup below since the symbol may be resource allocated if (!table[index]) { table[index] = new (this) vmNode(os::strdup(name), where); } else { ProfilerNode* prev = table[index]; for(ProfilerNode* node = prev; node; node = node->next()) { if (((vmNode *)node)->vm_match(name)) { node->update(where); return; } prev = node; } prev->set_next(new (this) vmNode(os::strdup(name), where)); } }