src/hotspot/share/jfr/recorder/storage/jfrBuffer.cpp
changeset 54964 ec7d6d8effc7
parent 50429 83aec1d357d4
child 55053 d58e1a447d2b
--- a/src/hotspot/share/jfr/recorder/storage/jfrBuffer.cpp	Tue May 21 13:06:52 2019 -0400
+++ b/src/hotspot/share/jfr/recorder/storage/jfrBuffer.cpp	Tue May 21 20:53:27 2019 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2019, 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
@@ -136,6 +136,14 @@
   _identity = NULL;
 }
 
+bool JfrBuffer::acquired_by(const void* id) const {
+  return identity() == id;
+}
+
+bool JfrBuffer::acquired_by_self() const {
+  return acquired_by(Thread::current());
+}
+
 #ifdef ASSERT
 static bool validate_to(const JfrBuffer* const to, size_t size) {
   assert(to != NULL, "invariant");
@@ -153,10 +161,6 @@
   assert(t->top() + size <= t->pos(), "invariant");
   return true;
 }
-
-bool JfrBuffer::acquired_by_self() const {
-  return identity() == Thread::current();
-}
 #endif // ASSERT
 
 void JfrBuffer::move(JfrBuffer* const to, size_t size) {
@@ -183,7 +187,6 @@
   set_concurrent_top(start());
 }
 
-// flags
 enum FLAG {
   RETIRED = 1,
   TRANSIENT = 2,