< prev index next >

src/hotspot/share/oops/methodData.hpp

Print this page




 541   friend class JVMCIVMStructs;
 542 protected:
 543   enum {
 544     count_off,
 545     counter_cell_count
 546   };
 547 public:
 548   CounterData(DataLayout* layout) : BitData(layout) {}
 549 
 550   virtual bool is_CounterData() const { return true; }
 551 
 552   static int static_cell_count() {
 553     return counter_cell_count;
 554   }
 555 
 556   virtual int cell_count() const {
 557     return static_cell_count();
 558   }
 559 
 560   // Direct accessor
 561   int count() const {
 562     intptr_t raw_data = intptr_at(count_off);
 563     if (raw_data > max_jint) {
 564       raw_data = max_jint;
 565     } else if (raw_data < min_jint) {
 566       raw_data = min_jint;
 567     }
 568     return int(raw_data);
 569   }
 570 
 571   // Code generation support
 572   static ByteSize count_offset() {
 573     return cell_offset(count_off);
 574   }
 575   static ByteSize counter_data_size() {
 576     return cell_offset(counter_cell_count);
 577   }
 578 
 579   void set_count(int count) {
 580     set_int_at(count_off, count);
 581   }
 582 
 583   void print_data_on(outputStream* st, const char* extra = NULL) const;
 584 };
 585 
 586 // JumpData
 587 //
 588 // A JumpData is used to access profiling information for a direct
 589 // branch.  It is a counter, used for counting the number of branches,
 590 // plus a data displacement, used for realigning the data pointer to
 591 // the corresponding target bci.
 592 class JumpData : public ProfileData {
 593   friend class VMStructs;
 594   friend class JVMCIVMStructs;
 595 protected:
 596   enum {
 597     taken_off_set,
 598     displacement_off_set,
 599     jump_cell_count
 600   };


2375     } else {
2376       return _trap_hist_mask + (++_nof_overflow_traps);
2377     }
2378   }
2379 
2380   uint overflow_trap_count() const {
2381     return _nof_overflow_traps;
2382   }
2383   uint overflow_recompile_count() const {
2384     return _nof_overflow_recompiles;
2385   }
2386   void inc_overflow_recompile_count() {
2387     _nof_overflow_recompiles += 1;
2388   }
2389   uint decompile_count() const {
2390     return _nof_decompiles;
2391   }
2392   void inc_decompile_count() {
2393     _nof_decompiles += 1;
2394     if (decompile_count() > (uint)PerMethodRecompilationCutoff) {
2395       method()->set_not_compilable("decompile_count > PerMethodRecompilationCutoff", CompLevel_full_optimization);
2396     }
2397   }
2398   uint tenure_traps() const {
2399     return _tenure_traps;
2400   }
2401   void inc_tenure_traps() {
2402     _tenure_traps += 1;
2403   }
2404 
2405   // Return pointer to area dedicated to parameters in MDO
2406   ParametersTypeData* parameters_type_data() const {
2407     assert(_parameters_type_data_di != parameters_uninitialized, "called too early");
2408     return _parameters_type_data_di != no_parameters ? data_layout_at(_parameters_type_data_di)->data_in()->as_ParametersTypeData() : NULL;
2409   }
2410 
2411   int parameters_type_data_di() const {
2412     assert(_parameters_type_data_di != parameters_uninitialized && _parameters_type_data_di != no_parameters, "no args type data");
2413     return _parameters_type_data_di;
2414   }
2415 




 541   friend class JVMCIVMStructs;
 542 protected:
 543   enum {
 544     count_off,
 545     counter_cell_count
 546   };
 547 public:
 548   CounterData(DataLayout* layout) : BitData(layout) {}
 549 
 550   virtual bool is_CounterData() const { return true; }
 551 
 552   static int static_cell_count() {
 553     return counter_cell_count;
 554   }
 555 
 556   virtual int cell_count() const {
 557     return static_cell_count();
 558   }
 559 
 560   // Direct accessor
 561   uint count() const {
 562     return uint_at(count_off);






 563   }
 564 
 565   // Code generation support
 566   static ByteSize count_offset() {
 567     return cell_offset(count_off);
 568   }
 569   static ByteSize counter_data_size() {
 570     return cell_offset(counter_cell_count);
 571   }
 572 
 573   void set_count(uint count) {
 574     set_uint_at(count_off, count);
 575   }
 576 
 577   void print_data_on(outputStream* st, const char* extra = NULL) const;
 578 };
 579 
 580 // JumpData
 581 //
 582 // A JumpData is used to access profiling information for a direct
 583 // branch.  It is a counter, used for counting the number of branches,
 584 // plus a data displacement, used for realigning the data pointer to
 585 // the corresponding target bci.
 586 class JumpData : public ProfileData {
 587   friend class VMStructs;
 588   friend class JVMCIVMStructs;
 589 protected:
 590   enum {
 591     taken_off_set,
 592     displacement_off_set,
 593     jump_cell_count
 594   };


2369     } else {
2370       return _trap_hist_mask + (++_nof_overflow_traps);
2371     }
2372   }
2373 
2374   uint overflow_trap_count() const {
2375     return _nof_overflow_traps;
2376   }
2377   uint overflow_recompile_count() const {
2378     return _nof_overflow_recompiles;
2379   }
2380   void inc_overflow_recompile_count() {
2381     _nof_overflow_recompiles += 1;
2382   }
2383   uint decompile_count() const {
2384     return _nof_decompiles;
2385   }
2386   void inc_decompile_count() {
2387     _nof_decompiles += 1;
2388     if (decompile_count() > (uint)PerMethodRecompilationCutoff) {
2389       method()->set_not_compilable(CompLevel_full_optimization, true, "decompile_count > PerMethodRecompilationCutoff");
2390     }
2391   }
2392   uint tenure_traps() const {
2393     return _tenure_traps;
2394   }
2395   void inc_tenure_traps() {
2396     _tenure_traps += 1;
2397   }
2398 
2399   // Return pointer to area dedicated to parameters in MDO
2400   ParametersTypeData* parameters_type_data() const {
2401     assert(_parameters_type_data_di != parameters_uninitialized, "called too early");
2402     return _parameters_type_data_di != no_parameters ? data_layout_at(_parameters_type_data_di)->data_in()->as_ParametersTypeData() : NULL;
2403   }
2404 
2405   int parameters_type_data_di() const {
2406     assert(_parameters_type_data_di != parameters_uninitialized && _parameters_type_data_di != no_parameters, "no args type data");
2407     return _parameters_type_data_di;
2408   }
2409 


< prev index next >