1.1 --- a/src/share/vm/jfr/recorder/storage/jfrBuffer.cpp Mon Jun 15 20:21:56 2020 +0100 1.2 +++ b/src/share/vm/jfr/recorder/storage/jfrBuffer.cpp Wed Jun 17 11:43:05 2020 +0300 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -137,6 +137,14 @@ 1.11 _identity = NULL; 1.12 } 1.13 1.14 +bool JfrBuffer::acquired_by(const void* id) const { 1.15 + return identity() == id; 1.16 +} 1.17 + 1.18 +bool JfrBuffer::acquired_by_self() const { 1.19 + return acquired_by(Thread::current()); 1.20 +} 1.21 + 1.22 #ifdef ASSERT 1.23 static bool validate_to(const JfrBuffer* const to, size_t size) { 1.24 assert(to != NULL, "invariant"); 1.25 @@ -154,10 +162,6 @@ 1.26 assert(t->top() + size <= t->pos(), "invariant"); 1.27 return true; 1.28 } 1.29 - 1.30 -bool JfrBuffer::acquired_by_self() const { 1.31 - return identity() == Thread::current(); 1.32 -} 1.33 #endif // ASSERT 1.34 1.35 void JfrBuffer::move(JfrBuffer* const to, size_t size) { 1.36 @@ -184,7 +188,6 @@ 1.37 set_concurrent_top(start()); 1.38 } 1.39 1.40 -// flags 1.41 enum FLAG { 1.42 RETIRED = 1, 1.43 TRANSIENT = 2,