예제 #1
0
void MemProfiler::do_trace() {
  // Calculate thread local sizes
  size_t handles_memory_usage    = VMThread::vm_thread()->handle_area()->size_in_bytes();
  size_t resource_memory_usage   = VMThread::vm_thread()->resource_area()->size_in_bytes();
  JavaThread *cur = Threads::first();
  while (cur != NULL) {
    handles_memory_usage  += cur->handle_area()->size_in_bytes();
    resource_memory_usage += cur->resource_area()->size_in_bytes();
    cur = cur->next();
  }

  // Print trace line in log
  fprintf(_log_fp, "%6.1f,%5d,%5d," UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) ",",
          os::elapsedTime(),
          Threads::number_of_threads(),
          SystemDictionary::number_of_classes(),
          Universe::heap()->used() / K,
          Universe::heap()->capacity() / K);

  fprintf(_log_fp, UINTX_FORMAT_W(6) ",", CodeCache::capacity() / K);

  fprintf(_log_fp, UINTX_FORMAT_W(6) "," UINTX_FORMAT_W(6) ",%6ld\n",
          handles_memory_usage / K,
          resource_memory_usage / K,
          OopMapCache::memory_usage() / K);
  fflush(_log_fp);
}
예제 #2
0
파일: javaCalls.cpp 프로젝트: lewurm/graal
void JavaCalls::call_helper(JavaValue* result, methodHandle* m, JavaCallArguments* args, TRAPS) {
  methodHandle method = *m;
  JavaThread* thread = (JavaThread*)THREAD;
  assert(thread->is_Java_thread(), "must be called by a java thread");
  assert(method.not_null(), "must have a method to call");
  assert(!SafepointSynchronize::is_at_safepoint(), "call to Java code during VM operation");
  assert(!thread->handle_area()->no_handle_mark_active(), "cannot call out to Java here");


  CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();)
예제 #3
0
파일: javaCalls.cpp 프로젝트: lmsf/jdk9-dev
void JavaCalls::call_helper(JavaValue* result, const methodHandle& method, JavaCallArguments* args, TRAPS) {
  // During dumping, Java execution environment is not fully initialized. Also, Java execution
  // may cause undesirable side-effects in the class metadata.
  assert(!DumpSharedSpaces, "must not execute Java bytecodes when dumping");

  JavaThread* thread = (JavaThread*)THREAD;
  assert(thread->is_Java_thread(), "must be called by a java thread");
  assert(method.not_null(), "must have a method to call");
  assert(!SafepointSynchronize::is_at_safepoint(), "call to Java code during VM operation");
  assert(!thread->handle_area()->no_handle_mark_active(), "cannot call out to Java here");


  CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();)