< prev index next >

src/share/vm/oops/methodData.hpp

Print this page




2321 public:
2322   static int header_size() {
2323     return sizeof(MethodData)/wordSize;
2324   }
2325 
2326   // Compute the size of a MethodData* before it is created.
2327   static int compute_allocation_size_in_bytes(const methodHandle& method);
2328   static int compute_allocation_size_in_words(const methodHandle& method);
2329   static int compute_extra_data_count(int data_size, int empty_bc_count, bool needs_speculative_traps);
2330 
2331   // Determine if a given bytecode can have profile information.
2332   static bool bytecode_has_profile(Bytecodes::Code code) {
2333     return bytecode_cell_count(code) != no_profile_data;
2334   }
2335 
2336   // reset into original state
2337   void init();
2338 
2339   // My size
2340   int size_in_bytes() const { return _size; }
2341   int size() const    { return align_metadata_size(align_size_up(_size, BytesPerWord)/BytesPerWord); }
2342 #if INCLUDE_SERVICES
2343   void collect_statistics(KlassSizeStats *sz) const;
2344 #endif
2345 
2346   int      creation_mileage() const  { return _creation_mileage; }
2347   void set_creation_mileage(int x)   { _creation_mileage = x; }
2348 
2349   int invocation_count() {
2350     if (invocation_counter()->carry()) {
2351       return InvocationCounter::count_limit;
2352     }
2353     return invocation_counter()->count();
2354   }
2355   int backedge_count() {
2356     if (backedge_counter()->carry()) {
2357       return InvocationCounter::count_limit;
2358     }
2359     return backedge_counter()->count();
2360   }
2361 




2321 public:
2322   static int header_size() {
2323     return sizeof(MethodData)/wordSize;
2324   }
2325 
2326   // Compute the size of a MethodData* before it is created.
2327   static int compute_allocation_size_in_bytes(const methodHandle& method);
2328   static int compute_allocation_size_in_words(const methodHandle& method);
2329   static int compute_extra_data_count(int data_size, int empty_bc_count, bool needs_speculative_traps);
2330 
2331   // Determine if a given bytecode can have profile information.
2332   static bool bytecode_has_profile(Bytecodes::Code code) {
2333     return bytecode_cell_count(code) != no_profile_data;
2334   }
2335 
2336   // reset into original state
2337   void init();
2338 
2339   // My size
2340   int size_in_bytes() const { return _size; }
2341   int size() const    { return align_metadata_size(align_up(_size, BytesPerWord)/BytesPerWord); }
2342 #if INCLUDE_SERVICES
2343   void collect_statistics(KlassSizeStats *sz) const;
2344 #endif
2345 
2346   int      creation_mileage() const  { return _creation_mileage; }
2347   void set_creation_mileage(int x)   { _creation_mileage = x; }
2348 
2349   int invocation_count() {
2350     if (invocation_counter()->carry()) {
2351       return InvocationCounter::count_limit;
2352     }
2353     return invocation_counter()->count();
2354   }
2355   int backedge_count() {
2356     if (backedge_counter()->carry()) {
2357       return InvocationCounter::count_limit;
2358     }
2359     return backedge_counter()->count();
2360   }
2361 


< prev index next >