hotspot/src/share/vm/runtime/java.cpp
changeset 46271 979ebd346ecf
parent 42650 1f304d0c888b
child 46293 9a88f7fe04b5
equal deleted inserted replaced
46270:2e7898927798 46271:979ebd346ecf
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    97        - ((*a)->invocation_count() + (*a)->compiled_invocation_count());
    97        - ((*a)->invocation_count() + (*a)->compiled_invocation_count());
    98 }
    98 }
    99 
    99 
   100 void collect_profiled_methods(Method* m) {
   100 void collect_profiled_methods(Method* m) {
   101   Thread* thread = Thread::current();
   101   Thread* thread = Thread::current();
   102   // This HandleMark prevents a huge amount of handles from being added
       
   103   // to the metadata_handles() array on the thread.
       
   104   HandleMark hm(thread);
       
   105   methodHandle mh(thread, m);
   102   methodHandle mh(thread, m);
   106   if ((m->method_data() != NULL) &&
   103   if ((m->method_data() != NULL) &&
   107       (PrintMethodData || CompilerOracle::should_print(mh))) {
   104       (PrintMethodData || CompilerOracle::should_print(mh))) {
   108     collected_profiled_methods->push(m);
   105     collected_profiled_methods->push(m);
   109   }
   106   }