Mercurial > hg > truffle
comparison src/share/vm/oops/methodData.hpp @ 7154:5d0bb7d52783
changes to support Graal co-existing with the other HotSpot compiler(s) and being used for explicit compilation requests and code installation via the Graal API
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 12 Dec 2012 21:36:40 +0100 |
parents | e522a00b91aa |
children | 5fc51c1ecdeb |
comparison
equal
deleted
inserted
replaced
7153:c421c19b7bf8 | 7154:5d0bb7d52783 |
---|---|
623 // that the check is reached, and a series of (Klass*, count) pairs | 623 // that the check is reached, and a series of (Klass*, count) pairs |
624 // which are used to store a type profile for the receiver of the check. | 624 // which are used to store a type profile for the receiver of the check. |
625 class ReceiverTypeData : public CounterData { | 625 class ReceiverTypeData : public CounterData { |
626 protected: | 626 protected: |
627 enum { | 627 enum { |
628 #ifdef GRAAL | |
629 // Graal is interested in knowing the percentage of type checks | |
630 // involving a type not explicitly in the profile | |
631 nonprofiled_receiver_count_off_set = counter_cell_count, | |
632 receiver0_offset, | |
633 #else | |
628 receiver0_offset = counter_cell_count, | 634 receiver0_offset = counter_cell_count, |
635 #endif | |
629 count0_offset, | 636 count0_offset, |
630 receiver_type_row_cell_count = (count0_offset + 1) - receiver0_offset | 637 receiver_type_row_cell_count = (count0_offset + 1) - receiver0_offset |
631 }; | 638 }; |
632 | 639 |
633 public: | 640 public: |
637 } | 644 } |
638 | 645 |
639 virtual bool is_ReceiverTypeData() { return true; } | 646 virtual bool is_ReceiverTypeData() { return true; } |
640 | 647 |
641 static int static_cell_count() { | 648 static int static_cell_count() { |
642 return counter_cell_count + (uint) TypeProfileWidth * receiver_type_row_cell_count; | 649 return counter_cell_count + (uint) TypeProfileWidth * receiver_type_row_cell_count GRAAL_ONLY(+ 1); |
643 } | 650 } |
644 | 651 |
645 virtual int cell_count() { | 652 virtual int cell_count() { |
646 return static_cell_count(); | 653 return static_cell_count(); |
647 } | 654 } |
708 return cell_offset(receiver_cell_index(row)); | 715 return cell_offset(receiver_cell_index(row)); |
709 } | 716 } |
710 static ByteSize receiver_count_offset(uint row) { | 717 static ByteSize receiver_count_offset(uint row) { |
711 return cell_offset(receiver_count_cell_index(row)); | 718 return cell_offset(receiver_count_cell_index(row)); |
712 } | 719 } |
720 #ifdef GRAAL | |
721 static ByteSize nonprofiled_receiver_count_offset() { | |
722 return cell_offset(nonprofiled_receiver_count_off_set); | |
723 } | |
724 #endif | |
713 static ByteSize receiver_type_data_size() { | 725 static ByteSize receiver_type_data_size() { |
714 return cell_offset(static_cell_count()); | 726 return cell_offset(static_cell_count()); |
715 } | 727 } |
716 | 728 |
717 // GC support | 729 // GC support |
1166 | 1178 |
1167 bool is_methodData() const volatile { return true; } | 1179 bool is_methodData() const volatile { return true; } |
1168 | 1180 |
1169 // Whole-method sticky bits and flags | 1181 // Whole-method sticky bits and flags |
1170 enum { | 1182 enum { |
1171 #ifdef GRAAL | |
1172 _trap_hist_limit = 13, // decoupled from Deoptimization::Reason_LIMIT | |
1173 #else | |
1174 _trap_hist_limit = 17, // decoupled from Deoptimization::Reason_LIMIT | 1183 _trap_hist_limit = 17, // decoupled from Deoptimization::Reason_LIMIT |
1175 #endif | |
1176 _trap_hist_mask = max_jubyte, | 1184 _trap_hist_mask = max_jubyte, |
1177 _extra_data_count = 4 // extra DataLayout headers, for trap history | 1185 _extra_data_count = 4 // extra DataLayout headers, for trap history |
1178 }; // Public flag values | 1186 }; // Public flag values |
1179 private: | 1187 private: |
1180 uint _nof_decompiles; // count of all nmethod removals | 1188 uint _nof_decompiles; // count of all nmethod removals |