예제 #1
0
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));
  }
}
예제 #2
0
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));
  }
}
예제 #3
0
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));
  }
}
예제 #4
0
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));
  }
}
예제 #5
0
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));
  }
}
예제 #6
0
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));
  }
}