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

src/share/vm/oops/methodData.hpp

Print this page




2321   int data_size() const {
2322     return _data_size;
2323   }
2324 
2325   // Accessors
2326   Method* method() const { return _method; }
2327 
2328   // Get the data at an arbitrary (sort of) data index.
2329   ProfileData* data_at(int data_index) const;
2330 
2331   // Walk through the data in order.
2332   ProfileData* first_data() const { return data_at(first_di()); }
2333   ProfileData* next_data(ProfileData* current) const;
2334   bool is_valid(ProfileData* current) const { return current != NULL; }
2335 
2336   // Convert a dp (data pointer) to a di (data index).
2337   int dp_to_di(address dp) const {
2338     return dp - ((address)_data);
2339   }
2340 
2341   address di_to_dp(int di) {
2342     return (address)data_layout_at(di);
2343   }
2344 
2345   // bci to di/dp conversion.
2346   address bci_to_dp(int bci);
2347   int bci_to_di(int bci) {
2348     return dp_to_di(bci_to_dp(bci));
2349   }
2350 
2351   // Get the data at an arbitrary bci, or NULL if there is none.
2352   ProfileData* bci_to_data(int bci);
2353 
2354   // Same, but try to create an extra_data record if one is needed:
2355   ProfileData* allocate_bci_to_data(int bci, Method* m) {
2356     ProfileData* data = NULL;
2357     // If m not NULL, try to allocate a SpeculativeTrapData entry
2358     if (m == NULL) {
2359       data = bci_to_data(bci);
2360     }
2361     if (data != NULL) {
2362       return data;
2363     }
2364     data = bci_to_extra_data(bci, m, true);




2321   int data_size() const {
2322     return _data_size;
2323   }
2324 
2325   // Accessors
2326   Method* method() const { return _method; }
2327 
2328   // Get the data at an arbitrary (sort of) data index.
2329   ProfileData* data_at(int data_index) const;
2330 
2331   // Walk through the data in order.
2332   ProfileData* first_data() const { return data_at(first_di()); }
2333   ProfileData* next_data(ProfileData* current) const;
2334   bool is_valid(ProfileData* current) const { return current != NULL; }
2335 
2336   // Convert a dp (data pointer) to a di (data index).
2337   int dp_to_di(address dp) const {
2338     return dp - ((address)_data);
2339   }
2340 




2341   // bci to di/dp conversion.
2342   address bci_to_dp(int bci);
2343   int bci_to_di(int bci) {
2344     return dp_to_di(bci_to_dp(bci));
2345   }
2346 
2347   // Get the data at an arbitrary bci, or NULL if there is none.
2348   ProfileData* bci_to_data(int bci);
2349 
2350   // Same, but try to create an extra_data record if one is needed:
2351   ProfileData* allocate_bci_to_data(int bci, Method* m) {
2352     ProfileData* data = NULL;
2353     // If m not NULL, try to allocate a SpeculativeTrapData entry
2354     if (m == NULL) {
2355       data = bci_to_data(bci);
2356     }
2357     if (data != NULL) {
2358       return data;
2359     }
2360     data = bci_to_extra_data(bci, m, true);


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