Skip to content

Commit 90b29c5

Browse files
committed
Bug 37625246 - [37624706->25.03] BufferManager allocation messages should be FINEST not FINE
Bug 37624706 - BufferManager allocation messages should be FINEST not FINE (auto-submit 114535 after successfully running remote remote.full) Job ID: job.9.20250222041417.22286 (auto-submit integ 114536 main -> coherence-ce/main after successfully running remote remote.full) Job ID: job.9.20250222134551.30575 [git-p4: depot-paths = "//dev/coherence-ce/main/": change = 114544]
1 parent 1a5e57f commit 90b29c5

File tree

3 files changed

+37
-39
lines changed

3 files changed

+37
-39
lines changed

prj/coherence-core/src/main/java/com/oracle/coherence/common/internal/io/SegmentedBufferManager.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
2-
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
55
* https://oss.oracle.com/licenses/upl.
66
*/
77
package com.oracle.coherence.common.internal.io;
88

9-
109
import com.oracle.coherence.common.base.Disposable;
10+
1111
import com.oracle.coherence.common.collections.ConcurrentLinkedStack;
1212
import com.oracle.coherence.common.collections.Stack;
1313
import com.oracle.coherence.common.io.BufferManager;
@@ -18,17 +18,17 @@
1818

1919
import com.tangosol.coherence.config.Config;
2020

21+
import java.nio.ByteBuffer;
2122
import java.nio.ByteOrder;
22-
import java.util.logging.Logger;
23-
import java.util.logging.Level;
2423

2524
import java.util.concurrent.atomic.AtomicInteger;
2625
import java.util.concurrent.atomic.AtomicLong;
27-
import java.nio.ByteBuffer;
2826

27+
import java.util.logging.Level;
28+
import java.util.logging.Logger;
2929

