1859 |
1859 |
1860 bool is_methodData() const volatile { return true; } |
1860 bool is_methodData() const volatile { return true; } |
1861 |
1861 |
1862 // Whole-method sticky bits and flags |
1862 // Whole-method sticky bits and flags |
1863 enum { |
1863 enum { |
1864 _trap_hist_limit = 18, // decoupled from Deoptimization::Reason_LIMIT |
1864 _trap_hist_limit = 19, // decoupled from Deoptimization::Reason_LIMIT |
1865 _trap_hist_mask = max_jubyte, |
1865 _trap_hist_mask = max_jubyte, |
1866 _extra_data_count = 4 // extra DataLayout headers, for trap history |
1866 _extra_data_count = 4 // extra DataLayout headers, for trap history |
1867 }; // Public flag values |
1867 }; // Public flag values |
1868 private: |
1868 private: |
1869 uint _nof_decompiles; // count of all nmethod removals |
1869 uint _nof_decompiles; // count of all nmethod removals |
1890 // Same for backedges. |
1890 // Same for backedges. |
1891 InvocationCounter _backedge_counter; |
1891 InvocationCounter _backedge_counter; |
1892 // Counter values at the time profiling started. |
1892 // Counter values at the time profiling started. |
1893 int _invocation_counter_start; |
1893 int _invocation_counter_start; |
1894 int _backedge_counter_start; |
1894 int _backedge_counter_start; |
|
1895 |
|
1896 #if INCLUDE_RTM_OPT |
|
1897 // State of RTM code generation during compilation of the method |
|
1898 int _rtm_state; |
|
1899 #endif |
|
1900 |
1895 // Number of loops and blocks is computed when compiling the first |
1901 // Number of loops and blocks is computed when compiling the first |
1896 // time with C1. It is used to determine if method is trivial. |
1902 // time with C1. It is used to determine if method is trivial. |
1897 short _num_loops; |
1903 short _num_loops; |
1898 short _num_blocks; |
1904 short _num_blocks; |
1899 // Highest compile level this method has ever seen. |
1905 // Highest compile level this method has ever seen. |
2052 _backedge_counter_start = backedge_count(); |
2058 _backedge_counter_start = backedge_count(); |
2053 } |
2059 } |
2054 |
2060 |
2055 InvocationCounter* invocation_counter() { return &_invocation_counter; } |
2061 InvocationCounter* invocation_counter() { return &_invocation_counter; } |
2056 InvocationCounter* backedge_counter() { return &_backedge_counter; } |
2062 InvocationCounter* backedge_counter() { return &_backedge_counter; } |
|
2063 |
|
2064 #if INCLUDE_RTM_OPT |
|
2065 int rtm_state() const { |
|
2066 return _rtm_state; |
|
2067 } |
|
2068 void set_rtm_state(RTMState rstate) { |
|
2069 _rtm_state = (int)rstate; |
|
2070 } |
|
2071 void atomic_set_rtm_state(RTMState rstate) { |
|
2072 Atomic::store((int)rstate, &_rtm_state); |
|
2073 } |
|
2074 |
|
2075 static int rtm_state_offset_in_bytes() { |
|
2076 return offset_of(MethodData, _rtm_state); |
|
2077 } |
|
2078 #endif |
2057 |
2079 |
2058 void set_would_profile(bool p) { _would_profile = p; } |
2080 void set_would_profile(bool p) { _would_profile = p; } |
2059 bool would_profile() const { return _would_profile; } |
2081 bool would_profile() const { return _would_profile; } |
2060 |
2082 |
2061 int highest_comp_level() const { return _highest_comp_level; } |
2083 int highest_comp_level() const { return _highest_comp_level; } |