src/share/vm/oops/method.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-comp Sdiff src/share/vm/oops

src/share/vm/oops/method.cpp

Print this page




 378   // MethodData*s from being created.
 379   MutexLocker ml(MethodData_lock, THREAD);
 380   if (method->method_data() == NULL) {
 381     ClassLoaderData* loader_data = method->method_holder()->class_loader_data();
 382     MethodData* method_data = MethodData::allocate(loader_data, method, CHECK);
 383     method->set_method_data(method_data);
 384     if (PrintMethodData && (Verbose || WizardMode)) {
 385       ResourceMark rm(THREAD);
 386       tty->print("build_interpreter_method_data for ");
 387       method->print_name(tty);
 388       tty->cr();
 389       // At the end of the run, the MDO, full of data, will be dumped.
 390     }
 391   }
 392 }
 393 
 394 MethodCounters* Method::build_method_counters(Method* m, TRAPS) {
 395   methodHandle mh(m);
 396   ClassLoaderData* loader_data = mh->method_holder()->class_loader_data();
 397   MethodCounters* counters = MethodCounters::allocate(loader_data, CHECK_NULL);
 398   if (mh->method_counters() == NULL) {
 399     mh->set_method_counters(counters);
 400   } else {
 401     MetadataFactory::free_metadata(loader_data, counters);
 402   }
 403   return mh->method_counters();
 404 }
 405 
 406 void Method::cleanup_inline_caches() {
 407   // The current system doesn't use inline caches in the interpreter
 408   // => nothing to do (keep this method around for future use)
 409 }
 410 
 411 
 412 int Method::extra_stack_words() {
 413   // not an inline function, to avoid a header dependency on Interpreter
 414   return extra_stack_entries() * Interpreter::stackElementSize;
 415 }
 416 
 417 
 418 void Method::compute_size_of_parameters(Thread *thread) {
 419   ArgumentSizeComputer asc(signature());
 420   set_size_of_parameters(asc.size() + (is_static() ? 0 : 1));




 378   // MethodData*s from being created.
 379   MutexLocker ml(MethodData_lock, THREAD);
 380   if (method->method_data() == NULL) {
 381     ClassLoaderData* loader_data = method->method_holder()->class_loader_data();
 382     MethodData* method_data = MethodData::allocate(loader_data, method, CHECK);
 383     method->set_method_data(method_data);
 384     if (PrintMethodData && (Verbose || WizardMode)) {
 385       ResourceMark rm(THREAD);
 386       tty->print("build_interpreter_method_data for ");
 387       method->print_name(tty);
 388       tty->cr();
 389       // At the end of the run, the MDO, full of data, will be dumped.
 390     }
 391   }
 392 }
 393 
 394 MethodCounters* Method::build_method_counters(Method* m, TRAPS) {
 395   methodHandle mh(m);
 396   ClassLoaderData* loader_data = mh->method_holder()->class_loader_data();
 397   MethodCounters* counters = MethodCounters::allocate(loader_data, CHECK_NULL);
 398   if (!mh->init_method_counters(counters)) {


 399     MetadataFactory::free_metadata(loader_data, counters);
 400   }
 401   return mh->method_counters();
 402 }
 403 
 404 void Method::cleanup_inline_caches() {
 405   // The current system doesn't use inline caches in the interpreter
 406   // => nothing to do (keep this method around for future use)
 407 }
 408 
 409 
 410 int Method::extra_stack_words() {
 411   // not an inline function, to avoid a header dependency on Interpreter
 412   return extra_stack_entries() * Interpreter::stackElementSize;
 413 }
 414 
 415 
 416 void Method::compute_size_of_parameters(Thread *thread) {
 417   ArgumentSizeComputer asc(signature());
 418   set_size_of_parameters(asc.size() + (is_static() ? 0 : 1));


src/share/vm/oops/method.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File