3030
/**
31-
* The SegmentedBufferManager performs buffer managment by dividing
31+
* The SegmentedBufferManager performs buffer management by dividing
3232
* the buffers into a number of segments, such as small, medium, and large.
3333
* <p>
3434
* Each segment contains a number of generations, where generations are created
@@ -805,7 +805,7 @@ protected boolean allocateGeneration(int nGeneration)
805805
{
806806
int cbBuffer = encodeGeneration(nGeneration);
807807

808-
LOGGER.log(Level.FINE, getName() + " growing segment '"
808+
LOGGER.log(Level.FINEST, getName() + " growing segment '"
809809
+ getBufferSize() + "' to " + (nGeneration + 1)
810810
+ " generations");
811811

@@ -883,7 +883,7 @@ private void evaluateCapacity(final boolean fEvalPeers)
883883
{
884884
m_cMaxBuffersHistoric = m_cMaxBuffers;
885885

886-
LOGGER.log(Level.FINE, getName() + " shrinking segment '" + getBufferSize()
886+
LOGGER.log(Level.FINEST, getName() + " shrinking segment '" + getBufferSize()
887887
+ "' by " + (nGen - nDesiredGen)
888888
+ " generation(s) to " + (nDesiredGen + 1) + ", based on recent high water mark of "
889889
+ new MemorySize(m_cMaxBuffers * f_cbBuffer));
@@ -1074,7 +1074,7 @@ public String toString()
10741074
// ----- inner class: BufferAllocator -----------------------------------
10751075

10761076
/**
1077-
* A BufferAllocator is provides a mean for allocating ByteBuffers.
1077+
* A BufferAllocator provides a means for allocating ByteBuffers.
10781078
*/
10791079
public interface BufferAllocator
10801080
{
@@ -1085,7 +1085,7 @@ public interface BufferAllocator
10851085
*
10861086
* @return the buffer
10871087
*
1088-
* @throws OutOfMemoryError if the request cannot be satisified
1088+
* @throws OutOfMemoryError if the request cannot be satisfied
10891089
*/
10901090
public ByteBuffer allocate(int cb);
10911091

@@ -1137,7 +1137,7 @@ public interface BufferAllocator
11371137
public static final long UNPOOLED_RECLAIM_INTERVAL = 1024;
11381138

11391139
/**
1140-
* The default release frequency at which to records statistics.
1140+
* The default release frequency at which to record statistics.
11411141
*
11421142
* Note this value must be a power of two - 1.
11431143
*/
@@ -1188,7 +1188,7 @@ public interface BufferAllocator
11881188
private final BufferAllocator m_allocator;
11891189

11901190
/**
1191-
* The pool is composed of several sub-ordinate pools represented by the
1191+
* The pool is composed of several subordinate pools represented by the
11921192
* PoolSegment inner class, each of a specific allocation size. This array
11931193
* holds the various PoolSegment instances, starting with the smallest
11941194
* allocation size and proceeding to the largest.

prj/coherence-core/src/main/java/com/oracle/coherence/common/internal/io/SlabBufferManager.java

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,39 @@
11
/*
2-
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
5-
* http://oss.oracle.com/licenses/upl.
5+
* https://oss.oracle.com/licenses/upl.
66
*/
77
package com.oracle.coherence.common.internal.io;
88

99
import com.oracle.coherence.common.collections.WeakIdentityHashMap;
1010

1111
import com.oracle.coherence.common.io.BufferManagers;
1212

13+
import com.oracle.coherence.common.util.SafeClock;
14+
15+
import java.lang.management.GarbageCollectorMXBean;
16+
import java.lang.management.ManagementFactory;
17+
1318
import java.lang.ref.WeakReference;
1419

20+
import java.lang.reflect.InvocationTargetException;
21+
import java.lang.reflect.Method;
22+
1523
import java.nio.ByteBuffer;
1624

1725
import java.util.BitSet;
1826
import java.util.HashSet;
1927
import java.util.List;
2028
import java.util.Map;
2129

22-
import com.oracle.coherence.common.util.SafeClock;
23-
24-
import java.lang.management.GarbageCollectorMXBean;
25-
import java.lang.management.ManagementFactory;
26-
2730
import java.util.concurrent.ThreadLocalRandom;
2831
import java.util.concurrent.atomic.AtomicLong;
29-
import java.util.function.Consumer;
3032

31-
import java.lang.reflect.InvocationTargetException;
32-
import java.lang.reflect.Method;
33+
import java.util.function.Consumer;
3334

3435
import java.util.logging.Level;
3536

36-
3737
/**
3838
* The SlabBufferManager is a BufferManager which allocates buffers in large slabs which are then sliced into smaller
3939
* ByteBuffers.
@@ -134,7 +134,7 @@ protected boolean allocateGenerationBuffers(int nGen, int cbBuffer)
134134
f_cReclaimed.addAndGet(getGenerationSize());
135135
LOGGER.log(Level.WARNING, getName() + " replenished leaked segment '" + getBufferSize()
136136
+ "' slab for generation " + i +
137-
"; set the com.oracle.common.io.BufferManagers.checked system property to true to help identify leak suspects");
137+
"; set the com.oracle.coherence.common.io.BufferManagers.checked system property to true to help identify leak suspects");
138138
}
139139
}
140140

@@ -144,7 +144,7 @@ protected boolean allocateGenerationBuffers(int nGen, int cbBuffer)
144144
if (!slab.ensure())
145145
{
146146
// revive generation that was never fully released
147-
LOGGER.log(Level.FINE, getName() + " reviving segment '" + getBufferSize() + "' slab for generation "
147+
LOGGER.log(Level.FINEST, getName() + " reviving segment '" + getBufferSize() + "' slab for generation "
148148
+ nGen);
149149
}
150150
// else; new memory allocation
@@ -172,7 +172,7 @@ protected ByteBuffer allocateNonPooledBuffer()
172172
LOGGER.log(Level.WARNING, getName() + " detected leaked segment '" + getBufferSize()
173173
+ "' slab for generation " + GEN_ID_UNPOOLED + "; " + slab.f_afOutstanding.cardinality() +
174174
" of " + f_cBufferGen + " buffers were leaked" +
175-
"; set the com.oracle.common.io.BufferManagers.checked system property to true to help identify leak suspects");
175+
"; set the com.oracle.coherence.common.io.BufferManagers.checked system property to true to help identify leak suspects");
176176
}
177177
// else; just a GC
178178
}
@@ -190,7 +190,7 @@ protected ByteBuffer allocateNonPooledBuffer()
190190
if (!slabRevive.ensure())
191191
{
192192
// revive generation that was never fully released
193-
LOGGER.log(Level.FINE, getName() + " reviving segment '" + getBufferSize() + "' slab for generation "
193+
LOGGER.log(Level.FINEST, getName() + " reviving segment '" + getBufferSize() + "' slab for generation "
194194
+ GEN_ID_UNPOOLED);
195195
}
196196

@@ -205,7 +205,7 @@ protected ByteBuffer allocateNonPooledBuffer()
205205
f_cNonPooledAllocations.incrementAndGet();
206206
instantiateSlab(f_cbUnpooledBuffer).ensure(); // note: ensure inserts its buffers into the segment
207207

208-
LOGGER.log(Level.FINE, getName() + " allocating unpooled slab for segment '" + getBufferSize());
208+
LOGGER.log(Level.FINEST, getName() + " allocating unpooled slab for segment '" + getBufferSize());
209209

210210
buff = f_stackBuf.pop();
211211
}
@@ -261,7 +261,7 @@ public void dropBuffer(ByteBuffer buffer)
261261
// we didn't produce. We have no evidence that it is the callers fault though, so we don't throw
262262
LOGGER.log(Level.WARNING, getName() + " detected release of unknown ByteBuffer for segment '"
263263
+ getBufferSize() + "' generation " + nGen
264-
+ "; set the com.oracle.common.io.BufferManagers.checked system property to true to help identify suspects");
264+
+ "; set the com.oracle.coherence.common.io.BufferManagers.checked system property to true to help identify suspects");
265265
// return and let GC deal with it
266266
}
267267
else if (slab.releaseSlice(buffer))
@@ -399,7 +399,7 @@ public synchronized boolean releaseSlice(ByteBuffer buffer)
399399
if (f_afOutstanding.isEmpty())
400400
{
401401
// we've reclaimed the entire generation (slab); release it now
402-
LOGGER.log(Level.FINE, getName() + " releasing segment '" + getBufferSize()
402+
LOGGER.log(Level.FINEST, getName() + " releasing segment '" + getBufferSize()
403403
+ "' slab for generation " + decodeGeneration(f_cbSlice));
404404
getAllocator().release(bufSlab);
405405
m_weakBuf.clear();
@@ -453,7 +453,7 @@ else if (f_cbSlice == f_cbUnpooledBuffer)
453453
// double release of slice
454454
LOGGER.log(Level.WARNING, getName() + " double release of '" + getBufferSize()
455455
+ "' buffer in generation " + decodeGeneration(f_cbSlice) +
456-
"; set the com.oracle.common.io.BufferManagers.checked system property to true to help identify suspects");
456+
"; set the com.oracle.coherence.common.io.BufferManagers.checked system property to true to help identify suspects");
457457
}
458458

459459
return false;

prj/coherence-core/src/main/java/com/oracle/coherence/common/io/BufferManagers.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
/*
2-
* Copyright (c) 2000, 2024, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
55
* https://oss.oracle.com/licenses/upl.
66
*/
77
package com.oracle.coherence.common.io;
88

9-
109
import com.oracle.coherence.common.internal.io.AbstractBufferManager;
1110
import com.oracle.coherence.common.internal.io.SegmentedBufferManager;
1211
import com.oracle.coherence.common.internal.io.CheckedBufferManager;
@@ -17,17 +16,16 @@
1716
import com.tangosol.coherence.config.Config;
1817

1918
import java.nio.ByteBuffer;
19+
2020
import java.util.logging.Level;
2121
import java.util.logging.Logger;
2222

23-
2423
/**
2524
* BufferManagers provides access to pre-defined system-wide managers.
2625
* <p>
27-
* The default size of each of the pools may be specified via the <tt>com.oracle.common.io.BufferManagers.pool</tt>
28-
* system property. Additionally <tt>com.oracle.common.io.BufferManagers.checked</tt> can be used to default all
26+
* The default size of each of the pools may be specified via the <tt>com.oracle.coherence.common.io.BufferManagers.pool</tt>
27+
* system property. Additionally <tt>com.oracle.coherence.common.io.BufferManagers.checked</tt> can be used to default all
2928
* managers to utilize checked implementations to watch for pool usage issues.
30-
* </p>
3129
*
3230
* @author mf 2010.12.02
3331
*/
@@ -180,7 +178,7 @@ protected void ensureCompatibility(ByteBuffer buff)
180178
}
181179

182180
mgr = new NonDisposableBufferManager(mgr);
183-
LOGGER.log(Level.FINE, "initialized HeapBufferManager " + mgr);
181+
LOGGER.log(Level.FINEST, "initialized HeapBufferManager " + mgr);
184182
INSTANCE = Config.getBoolean(BufferManagers.class.getName() + ".heap.checked",
185183
Config.getBoolean(BufferManagers.class.getName() + ".checked"))
186184
? new CheckedBufferManager(mgr) : mgr;
@@ -242,7 +240,7 @@ protected void ensureCompatibility(ByteBuffer buff)
242240
}
243241

244242
mgr = new NonDisposableBufferManager(mgr);
245-
LOGGER.log(Level.FINE, "initialized DirectBufferManager " + mgr);
243+
LOGGER.log(Level.FINEST, "initialized DirectBufferManager " + mgr);
246244
INSTANCE = Config.getBoolean(BufferManagers.class.getName() + ".direct.checked",
247245
Config.getBoolean(BufferManagers.class.getName() + ".checked"))
248246
? new CheckedBufferManager(mgr) : mgr;

0 commit comments

Comments
 (0)