< prev index next >


Print this page
rev 47590 : [mq]: heap8
rev 47591 : [mq]: heap10a
rev 47592 : [mq]: heap14_rebased

@@ -143,10 +143,19 @@
   // Allocate from the current thread's TLAB, with broken-out slow path.
   inline static HeapWord* allocate_from_tlab(Klass* klass, Thread* thread, size_t size);
   static HeapWord* allocate_from_tlab_slow(Klass* klass, Thread* thread, size_t size);
+  // Sample the allocation via HeapMonitoring.
+  // overflowed_words represents the number of HeapWords that went passed the
+  // sampling boundary. This is used to fix the next sampling rate.
+  static void sample_allocation(Thread* thread, HeapWord* obj, size_t size,
+                                size_t overflowed_words = 0);
+  // Try to allocate the object we want to sample in this tlab, returns NULL if
+  // fails to allocate.
+  static HeapWord* allocate_sampled_object(Thread* thread, size_t size);
   // Allocate an uninitialized block of the given size, or returns NULL if
   // this is impossible.
   inline static HeapWord* common_mem_allocate_noinit(Klass* klass, size_t size, TRAPS);
   // Like allocate_init, but the block returned by a successful allocation
< prev index next >