src/share/vm/oops/methodData.hpp

changeset 6518
62c54fcc0a35
parent 6485
da862781b584
parent 6429
606acabe7b5c
child 6643
ce9fd31ffd14
equal deleted inserted replaced
6517:a433eb716ce1 6518:62c54fcc0a35
118 branch_data_tag, 118 branch_data_tag,
119 multi_branch_data_tag, 119 multi_branch_data_tag,
120 arg_info_data_tag, 120 arg_info_data_tag,
121 call_type_data_tag, 121 call_type_data_tag,
122 virtual_call_type_data_tag, 122 virtual_call_type_data_tag,
123 parameters_type_data_tag 123 parameters_type_data_tag,
124 speculative_trap_data_tag
124 }; 125 };
125 126
126 enum { 127 enum {
127 // The _struct._flags word is formatted as [trap_state:4 | flags:4]. 128 // The _struct._flags word is formatted as [trap_state:4 | flags:4].
128 // The trap state breaks down further as [recompile:1 | reason:3]. 129 // The trap state breaks down further as [recompile:1 | reason:3].
187 } 188 }
188 189
189 void set_header(intptr_t value) { 190 void set_header(intptr_t value) {
190 _header._bits = value; 191 _header._bits = value;
191 } 192 }
192 void release_set_header(intptr_t value) {
193 OrderAccess::release_store_ptr(&_header._bits, value);
194 }
195 intptr_t header() { 193 intptr_t header() {
196 return _header._bits; 194 return _header._bits;
197 } 195 }
198 void set_cell_at(int index, intptr_t value) { 196 void set_cell_at(int index, intptr_t value) {
199 _cells[index] = value; 197 _cells[index] = value;
269 class BranchData; 267 class BranchData;
270 class ArrayData; 268 class ArrayData;
271 class MultiBranchData; 269 class MultiBranchData;
272 class ArgInfoData; 270 class ArgInfoData;
273 class ParametersTypeData; 271 class ParametersTypeData;
272 class SpeculativeTrapData;
274 273
275 // ProfileData 274 // ProfileData
276 // 275 //
277 // A ProfileData object is created to refer to a section of profiling 276 // A ProfileData object is created to refer to a section of profiling
278 // data in a structured way. 277 // data in a structured way.
289 #endif // !PRODUCT 288 #endif // !PRODUCT
290 289
291 // This is a pointer to a section of profiling data. 290 // This is a pointer to a section of profiling data.
292 DataLayout* _data; 291 DataLayout* _data;
293 292
293 char* print_data_on_helper(const MethodData* md) const;
294
294 protected: 295 protected:
295 DataLayout* data() { return _data; } 296 DataLayout* data() { return _data; }
296 const DataLayout* data() const { return _data; } 297 const DataLayout* data() const { return _data; }
297 298
298 enum { 299 enum {
438 virtual bool is_MultiBranchData() const { return false; } 439 virtual bool is_MultiBranchData() const { return false; }
439 virtual bool is_ArgInfoData() const { return false; } 440 virtual bool is_ArgInfoData() const { return false; }
440 virtual bool is_CallTypeData() const { return false; } 441 virtual bool is_CallTypeData() const { return false; }
441 virtual bool is_VirtualCallTypeData()const { return false; } 442 virtual bool is_VirtualCallTypeData()const { return false; }
442 virtual bool is_ParametersTypeData() const { return false; } 443 virtual bool is_ParametersTypeData() const { return false; }
444 virtual bool is_SpeculativeTrapData()const { return false; }
443 445
444 446
445 BitData* as_BitData() const { 447 BitData* as_BitData() const {
446 assert(is_BitData(), "wrong type"); 448 assert(is_BitData(), "wrong type");
447 return is_BitData() ? (BitData*) this : NULL; 449 return is_BitData() ? (BitData*) this : NULL;
491 return is_VirtualCallTypeData() ? (VirtualCallTypeData*)this : NULL; 493 return is_VirtualCallTypeData() ? (VirtualCallTypeData*)this : NULL;
492 } 494 }
493 ParametersTypeData* as_ParametersTypeData() const { 495 ParametersTypeData* as_ParametersTypeData() const {
494 assert(is_ParametersTypeData(), "wrong type"); 496 assert(is_ParametersTypeData(), "wrong type");
495 return is_ParametersTypeData() ? (ParametersTypeData*)this : NULL; 497 return is_ParametersTypeData() ? (ParametersTypeData*)this : NULL;
498 }
499 SpeculativeTrapData* as_SpeculativeTrapData() const {
500 assert(is_SpeculativeTrapData(), "wrong type");
501 return is_SpeculativeTrapData() ? (SpeculativeTrapData*)this : NULL;
496 } 502 }
497 503
498 504
499 // Subclass specific initialization 505 // Subclass specific initialization
500 virtual void post_initialize(BytecodeStream* stream, MethodData* mdo) {} 506 virtual void post_initialize(BytecodeStream* stream, MethodData* mdo) {}
507 // an oop in a ProfileData to the ci equivalent. Generally speaking, 513 // an oop in a ProfileData to the ci equivalent. Generally speaking,
508 // most ProfileData don't require any translation, so we provide the null 514 // most ProfileData don't require any translation, so we provide the null
509 // translation here, and the required translators are in the ci subclasses. 515 // translation here, and the required translators are in the ci subclasses.
510 virtual void translate_from(const ProfileData* data) {} 516 virtual void translate_from(const ProfileData* data) {}
511 517
512 virtual void print_data_on(outputStream* st) const { 518 virtual void print_data_on(outputStream* st, const char* extra = NULL) const {
513 ShouldNotReachHere(); 519 ShouldNotReachHere();
514 } 520 }
515 521
522 void print_data_on(outputStream* st, const MethodData* md) const;
523
516 #ifndef PRODUCT 524 #ifndef PRODUCT
517 void print_shared(outputStream* st, const char* name) const; 525 void print_shared(outputStream* st, const char* name, const char* extra) const;
518 void tab(outputStream* st, bool first = false) const; 526 void tab(outputStream* st, bool first = false) const;
519 #endif 527 #endif
520 }; 528 };
521 529
522 // BitData 530 // BitData
574 return (DataLayout*) (((address)layout) + (ssize_t)BitData::bit_data_size_in_bytes()); 582 return (DataLayout*) (((address)layout) + (ssize_t)BitData::bit_data_size_in_bytes());
575 } 583 }
576 #endif // CC_INTERP 584 #endif // CC_INTERP
577 585
578 #ifndef PRODUCT 586 #ifndef PRODUCT
579 void print_data_on(outputStream* st) const; 587 void print_data_on(outputStream* st, const char* extra = NULL) const;
580 #endif 588 #endif
581 }; 589 };
582 590
583 // CounterData 591 // CounterData
584 // 592 //
637 return (DataLayout*) (((address)layout) + (ssize_t)CounterData::counter_data_size_in_bytes()); 645 return (DataLayout*) (((address)layout) + (ssize_t)CounterData::counter_data_size_in_bytes());
638 } 646 }
639 #endif // CC_INTERP 647 #endif // CC_INTERP
640 648
641 #ifndef PRODUCT 649 #ifndef PRODUCT
642 void print_data_on(outputStream* st) const; 650 void print_data_on(outputStream* st, const char* extra = NULL) const;
643 #endif 651 #endif
644 }; 652 };
645 653
646 // JumpData 654 // JumpData
647 // 655 //
724 732
725 // Specific initialization. 733 // Specific initialization.
726 void post_initialize(BytecodeStream* stream, MethodData* mdo); 734 void post_initialize(BytecodeStream* stream, MethodData* mdo);
727 735
728 #ifndef PRODUCT 736 #ifndef PRODUCT
729 void print_data_on(outputStream* st) const; 737 void print_data_on(outputStream* st, const char* extra = NULL) const;
730 #endif 738 #endif
731 }; 739 };
732 740
733 // Entries in a ProfileData object to record types: it can either be 741 // Entries in a ProfileData object to record types: it can either be
734 // none (no profile), unknown (conflicting profile data) or a klass if 742 // none (no profile), unknown (conflicting profile data) or a klass if
1135 _ret.clean_weak_klass_links(is_alive_closure); 1143 _ret.clean_weak_klass_links(is_alive_closure);
1136 } 1144 }
1137 } 1145 }
1138 1146
1139 #ifndef PRODUCT 1147 #ifndef PRODUCT
1140 virtual void print_data_on(outputStream* st) const; 1148 virtual void print_data_on(outputStream* st, const char* extra = NULL) const;
1141 #endif 1149 #endif
1142 }; 1150 };
1143 1151
1144 // ReceiverTypeData 1152 // ReceiverTypeData
1145 // 1153 //
1280 } 1288 }
1281 #endif // CC_INTERP 1289 #endif // CC_INTERP
1282 1290
1283 #ifndef PRODUCT 1291 #ifndef PRODUCT
1284 void print_receiver_data_on(outputStream* st) const; 1292 void print_receiver_data_on(outputStream* st) const;
1285 void print_data_on(outputStream* st) const; 1293 void print_data_on(outputStream* st, const char* extra = NULL) const;
1286 #endif 1294 #endif
1287 }; 1295 };
1288 1296
1289 // VirtualCallData 1297 // VirtualCallData
1290 // 1298 //
1323 return (DataLayout*) (((address)layout) + (ssize_t)VirtualCallData::virtual_call_data_size_in_bytes()); 1331 return (DataLayout*) (((address)layout) + (ssize_t)VirtualCallData::virtual_call_data_size_in_bytes());
1324 } 1332 }
1325 #endif // CC_INTERP 1333 #endif // CC_INTERP
1326 1334
1327 #ifndef PRODUCT 1335 #ifndef PRODUCT
1328 void print_data_on(outputStream* st) const; 1336 void print_data_on(outputStream* st, const char* extra = NULL) const;
1329 #endif 1337 #endif
1330 }; 1338 };
1331 1339
1332 // VirtualCallTypeData 1340 // VirtualCallTypeData
1333 // 1341 //
1449 _ret.clean_weak_klass_links(is_alive_closure); 1457 _ret.clean_weak_klass_links(is_alive_closure);
1450 } 1458 }
1451 } 1459 }
1452 1460
1453 #ifndef PRODUCT 1461 #ifndef PRODUCT
1454 virtual void print_data_on(outputStream* st) const; 1462 virtual void print_data_on(outputStream* st, const char* extra = NULL) const;
1455 #endif 1463 #endif
1456 }; 1464 };
1457 1465
1458 // RetData 1466 // RetData
1459 // 1467 //
1552 1560
1553 // Specific initialization. 1561 // Specific initialization.
1554 void post_initialize(BytecodeStream* stream, MethodData* mdo); 1562 void post_initialize(BytecodeStream* stream, MethodData* mdo);
1555 1563
1556 #ifndef PRODUCT 1564 #ifndef PRODUCT
1557 void print_data_on(outputStream* st) const; 1565 void print_data_on(outputStream* st, const char* extra = NULL) const;
1558 #endif 1566 #endif
1559 }; 1567 };
1560 1568
1561 // BranchData 1569 // BranchData
1562 // 1570 //
1630 1638
1631 // Specific initialization. 1639 // Specific initialization.
1632 void post_initialize(BytecodeStream* stream, MethodData* mdo); 1640 void post_initialize(BytecodeStream* stream, MethodData* mdo);
1633 1641
1634 #ifndef PRODUCT 1642 #ifndef PRODUCT
1635 void print_data_on(outputStream* st) const; 1643 void print_data_on(outputStream* st, const char* extra = NULL) const;
1636 #endif 1644 #endif
1637 }; 1645 };
1638 1646
1639 // ArrayData 1647 // ArrayData
1640 // 1648 //
1823 1831
1824 // Specific initialization. 1832 // Specific initialization.
1825 void post_initialize(BytecodeStream* stream, MethodData* mdo); 1833 void post_initialize(BytecodeStream* stream, MethodData* mdo);
1826 1834
1827 #ifndef PRODUCT 1835 #ifndef PRODUCT
1828 void print_data_on(outputStream* st) const; 1836 void print_data_on(outputStream* st, const char* extra = NULL) const;
1829 #endif 1837 #endif
1830 }; 1838 };
1831 1839
1832 class ArgInfoData : public ArrayData { 1840 class ArgInfoData : public ArrayData {
1833 1841
1850 void set_arg_modified(int arg, uint val) { 1858 void set_arg_modified(int arg, uint val) {
1851 array_set_int_at(arg, val); 1859 array_set_int_at(arg, val);
1852 } 1860 }
1853 1861
1854 #ifndef PRODUCT 1862 #ifndef PRODUCT
1855 void print_data_on(outputStream* st) const; 1863 void print_data_on(outputStream* st, const char* extra = NULL) const;
1856 #endif 1864 #endif
1857 }; 1865 };
1858 1866
1859 // ParametersTypeData 1867 // ParametersTypeData
1860 // 1868 //
1911 virtual void clean_weak_klass_links(BoolObjectClosure* is_alive_closure) { 1919 virtual void clean_weak_klass_links(BoolObjectClosure* is_alive_closure) {
1912 _parameters.clean_weak_klass_links(is_alive_closure); 1920 _parameters.clean_weak_klass_links(is_alive_closure);
1913 } 1921 }
1914 1922
1915 #ifndef PRODUCT 1923 #ifndef PRODUCT
1916 virtual void print_data_on(outputStream* st) const; 1924 virtual void print_data_on(outputStream* st, const char* extra = NULL) const;
1917 #endif 1925 #endif
1918 1926
1919 static ByteSize stack_slot_offset(int i) { 1927 static ByteSize stack_slot_offset(int i) {
1920 return cell_offset(stack_slot_local_offset(i)); 1928 return cell_offset(stack_slot_local_offset(i));
1921 } 1929 }
1922 1930
1923 static ByteSize type_offset(int i) { 1931 static ByteSize type_offset(int i) {
1924 return cell_offset(type_local_offset(i)); 1932 return cell_offset(type_local_offset(i));
1925 } 1933 }
1934 };
1935
1936 // SpeculativeTrapData
1937 //
1938 // A SpeculativeTrapData is used to record traps due to type
1939 // speculation. It records the root of the compilation: that type
1940 // speculation is wrong in the context of one compilation (for
1941 // method1) doesn't mean it's wrong in the context of another one (for
1942 // method2). Type speculation could have more/different data in the
1943 // context of the compilation of method2 and it's worthwhile to try an
1944 // optimization that failed for compilation of method1 in the context
1945 // of compilation of method2.
1946 // Space for SpeculativeTrapData entries is allocated from the extra
1947 // data space in the MDO. If we run out of space, the trap data for
1948 // the ProfileData at that bci is updated.
1949 class SpeculativeTrapData : public ProfileData {
1950 protected:
1951 enum {
1952 method_offset,
1953 speculative_trap_cell_count
1954 };
1955 public:
1956 SpeculativeTrapData(DataLayout* layout) : ProfileData(layout) {
1957 assert(layout->tag() == DataLayout::speculative_trap_data_tag, "wrong type");
1958 }
1959
1960 virtual bool is_SpeculativeTrapData() const { return true; }
1961
1962 static int static_cell_count() {
1963 return speculative_trap_cell_count;
1964 }
1965
1966 virtual int cell_count() const {
1967 return static_cell_count();
1968 }
1969
1970 // Direct accessor
1971 Method* method() const {
1972 return (Method*)intptr_at(method_offset);
1973 }
1974
1975 void set_method(Method* m) {
1976 set_intptr_at(method_offset, (intptr_t)m);
1977 }
1978
1979 #ifndef PRODUCT
1980 virtual void print_data_on(outputStream* st, const char* extra = NULL) const;
1981 #endif
1926 }; 1982 };
1927 1983
1928 // MethodData* 1984 // MethodData*
1929 // 1985 //
1930 // A MethodData* holds information which has been collected about 1986 // A MethodData* holds information which has been collected about
1983 int _size; 2039 int _size;
1984 2040
1985 // Cached hint for bci_to_dp and bci_to_data 2041 // Cached hint for bci_to_dp and bci_to_data
1986 int _hint_di; 2042 int _hint_di;
1987 2043
2044 Mutex _extra_data_lock;
2045
1988 MethodData(methodHandle method, int size, TRAPS); 2046 MethodData(methodHandle method, int size, TRAPS);
1989 public: 2047 public:
1990 static MethodData* allocate(ClassLoaderData* loader_data, methodHandle method, TRAPS); 2048 static MethodData* allocate(ClassLoaderData* loader_data, methodHandle method, TRAPS);
1991 MethodData() {}; // For ciMethodData 2049 MethodData() : _extra_data_lock(Monitor::leaf, "MDO extra data lock") {}; // For ciMethodData
1992 2050
1993 bool is_methodData() const volatile { return true; } 2051 bool is_methodData() const volatile { return true; }
1994 2052
1995 // Whole-method sticky bits and flags 2053 // Whole-method sticky bits and flags
1996 enum { 2054 enum {
1997 _trap_hist_limit = 17, // decoupled from Deoptimization::Reason_LIMIT 2055 _trap_hist_limit = 19, // decoupled from Deoptimization::Reason_LIMIT
1998 _trap_hist_mask = max_jubyte, 2056 _trap_hist_mask = max_jubyte,
1999 _extra_data_count = 4 // extra DataLayout headers, for trap history 2057 _extra_data_count = 4 // extra DataLayout headers, for trap history
2000 }; // Public flag values 2058 }; // Public flag values
2001 private: 2059 private:
2002 uint _nof_decompiles; // count of all nmethod removals 2060 uint _nof_decompiles; // count of all nmethod removals
2023 // Same for backedges. 2081 // Same for backedges.
2024 InvocationCounter _backedge_counter; 2082 InvocationCounter _backedge_counter;
2025 // Counter values at the time profiling started. 2083 // Counter values at the time profiling started.
2026 int _invocation_counter_start; 2084 int _invocation_counter_start;
2027 int _backedge_counter_start; 2085 int _backedge_counter_start;
2086
2087 #if INCLUDE_RTM_OPT
2088 // State of RTM code generation during compilation of the method
2089 int _rtm_state;
2090 #endif
2091
2028 // Number of loops and blocks is computed when compiling the first 2092 // Number of loops and blocks is computed when compiling the first
2029 // time with C1. It is used to determine if method is trivial. 2093 // time with C1. It is used to determine if method is trivial.
2030 short _num_loops; 2094 short _num_loops;
2031 short _num_blocks; 2095 short _num_blocks;
2032 // Highest compile level this method has ever seen. 2096 // Highest compile level this method has ever seen.
2047 intptr_t _data[1]; 2111 intptr_t _data[1];
2048 2112
2049 // Helper for size computation 2113 // Helper for size computation
2050 static int compute_data_size(BytecodeStream* stream); 2114 static int compute_data_size(BytecodeStream* stream);
2051 static int bytecode_cell_count(Bytecodes::Code code); 2115 static int bytecode_cell_count(Bytecodes::Code code);
2116 static bool is_speculative_trap_bytecode(Bytecodes::Code code);
2052 enum { no_profile_data = -1, variable_cell_count = -2 }; 2117 enum { no_profile_data = -1, variable_cell_count = -2 };
2053 2118
2054 // Helper for initialization 2119 // Helper for initialization
2055 DataLayout* data_layout_at(int data_index) const { 2120 DataLayout* data_layout_at(int data_index) const {
2056 assert(data_index % sizeof(intptr_t) == 0, "unaligned"); 2121 assert(data_index % sizeof(intptr_t) == 0, "unaligned");
2090 } 2155 }
2091 2156
2092 // What is the index of the first data entry? 2157 // What is the index of the first data entry?
2093 int first_di() const { return 0; } 2158 int first_di() const { return 0; }
2094 2159
2160 ProfileData* bci_to_extra_data_helper(int bci, Method* m, DataLayout*& dp, bool concurrent);
2095 // Find or create an extra ProfileData: 2161 // Find or create an extra ProfileData:
2096 ProfileData* bci_to_extra_data(int bci, bool create_if_missing); 2162 ProfileData* bci_to_extra_data(int bci, Method* m, bool create_if_missing);
2097 2163
2098 // return the argument info cell 2164 // return the argument info cell
2099 ArgInfoData *arg_info(); 2165 ArgInfoData *arg_info();
2100 2166
2101 enum { 2167 enum {
2114 static bool profile_return_for_invoke(methodHandle m, int bci); 2180 static bool profile_return_for_invoke(methodHandle m, int bci);
2115 static int profile_parameters_flag(); 2181 static int profile_parameters_flag();
2116 static bool profile_parameters_jsr292_only(); 2182 static bool profile_parameters_jsr292_only();
2117 static bool profile_all_parameters(); 2183 static bool profile_all_parameters();
2118 2184
2185 void clean_extra_data(BoolObjectClosure* is_alive);
2186 void clean_extra_data_helper(DataLayout* dp, int shift, bool reset = false);
2187 void verify_extra_data_clean(BoolObjectClosure* is_alive);
2188
2119 public: 2189 public:
2120 static int header_size() { 2190 static int header_size() {
2121 return sizeof(MethodData)/wordSize; 2191 return sizeof(MethodData)/wordSize;
2122 } 2192 }
2123 2193
2124 // Compute the size of a MethodData* before it is created. 2194 // Compute the size of a MethodData* before it is created.
2125 static int compute_allocation_size_in_bytes(methodHandle method); 2195 static int compute_allocation_size_in_bytes(methodHandle method);
2126 static int compute_allocation_size_in_words(methodHandle method); 2196 static int compute_allocation_size_in_words(methodHandle method);
2127 static int compute_extra_data_count(int data_size, int empty_bc_count); 2197 static int compute_extra_data_count(int data_size, int empty_bc_count, bool needs_speculative_traps);
2128 2198
2129 // Determine if a given bytecode can have profile information. 2199 // Determine if a given bytecode can have profile information.
2130 static bool bytecode_has_profile(Bytecodes::Code code) { 2200 static bool bytecode_has_profile(Bytecodes::Code code) {
2131 return bytecode_cell_count(code) != no_profile_data; 2201 return bytecode_cell_count(code) != no_profile_data;
2132 } 2202 }
2179 _backedge_counter_start = backedge_count(); 2249 _backedge_counter_start = backedge_count();
2180 } 2250 }
2181 2251
2182 InvocationCounter* invocation_counter() { return &_invocation_counter; } 2252 InvocationCounter* invocation_counter() { return &_invocation_counter; }
2183 InvocationCounter* backedge_counter() { return &_backedge_counter; } 2253 InvocationCounter* backedge_counter() { return &_backedge_counter; }
2254
2255 #if INCLUDE_RTM_OPT
2256 int rtm_state() const {
2257 return _rtm_state;
2258 }
2259 void set_rtm_state(RTMState rstate) {
2260 _rtm_state = (int)rstate;
2261 }
2262 void atomic_set_rtm_state(RTMState rstate) {
2263 Atomic::store((int)rstate, &_rtm_state);
2264 }
2265
2266 static int rtm_state_offset_in_bytes() {
2267 return offset_of(MethodData, _rtm_state);
2268 }
2269 #endif
2184 2270
2185 void set_would_profile(bool p) { _would_profile = p; } 2271 void set_would_profile(bool p) { _would_profile = p; }
2186 bool would_profile() const { return _would_profile; } 2272 bool would_profile() const { return _would_profile; }
2187 2273
2188 int highest_comp_level() const { return _highest_comp_level; } 2274 int highest_comp_level() const { return _highest_comp_level; }
2263 2349
2264 // Get the data at an arbitrary bci, or NULL if there is none. 2350 // Get the data at an arbitrary bci, or NULL if there is none.
2265 ProfileData* bci_to_data(int bci); 2351 ProfileData* bci_to_data(int bci);
2266 2352
2267 // Same, but try to create an extra_data record if one is needed: 2353 // Same, but try to create an extra_data record if one is needed:
2268 ProfileData* allocate_bci_to_data(int bci) { 2354 ProfileData* allocate_bci_to_data(int bci, Method* m) {
2269 ProfileData* data = bci_to_data(bci); 2355 ProfileData* data = NULL;
2270 return (data != NULL) ? data : bci_to_extra_data(bci, true); 2356 // If m not NULL, try to allocate a SpeculativeTrapData entry
2357 if (m == NULL) {
2358 data = bci_to_data(bci);
2359 }
2360 if (data != NULL) {
2361 return data;
2362 }
2363 data = bci_to_extra_data(bci, m, true);
2364 if (data != NULL) {
2365 return data;
2366 }
2367 // If SpeculativeTrapData allocation fails try to allocate a
2368 // regular entry
2369 data = bci_to_data(bci);
2370 if (data != NULL) {
2371 return data;
2372 }
2373 return bci_to_extra_data(bci, NULL, true);
2271 } 2374 }
2272 2375
2273 // Add a handful of extra data records, for trap tracking. 2376 // Add a handful of extra data records, for trap tracking.
2274 DataLayout* extra_data_base() const { return limit_data_position(); } 2377 DataLayout* extra_data_base() const { return limit_data_position(); }
2275 DataLayout* extra_data_limit() const { return (DataLayout*)((address)this + size_in_bytes()); } 2378 DataLayout* extra_data_limit() const { return (DataLayout*)((address)this + size_in_bytes()); }
2276 int extra_data_size() const { return (address)extra_data_limit() 2379 int extra_data_size() const { return (address)extra_data_limit()
2277 - (address)extra_data_base(); } 2380 - (address)extra_data_base(); }
2278 static DataLayout* next_extra(DataLayout* dp) { return (DataLayout*)((address)dp + in_bytes(DataLayout::cell_offset(0))); } 2381 static DataLayout* next_extra(DataLayout* dp);
2279 2382
2280 // Return (uint)-1 for overflow. 2383 // Return (uint)-1 for overflow.
2281 uint trap_count(int reason) const { 2384 uint trap_count(int reason) const {
2282 assert((uint)reason < _trap_hist_limit, "oob"); 2385 assert((uint)reason < _trap_hist_limit, "oob");
2283 return (int)((_trap_hist._array[reason]+1) & _trap_hist_mask) - 1; 2386 return (int)((_trap_hist._array[reason]+1) & _trap_hist_mask) - 1;
2373 static bool profile_parameters_for_method(methodHandle m); 2476 static bool profile_parameters_for_method(methodHandle m);
2374 static bool profile_arguments(); 2477 static bool profile_arguments();
2375 static bool profile_return(); 2478 static bool profile_return();
2376 static bool profile_parameters(); 2479 static bool profile_parameters();
2377 static bool profile_return_jsr292_only(); 2480 static bool profile_return_jsr292_only();
2481
2482 void clean_method_data(BoolObjectClosure* is_alive);
2378 }; 2483 };
2379 2484
2380 #endif // SHARE_VM_OOPS_METHODDATAOOP_HPP 2485 #endif // SHARE_VM_OOPS_METHODDATAOOP_HPP

mercurial