hotspot/src/share/vm/oops/methodCounters.hpp
changeset 46727 6e4a84748e2c
parent 46625 edefffab74e2
child 46746 ea379ebb9447
equal deleted inserted replaced
46726:7801367e3cc9 46727:6e4a84748e2c
     1 /*
     1 /*
     2  * Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 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.
    66   jlong             _prev_time;                   // Previous time the rate was acquired
    66   jlong             _prev_time;                   // Previous time the rate was acquired
    67   u1                _highest_comp_level;          // Highest compile level this method has ever seen.
    67   u1                _highest_comp_level;          // Highest compile level this method has ever seen.
    68   u1                _highest_osr_comp_level;      // Same for OSR level
    68   u1                _highest_osr_comp_level;      // Same for OSR level
    69 #endif
    69 #endif
    70 
    70 
    71   MethodCounters(methodHandle mh) :
    71   MethodCounters(const methodHandle& mh) :
    72 #if INCLUDE_AOT
    72 #if INCLUDE_AOT
    73                                     _method(mh()),
    73                                     _method(mh()),
    74 #endif
    74 #endif
    75                                     _nmethod_age(INT_MAX)
    75                                     _nmethod_age(INT_MAX)
    76 #ifdef TIERED
    76 #ifdef TIERED
   110   }
   110   }
   111 
   111 
   112  public:
   112  public:
   113   virtual bool is_methodCounters() const volatile { return true; }
   113   virtual bool is_methodCounters() const volatile { return true; }
   114 
   114 
   115   static MethodCounters* allocate(methodHandle mh, TRAPS);
   115   static MethodCounters* allocate(const methodHandle& mh, TRAPS);
   116 
   116 
   117   void deallocate_contents(ClassLoaderData* loader_data) {}
   117   void deallocate_contents(ClassLoaderData* loader_data) {}
   118 
   118 
   119   AOT_ONLY(Method* method() const { return _method; })
   119   AOT_ONLY(Method* method() const { return _method; })
   120 
   120