diff src/share/vm/oops/methodData.hpp @ 9760:c76b43ed5089

Added infrastructure for recording invoked methods in the profiling information.
author Christian Haeubl <haeubl@ssw.jku.at>
date Fri, 17 May 2013 15:38:22 +0200
parents 89e4d67fdd2a
children 57e5211846f9
line wrap: on
line diff
--- a/src/share/vm/oops/methodData.hpp	Fri May 17 09:28:41 2013 +0200
+++ b/src/share/vm/oops/methodData.hpp	Fri May 17 15:38:22 2013 +0200
@@ -759,13 +759,28 @@
   static int static_cell_count() {
     // At this point we could add more profile state, e.g., for arguments.
     // But for now it's the same size as the base record type.
-    return ReceiverTypeData::static_cell_count();
+    return ReceiverTypeData::static_cell_count() GRAAL_ONLY(+ (uint) MethodProfileWidth * receiver_type_row_cell_count);
   }
 
   virtual int cell_count() {
     return static_cell_count();
   }
 
+#ifdef GRAAL
+  static ByteSize method_offset(uint row) {
+    return cell_offset(method_cell_index(row));
+  }
+  static ByteSize method_count_offset(uint row) {
+    return cell_offset(method_count_cell_index(row));
+  }
+  static int method_cell_index(uint row) {
+    return receiver0_offset + (row + TypeProfileWidth) * receiver_type_row_cell_count;
+  }
+  static int method_count_cell_index(uint row) {
+    return count0_offset + (row + TypeProfileWidth) * receiver_type_row_cell_count;
+  }
+#endif
+
   // Direct accessors
   static ByteSize virtual_call_data_size() {
     return cell_offset(static_cell_count());