src/hotspot/share/runtime/sharedRuntime.cpp
changeset 48961 120b61d50f85
parent 48147 1b57d99567ed
child 49056 91ada5977172
--- a/src/hotspot/share/runtime/sharedRuntime.cpp	Mon Feb 12 16:08:33 2018 -0800
+++ b/src/hotspot/share/runtime/sharedRuntime.cpp	Wed Jan 10 22:48:27 2018 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -3169,3 +3169,16 @@
   }
   return activation;
 }
+
+void SharedRuntime::on_slowpath_allocation_exit(JavaThread* thread) {
+  // After any safepoint, just before going back to compiled code,
+  // we inform the GC that we will be doing initializing writes to
+  // this object in the future without emitting card-marks, so
+  // GC may take any compensating steps.
+
+  oop new_obj = thread->vm_result();
+  if (new_obj == NULL) return;
+
+  BarrierSet *bs = Universe::heap()->barrier_set();
+  bs->on_slowpath_allocation_exit(thread, new_obj);
+}