diff src/share/vm/oops/methodData.hpp @ 22572:c3b49e9d0f48

HotSpotMethodData shouldn't hardcode constants
author Tom Rodriguez <tom.rodriguez@oracle.com>
date Thu, 17 Sep 2015 12:10:17 -0700
parents c28cb37b2e1d
children 5796b1867b68
line wrap: on
line diff
--- a/src/share/vm/oops/methodData.hpp	Thu Sep 17 13:52:48 2015 +0200
+++ b/src/share/vm/oops/methodData.hpp	Thu Sep 17 12:10:17 2015 -0700
@@ -537,6 +537,7 @@
 //
 // A BitData holds a flag or two in its header.
 class BitData : public ProfileData {
+  friend class VMStructs;
 protected:
   enum {
     // null_seen:
@@ -608,6 +609,7 @@
 //
 // A CounterData corresponds to a simple counter.
 class CounterData : public BitData {
+  friend class VMStructs;
 protected:
   enum {
     count_off,
@@ -674,6 +676,7 @@
 // plus a data displacement, used for realigning the data pointer to
 // the corresponding target bci.
 class JumpData : public ProfileData {
+  friend class VMStructs;
 protected:
   enum {
     taken_off_set,
@@ -1177,6 +1180,7 @@
 // that the check is reached, and a series of (Klass*, count) pairs
 // which are used to store a type profile for the receiver of the check.
 class ReceiverTypeData : public CounterData {
+  friend class VMStructs;
 protected:
   enum {
 #if INCLUDE_JVMCI
@@ -1353,6 +1357,7 @@
 // A VirtualCallData is used to access profiling information about a
 // virtual call.  For now, it has nothing more than a ReceiverTypeData.
 class VirtualCallData : public ReceiverTypeData {
+  friend class VMStructs;
 public:
   VirtualCallData(DataLayout* layout) : ReceiverTypeData(layout) {
     assert(layout->tag() == DataLayout::virtual_call_data_tag ||
@@ -1455,6 +1460,7 @@
 // a virtual call for which we collect type information about
 // arguments and return value.
 class VirtualCallTypeData : public VirtualCallData {
+  friend class VMStructs;
 private:
   // entries for arguments if any
   TypeStackSlotEntries _args;
@@ -1684,6 +1690,7 @@
 // It consists of taken and not_taken counts as well as a data displacement
 // for the taken case.
 class BranchData : public JumpData {
+  friend class VMStructs;
 protected:
   enum {
     not_taken_off_set = jump_cell_count,
@@ -1762,6 +1769,7 @@
 // not have a statically known size.  It consists of an array length
 // and an array start.
 class ArrayData : public ProfileData {
+  friend class VMStructs;
 protected:
   friend class DataLayout;
 
@@ -1839,6 +1847,7 @@
 // of (count, displacement) pairs, which count the number of times each
 // case was taken and specify the data displacment for each branch target.
 class MultiBranchData : public ArrayData {
+  friend class VMStructs;
 protected:
   enum {
     default_count_off_set,