src/share/vm/oops/methodData.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/oops

src/share/vm/oops/methodData.hpp

Print this page




2079   // We need those because in tiered a method can be concurrently
2080   // executed at different levels.
2081   InvocationCounter _invocation_counter;
2082   // Same for backedges.
2083   InvocationCounter _backedge_counter;
2084   // Counter values at the time profiling started.
2085   int               _invocation_counter_start;
2086   int               _backedge_counter_start;
2087   uint              _tenure_traps;
2088 
2089 #if INCLUDE_RTM_OPT
2090   // State of RTM code generation during compilation of the method
2091   int               _rtm_state;
2092 #endif
2093 
2094   // Number of loops and blocks is computed when compiling the first
2095   // time with C1. It is used to determine if method is trivial.
2096   short             _num_loops;
2097   short             _num_blocks;
2098   // Does this method contain anything worth profiling?

2099   bool              _would_profile;
2100 
2101   // Size of _data array in bytes.  (Excludes header and extra_data fields.)
2102   int _data_size;
2103 
2104   // data index for the area dedicated to parameters. -1 if no
2105   // parameter profiling.
2106   enum { no_parameters = -2, parameters_uninitialized = -1 };
2107   int _parameters_type_data_di;
2108   int parameters_size_in_bytes() const {
2109     ParametersTypeData* param = parameters_type_data();
2110     return param == NULL ? 0 : param->size_in_bytes();
2111   }
2112 
2113   // Beginning of the data entries
2114   intptr_t _data[1];
2115 
2116   // Helper for size computation
2117   static int compute_data_size(BytecodeStream* stream);
2118   static int bytecode_cell_count(Bytecodes::Code code);


2253 
2254   InvocationCounter* invocation_counter()     { return &_invocation_counter; }
2255   InvocationCounter* backedge_counter()       { return &_backedge_counter;   }
2256 
2257 #if INCLUDE_RTM_OPT
2258   int rtm_state() const {
2259     return _rtm_state;
2260   }
2261   void set_rtm_state(RTMState rstate) {
2262     _rtm_state = (int)rstate;
2263   }
2264   void atomic_set_rtm_state(RTMState rstate) {
2265     Atomic::store((int)rstate, &_rtm_state);
2266   }
2267 
2268   static int rtm_state_offset_in_bytes() {
2269     return offset_of(MethodData, _rtm_state);
2270   }
2271 #endif
2272 
2273   void set_would_profile(bool p)              { _would_profile = p;    }
2274   bool would_profile() const                  { return _would_profile; }
2275 
2276   int num_loops() const                       { return _num_loops;  }
2277   void set_num_loops(int n)                   { _num_loops = n;     }
2278   int num_blocks() const                      { return _num_blocks; }
2279   void set_num_blocks(int n)                  { _num_blocks = n;    }
2280 
2281   bool is_mature() const;  // consult mileage and ProfileMaturityPercentage
2282   static int mileage_of(Method* m);
2283 
2284   // Support for interprocedural escape analysis, from Thomas Kotzmann.
2285   enum EscapeFlag {
2286     estimated    = 1 << 0,
2287     return_local = 1 << 1,
2288     return_allocated = 1 << 2,
2289     allocated_escapes = 1 << 3,
2290     unknown_modified = 1 << 4
2291   };
2292 
2293   intx eflags()                                  { return _eflags; }
2294   intx arg_local()                               { return _arg_local; }




2079   // We need those because in tiered a method can be concurrently
2080   // executed at different levels.
2081   InvocationCounter _invocation_counter;
2082   // Same for backedges.
2083   InvocationCounter _backedge_counter;
2084   // Counter values at the time profiling started.
2085   int               _invocation_counter_start;
2086   int               _backedge_counter_start;
2087   uint              _tenure_traps;
2088 
2089 #if INCLUDE_RTM_OPT
2090   // State of RTM code generation during compilation of the method
2091   int               _rtm_state;
2092 #endif
2093 
2094   // Number of loops and blocks is computed when compiling the first
2095   // time with C1. It is used to determine if method is trivial.
2096   short             _num_loops;
2097   short             _num_blocks;
2098   // Does this method contain anything worth profiling?
2099   enum              {unknown, no_profile, profile};
2100   bool              _would_profile;
2101 
2102   // Size of _data array in bytes.  (Excludes header and extra_data fields.)
2103   int _data_size;
2104 
2105   // data index for the area dedicated to parameters. -1 if no
2106   // parameter profiling.
2107   enum { no_parameters = -2, parameters_uninitialized = -1 };
2108   int _parameters_type_data_di;
2109   int parameters_size_in_bytes() const {
2110     ParametersTypeData* param = parameters_type_data();
2111     return param == NULL ? 0 : param->size_in_bytes();
2112   }
2113 
2114   // Beginning of the data entries
2115   intptr_t _data[1];
2116 
2117   // Helper for size computation
2118   static int compute_data_size(BytecodeStream* stream);
2119   static int bytecode_cell_count(Bytecodes::Code code);


2254 
2255   InvocationCounter* invocation_counter()     { return &_invocation_counter; }
2256   InvocationCounter* backedge_counter()       { return &_backedge_counter;   }
2257 
2258 #if INCLUDE_RTM_OPT
2259   int rtm_state() const {
2260     return _rtm_state;
2261   }
2262   void set_rtm_state(RTMState rstate) {
2263     _rtm_state = (int)rstate;
2264   }
2265   void atomic_set_rtm_state(RTMState rstate) {
2266     Atomic::store((int)rstate, &_rtm_state);
2267   }
2268 
2269   static int rtm_state_offset_in_bytes() {
2270     return offset_of(MethodData, _rtm_state);
2271   }
2272 #endif
2273 
2274   void set_would_profile(bool p)              { _would_profile = p ? profile : no_profile; }
2275   bool would_profile() const                  { return _would_profile != no_profile; }
2276 
2277   int num_loops() const                       { return _num_loops;  }
2278   void set_num_loops(int n)                   { _num_loops = n;     }
2279   int num_blocks() const                      { return _num_blocks; }
2280   void set_num_blocks(int n)                  { _num_blocks = n;    }
2281 
2282   bool is_mature() const;  // consult mileage and ProfileMaturityPercentage
2283   static int mileage_of(Method* m);
2284 
2285   // Support for interprocedural escape analysis, from Thomas Kotzmann.
2286   enum EscapeFlag {
2287     estimated    = 1 << 0,
2288     return_local = 1 << 1,
2289     return_allocated = 1 << 2,
2290     allocated_escapes = 1 << 3,
2291     unknown_modified = 1 << 4
2292   };
2293 
2294   intx eflags()                                  { return _eflags; }
2295   intx arg_local()                               { return _arg_local; }


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