Mercurial > hg > truffle
comparison src/share/vm/oops/methodData.hpp @ 20804:7848fc12602b
Merge with jdk8u40-b25
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Tue, 07 Apr 2015 14:58:49 +0200 |
parents | 99e5d0a7600e 600c44255e5f |
children | a04dfbf81bc4 |
comparison
equal
deleted
inserted
replaced
20184:84105dcdb05b | 20804:7848fc12602b |
---|---|
540 protected: | 540 protected: |
541 enum { | 541 enum { |
542 // null_seen: | 542 // null_seen: |
543 // saw a null operand (cast/aastore/instanceof) | 543 // saw a null operand (cast/aastore/instanceof) |
544 null_seen_flag = DataLayout::first_flag + 0 | 544 null_seen_flag = DataLayout::first_flag + 0 |
545 | |
545 #ifdef GRAAL | 546 #ifdef GRAAL |
546 // bytecode threw any exception | 547 // bytecode threw any exception |
547 , exception_seen_flag = null_seen_flag + 1 | 548 , exception_seen_flag = null_seen_flag + 1 |
548 #endif | 549 #endif |
549 }; | 550 }; |
566 | 567 |
567 // The null_seen flag bit is specially known to the interpreter. | 568 // The null_seen flag bit is specially known to the interpreter. |
568 // Consulting it allows the compiler to avoid setting up null_check traps. | 569 // Consulting it allows the compiler to avoid setting up null_check traps. |
569 bool null_seen() { return flag_at(null_seen_flag); } | 570 bool null_seen() { return flag_at(null_seen_flag); } |
570 void set_null_seen() { set_flag_at(null_seen_flag); } | 571 void set_null_seen() { set_flag_at(null_seen_flag); } |
572 | |
571 #ifdef GRAAL | 573 #ifdef GRAAL |
572 // true if an exception was thrown at the specific BCI | 574 // true if an exception was thrown at the specific BCI |
573 bool exception_seen() { return flag_at(exception_seen_flag); } | 575 bool exception_seen() { return flag_at(exception_seen_flag); } |
574 void set_exception_seen() { set_flag_at(exception_seen_flag); } | 576 void set_exception_seen() { set_flag_at(exception_seen_flag); } |
575 #endif | 577 #endif |
2161 bool is_methodData() const volatile { return true; } | 2163 bool is_methodData() const volatile { return true; } |
2162 void initialize(); | 2164 void initialize(); |
2163 | 2165 |
2164 // Whole-method sticky bits and flags | 2166 // Whole-method sticky bits and flags |
2165 enum { | 2167 enum { |
2166 _trap_hist_limit = 19 GRAAL_ONLY(+5), // decoupled from Deoptimization::Reason_LIMIT | 2168 _trap_hist_limit = 20 GRAAL_ONLY(+5), // decoupled from Deoptimization::Reason_LIMIT |
2167 _trap_hist_mask = max_jubyte, | 2169 _trap_hist_mask = max_jubyte, |
2168 _extra_data_count = 4 // extra DataLayout headers, for trap history | 2170 _extra_data_count = 4 // extra DataLayout headers, for trap history |
2169 }; // Public flag values | 2171 }; // Public flag values |
2170 private: | 2172 private: |
2171 uint _nof_decompiles; // count of all nmethod removals | 2173 uint _nof_decompiles; // count of all nmethod removals |
2172 uint _nof_overflow_recompiles; // recompile count, excluding recomp. bits | 2174 uint _nof_overflow_recompiles; // recompile count, excluding recomp. bits |
2173 uint _nof_overflow_traps; // trap count, excluding _trap_hist | 2175 uint _nof_overflow_traps; // trap count, excluding _trap_hist |
2174 union { | 2176 union { |
2175 intptr_t _align; | 2177 intptr_t _align; |
2176 u1 _array[GRAAL_ONLY(2*)_trap_hist_limit]; | 2178 u1 _array[_trap_hist_limit]; |
2177 } _trap_hist; | 2179 } _trap_hist; |
2178 | 2180 |
2179 // Support for interprocedural escape analysis, from Thomas Kotzmann. | 2181 // Support for interprocedural escape analysis, from Thomas Kotzmann. |
2180 intx _eflags; // flags on escape information | 2182 intx _eflags; // flags on escape information |
2181 intx _arg_local; // bit set of non-escaping arguments | 2183 intx _arg_local; // bit set of non-escaping arguments |
2202 | 2204 |
2203 // Number of loops and blocks is computed when compiling the first | 2205 // Number of loops and blocks is computed when compiling the first |
2204 // time with C1. It is used to determine if method is trivial. | 2206 // time with C1. It is used to determine if method is trivial. |
2205 short _num_loops; | 2207 short _num_loops; |
2206 short _num_blocks; | 2208 short _num_blocks; |
2207 // Highest compile level this method has ever seen. | |
2208 u1 _highest_comp_level; | |
2209 // Same for OSR level | |
2210 u1 _highest_osr_comp_level; | |
2211 // Does this method contain anything worth profiling? | 2209 // Does this method contain anything worth profiling? |
2212 bool _would_profile; | 2210 enum WouldProfile {unknown, no_profile, profile}; |
2211 WouldProfile _would_profile; | |
2213 | 2212 |
2214 #ifdef GRAAL | 2213 #ifdef GRAAL |
2215 // Support for HotSpotMethodData.setCompiledGraphSize(int) | 2214 // Support for HotSpotMethodData.setCompiledGraphSize(int) |
2216 int _graal_node_count; | 2215 int _graal_node_count; |
2217 #endif | 2216 #endif |
2381 static int rtm_state_offset_in_bytes() { | 2380 static int rtm_state_offset_in_bytes() { |
2382 return offset_of(MethodData, _rtm_state); | 2381 return offset_of(MethodData, _rtm_state); |
2383 } | 2382 } |
2384 #endif | 2383 #endif |
2385 | 2384 |
2386 void set_would_profile(bool p) { _would_profile = p; } | 2385 void set_would_profile(bool p) { _would_profile = p ? profile : no_profile; } |
2387 bool would_profile() const { return _would_profile; } | 2386 bool would_profile() const { return _would_profile != no_profile; } |
2388 | |
2389 int highest_comp_level() const { return _highest_comp_level; } | |
2390 void set_highest_comp_level(int level) { _highest_comp_level = level; } | |
2391 int highest_osr_comp_level() const { return _highest_osr_comp_level; } | |
2392 void set_highest_osr_comp_level(int level) { _highest_osr_comp_level = level; } | |
2393 | 2387 |
2394 int num_loops() const { return _num_loops; } | 2388 int num_loops() const { return _num_loops; } |
2395 void set_num_loops(int n) { _num_loops = n; } | 2389 void set_num_loops(int n) { _num_loops = n; } |
2396 int num_blocks() const { return _num_blocks; } | 2390 int num_blocks() const { return _num_blocks; } |
2397 void set_num_blocks(int n) { _num_blocks = n; } | 2391 void set_num_blocks(int n) { _num_blocks = n; } |