You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "easyice (via GitHub)" <gi...@apache.org> on 2023/11/24 11:49:45 UTC
[PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
easyice opened a new pull request, #12841:
URL: https://github.com/apache/lucene/pull/12841
From issue: https://github.com/apache/lucene/issues/12826
The JMH benchmark with this PR on my Mac (Intel chip) :
java 17
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.byteArrayReadGroupVInt 64 thrpt 5 5.519 ± 0.270 ops/us
GroupVIntBenchmark.byteArrayReadVInt 64 thrpt 5 4.075 ± 2.868 ops/us
GroupVIntBenchmark.byteBufferReadGroupVInt 64 thrpt 5 7.464 ± 1.618 ops/us
GroupVIntBenchmark.byteBufferReadVInt 64 thrpt 5 5.179 ± 0.470 ops/us
```
java 21
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.byteArrayReadGroupVInt 64 thrpt 5 5.768 ± 0.305 ops/us
GroupVIntBenchmark.byteArrayReadVInt 64 thrpt 5 5.255 ± 0.110 ops/us
GroupVIntBenchmark.byteBufferReadGroupVInt 64 thrpt 5 11.551 ± 0.252 ops/us
GroupVIntBenchmark.byteBufferReadVInt 64 thrpt 5 5.611 ± 0.266 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871193467
> Thank you Uwe, in my understanding we shouldn't backport this PR, because it has performance regression on java11 for `MMapDirectoryInputs` , this is also the main way of reading data. what do you think? CC @jpountz
No it hasn't. We excluded MMapDirectory based on ByteBufferIndexInput in this PR. There is no change in ByteBufferIndexInput.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1412795418
##########
lucene/core/src/java/org/apache/lucene/store/DataOutput.java:
##########
@@ -324,4 +326,41 @@ public void writeSetOfStrings(Set<String> set) throws IOException {
writeString(value);
}
}
+
+ /**
+ * Encode integers using group-varint. It uses VInt to encode tail values that are not enough for
Review Comment:
Add a javadoc link to #writeVInt? Also mention that all longs are actually required to be integers?
##########
lucene/core/src/java/org/apache/lucene/store/ByteBuffersDataInput.java:
##########
@@ -212,6 +224,51 @@ public long readLong() throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] docs, int limit) throws IOException {
+ if (asReadOnlyBuffer == true) {
+ super.readGroupVInts(docs, limit);
+ return;
+ }
+
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(docs, i);
+ }
+ for (; i < limit; ++i) {
+ docs[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] docs, int offset) throws IOException {
+ int blockOffset = blockOffset(pos);
+ if (blockOffset + MAX_LENGTH_PER_GROUP <= blockMask) {
+ super.fallbackReadGroupVInt(docs, offset);
+ return;
+ }
+
+ final int flag = readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ blockOffset = blockOffset(pos);
+ int curPosition = blockOffset;
+
+ byte[] bytes = blocks[blockIndex(pos)].array();
+ docs[offset] = (int) BitUtil.VH_LE_INT.get(bytes, curPosition) & GROUP_VINT_MASKS[n1Minus1];
Review Comment:
I'd rather work on the ByteBuffer (ie. do ByteBuffer#getInt rather than using var handles on the underlying byte[]), even if performance is a bit better by working directly on the byte[].
##########
lucene/core/src/java/org/apache/lucene/store/DataInput.java:
##########
@@ -38,6 +38,9 @@
* positioned independently.
*/
public abstract class DataInput implements Cloneable {
+ // the maximum length of a single group-varint is 4 integers + 1 byte flag.
+ static final int MAX_LENGTH_PER_GROUP = 17;
+ static final int[] GROUP_VINT_MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
Review Comment:
Nit: I would like it better if these constants and `fallbackReadGroupVInt` were moved to a helper class, e.g. `org.apache.lucene.util.GroupVIntUtil`.
##########
lucene/core/src/test/org/apache/lucene/codecs/lucene99/TestGroupVInt.java:
##########
@@ -18,38 +18,144 @@
import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
import java.io.IOException;
-import org.apache.lucene.store.ByteArrayDataInput;
-import org.apache.lucene.store.ByteArrayDataOutput;
+import java.nio.file.Files;
+import java.util.Locale;
+import java.util.function.BiFunction;
+import org.apache.lucene.store.ByteBuffersDataInput;
+import org.apache.lucene.store.ByteBuffersDataOutput;
+import org.apache.lucene.store.ByteBuffersDirectory;
+import org.apache.lucene.store.ByteBuffersIndexInput;
+import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.FilterDirectory;
+import org.apache.lucene.store.FilterIndexInput;
+import org.apache.lucene.store.IOContext;
+import org.apache.lucene.store.IndexInput;
+import org.apache.lucene.store.IndexOutput;
+import org.apache.lucene.store.MMapDirectory;
+import org.apache.lucene.store.NIOFSDirectory;
+import org.apache.lucene.store.SingleInstanceLockFactory;
import org.apache.lucene.tests.util.LuceneTestCase;
import org.apache.lucene.tests.util.TestUtil;
import org.apache.lucene.util.ArrayUtil;
import org.apache.lucene.util.packed.PackedInts;
public class TestGroupVInt extends LuceneTestCase {
Review Comment:
Should we move these tests to BaseDirectoryTestCase now, to automatically get coverage across all directories?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422413707
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
For IndexInput subclasses, you can call `seek()`. So basically we won't even need the return value as the utility method can set the file pointer on its own. The static method would only need maximum available bytes to seek to and the IndexInput.
For native DataInputs that do not extend IndexInput, we can use the low level code, nobody outside would implement that on their own.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1846779641
I confirmed there's GC activity happening with the slice approach by using `-prof gc`:
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt 64 thrpt 5 11.482 ± 0.727 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt:gc.alloc.rate 64 thrpt 5 0.001 ± 0.001 MB/sec
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt:gc.alloc.rate.norm 64 thrpt 5 ≈ 10⁻⁴ B/op
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt:gc.count 64 thrpt 5 ≈ 0 counts
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline 64 thrpt 5 6.613 ± 0.504 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline:gc.alloc.rate 64 thrpt 5 0.001 ± 0.001 MB/sec
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline:gc.alloc.rate.norm 64 thrpt 5 ≈ 10⁻⁴ B/op
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline:gc.count 64 thrpt 5 ≈ 0 counts
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt_viaByteBuffer 64 thrpt 5 0.153 ± 0.002 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt_viaByteBuffer:gc.alloc.rate 64 thrpt 5 2391.134 ± 25.909 MB/sec
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt_viaByteBuffer:gc.alloc.rate.norm 64 thrpt 5 16432.009 ± 0.001 B/op
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt_viaByteBuffer:gc.count 64 thrpt 5 202.000 counts
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt_viaByteBuffer:gc.time 64 thrpt 5 129.000 ms
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420793976
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -324,24 +324,9 @@ private void readGroupVInt(long[] dst, int offset) throws IOException {
try {
final int flag = curSegment.get(LAYOUT_BYTE, curPosition++) & 0xFF;
-
- final int n1Minus1 = flag >> 6;
- final int n2Minus1 = (flag >> 4) & 0x03;
- final int n3Minus1 = (flag >> 2) & 0x03;
- final int n4Minus1 = flag & 0x03;
-
- dst[offset] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n1Minus1];
- curPosition += 1 + n1Minus1;
- dst[offset + 1] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n2Minus1];
- curPosition += 1 + n2Minus1;
- dst[offset + 2] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n3Minus1];
- curPosition += 1 + n3Minus1;
- dst[offset + 3] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n4Minus1];
- curPosition += 1 + n4Minus1;
+ curPosition +=
+ GroupVIntUtil.readGroupVInt(
+ flag, p -> curSegment.get(LAYOUT_LE_INT, p), curPosition, dst, offset);
Review Comment:
Are you sure? It just reads the flag but does not increment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1844846435
> > The best idea that I have instead of VarHandles: Create an implementation for ByteBuffer
>
> do you mean create an implementation to get the current block as `ByteBuffer` for `BufferedIndexInput` `ByteBuffersDataInput` and `MemorySegmentIndexInput` like "wrapSliceAsByteBuffer()" ? then put the decode function `readGroupVInt` to `DataInput`?
My idea was to create a utility class with a static method that does the decoding on top of a ByteBuffer. This method takes a ByteBuffer and the same remaining parameters. To allow reuse of bytebuffers also add a startoffset where encoding starts.
In the several indexinputs just wrap a slice and call the static method. In ByteBufferIndexInput directly call the method.
The only downside of this is that the caller code must know beforehand how large the slice must be.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1845316218
> The only downside of this is that the caller code must know beforehand how large the slice must be.
I think that there is another downside, which is that this might not allow you to read 4 bytes for each integer. E.g. let's assume the simple case of 4 integers that are less than 256. The header byte is `0` in that case. So we know we need 4 bytes and can get a ByteBuffer of size 4. But then we'd like to `ByteBuffer#getInt()` at offsets 0, 1, 2 and 3 on that `ByteBuffer`, which can't be done for the last 3 integers since it has a size of 4?
Alternatively, could we read 17 bytes all the time and do something like below?
```java
try {
ByteBuffer nextBytes = in.readByteBuffer(17);
<decoding logic>
in.seek(in.getPosition() - nextBytes().remaining()); // rewind unread bytes
} catch (EOFException e) {
// naive impl
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1867866005
> Change looks good to me, thanks for running the micro benchmarks again.
>
> I was thinking we'd backport this to 9.x, since this doesn't look like it would break anything. This would also help nightly benchmarks stay more in line with the stable branch. No strong feelings though, if @uschindler likes it better as a 10.0 only change, that's fine with me.
I think you're right. My problem was that the MMapDirectory changes regarding the ByteBufferIndexInput impl and NIOFSDir may be slower on 11. As we backed out those changes, I see no reason not to backport it. If somebody uses memory segments he she is already on java 19+.
I'd still like to check perf of the other changes on java 11 (ByteBuffers)!
Anyways, we should stop working on 9.x.
Uwe
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1852257293
I have the feeling that for direct buffers (this is what MMap and NIO use, the getInt() seems more expensive than the sequential reads.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1825685057
And maybe `BufferedIndexInput` too for folks using `NIOFSDirectory`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1421431357
##########
lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/GroupVIntBenchmark.java:
##########
@@ -140,10 +155,12 @@ public void init() throws Exception {
}
initByteBufferInput(docs);
initArrayInput(docs);
+ initNioInput(docs);
+ initByteBuffersInput(docs);
}
@Benchmark
- public void byteBufferReadVInt(Blackhole bh) throws IOException {
+ public void mmap_byteBufferReadVInt(Blackhole bh) throws IOException {
Review Comment:
The reason why niofs may have problems more quickly is the case because the buffer size is quite small so it may more often fall back to the slow impl causing deoptimization on hotspot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1854874240
I checked: niofs indexinput still uses an on heap buffer. So I have no idea why it is slower for that case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1852261778
If you have an on-heap ByteBuffer (like for ByteBuffersIndexInput), it executes completely different code when reading from the underlying data structure..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422381211
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
Forget about borders. There is one border every gigabyte before java 19. After Java 19 there's a border every 16GiB.
And NIOFSDirectory is not optimized anymore in your code. And also there it is not the biggest problem. The problem why it was slow is most llikely caused by the capturing lambda
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1845870621
@uschindler I pushed a quick ugly impl of reading group vints via a `ByteBuffer` at https://github.com/apache/lucene/commit/9f5d9f7ab6777b6331c7e0456b5f7660cb64d55b. `DataInput` gets a new `readNBytes(int)` method that produces a `ByteBuffer`. `MMapDirectory` overrides it to return a slice of the current memory segment when the buffer would not cross boundaries. Then a utility method reads sequences of variable-length integers by calling `readNBytes(17)` for each group of 4 integers, and rewinds unused bytes.
Unfortunately, the benchmark reports terrible performance, I'll try to look more into why but I thought you may have ideas. FWIW I verified that I'm actually using the specialized `MemorySegmentIndexInput#readNBytes` impl, and not the default impl which is slow as well.
- `mmap_byteBufferReadGroupVIntBaseline` is how things are currently
- `mmap_byteBufferReadGroupVInt` is the optimized impl in this PR
- `mmap_byteBufferReadGroupVInt_viaByteBuffer` is my new tentative impl on `ByteBuffer`s.
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt 64 thrpt 5 11.198 ± 0.160 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline 64 thrpt 5 6.908 ± 0.385 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt_viaByteBuffer 64 thrpt 5 0.155 ± 0.001 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420760926
##########
lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java:
##########
@@ -114,4 +115,31 @@ public void testNullParamsIndexInput() throws Exception {
}
}
}
+
+ private void doTestReadingClosedInput(Directory dir, long[] values, int numValues)
Review Comment:
You don't need to test all variants and different sizes here. Just create an empty file with indexoutput. open it and close it, then call `readGroupVInts`. As this should only trigger the AlreadyClosedException theres no need to repeat this multiple times.
These are IO-heavy tests, so only do the required stuff and don't scrub my SSD. It also slows down those tests.
Just add it here and try to call that method on "two":
- https://github.com/apache/lucene/blob/08d24dd9cb10b0808264b7c44e5b620d7d1a398e/lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseChunkedDirectoryTestCase.java#L70-L74
- https://github.com/apache/lucene/blob/08d24dd9cb10b0808264b7c44e5b620d7d1a398e/lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseChunkedDirectoryTestCase.java#L91-L95
Anyways, I don't think we need this test in reality. Otherwise we would need a call of all public methods.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422507453
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
> +1, we can make sure the static method caller have an efficient implementation of `skipBytes()`(base on `seek()`), Just i guess the `seek()` has an impact on performance, let me try..
Yes, if `skipBytes()` is not efficient (InputStream based DataInput), you can't use that specialized method anyways. IndexInput has an efficient default implementation, so no need to change anything. So we do not need to optimize anything.
Just call skipBytes() and test performance.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1850587232
Otherwise I like the new code very much.
In fact, this is a micro-benchmark. So the differences in speed won't be visible in query benchmarks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1421441005
##########
lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/GroupVIntBenchmark.java:
##########
@@ -140,10 +155,12 @@ public void init() throws Exception {
}
initByteBufferInput(docs);
initArrayInput(docs);
+ initNioInput(docs);
+ initByteBuffersInput(docs);
}
@Benchmark
- public void byteBufferReadVInt(Blackhole bh) throws IOException {
+ public void mmap_byteBufferReadVInt(Blackhole bh) throws IOException {
Review Comment:
Thank for you suggestions! the buffer size for both niofs and ByteBuffersDataInput(with s) should be 1024 in the case, and both did long to int cast, but ByteBuffersDataInput(with s) not become slow so much as niofs
* **niofs** ~18% slow than using duplicate code
* **ByteBuffersDataInput(with s)** ~7% slow than using duplicate code
I tried remove the long to int cast, and increase block size, nothing changed on jmh benchmark result. all cases have no GC activity. it's an interesting issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1846907147
> Can we do the same for all other inputs?
I think so, i will do this if @jpountz doesn't mind.
> I will nag Maurizio again about the problem with slice().
Thank you so much for pinpointing the cause of the problem!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1846881254
I would still be safe and initialize the IntReader on construction of the IndexInput. It can strongly bind to the current segment.
Can we do the same for all other inputs?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1846774383
I'll check if there is GC activity during the benchmark. In the meantime, I looked into using lambdas instead, and it seems like it would work well: https://github.com/apache/lucene/commit/8109e639508b6875d657e84634dd27c58942f610
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt 64 thrpt 5 13.174 ± 0.870 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline 64 thrpt 5 6.834 ± 0.021 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1404387618
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInt(long[] docs, int pos) throws IOException {
+ if (curSegment.byteSize() - curPosition < 17) {
+ super.readGroupVInt(docs, pos);
+ return;
+ }
+
+ final int flag = readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ docs[pos] = curSegment.get(LAYOUT_LE_INT, curPosition) & MASKS[n1Minus1];
+ curPosition += 1 + n1Minus1;
+ docs[pos + 1] = curSegment.get(LAYOUT_LE_INT, curPosition) & MASKS[n2Minus1];
+ curPosition += 1 + n2Minus1;
+ docs[pos + 2] = curSegment.get(LAYOUT_LE_INT, curPosition) & MASKS[n3Minus1];
+ curPosition += 1 + n3Minus1;
+ docs[pos + 3] = curSegment.get(LAYOUT_LE_INT, curPosition) & MASKS[n4Minus1];
+ curPosition += 1 + n4Minus1;
+ }
Review Comment:
+1, Thanks!
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -49,6 +49,7 @@ abstract class MemorySegmentIndexInput extends IndexInput implements RandomAcces
final int chunkSizePower;
final Arena arena;
final MemorySegment[] segments;
+ private static final int[] MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
Review Comment:
+1, great suggestion!
##########
lucene/core/src/java/org/apache/lucene/store/DataOutput.java:
##########
@@ -29,6 +29,7 @@
* internal state like file position).
*/
public abstract class DataOutput {
+ BytesRef groupVIntBytes;
Review Comment:
+1, Thanks for the suggestion!
##########
lucene/core/src/java/org/apache/lucene/store/DataOutput.java:
##########
@@ -324,4 +325,45 @@ public void writeSetOfStrings(Set<String> set) throws IOException {
writeString(value);
}
}
+
+ /**
+ * Encode integers using group-varint. It uses VInt to encode tail values that are not enough for
+ * a group
+ *
+ * @param values the values to write
+ * @param limit the number of values to write.
+ */
+ public void writeGroupVInts(long[] values, int limit) throws IOException {
+ if (groupVIntBytes == null) {
+ // the maximum size of one group is 4 integers + 1 byte flag.
+ groupVIntBytes = new BytesRef(17);
+ }
+ int off = 0;
+
+ // encode each group
+ while ((limit - off) >= 4) {
+ byte flag = 0;
+ groupVIntBytes.offset = 1;
+ flag |= (encodeGroupValue((int) values[off++]) - 1) << 6;
+ flag |= (encodeGroupValue((int) values[off++]) - 1) << 4;
+ flag |= (encodeGroupValue((int) values[off++]) - 1) << 2;
+ flag |= (encodeGroupValue((int) values[off++]) - 1);
+ groupVIntBytes.bytes[0] = flag;
+ writeBytes(groupVIntBytes.bytes, groupVIntBytes.offset);
+ }
+
+ // tail vints
+ for (; off < limit; off++) {
+ writeVInt((int) values[off]);
Review Comment:
Good idea, i like that!
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInt(long[] docs, int pos) throws IOException {
+ if (curSegment.byteSize() - curPosition < 17) {
+ super.readGroupVInt(docs, pos);
+ return;
+ }
Review Comment:
In `TestGroupVInt#testEncodeDecode` we use a range of [1-31] `bpv` and a ragne of [1-128] `numValues`, For instance if the `bpv==2` and `numValues==4` it will cover this case?
##########
lucene/core/src/test/org/apache/lucene/codecs/lucene99/TestGroupVInt.java:
##########
@@ -31,9 +34,7 @@ public void testEncodeDecode() throws IOException {
long[] values = new long[ForUtil.BLOCK_SIZE];
long[] restored = new long[ForUtil.BLOCK_SIZE];
final int iterations = atLeast(100);
-
- final GroupVIntWriter w = new GroupVIntWriter();
- byte[] encoded = new byte[(int) (Integer.BYTES * ForUtil.BLOCK_SIZE * 1.25)];
+ Directory dir = FSDirectory.open(createTempDir());
Review Comment:
+1
##########
lucene/core/src/java/org/apache/lucene/store/DataInput.java:
##########
@@ -98,6 +98,55 @@ public int readInt() throws IOException {
return ((b4 & 0xFF) << 24) | ((b3 & 0xFF) << 16) | ((b2 & 0xFF) << 8) | (b1 & 0xFF);
}
+ /**
+ * Read all the group varints, including the tail vints.
+ *
+ * @param docs the array to read ints into.
+ * @param limit the number of int values to read.
+ */
+ public void readGroupVInts(long[] docs, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(docs, i);
+ }
+ for (; i < limit; ++i) {
+ docs[i] = readVInt();
+ }
+ }
+
+ /**
+ * Read single group varint. we need a long[] because this is what postings are using.
+ *
+ * @param docs the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ */
+ public void readGroupVInt(long[] docs, int offset) throws IOException {
Review Comment:
+1, This also reduces virtual function calls.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1404341416
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInt(long[] docs, int pos) throws IOException {
+ if (curSegment.byteSize() - curPosition < 17) {
+ super.readGroupVInt(docs, pos);
+ return;
+ }
+
+ final int flag = readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ docs[pos] = curSegment.get(LAYOUT_LE_INT, curPosition) & MASKS[n1Minus1];
+ curPosition += 1 + n1Minus1;
+ docs[pos + 1] = curSegment.get(LAYOUT_LE_INT, curPosition) & MASKS[n2Minus1];
+ curPosition += 1 + n2Minus1;
+ docs[pos + 2] = curSegment.get(LAYOUT_LE_INT, curPosition) & MASKS[n3Minus1];
+ curPosition += 1 + n3Minus1;
+ docs[pos + 3] = curSegment.get(LAYOUT_LE_INT, curPosition) & MASKS[n4Minus1];
+ curPosition += 1 + n4Minus1;
+ }
Review Comment:
Can you add the same `catch (NullPointerException | IllegalStateException e)` that `readInt()` and other read methods have, for the case when the index input is closed?
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInt(long[] docs, int pos) throws IOException {
+ if (curSegment.byteSize() - curPosition < 17) {
+ super.readGroupVInt(docs, pos);
+ return;
+ }
Review Comment:
I don't think we have a test that covers this case well at the moment.
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -49,6 +49,7 @@ abstract class MemorySegmentIndexInput extends IndexInput implements RandomAcces
final int chunkSizePower;
final Arena arena;
final MemorySegment[] segments;
+ private static final int[] MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
Review Comment:
maybe rename to `GROUP_VINT_MASKS` or something along these lines now that this logic moved to a class which is not only about group vint?
Also in general I prefer having constants before instance members in the class definition.
##########
lucene/core/src/java/org/apache/lucene/store/DataOutput.java:
##########
@@ -29,6 +29,7 @@
* internal state like file position).
*/
public abstract class DataOutput {
+ BytesRef groupVIntBytes;
Review Comment:
BytesRefBuilder feels like a better fit for how you're using it (using `length` rather than `offset` to track the number of written bytes). Also let's make it `private`?
##########
lucene/core/src/test/org/apache/lucene/codecs/lucene99/TestGroupVInt.java:
##########
@@ -31,9 +34,7 @@ public void testEncodeDecode() throws IOException {
long[] values = new long[ForUtil.BLOCK_SIZE];
long[] restored = new long[ForUtil.BLOCK_SIZE];
final int iterations = atLeast(100);
-
- final GroupVIntWriter w = new GroupVIntWriter();
- byte[] encoded = new byte[(int) (Integer.BYTES * ForUtil.BLOCK_SIZE * 1.25)];
+ Directory dir = FSDirectory.open(createTempDir());
Review Comment:
Let's use `newFSDirectory` to add coverage for all Directory implementations?
```suggestion
Directory dir = newFSDirectory(createTempDir());
```
##########
lucene/core/src/java/org/apache/lucene/store/DataOutput.java:
##########
@@ -324,4 +325,45 @@ public void writeSetOfStrings(Set<String> set) throws IOException {
writeString(value);
}
}
+
+ /**
+ * Encode integers using group-varint. It uses VInt to encode tail values that are not enough for
+ * a group
+ *
+ * @param values the values to write
+ * @param limit the number of values to write.
+ */
+ public void writeGroupVInts(long[] values, int limit) throws IOException {
+ if (groupVIntBytes == null) {
+ // the maximum size of one group is 4 integers + 1 byte flag.
+ groupVIntBytes = new BytesRef(17);
+ }
+ int off = 0;
+
+ // encode each group
+ while ((limit - off) >= 4) {
+ byte flag = 0;
+ groupVIntBytes.offset = 1;
+ flag |= (encodeGroupValue((int) values[off++]) - 1) << 6;
+ flag |= (encodeGroupValue((int) values[off++]) - 1) << 4;
+ flag |= (encodeGroupValue((int) values[off++]) - 1) << 2;
+ flag |= (encodeGroupValue((int) values[off++]) - 1);
+ groupVIntBytes.bytes[0] = flag;
+ writeBytes(groupVIntBytes.bytes, groupVIntBytes.offset);
+ }
+
+ // tail vints
+ for (; off < limit; off++) {
+ writeVInt((int) values[off]);
Review Comment:
Now that we're moving this to `DataOutput`, we probably need to check these casts, e.g. with `Math.toIntExact`.
##########
lucene/core/src/java/org/apache/lucene/store/DataInput.java:
##########
@@ -98,6 +98,55 @@ public int readInt() throws IOException {
return ((b4 & 0xFF) << 24) | ((b3 & 0xFF) << 16) | ((b2 & 0xFF) << 8) | (b1 & 0xFF);
}
+ /**
+ * Read all the group varints, including the tail vints.
+ *
+ * @param docs the array to read ints into.
+ * @param limit the number of int values to read.
+ */
+ public void readGroupVInts(long[] docs, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(docs, i);
+ }
+ for (; i < limit; ++i) {
+ docs[i] = readVInt();
+ }
+ }
+
+ /**
+ * Read single group varint. we need a long[] because this is what postings are using.
+ *
+ * @param docs the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ */
+ public void readGroupVInt(long[] docs, int offset) throws IOException {
Review Comment:
Let's make this method private? This would force `MemorySegmentIndexInput` to copy the logic of `readGroupVInts` but this would also be better encapsulated?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1837152363
In general I am not sure if we really need specialization in Mmapdir. Without a benchmark showing improvement, I'd cancel this. Counting number of virtual calls is bullshit. This is all optimized away by Hotspot's inlining, so don't repeat code just because of a few method calls. CC @rmuir
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871194418
This PR only changes the Java 19-21 MMapIndput as we had a regression of ByteBufferIndexInput in Java 17 with ByteBufferIndexInput, too. So it was reverted. Just look at the code. With Java 17 (and therefore Java 11) there is no change in code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1413151301
##########
lucene/core/src/java/org/apache/lucene/store/ByteBuffersDataInput.java:
##########
@@ -212,6 +224,51 @@ public long readLong() throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] docs, int limit) throws IOException {
+ if (asReadOnlyBuffer == true) {
+ super.readGroupVInts(docs, limit);
+ return;
+ }
+
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(docs, i);
+ }
+ for (; i < limit; ++i) {
+ docs[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] docs, int offset) throws IOException {
+ int blockOffset = blockOffset(pos);
+ if (blockOffset + MAX_LENGTH_PER_GROUP <= blockMask) {
+ super.fallbackReadGroupVInt(docs, offset);
+ return;
+ }
+
+ final int flag = readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ blockOffset = blockOffset(pos);
+ int curPosition = blockOffset;
+
+ byte[] bytes = blocks[blockIndex(pos)].array();
+ docs[offset] = (int) BitUtil.VH_LE_INT.get(bytes, curPosition) & GROUP_VINT_MASKS[n1Minus1];
Review Comment:
@jpountz Thanks for this suggestion, the performance is similar
##########
lucene/core/src/java/org/apache/lucene/store/DataOutput.java:
##########
@@ -324,4 +326,41 @@ public void writeSetOfStrings(Set<String> set) throws IOException {
writeString(value);
}
}
+
+ /**
+ * Encode integers using group-varint. It uses VInt to encode tail values that are not enough for
Review Comment:
+1, Thanks, i like that
##########
lucene/core/src/java/org/apache/lucene/store/DataInput.java:
##########
@@ -38,6 +38,9 @@
* positioned independently.
*/
public abstract class DataInput implements Cloneable {
+ // the maximum length of a single group-varint is 4 integers + 1 byte flag.
+ static final int MAX_LENGTH_PER_GROUP = 17;
+ static final int[] GROUP_VINT_MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
Review Comment:
+1
##########
lucene/core/src/test/org/apache/lucene/codecs/lucene99/TestGroupVInt.java:
##########
@@ -18,38 +18,144 @@
import com.carrotsearch.randomizedtesting.generators.RandomNumbers;
import java.io.IOException;
-import org.apache.lucene.store.ByteArrayDataInput;
-import org.apache.lucene.store.ByteArrayDataOutput;
+import java.nio.file.Files;
+import java.util.Locale;
+import java.util.function.BiFunction;
+import org.apache.lucene.store.ByteBuffersDataInput;
+import org.apache.lucene.store.ByteBuffersDataOutput;
+import org.apache.lucene.store.ByteBuffersDirectory;
+import org.apache.lucene.store.ByteBuffersIndexInput;
+import org.apache.lucene.store.Directory;
+import org.apache.lucene.store.FilterDirectory;
+import org.apache.lucene.store.FilterIndexInput;
+import org.apache.lucene.store.IOContext;
+import org.apache.lucene.store.IndexInput;
+import org.apache.lucene.store.IndexOutput;
+import org.apache.lucene.store.MMapDirectory;
+import org.apache.lucene.store.NIOFSDirectory;
+import org.apache.lucene.store.SingleInstanceLockFactory;
import org.apache.lucene.tests.util.LuceneTestCase;
import org.apache.lucene.tests.util.TestUtil;
import org.apache.lucene.util.ArrayUtil;
import org.apache.lucene.util.packed.PackedInts;
public class TestGroupVInt extends LuceneTestCase {
Review Comment:
+1, cool!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1826785154
I did the similarly optimize in `BufferedIndexInput` and `BufferedIndexInput`, The benchmark with java 17 looks fine. In order to observe the diff after overriding `readGroupVInts`,I add `DataInput#readGroupVIntsBaseline` which is copy from `readGroupVInts`, it will be removed after code review.
Here is the JMH output for newly optimized, `byteBuffersReadGroupVIntBaseline` and `nioReadGroupVIntBaseline` means use the default implementation (`DataInput#readGroupVIntsBaseline`), the other is their own optimized implementations
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.byteBuffersReadGroupVInt 64 thrpt 5 5.384 ± 1.074 ops/us
GroupVIntBenchmark.byteBuffersReadGroupVIntBaseline 64 thrpt 5 2.056 ± 0.365 ops/us
GroupVIntBenchmark.nioReadGroupVInt 64 thrpt 5 8.787 ± 1.405 ops/us
GroupVIntBenchmark.nioReadGroupVIntBaseline 64 thrpt 5 5.281 ± 0.741 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420364348
##########
lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseDirectoryTestCase.java:
##########
@@ -1438,4 +1440,68 @@ public void testListAllIsSorted() throws IOException {
assertArrayEquals(expected, actual);
}
}
+
+ public void testDataTypes() throws IOException {
+ final long[] values = new long[] {43, 12345, 123456, 1234567890};
+ try (Directory dir = getDirectory(createTempDir("testDataTypes"))) {
+ IndexOutput out = dir.createOutput("test", IOContext.DEFAULT);
+ out.writeByte((byte) 43);
+ out.writeShort((short) 12345);
+ out.writeInt(1234567890);
+ out.writeGroupVInts(values, 4);
+ out.writeLong(1234567890123456789L);
+ out.close();
+
+ long[] restored = new long[4];
+ IndexInput in = dir.openInput("test", IOContext.DEFAULT);
+ assertEquals(43, in.readByte());
+ assertEquals(12345, in.readShort());
+ assertEquals(1234567890, in.readInt());
+ in.readGroupVInts(restored, 4);
+ assertArrayEquals(values, restored);
+ assertEquals(1234567890123456789L, in.readLong());
+ in.close();
+ }
+ }
+
+ public void testGroupVInt() throws IOException {
+ try (Directory dir = getDirectory(createTempDir("testGroupVInt"))) {
+ // test fallback to default implementation of readGroupVInt
+ doTestGroupVInt(dir, 5, 1, 6, 8);
+
+ // use more iterations to covers all bpv
+ doTestGroupVInt(dir, atLeast(100), 1, 31, 128);
+
+ // we use BaseChunkedDirectoryTestCase#testGroupVIntMultiBlocks cover multiple blocks for
+ // ByteBuffersDataInput and MMapDirectory
+ }
+ }
+
+ protected void doTestGroupVInt(
+ Directory dir, int iterations, int minBpv, int maxBpv, int maxNumValues) throws IOException {
+ long[] values = new long[maxNumValues];
+ long[] restored = new long[maxNumValues];
+
+ for (int i = 0; i < iterations; i++) {
Review Comment:
I am a bit afraid that those tests kill my SSD at some point (also Jenkin's SSD). This creates files over and over. With test directories its not a problem, but with real FSDirectory ones we should reduce the iteration counts.
The chunked test should clearly setup a directory with a random chunk size once and run all tests on it. Ideally write only one file with multiple variants of groupVints behind each other (so it definitely crosses borders) and then read all of them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420447123
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.util;
+
+import java.io.IOException;
+import org.apache.lucene.store.DataInput;
+
+/**
+ * This class contains utility methods and constants for group varint
+ *
+ * @lucene.internal
+ */
+public final class GroupVIntUtil {
+ // the maximum length of a single group-varint is 4 integers + 1 byte flag.
+ public static final int MAX_LENGTH_PER_GROUP = 17;
+ private static final int[] MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
+
+ /**
+ * Default implementation of read single group, for optimal performance, you should use {@link
+ * DataInput#readGroupVInts(long[], int)} instead.
+ *
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ */
+ public static void readGroupVInt(DataInput in, long[] dst, int offset) throws IOException {
+ final int flag = in.readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ dst[offset] = readLongInGroup(in, n1Minus1);
+ dst[offset + 1] = readLongInGroup(in, n2Minus1);
+ dst[offset + 2] = readLongInGroup(in, n3Minus1);
+ dst[offset + 3] = readLongInGroup(in, n4Minus1);
+ }
+
+ private static long readLongInGroup(DataInput in, int numBytesMinus1) throws IOException {
+ switch (numBytesMinus1) {
+ case 0:
+ return in.readByte() & 0xFFL;
+ case 1:
+ return in.readShort() & 0xFFFFL;
+ case 2:
+ return (in.readShort() & 0xFFFFL) | ((in.readByte() & 0xFFL) << 16);
+ default:
+ return in.readInt() & 0xFFFFFFFFL;
+ }
+ }
+
+ /**
+ * Provides an abstraction for read int values, so that decoding logic can be reused in different
+ * DataInput.
+ */
+ public static interface IntReader {
+ int read(long v);
+ }
+
+ /**
+ * Faster implementation of read single group, It read values from the buffer that would not cross
+ * boundaries.
+ *
+ * @param flag the flag of group varint.
+ * @param reader the supplier of read int.
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ * @return the number of bytes read, it is a positive number and less than {@link
+ * #MAX_LENGTH_PER_GROUP}
+ */
+ public static int readGroupVInt(int flag, IntReader reader, long pos, long[] dst, int offset)
+ throws IOException {
Review Comment:
No. Why? It is an unchecked exception.
The NPE and ISE are mmap special case (also for the legacy mmap impl). Please only cover the whole method in memorysegment's input by the try-catch. If anywhere while the method is executed we get an NPE the input is closed. No need to do anything outside.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420450756
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.util;
+
+import java.io.IOException;
+import org.apache.lucene.store.DataInput;
+
+/**
+ * This class contains utility methods and constants for group varint
+ *
+ * @lucene.internal
+ */
+public final class GroupVIntUtil {
+ // the maximum length of a single group-varint is 4 integers + 1 byte flag.
+ public static final int MAX_LENGTH_PER_GROUP = 17;
+ private static final int[] MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
+
+ /**
+ * Default implementation of read single group, for optimal performance, you should use {@link
+ * DataInput#readGroupVInts(long[], int)} instead.
+ *
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ */
+ public static void readGroupVInt(DataInput in, long[] dst, int offset) throws IOException {
+ final int flag = in.readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ dst[offset] = readLongInGroup(in, n1Minus1);
+ dst[offset + 1] = readLongInGroup(in, n2Minus1);
+ dst[offset + 2] = readLongInGroup(in, n3Minus1);
+ dst[offset + 3] = readLongInGroup(in, n4Minus1);
+ }
+
+ private static long readLongInGroup(DataInput in, int numBytesMinus1) throws IOException {
+ switch (numBytesMinus1) {
+ case 0:
+ return in.readByte() & 0xFFL;
+ case 1:
+ return in.readShort() & 0xFFFFL;
+ case 2:
+ return (in.readShort() & 0xFFFFL) | ((in.readByte() & 0xFFL) << 16);
+ default:
+ return in.readInt() & 0xFFFFFFFFL;
+ }
+ }
+
+ /**
+ * Provides an abstraction for read int values, so that decoding logic can be reused in different
+ * DataInput.
+ */
+ public static interface IntReader {
+ int read(long v);
+ }
+
+ /**
+ * Faster implementation of read single group, It read values from the buffer that would not cross
+ * boundaries.
+ *
+ * @param flag the flag of group varint.
+ * @param reader the supplier of read int.
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ * @return the number of bytes read, it is a positive number and less than {@link
+ * #MAX_LENGTH_PER_GROUP}
+ */
+ public static int readGroupVInt(int flag, IntReader reader, long pos, long[] dst, int offset)
+ throws IOException {
Review Comment:
See my other comment. Just extend the NPE/ISE try on the whole read method. Like everywhere else. Just look at the other methods, they are all identically structured. There is a reason why it is done like that. Don't change the pattern.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1421431248
##########
lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/GroupVIntBenchmark.java:
##########
@@ -140,10 +155,12 @@ public void init() throws Exception {
}
initByteBufferInput(docs);
initArrayInput(docs);
+ initNioInput(docs);
+ initByteBuffersInput(docs);
}
@Benchmark
- public void byteBufferReadVInt(Blackhole bh) throws IOException {
+ public void mmap_byteBufferReadVInt(Blackhole bh) throws IOException {
Review Comment:
If we implement ByteBufferInput (without s) for java 17's mmap, we can detect this problem. I know the class is badly named and should me MappedByteBufferIndexInput.
I have some ideas, let me check this evening or tomorrow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1851570021
> Could we consider not changing `MemorySegmentIndexInput` for java 19 and java20? As a preview feature , it seems reasonable that we only do optimizations in higher versions, and they are not Long-Term-Support (LTS) releases. but if you still feel we should to support them, i will do it.
Hi,
it is up to you, but at some point I will copy paster the code over, because I try to keep the 3 impls aligned to each other (I have some semi-automatic process) for updates. Java 22 is ongoing and will be merged soon. There is also the problem: It would be slower in Java 19 than in Java 18 or Java 17, if we also improve the `ByteBufferIndexInput` (without 's', see below).
So I would like you to just copypaste the one method to the other impl. It is tested by Jenkins automatically once we have it merged into main branch.
What is much more important: Please add the implementation for `ByteBufferIndexInput` (which is responsible for `MMapDirectory` before Java 18. Then you should see speedup with Java 17, too.
I am in generally not sure if this should be backported into the 9.x branch of Lucene unless we have performance tests for Java 11. In Java 11 the lambdas may be a problem and slowdown. So I would say: Let's do this only in main branch (Lucene 10.x).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422466176
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
In fact it would still work with default `skipBytes()` that has a loop of `readByte()`, it would be just ineffective. But nobody would do this in a custom directory implementation!
So +1 to use skipBytes!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1849275229
> 3rd party implementations and our own MMap/NIO/... would just call this static method if they support random access or call super(), if they can't.
Thanks @uschindler , it's ok!, i'm going to do this today, and then you can take a look when you get a chance.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871151967
Hi @easyice, is my understanding correct. We can backport this PR as is?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1867190473
Hi @uschindler , can we merge this PR now?(without optimizing ByteBufferIndexInput) or anything else that needs to be changed?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1421421593
##########
lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java:
##########
@@ -149,6 +150,29 @@ public final int readInt() throws IOException {
}
}
+ @Override
Review Comment:
> if you like I can create a patch (and possbly also push it to your repository).
Thanks @uschindler , Feel free to push patch if you like :) or if you're busy i can try it too. i'm investigating why lambda has a bit regression on `NIOFSDirectory` today, but it seems no more can be optimize.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422300969
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
+ final MemorySegment curSegment = this.curSegment;
Review Comment:
I would not do this, because it would make a captured lambda. Just remove the local variable. Adrien's argument does not apply here, as this would also affect other methods in MemorySegmentIndexInput. In fact the curSegment field can't change in the actual thread, it is stable.
This would also explain why NIOFSDir has problems?
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
why can't we move the whole loop into the utility class? As said before it is unlikely that we hit the boundary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422413707
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
For IndexInput subclasses, you can call setPosition(). So basically we won't even need the return value as the utility method can set the file pointer on its own. The static method would only need maximum available bytes to seek to and the IndexInput.
For native DataInputs that do not extend IndexInput, we can use the low level code, nobody outside would implement that on their own.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422395622
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
Hrrrm.... Thinking about that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1846784038
+1 for gc overhead, here is the gc output (`-prof gc` ):
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntUseByteBuffer 64 thrpt 5 1.873 ± 0.269 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntUseByteBuffer:gc.alloc.rate 64 thrpt 5 4800.320 ± 690.606 MB/sec
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntUseByteBuffer:gc.alloc.rate.norm 64 thrpt 5 2688.001 ± 0.001 B/op
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntUseByteBuffer:gc.count 64 thrpt 5 273.000 counts
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntUseByteBuffer:gc.time 64 thrpt 5 218.000 ms
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt 64 thrpt 5 8.118 ± 5.922 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt:gc.alloc.rate 64 thrpt 5 0.001 ± 0.001 MB/sec
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt:gc.alloc.rate.norm 64 thrpt 5 ≈ 10⁻⁴ B/op
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt:gc.count 64 thrpt 5 ≈ 0 counts
```
> I looked into using lambdas instead, and it seems like it would work well:
It's so cool!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1847060669
I'm running the performance differences between previous commit, it will take a moment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422358990
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
I am indeed worried about borders, now i understand your idea, just consider current block, i will push a commit later.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422390737
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
I think the loop of `readVInt()` needs to stay? because we needs update position of block before `readVInt()` in different directory implementations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871224023
Thanks for explaining! i agree that the micro benchmarks results are for reference only, so let we backport it :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871203007
Yeah, i backport this PR to branch_9x on my local machine, and run the benchmark with java11, i got performance regression for `MMapDirectoryInputs`, even if we not change the code for `ByteBufferIndexInput` :(
java11
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVInt 64 thrpt 5 5.064 ± 0.069 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVIntBaseline 64 thrpt 5 1.612 ± 0.078 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 6.334 ± 0.914 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 7.362 ± 0.505 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readVInt 64 thrpt 5 4.885 ± 0.545 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVInt 64 thrpt 5 2.977 ± 0.346 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 2.660 ± 1.700 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1841347419
Hi,
Did you create this one with the jmh option `-perfasm`? This looks like unoptimized code generated only by C1, not by the C2 compiler.
It would be good to have 2 asm dumps: one with your patch and one where the benchmark just calls the inherited default impl on Mmapdir.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1837156121
Hi,
We do not even implement readVInt for memory segments. Why should we implement it for this complex case.
Please share assembly output of optimized code, otherwise -1 to apply any changes to MemorySegmentIndexInput and (Mapped)ByteBufferIndexInput.
This normally inlines perfectly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1421801910
##########
lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/GroupVIntBenchmark.java:
##########
@@ -140,10 +155,12 @@ public void init() throws Exception {
}
initByteBufferInput(docs);
initArrayInput(docs);
+ initNioInput(docs);
+ initByteBuffersInput(docs);
}
@Benchmark
- public void byteBufferReadVInt(Blackhole bh) throws IOException {
+ public void mmap_byteBufferReadVInt(Blackhole bh) throws IOException {
Review Comment:
Looks fine.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1846883907
I will nag Maurizio again about the problem with slice(). The reason for this was some strange problem with Hotspot. I thought they fixed it.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420364348
##########
lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseDirectoryTestCase.java:
##########
@@ -1438,4 +1440,68 @@ public void testListAllIsSorted() throws IOException {
assertArrayEquals(expected, actual);
}
}
+
+ public void testDataTypes() throws IOException {
+ final long[] values = new long[] {43, 12345, 123456, 1234567890};
+ try (Directory dir = getDirectory(createTempDir("testDataTypes"))) {
+ IndexOutput out = dir.createOutput("test", IOContext.DEFAULT);
+ out.writeByte((byte) 43);
+ out.writeShort((short) 12345);
+ out.writeInt(1234567890);
+ out.writeGroupVInts(values, 4);
+ out.writeLong(1234567890123456789L);
+ out.close();
+
+ long[] restored = new long[4];
+ IndexInput in = dir.openInput("test", IOContext.DEFAULT);
+ assertEquals(43, in.readByte());
+ assertEquals(12345, in.readShort());
+ assertEquals(1234567890, in.readInt());
+ in.readGroupVInts(restored, 4);
+ assertArrayEquals(values, restored);
+ assertEquals(1234567890123456789L, in.readLong());
+ in.close();
+ }
+ }
+
+ public void testGroupVInt() throws IOException {
+ try (Directory dir = getDirectory(createTempDir("testGroupVInt"))) {
+ // test fallback to default implementation of readGroupVInt
+ doTestGroupVInt(dir, 5, 1, 6, 8);
+
+ // use more iterations to covers all bpv
+ doTestGroupVInt(dir, atLeast(100), 1, 31, 128);
+
+ // we use BaseChunkedDirectoryTestCase#testGroupVIntMultiBlocks cover multiple blocks for
+ // ByteBuffersDataInput and MMapDirectory
+ }
+ }
+
+ protected void doTestGroupVInt(
+ Directory dir, int iterations, int minBpv, int maxBpv, int maxNumValues) throws IOException {
+ long[] values = new long[maxNumValues];
+ long[] restored = new long[maxNumValues];
+
+ for (int i = 0; i < iterations; i++) {
Review Comment:
I am a bit afraid that those tests kill my SSD at some point (also Jenkin's SSD). This creates files over and over. With test directories its not a problem, but with real FDDirectory ones we should reduce the iteration counts.
The chunked test should clearly setup a directory with a random chunk size once and run all tests on it. Ideally write only one file with multiple variants of groupVints behind each other (so it definitely crosses borders) and then read all of them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420418454
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.util;
+
+import java.io.IOException;
+import org.apache.lucene.store.DataInput;
+
+/**
+ * This class contains utility methods and constants for group varint
+ *
+ * @lucene.internal
+ */
+public final class GroupVIntUtil {
+ // the maximum length of a single group-varint is 4 integers + 1 byte flag.
+ public static final int MAX_LENGTH_PER_GROUP = 17;
+ private static final int[] MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
+
+ /**
+ * Default implementation of read single group, for optimal performance, you should use {@link
+ * DataInput#readGroupVInts(long[], int)} instead.
+ *
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ */
+ public static void readGroupVInt(DataInput in, long[] dst, int offset) throws IOException {
+ final int flag = in.readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ dst[offset] = readLongInGroup(in, n1Minus1);
+ dst[offset + 1] = readLongInGroup(in, n2Minus1);
+ dst[offset + 2] = readLongInGroup(in, n3Minus1);
+ dst[offset + 3] = readLongInGroup(in, n4Minus1);
+ }
+
+ private static long readLongInGroup(DataInput in, int numBytesMinus1) throws IOException {
+ switch (numBytesMinus1) {
+ case 0:
+ return in.readByte() & 0xFFL;
+ case 1:
+ return in.readShort() & 0xFFFFL;
+ case 2:
+ return (in.readShort() & 0xFFFFL) | ((in.readByte() & 0xFFL) << 16);
+ default:
+ return in.readInt() & 0xFFFFFFFFL;
+ }
+ }
+
+ /**
+ * Provides an abstraction for read int values, so that decoding logic can be reused in different
+ * DataInput.
+ */
+ public static interface IntReader {
+ int read(long v);
+ }
+
+ /**
+ * Faster implementation of read single group, It read values from the buffer that would not cross
+ * boundaries.
+ *
+ * @param flag the flag of group varint.
+ * @param reader the supplier of read int.
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ * @return the number of bytes read, it is a positive number and less than {@link
+ * #MAX_LENGTH_PER_GROUP}
+ */
+ public static int readGroupVInt(int flag, IntReader reader, long pos, long[] dst, int offset)
+ throws IOException {
Review Comment:
@uschindler should we also throws `NullPointerException`, `IllegalStateException` exception that maybe happen in `MemorySegmentIndexInput`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420565417
##########
lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseDirectoryTestCase.java:
##########
@@ -1438,4 +1440,68 @@ public void testListAllIsSorted() throws IOException {
assertArrayEquals(expected, actual);
}
}
+
+ public void testDataTypes() throws IOException {
+ final long[] values = new long[] {43, 12345, 123456, 1234567890};
+ try (Directory dir = getDirectory(createTempDir("testDataTypes"))) {
+ IndexOutput out = dir.createOutput("test", IOContext.DEFAULT);
+ out.writeByte((byte) 43);
+ out.writeShort((short) 12345);
+ out.writeInt(1234567890);
+ out.writeGroupVInts(values, 4);
+ out.writeLong(1234567890123456789L);
+ out.close();
+
+ long[] restored = new long[4];
+ IndexInput in = dir.openInput("test", IOContext.DEFAULT);
+ assertEquals(43, in.readByte());
+ assertEquals(12345, in.readShort());
+ assertEquals(1234567890, in.readInt());
+ in.readGroupVInts(restored, 4);
+ assertArrayEquals(values, restored);
+ assertEquals(1234567890123456789L, in.readLong());
+ in.close();
+ }
+ }
+
+ public void testGroupVInt() throws IOException {
+ try (Directory dir = getDirectory(createTempDir("testGroupVInt"))) {
+ // test fallback to default implementation of readGroupVInt
+ doTestGroupVInt(dir, 5, 1, 6, 8);
+
+ // use more iterations to covers all bpv
+ doTestGroupVInt(dir, atLeast(100), 1, 31, 128);
+
+ // we use BaseChunkedDirectoryTestCase#testGroupVIntMultiBlocks cover multiple blocks for
+ // ByteBuffersDataInput and MMapDirectory
+ }
+ }
+
+ protected void doTestGroupVInt(
+ Directory dir, int iterations, int minBpv, int maxBpv, int maxNumValues) throws IOException {
+ long[] values = new long[maxNumValues];
+ long[] restored = new long[maxNumValues];
+
+ for (int i = 0; i < iterations; i++) {
Review Comment:
I changed the all iterations write to a single file, then do `writeVInt` to an other file as expected.
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -62,4 +62,42 @@ private static long readLongInGroup(DataInput in, int numBytesMinus1) throws IOE
return in.readInt() & 0xFFFFFFFFL;
}
}
+
+ /**
+ * Provides an abstraction for read int values, so that decoding logic can be reused in different DataInput.
+ *
+ */
+ public static interface IntReader {
+ int read(long v);
+ }
+
+ /**
+ * Faster implementation of read single group, It read values from the buffer that would not cross
+ * boundaries.
+ *
+ * @param flag the flag of group varint.
+ * @param reader the supplier of read int.
+ * @param dst the array to read ints into.
Review Comment:
sorry for the missing!
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -324,24 +324,9 @@ private void readGroupVInt(long[] dst, int offset) throws IOException {
try {
final int flag = curSegment.get(LAYOUT_BYTE, curPosition++) & 0xFF;
-
- final int n1Minus1 = flag >> 6;
- final int n2Minus1 = (flag >> 4) & 0x03;
- final int n3Minus1 = (flag >> 2) & 0x03;
- final int n4Minus1 = flag & 0x03;
-
- dst[offset] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n1Minus1];
- curPosition += 1 + n1Minus1;
- dst[offset + 1] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n2Minus1];
- curPosition += 1 + n2Minus1;
- dst[offset + 2] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n3Minus1];
- curPosition += 1 + n3Minus1;
- dst[offset + 3] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n4Minus1];
- curPosition += 1 + n4Minus1;
+ curPosition +=
+ GroupVIntUtil.readGroupVInt(
+ flag, p -> curSegment.get(LAYOUT_LE_INT, p), curPosition, dst, offset);
Review Comment:
the `curPosition` had +1 when read flag, so it don't need +1
> This is why I'd like to have a test that reads a vint group and other data from the same input placed behind each other!
In `BaseDirectoryTestCase#testDataTypes` we did the similar test, is that enough?
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,34 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(dst, i);
+ }
+ for (; i < limit; ++i) {
+ dst[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] dst, int offset) throws IOException {
+ final MemorySegment curSegment = this.curSegment;
Review Comment:
okay!
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -62,4 +62,42 @@ private static long readLongInGroup(DataInput in, int numBytesMinus1) throws IOE
return in.readInt() & 0xFFFFFFFFL;
}
}
+
+ /**
+ * Provides an abstraction for read int values, so that decoding logic can be reused in different DataInput.
+ *
+ */
+ public static interface IntReader {
Review Comment:
+1
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.util;
+
+import java.io.IOException;
+import org.apache.lucene.store.DataInput;
+
+/**
+ * This class contains utility methods and constants for group varint
+ *
+ * @lucene.internal
+ */
+public final class GroupVIntUtil {
+ // the maximum length of a single group-varint is 4 integers + 1 byte flag.
+ public static final int MAX_LENGTH_PER_GROUP = 17;
+ private static final int[] MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
+
+ /**
+ * Default implementation of read single group, for optimal performance, you should use {@link
+ * DataInput#readGroupVInts(long[], int)} instead.
+ *
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ */
+ public static void readGroupVInt(DataInput in, long[] dst, int offset) throws IOException {
+ final int flag = in.readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ dst[offset] = readLongInGroup(in, n1Minus1);
+ dst[offset + 1] = readLongInGroup(in, n2Minus1);
+ dst[offset + 2] = readLongInGroup(in, n3Minus1);
+ dst[offset + 3] = readLongInGroup(in, n4Minus1);
+ }
+
+ private static long readLongInGroup(DataInput in, int numBytesMinus1) throws IOException {
+ switch (numBytesMinus1) {
+ case 0:
+ return in.readByte() & 0xFFL;
+ case 1:
+ return in.readShort() & 0xFFFFL;
+ case 2:
+ return (in.readShort() & 0xFFFFL) | ((in.readByte() & 0xFFL) << 16);
+ default:
+ return in.readInt() & 0xFFFFFFFFL;
+ }
+ }
+
+ /**
+ * Provides an abstraction for read int values, so that decoding logic can be reused in different
+ * DataInput.
+ */
+ public static interface IntReader {
+ int read(long v);
+ }
+
+ /**
+ * Faster implementation of read single group, It read values from the buffer that would not cross
+ * boundaries.
+ *
+ * @param flag the flag of group varint.
+ * @param reader the supplier of read int.
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ * @return the number of bytes read, it is a positive number and less than {@link
+ * #MAX_LENGTH_PER_GROUP}
+ */
+ public static int readGroupVInt(int flag, IntReader reader, long pos, long[] dst, int offset)
+ throws IOException {
Review Comment:
Thanks for explaining :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1846710600
> Thank you for quick impl Adrien, for reference, i tried this approach [code link](https://github.com/easyice/lucene/commit/13851013e98ff8e27f05fa6dc4bc2e450ea6c03d#diff-c81a04bd13d225f3a2dc2c47bde9590686fe5bb0a197c99eeec1a35bf2cc04cc) ,it's no performance regression on NIOFSDirectory and ByteBuffersDataInput, but terrible performance on MemorySegment:
This looks fine from the implementation, looks cool.
The performance on mmap is bad, there must be some problem with the slice/asBuffer code.
I know that this made problems in the past (till Java 17 incubating APIs it was *not possible* to copy slices of data from a MemorySegment to a heap array, so readBytes/readLongs/readFloats needed to be implemented to use a slice and then copy the whole slice to the heap array). See a early draft #177. The JDK people fixed it, so we can use the copy methods in MemorySegment now: https://bugs.openjdk.org/browse/JDK-8268743
It looks like we were hit by the same problem. The reason was that escape analysis did not work correctly, so the slice was allocated on every call. This should no longer be a problem, so maybe investigate what the problem is. Do you see GC activity during benchmark?
Anyways, thanks for trying. I like the new code much better, but it does not help for MemorSegment. :-(
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1851098019
Hi @easyice,
I have a better idea. Lets keep the 2 different method, but do another trick:
- The base class DataInput implements the public outer loop as a final implementation, subclasses won't override it: `public final void readGroupVInts(long[] dst, int limit) throws IOException`; this method does the outer loop and the tail readVInt(). There's nothing to optimize there anymore, so make that method final. The trick is now that this method calls inside the loop a `protected readGroupVInt()` method, where the default implementation of it is the one from the static helper class
- Subclasses like MemorySegment/ByteBuffer would just override the protected `readGroupVInt()` and possible provide their own implementation.
In short:
- make the outer loop a final public method thats called from client code
- make the previous private method to read a block protected and implement it in subclasses
This allows subclasses to just optimize by overriding the protected method and from there call the static helper method with the lambda. MemorySegment would also wrap with try...catch.
```java
class DataInput.java:
public final void readGroupVInts(long[] dst, int limit) throws IOException {
int i;
for (i = 0; i <= limit - 4; i += 4) {
this.readGroupVInt(this, dst, i);
}
for (; i < limit; ++i) {
dst[i] = readVInt();
}
}
protected void readGroupVInt(long[] dst, int offset) throws IOException {
GroupVIntUtil.readGroupVInt(this, dst, i);
}
class MemorySegmentindexInput:
@Override
protected void readGroupVInt(long[] dst, int offset) throws IOException {
try {
curPosition +=
GroupVIntUtil.readGroupVInt(
this,
this.curSegment.byteSize() - curPosition,
p -> this.curSegment.get(LAYOUT_LE_INT, p),
curPosition,
dst,
i);
} catch (NullPointerException | IllegalStateException e) {
throw alreadyClosed(e);
}
}
```
Do you get the idea?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1415479977
##########
lucene/core/src/java/org/apache/lucene/store/DataOutput.java:
##########
@@ -324,4 +326,42 @@ public void writeSetOfStrings(Set<String> set) throws IOException {
writeString(value);
}
}
+
+ /**
+ * Encode integers using group-varint. It uses {@link DataOutput#writeVInt VInt} to encode tail
+ * values that are not enough for a group. we need a long[] because this is what postings are
+ * using, all longs are actually required to be integers.
+ *
+ * @param values the values to write
+ * @param limit the number of values to write.
+ */
+ public void writeGroupVInts(long[] values, int limit) throws IOException {
Review Comment:
okay!
##########
lucene/core/src/java/org/apache/lucene/store/ByteBuffersDataInput.java:
##########
@@ -212,6 +213,46 @@ public long readLong() throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(dst, i);
+ }
+ for (; i < limit; ++i) {
+ dst[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] dst, int offset) throws IOException {
+ ByteBuffer block = blocks[blockIndex(pos)];
+ int blockOffset = blockOffset(pos);
+ if (block.limit() - blockOffset < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
+ GroupVIntUtil.fallbackReadGroupVInt(this, dst, offset);
+ return;
+ }
+
+ final int flag = readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ blockOffset = blockOffset(pos);
Review Comment:
+1, i did the similar change in `BufferedIndexInput#readGroupVInt`
##########
lucene/core/src/java/org/apache/lucene/store/DataOutput.java:
##########
@@ -29,6 +30,7 @@
* internal state like file position).
*/
public abstract class DataOutput {
+ private BytesRefBuilder groupVIntBytes = new BytesRefBuilder();
Review Comment:
+1, I will pay more attention to this issue.
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,48 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(dst, i);
+ }
+ for (; i < limit; ++i) {
+ dst[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] dst, int offset) throws IOException {
+ if (curSegment.byteSize() - curPosition < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
+ GroupVIntUtil.fallbackReadGroupVInt(this, dst, offset);
+ return;
+ }
+
+ try {
+ final int flag = readByte() & 0xFF;
Review Comment:
+1
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,48 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(dst, i);
+ }
+ for (; i < limit; ++i) {
+ dst[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] dst, int offset) throws IOException {
+ if (curSegment.byteSize() - curPosition < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
+ GroupVIntUtil.fallbackReadGroupVInt(this, dst, offset);
+ return;
+ }
+
Review Comment:
done, i wonder what the impact on JVM if the variable maybe updated? Thanks!
##########
lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseDirectoryTestCase.java:
##########
@@ -1438,4 +1440,68 @@ public void testListAllIsSorted() throws IOException {
assertArrayEquals(expected, actual);
}
}
+
+ public void testDataTypes() throws IOException {
+ final long[] values = new long[] {43, 12345, 123456, 1234567890};
+ try (Directory dir = getDirectory(createTempDir("testDataTypes"))) {
+ IndexOutput out = dir.createOutput("test", IOContext.DEFAULT);
+ out.writeByte((byte) 43);
+ out.writeShort((short) 12345);
+ out.writeInt(1234567890);
+ out.writeGroupVInts(values, 4);
+ out.writeLong(1234567890123456789L);
+ out.close();
+
+ long[] restored = new long[4];
+ IndexInput in = dir.openInput("test", IOContext.DEFAULT);
+ assertEquals(43, in.readByte());
+ assertEquals(12345, in.readShort());
+ assertEquals(1234567890, in.readInt());
+ in.readGroupVInts(restored, 4);
+ assertArrayEquals(values, restored);
+ assertEquals(1234567890123456789L, in.readLong());
+ in.close();
+ }
+ }
+
+ public void testGroupVInt() throws IOException {
+ try (Directory dir = getDirectory(createTempDir("testGroupVInt"))) {
+ // test fallbackReadGroupVInt
+ doTestGroupVInt(dir, 5, 1, 6, 8);
+
+ // test large data to covers multiple blocks in ByteBuffersDataInput
Review Comment:
Thank you @jpountz , i added a separate test to `BaseChunkedDirectoryTestCase` to make sure use multi blocks, this will both cover `MMapDirectory` and `ByteBuffersDataInput`
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.util;
+
+import java.io.IOException;
+import org.apache.lucene.store.DataInput;
+
+/**
+ * This class contains utility methods and constants for group varint
+ *
+ * @lucene.internal
+ */
+public final class GroupVIntUtil {
+ // the maximum length of a single group-varint is 4 integers + 1 byte flag.
+ public static final int MAX_LENGTH_PER_GROUP = 17;
+ public static final int[] GROUP_VINT_MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
+
+ /**
+ * Read single group varint. we need a long[] because this is what postings are using.
+ *
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ */
+ public static void fallbackReadGroupVInt(DataInput in, long[] dst, int offset)
Review Comment:
+1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1843857763
The best idea that I have instead of VarHandles: Create an implementation for ByteBuffer (using the methods available there). This implementation would work with:
- byte arrays: Use ByteBuffer.wrap(), do stuff. Don't care about the instances, with Java 11+ the escape anaylsis will nuke the bytebuffers
- ByteBuffers - use as is
- MemorySegment: You can wrap a MemorySegent slice as ByteBuffer (like byte arrays). The MemorySegment code wraps just the portion as a single use byteBuffer, calls the generic method and throws it away. Also here: the temporary object is nuked by escape analysis
I would give that a try: It is easy and reuseable as we just use a ByteBuffer as a view on top of the small area.
P.S.: That escape analysis works you can see in our Panama Vector Util. Every vector multiplication creates around 20 objects....
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1853232196
I agree with you, the getInt() seems more expensive than `MemorySegment`, i prefer to revert the change on `ByteBufferIndexInput`, then the similar improve on java20, java19 (to keep the 3 impls aligned to each other)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1867867281
I think, @mikemccand should have nightly benchmarks for both branches, the stable one and the main one.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1869575788
There seems to be a speedup on [prefix queries](http://people.apache.org/~mikemccand/lucenebench/Prefix3.html) in nightly benchmarks.
For reference, here is the benchmark in branch_9x with this PR, the performance of `ByteBuffersIndexInput` looks better than java17, `NIOFSDirectoryInputs` is similar than java17, but `MMapDirectoryInputs` has performance regression( we don't change the MMapDirectory impl)
java11:
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVInt 64 thrpt 5 5.064 ± 0.069 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVIntBaseline 64 thrpt 5 1.612 ± 0.078 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 6.334 ± 0.914 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 7.362 ± 0.505 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readVInt 64 thrpt 5 4.885 ± 0.545 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVInt 64 thrpt 5 2.977 ± 0.346 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 2.660 ± 1.700 ops/us
```
I ran with `-XX:+PrintInlining` parameter in `benchMMapDirectoryInputs_readGroupVInt` task, the output is similar to java17
```
702 799 3 org.apache.lucene.store.DataInput::readGroupVInts (41 bytes) made not entrant
@ 12 org.apache.lucene.store.DataInput::readGroupVInt (7 bytes) inline (hot)
\-> TypeProfile (26795/26795 counts) = org/apache/lucene/store/ByteBufferIndexInput$SingleBufferImpl
@ 3 org.apache.lucene.util.GroupVIntUtil::readGroupVInt (77 bytes) inline (hot)
! @ 1 org.apache.lucene.store.ByteBufferIndexInput::readByte (100 bytes) inline (hot)
@ 8 org.apache.lucene.store.ByteBufferGuard::getByte (9 bytes) inline (hot)
@ 1 org.apache.lucene.store.ByteBufferGuard::ensureValid (16 bytes) inline (hot)
! @ 5 java.nio.DirectByteBuffer::get (28 bytes) inline (hot)
\-> TypeProfile (13760/13760 counts) = java/nio/DirectByteBufferR
@ 5 java.nio.Buffer::nextGetIndex (31 bytes) inline (hot)
@ 8 java.nio.DirectByteBuffer::ix (10 bytes) inline (hot)
@ 11 jdk.internal.misc.Unsafe::getByte (7 bytes) force inline by annotation
@ 3 jdk.internal.misc.Unsafe::getByte (0 bytes) (intrinsic)
@ 16 java.lang.ref.Reference::reachabilityFence (1 bytes) force inline by annotation
@ 39 org.apache.lucene.util.GroupVIntUtil::readLongInGroup (81 bytes) inline (hot)
! @ 49 org.apache.lucene.store.ByteBufferIndexInput::readShort (25 bytes) inline (hot)
@ 8 org.apache.lucene.store.ByteBufferGuard::getShort (9 bytes) inline (hot)
@ 1 org.apache.lucene.store.ByteBufferGuard::ensureValid (16 bytes) inline (hot)
! @ 5 java.nio.DirectByteBuffer::getShort (27 bytes) inline (hot)
\-> TypeProfile (59062/59062 counts) = java/nio/DirectByteBufferR
@ 4 java.nio.Buffer::nextGetIndex (38 bytes) inline (hot)
@ 7 java.nio.DirectByteBuffer::ix (10 bytes) inline (hot)
! @ 10 java.nio.DirectByteBuffer::getShort (32 bytes) inline (hot)
@ 9 jdk.internal.misc.Unsafe::getShortUnaligned (12 bytes) inline (hot)
@ 5 jdk.internal.misc.Unsafe::getShortUnaligned (33 bytes) (intrinsic)
@ 8 jdk.internal.misc.Unsafe::convEndian (16 bytes) inline (hot)
@ 17 java.lang.ref.Reference::reachabilityFence (1 bytes) force inline by annotation
@ 15 java.lang.ref.Reference::reachabilityFence (1 bytes) force inline by annotation
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871203328
> As the naming of classes is causing issues all the time, I will open a PR and rename the badly named `ByteBufferIndexInput` used by MMapDirectory for Java 11-18 to `MappedByteBufferIndexInput`.
That's cool!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871206021
> If you have backported this PR and see a difference, it is a relic. Just raise number of repetitions.
Ohhh... let me try again..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871211606
You see a relic. There is no slowdown. The baseline code is exactly the same like the one
The difference may come from different decisions by hotspot regarding inlining possibly because the benchmark runtime was too short. You won't the a difference in production. You are hunting ghosts.
I see no reason to not backport this code. In general, I don't think the whole code here will make a big difference in production, as seen by Mike's benchmark. This is the reason why I am not happy in moving the code complexity to the indexinputs at all.
So either backport it or revert it in total.
These are only microbenchmarks that don't have a large impact at all. If it is twice as fast you will see a difference, but not for the code here. In production the inline decisions by hotspot will be totally different. The benchmark code only runs in isolation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1855355717
After copy paste code to `MemorysegmentIndexInput`, they work well:
java19:
```
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 9.050 ± 0.288 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 4.686 ± 0.099 ops/us
```
java20:
```
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 8.773 ± 4.910 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 4.408 ± 1.843 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1855104523
> Let's keep ByteBufferIndexInput (without s) as is. Maybe work on that later. We would need to figure out what is causing slowness here.
Yes, it is very strange. I have spent some time investigating this but nothing found yet. I will continue to pay attention to this.
> I tend to think we should for now only merge this to main.
+1, I think backporting this PR to version 9.9 might not be necessary. any suggestions on this? @jpountz
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "rmuir (via GitHub)" <gi...@apache.org>.
rmuir commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1840885611
> Thank you very much for your suggestions, i had fixed the comments from @jpountz, but the related to Mmapdir will be later(such as java19, java20 support), because we need to confirm whether to change it. i agree that we should be cautious here. in my understanding the optimized code is faster than the main branch probably because the optimized code doesn't need a `switch` statement in `GroupVIntUtil#readLongInGroup`, although it was inlined.
>
> The JMH output for currently, it's similar to before we replaced `varHander` with `ByteBuffer#getInt()` java17
>
> ```
> Benchmark (size) Mode Cnt Score Error Units
> GroupVIntBenchmark.byteBuffersReadGroupVInt 64 thrpt 5 4.698 ± 2.039 ops/us
> GroupVIntBenchmark.byteBuffersReadGroupVIntBaseline 64 thrpt 5 2.167 ± 0.064 ops/us
> GroupVIntBenchmark.mmap_byteBufferReadGroupVInt 64 thrpt 5 7.386 ± 0.524 ops/us
> GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline 64 thrpt 5 7.358 ± 1.316 ops/us
> GroupVIntBenchmark.nioReadGroupVInt 64 thrpt 5 8.236 ± 1.052 ops/us
> GroupVIntBenchmark.nioReadGroupVIntBaseline 64 thrpt 5 5.381 ± 1.134 ops/us
> ```
>
> java21
>
> ```
> Benchmark (size) Mode Cnt Score Error Units
> GroupVIntBenchmark.byteBuffersReadGroupVInt 64 thrpt 5 4.622 ± 0.880 ops/us
> GroupVIntBenchmark.byteBuffersReadGroupVIntBaseline 64 thrpt 5 1.674 ± 0.245 ops/us
> GroupVIntBenchmark.mmap_byteBufferReadGroupVInt 64 thrpt 5 10.165 ± 1.083 ops/us
> GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline 64 thrpt 5 5.104 ± 0.388 ops/us
> GroupVIntBenchmark.nioReadGroupVInt 64 thrpt 5 9.527 ± 1.556 ops/us
> GroupVIntBenchmark.nioReadGroupVIntBaseline 64 thrpt 5 5.351 ± 0.621 ops/us
> ```
>
> @uschindler Thank you for take a look at this, here is the assembly output for `MemorySegmentIndexInput#readGroupVInt`, using command: `java -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly --module-path lucene/benchmark-jmh/build/benchmarks --module org.apache.lucene.benchmark.jmh GroupVIntBenchmark.mmap`
>
> assembly code
you need to install hsdis to be able to see instructions and not just binary data from printassembly. see https://github.com/apache/lucene/blob/main/help/jmh.txt
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871196645
If you have backported this PR and see a difference, it is a relic. Just raise number of repetitions.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1872008672
Hi @easyice,
I backported the PR. There was only a change in the test because in Java 11 does not have random() with two parameters. We have TestUtil for that.
Uwe
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1843848755
Hi Adrien,
Thanks for the more insight!
> @uschindler FYI this is what I'm getting: https://gist.github.com/jpountz/be81b1eb93c6118aac65c3679911f1d8. There are two files: baseline.txt for the default impl, and contender.txt for the optimized impl.
This looks much better than the files posted before. This shows that both (the baseline and contender) methods are fully inlined (almost...). So the difference is indeed the internal implementation.
> > In general I am not sure if we really need specialization in Mmapdir.
> > We do not even implement readVInt for memory segments. Why should we implement it for this complex case?
>
> To be clear, this specialization is not about doing the same kind of optimization that the JVM would do by inlining, it's about taking advantage of the fact that many of our Directory implementations can do unaligned random reads under the hood to decode group-varints more efficiently, fewer conditionals specifically.
This information wasn't available to me.
With unaligned random reads you mean that you read with positional reads from the area where the buffer is saved? With default DataInput you can only go forward, so you need to read everything and also in order.
This explains, but I am really not happy to put this very special code into theeI/O layer of Lucene. This makes it unmaintainable, sorry.
I have not much time at the moment, but could we for now leave out MMapDirectory (all variants) form the optimization and start small? I have some ideas to rewrite that code to not duplicate the same code with small changes over and over. What you need is some way to read the the values unaliged from an indexed (int for arrays and bytebuffers, long for memorysegments)? This is exactly what VarHandles do! We could write a generic implementation that uses VarHandles to access the underlying bytes. You can get Varhandles from byte arrays (see BitUtil class - you already use that) or from ByteBuffers (works the same way to get a VarHandle to access internals of ByteBuffers - P.S.: We could use that to get rid of the stupid LongBuffers in the legacy MMap-ByteBufferIndexInput - so I played around with it already). And finally the accessors of MemorySegment are Varhandles behind the scenes, too (just with long coordinate).
So my idea would be an implementation that uses VarHandles and this one can be used for byte[], ByteBuffer[] and MemorySegment. The impl is basically the same (takes an offset for start of block and the receiver and then decodes everything after that offset). All implementations would create an instance of that GroupVarInt decoder that knows the varhandles and the receiver object).
I am a bit busy the next day, I can maybe look into that at the weekend. Maybe we get a good API without copypasting this horrible complex code that I don't under stand ten times into our repository. This is my main issue with this. I do much for performance but I won't copypaste code everywhere just to get a few percents. Sorry.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422417582
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
You could also call `skipBytes()`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422436257
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
It seems can be work well, i will do it then re run benchmark. so we use `skipBytes` directly, regardless of whether the current instance is subclasses of `IndexInput`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420377148
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -324,24 +324,9 @@ private void readGroupVInt(long[] dst, int offset) throws IOException {
try {
final int flag = curSegment.get(LAYOUT_BYTE, curPosition++) & 0xFF;
-
- final int n1Minus1 = flag >> 6;
- final int n2Minus1 = (flag >> 4) & 0x03;
- final int n3Minus1 = (flag >> 2) & 0x03;
- final int n4Minus1 = flag & 0x03;
-
- dst[offset] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n1Minus1];
- curPosition += 1 + n1Minus1;
- dst[offset + 1] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n2Minus1];
- curPosition += 1 + n2Minus1;
- dst[offset + 2] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n3Minus1];
- curPosition += 1 + n3Minus1;
- dst[offset + 3] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n4Minus1];
- curPosition += 1 + n4Minus1;
+ curPosition +=
+ GroupVIntUtil.readGroupVInt(
+ flag, p -> curSegment.get(LAYOUT_LE_INT, p), curPosition, dst, offset);
Review Comment:
isn't the +1 missing here like above?
This is why I'd like to have a test that reads a vint group and other data from the same input placed behind each other!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420373977
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -62,4 +62,42 @@ private static long readLongInGroup(DataInput in, int numBytesMinus1) throws IOE
return in.readInt() & 0xFFFFFFFFL;
}
}
+
+ /**
+ * Provides an abstraction for read int values, so that decoding logic can be reused in different DataInput.
+ *
+ */
+ public static interface IntReader {
Review Comment:
add `@FunctionalInterface`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1415213374
##########
lucene/core/src/java/org/apache/lucene/store/ByteBuffersDataInput.java:
##########
@@ -212,6 +213,46 @@ public long readLong() throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(dst, i);
+ }
+ for (; i < limit; ++i) {
+ dst[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] dst, int offset) throws IOException {
+ ByteBuffer block = blocks[blockIndex(pos)];
+ int blockOffset = blockOffset(pos);
+ if (block.limit() - blockOffset < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
+ GroupVIntUtil.fallbackReadGroupVInt(this, dst, offset);
+ return;
+ }
+
+ final int flag = readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ blockOffset = blockOffset(pos);
Review Comment:
We already computed `blockOffset()` above, can we avoid computing it twice, e.g. by replacing the `readByte()` call with `block.get(blockOffset++)`?
##########
lucene/core/src/java/org/apache/lucene/store/DataOutput.java:
##########
@@ -29,6 +30,7 @@
* internal state like file position).
*/
public abstract class DataOutput {
+ private BytesRefBuilder groupVIntBytes = new BytesRefBuilder();
Review Comment:
Can it be made final?
##########
lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseDirectoryTestCase.java:
##########
@@ -1438,4 +1440,68 @@ public void testListAllIsSorted() throws IOException {
assertArrayEquals(expected, actual);
}
}
+
+ public void testDataTypes() throws IOException {
+ final long[] values = new long[] {43, 12345, 123456, 1234567890};
+ try (Directory dir = getDirectory(createTempDir("testDataTypes"))) {
+ IndexOutput out = dir.createOutput("test", IOContext.DEFAULT);
+ out.writeByte((byte) 43);
+ out.writeShort((short) 12345);
+ out.writeInt(1234567890);
+ out.writeGroupVInts(values, 4);
+ out.writeLong(1234567890123456789L);
+ out.close();
+
+ long[] restored = new long[4];
+ IndexInput in = dir.openInput("test", IOContext.DEFAULT);
+ assertEquals(43, in.readByte());
+ assertEquals(12345, in.readShort());
+ assertEquals(1234567890, in.readInt());
+ in.readGroupVInts(restored, 4);
+ assertArrayEquals(values, restored);
+ assertEquals(1234567890123456789L, in.readLong());
+ in.close();
+ }
+ }
+
+ public void testGroupVInt() throws IOException {
+ try (Directory dir = getDirectory(createTempDir("testGroupVInt"))) {
+ // test fallbackReadGroupVInt
+ doTestGroupVInt(dir, 5, 1, 6, 8);
+
+ // test large data to covers multiple blocks in ByteBuffersDataInput
Review Comment:
adding it explicitly since this is probably the most important case to cover
```suggestion
// test large data to covers multiple blocks in ByteBuffersDataInput and MMapDirectory via TestMultiMMap
```
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,48 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(dst, i);
+ }
+ for (; i < limit; ++i) {
+ dst[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] dst, int offset) throws IOException {
+ if (curSegment.byteSize() - curPosition < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
+ GroupVIntUtil.fallbackReadGroupVInt(this, dst, offset);
+ return;
+ }
+
+ try {
+ final int flag = readByte() & 0xFF;
Review Comment:
Since we already did the job of checking that we have enough bytes left, we don't need `readByte()` to do it for us?
```suggestion
final int flag = curSegment.get(LAYOUT_BYTE, curPosition++) & 0xFF;
```
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,48 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(dst, i);
+ }
+ for (; i < limit; ++i) {
+ dst[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] dst, int offset) throws IOException {
+ if (curSegment.byteSize() - curPosition < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
+ GroupVIntUtil.fallbackReadGroupVInt(this, dst, offset);
+ return;
+ }
+
Review Comment:
Maybe copy `curSegment` to a local variable here, e.g. `MemorySegment curSegment = this.curSegment` so that the JVM doesn't have to worry about `curSegment` getting updated?
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.util;
+
+import java.io.IOException;
+import org.apache.lucene.store.DataInput;
+
+/**
+ * This class contains utility methods and constants for group varint
+ *
+ * @lucene.internal
+ */
+public final class GroupVIntUtil {
+ // the maximum length of a single group-varint is 4 integers + 1 byte flag.
+ public static final int MAX_LENGTH_PER_GROUP = 17;
+ public static final int[] GROUP_VINT_MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
+
+ /**
+ * Read single group varint. we need a long[] because this is what postings are using.
+ *
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ */
+ public static void fallbackReadGroupVInt(DataInput in, long[] dst, int offset)
Review Comment:
It doesn't need `fallback` as a prefix anymore now that it's in its own class. Let's document that this is a default implementation and that it is recommended to use `DataInput#readGroupVInts` directly rather than this method?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1850424855
The performance of the new approach seems regressed a bit more on java21_benchMMapDirectoryInputs_readGroupVInt, here is the difference of speed up relative to the baseline.
| | task | previous commit | current | diff |
|--------|------------------------------------------|------------------|--------------|--------|
| java17 | benchByteBuffersIndexInput_readGroupVInt | 2.3x faster | 2.1x faster | -0.2x |
| java17 | benchNIOFSDirectoryInputs_readGroupVInt | 1.15x faster | 1.09x faster | -0.06x |
| java21 | benchByteBuffersIndexInput_readGroupVInt | 2.7x faster | 3.0x faster | +0.3x |
| java21 | benchNIOFSDirectoryInputs_readGroupVInt | 1.75x faster | 1.24x faster | -0.51x |
| java21 | benchMMapDirectoryInputs_readGroupVInt | 1.74x faster | 1.3x faster | -0.44x |
Benchmark delta:
**Previous commit:**
java21
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.benchByteArrayDataInput_readGroupVInt 64 thrpt 5 11.463 ± 0.371 ops/us
GroupVIntBenchmark.benchByteArrayDataInput_readVInt 64 thrpt 5 4.631 ± 0.970 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVInt 64 thrpt 5 4.346 ± 1.094 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVIntBaseline 64 thrpt 5 1.611 ± 0.408 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 9.099 ± 1.438 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 5.207 ± 0.646 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readVInt 64 thrpt 5 3.998 ± 0.667 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVInt 64 thrpt 5 8.702 ± 0.513 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 4.967 ± 0.319 ops/us
```
java17
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.benchByteArrayDataInput_readGroupVInt 64 thrpt 5 10.309 ± 1.592 ops/us
GroupVIntBenchmark.benchByteArrayDataInput_readVInt 64 thrpt 5 4.236 ± 0.464 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVInt 64 thrpt 5 4.755 ± 0.426 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVIntBaseline 64 thrpt 5 2.012 ± 0.142 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 7.233 ± 0.759 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 7.471 ± 0.274 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readVInt 64 thrpt 5 3.854 ± 0.541 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVInt 64 thrpt 5 6.399 ± 1.494 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 5.557 ± 0.147 ops/us
```
**New approach:**
java17
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.benchByteArrayDataInput_readGroupVInt 64 thrpt 5 4.715 ± 3.024 ops/us
GroupVIntBenchmark.benchByteArrayDataInput_readVInt 64 thrpt 5 4.085 ± 0.352 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVInt 64 thrpt 5 4.194 ± 2.129 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVIntBaseline 64 thrpt 5 1.985 ± 0.594 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 6.946 ± 2.249 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 7.198 ± 1.596 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readVInt 64 thrpt 5 3.859 ± 0.345 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVInt 64 thrpt 5 5.845 ± 1.214 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 5.324 ± 0.470 ops/us
```
java21
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.benchByteArrayDataInput_readGroupVInt 64 thrpt 5 10.705 ± 1.000 ops/us
GroupVIntBenchmark.benchByteArrayDataInput_readVInt 64 thrpt 5 4.785 ± 0.986 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVInt 64 thrpt 5 4.704 ± 1.458 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVIntBaseline 64 thrpt 5 1.518 ± 0.428 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 6.948 ± 3.155 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 5.312 ± 0.223 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readVInt 64 thrpt 5 3.374 ± 2.154 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVInt 64 thrpt 5 6.367 ± 1.217 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 5.095 ± 0.544 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1423722848
##########
lucene/core/src/java/org/apache/lucene/store/ByteBuffersIndexInput.java:
##########
@@ -205,6 +205,12 @@ public void readLongs(long[] dst, int offset, int length) throws IOException {
in.readLongs(dst, offset, length);
}
+ @Override
+ public void readGroupVInt(long[] docs, int limit) throws IOException {
Review Comment:
this should be protected.
Why do we not have an improved implemenattion here? Last parameter should be "offset".
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1851319229
> I have a better idea. Lets keep the 2 different method, but do another trick:
With this great idea, the performance comes back!
java21
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.benchByteArrayDataInput_readGroupVInt 64 thrpt 5 5.458 ± 0.405 ops/us
GroupVIntBenchmark.benchByteArrayDataInput_readVInt 64 thrpt 5 4.837 ± 0.502 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVInt 64 thrpt 5 4.587 ± 0.304 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVIntBaseline 64 thrpt 5 1.799 ± 0.084 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 9.815 ± 0.255 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 5.517 ± 0.230 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readVInt 64 thrpt 5 4.294 ± 0.060 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVInt 64 thrpt 5 8.928 ± 0.313 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 5.121 ± 0.328 ops/us
```
java17
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.benchByteArrayDataInput_readGroupVInt 64 thrpt 5 4.093 ± 2.429 ops/us
GroupVIntBenchmark.benchByteArrayDataInput_readVInt 64 thrpt 5 3.530 ± 1.120 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVInt 64 thrpt 5 3.648 ± 3.295 ops/us
GroupVIntBenchmark.benchByteBuffersIndexInput_readGroupVIntBaseline 64 thrpt 5 1.644 ± 0.844 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 6.992 ± 1.110 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 7.188 ± 1.340 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readVInt 64 thrpt 5 3.690 ± 0.617 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVInt 64 thrpt 5 5.587 ± 4.289 ops/us
GroupVIntBenchmark.benchNIOFSDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 5.283 ± 0.330 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1841712905
@uschindler FYI this is what I'm getting: https://gist.github.com/jpountz/be81b1eb93c6118aac65c3679911f1d8. There are two files: baseline.txt for the default impl, and contender.txt for the optimized impl.
> In general I am not sure if we really need specialization in Mmapdir.
> We do not even implement readVInt for memory segments. Why should we implement it for this complex case?
To be clear, this specialization is not about doing the same kind of optimization that the JVM would do by inlining, it's about taking advantage of the fact that many of our Directory implementations can do unaligned random reads under the hood to decode group-varints more efficiently, fewer conditionals specifically.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1845632140
Thank you for sharing the code, it seems very clear, another way, could we pass the current block(ByteBuffer) to the decode function like below? this will keep the remaining byte checking in each indexinputs.
```java
private void readGroupVInt(long[] dst, int offset) throws IOException {
if (buffer.remaining() < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
GroupVIntUtil.readGroupVInt(this, dst, offset);
return;
}
int pos = buffer.position();
int len = GroupVIntUtil.readGroupVIntFromByteBuffer(buffer, pos, dst, offset);
buffer.position(pos + len);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420387856
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,34 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(dst, i);
+ }
+ for (; i < limit; ++i) {
+ dst[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] dst, int offset) throws IOException {
+ final MemorySegment curSegment = this.curSegment;
Review Comment:
please add a test to the exitsing closed tests, reading readGroupVInt from an already closed IndexInput
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420812950
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -324,24 +324,9 @@ private void readGroupVInt(long[] dst, int offset) throws IOException {
try {
final int flag = curSegment.get(LAYOUT_BYTE, curPosition++) & 0xFF;
-
- final int n1Minus1 = flag >> 6;
- final int n2Minus1 = (flag >> 4) & 0x03;
- final int n3Minus1 = (flag >> 2) & 0x03;
- final int n4Minus1 = flag & 0x03;
-
- dst[offset] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n1Minus1];
- curPosition += 1 + n1Minus1;
- dst[offset + 1] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n2Minus1];
- curPosition += 1 + n2Minus1;
- dst[offset + 2] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n3Minus1];
- curPosition += 1 + n3Minus1;
- dst[offset + 3] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n4Minus1];
- curPosition += 1 + n4Minus1;
+ curPosition +=
+ GroupVIntUtil.readGroupVInt(
+ flag, p -> curSegment.get(LAYOUT_LE_INT, p), curPosition, dst, offset);
Review Comment:
emmm... we use `curSegment.get(LAYOUT_BYTE, curPosition++)` to read flag byte, so `curPosition++` will increment the read pos , is that right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1421414875
##########
lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/GroupVIntBenchmark.java:
##########
@@ -140,10 +155,12 @@ public void init() throws Exception {
}
initByteBufferInput(docs);
initArrayInput(docs);
+ initNioInput(docs);
+ initByteBuffersInput(docs);
}
@Benchmark
- public void byteBufferReadVInt(Blackhole bh) throws IOException {
+ public void mmap_byteBufferReadVInt(Blackhole bh) throws IOException {
Review Comment:
I would rename all those benchmark methods to have better names including the exact implementation's class name. Remove internal details like ByteBuffer vs. something else, it should just like: `benchMMapDirectoryInputs`, `benchBufferedIndexInput`, `benchByteBuffersIndexInput`,...
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -324,24 +324,9 @@ private void readGroupVInt(long[] dst, int offset) throws IOException {
try {
final int flag = curSegment.get(LAYOUT_BYTE, curPosition++) & 0xFF;
-
- final int n1Minus1 = flag >> 6;
- final int n2Minus1 = (flag >> 4) & 0x03;
- final int n3Minus1 = (flag >> 2) & 0x03;
- final int n4Minus1 = flag & 0x03;
-
- dst[offset] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n1Minus1];
- curPosition += 1 + n1Minus1;
- dst[offset + 1] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n2Minus1];
- curPosition += 1 + n2Minus1;
- dst[offset + 2] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n3Minus1];
- curPosition += 1 + n3Minus1;
- dst[offset + 3] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n4Minus1];
- curPosition += 1 + n4Minus1;
+ curPosition +=
+ GroupVIntUtil.readGroupVInt(
+ flag, p -> curSegment.get(LAYOUT_LE_INT, p), curPosition, dst, offset);
Review Comment:
Sorry, I missed the `curPosition++`. It also have some problems because it does not wait till after the method has executed until it incremenets, so in the case of Exceptions the curPosition is wrong afterwards (as it won't be rolled back).
If you look at `readByte()`, it increments after the method call, which is different (this is tricky, i know, but there's a reason why it is done like that).
But to make it simple: Please simply call this.readByte() here, no need to inline the call.
##########
lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java:
##########
@@ -149,6 +150,29 @@ public final int readInt() throws IOException {
}
}
+ @Override
Review Comment:
Hi, would it not be a good idea now to remove the private method and put all of the logic into the static utility method? Basically we need to pass "this" to the method, so it is able to do `readVInt()` and also `readByte()` to get the flag.
It is a bit complicated to describe, if you like I can create a patch (and possbly also push it to your repository). At end, `readGroupVInts(long[] dst, int limit)` should more or less only call the static helper utility method and pass the `IntReader` functional interface. The method should return the number of bytes read using direct access (using the `IntReader`) not the ones read by the normal `read*` methods invoked on `this`. The caller could then increment the file position after it returns.
MMapDircetory inputs would wrap the whole method using `try...catch`. This would make it easy to implement it for all directories:
- ByteBufferIndexInput (without "s"), used by MMapDirectory in Java<19
- MemorySegmentIndexInput
- ByteBuffersIndexInput
- BufferedIndexInput
Then I would agree to this patch: Directory implementations can choose how to implement it but without needing to know what group vints are. This would also simplify testing (we won't need too many tests as all implementations just can the same method and give (optionally) the lambda to allow random access.
Of course the should be a helper static method giving the MAX size of encoded groupVInt based on limit, so code can check before, if remaing size of buffer/segment/array is large enough to work on, so it could fallback to default impl (call super `readGroupVInts`) if needed. I would not care about the fact that for larger limits the blocks must be larger, but for `MMapDirectory` it is very unlikely in production that you hit the boundary (the boundaries are at 16 GiB for Java 19+ and 1 GiB for Java<19).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1849057360
Hi, I was busy this Sunday, sorry for delay. Will check tomorrow.
In general: My idea is to have a single static utility method (like the default one) in the util class that does the *whole* readGroupVInt, but that also (additionally) takes a lambda to random-access read the integer and also takes a parameter with the maximum size available in the context of the caller for random access reads with the lambda. MemorySegmentIndexInput would pass the segment.byteSize()-position, while ByteBuffers would pass remaining(). It would also take the reference offset of the *actual* position so it knows what to add for random-access reads). As return value it would return the new position. Both (reference position before the first block and return value) would be relative for usage by the lambda. The caller then just calls the method with the lambda (possibly wrapping the whole call with the usual NPE/ISE try-catch block).
This would allow an easy implementation by 3rd party directory implementations without knowing how readGroupVInt works internally. 3rd party implementations and our own MMap/NIO/... would just call this static method if they support random access or call super(), if they can't.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1845904374
Lol. That's strange!
I would not have added a readNBytes method and just do the ByteBuffer wrapping in the readVInt method that calls the static method to decode.
If that's still slow we have to do a special case for mmap....
I will check tomorrow or at weekend.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1850511554
Thank you @uschindler , thinking about that too, i will try to a second lambda tomorrow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1851433406
Could we consider not changing `MemorySegmentIndexInput` for java 19 and java20? As a preview feature , it seems reasonable that we only do optimizations in higher versions, and they are not Long-Term-Support (LTS) releases.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1854877951
Let's keep ByteBufferIndexInput (without s) as is. Maybe work on that later. We would need to figure out what is causing slowness here.
So revert the change and copy paste code to MemorysegmentIndexInput.
My question: the coded 9.9 was already released, but as there is no index format change, we can just move the code away from the codec. But as this is now part of indexinput, we must be sure that the format and API is final.
I tend to think we should for now only merge this to main. Before backporting we should ensure that java 11 is not causing speed regression.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1868283208
I appied this for Lucene 10 only (main branch). This also fits changes.txt.
Let's figure out if backporting breaks anything. If this is fine in Lucene 9.x, we can move the changes entry. But for now I'd like to more thoroughly test this and see if Mike's production benchmark shows any changes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1869642731
Hi,
Thanks for the measurements, @easyice. So basically, we can backport the commit without any modifications. I can do this and move change entries afterwards.
No PR is needed for that. It's easy.
Uwe
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871184321
Thank you Uwe, in my understanding we shouldn't backport this PR, because it has performance regression on java11 for `MMapDirectoryInputs` , this is also the main way of reading data. what do you think? CC @jpountz
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1871198139
As the naming of classes is causing issues all the time, I will open a PR and rename the badly named `ByteBufferIndexInput` used by MMapDirectory for Java 11-18 to `MappedByteBufferIndexInput`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1838867648
I ran the benchmark using `wikimediumall`, we can got a minor speed up on java21 with `MMapDirectory`, but no significant improvement with `NIOFSDirectory`(java17), because the `NIOFSDirectory` has some additional cost.
For task `prefix3`, the baseline of `Lucene99PostingsReader.readVIntBlock` calls percentage in the flame graph:
* `NIOFSDirectory` 2.8%
* `MMapDirectory` 9.9%
Here is the benchmark output with java 21, baseline(main), candidate(PR):
<details>
<summary>round 1</summary>
```
TaskQPS baseline StdDevQPS my_modified_version StdDev Pct diff p-value
LowTerm 164.44 (11.4%) 161.36 (10.5%) -1.9% ( -21% - 22%) 0.589
AndHighHigh 30.63 (4.5%) 30.13 (4.7%) -1.6% ( -10% - 7%) 0.260
IntNRQ 15.46 (6.5%) 15.25 (4.1%) -1.3% ( -11% - 9%) 0.437
AndHighMed 53.37 (7.9%) 52.67 (7.9%) -1.3% ( -15% - 15%) 0.598
OrHighMed 41.16 (7.6%) 40.62 (6.5%) -1.3% ( -14% - 13%) 0.556
TermDTSort 63.95 (9.3%) 63.25 (8.5%) -1.1% ( -17% - 18%) 0.702
LowPhrase 34.09 (4.0%) 33.79 (4.6%) -0.9% ( -9% - 8%) 0.514
Fuzzy2 33.43 (2.8%) 33.14 (3.7%) -0.9% ( -7% - 5%) 0.399
MedPhrase 63.94 (4.0%) 63.47 (4.2%) -0.7% ( -8% - 7%) 0.565
AndHighLow 347.49 (2.3%) 344.95 (3.5%) -0.7% ( -6% - 5%) 0.435
MedTerm 300.87 (7.2%) 298.76 (5.7%) -0.7% ( -12% - 13%) 0.731
OrNotHighLow 209.67 (3.5%) 208.27 (3.3%) -0.7% ( -7% - 6%) 0.536
MedIntervalsOrdered 15.79 (2.4%) 15.69 (2.6%) -0.6% ( -5% - 4%) 0.450
HighTerm 228.97 (5.8%) 227.71 (4.5%) -0.6% ( -10% - 10%) 0.737
HighSpanNear 4.51 (1.6%) 4.48 (1.8%) -0.5% ( -3% - 2%) 0.314
MedSloppyPhrase 15.24 (3.1%) 15.17 (3.4%) -0.5% ( -6% - 6%) 0.625
MedSpanNear 6.97 (2.1%) 6.95 (2.1%) -0.3% ( -4% - 4%) 0.668
HighPhrase 19.21 (3.1%) 19.17 (3.4%) -0.2% ( -6% - 6%) 0.841
HighTermTitleSort 46.25 (3.2%) 46.16 (4.7%) -0.2% ( -7% - 7%) 0.886
LowIntervalsOrdered 9.01 (2.0%) 8.99 (1.9%) -0.2% ( -4% - 3%) 0.794
LowSloppyPhrase 40.24 (3.4%) 40.18 (3.9%) -0.2% ( -7% - 7%) 0.890
HighTermDayOfYearSort 160.70 (2.9%) 160.45 (2.8%) -0.2% ( -5% - 5%) 0.861
HighTermTitleBDVSort 3.52 (4.0%) 3.51 (4.9%) -0.1% ( -8% - 9%) 0.920
HighSloppyPhrase 10.64 (3.8%) 10.63 (4.0%) -0.1% ( -7% - 8%) 0.950
OrHighLow 286.00 (3.6%) 285.99 (3.4%) -0.0% ( -6% - 7%) 0.997
HighIntervalsOrdered 1.92 (3.2%) 1.92 (3.4%) -0.0% ( -6% - 6%) 0.997
Respell 21.95 (2.1%) 21.95 (2.4%) -0.0% ( -4% - 4%) 0.998
LowSpanNear 3.20 (1.6%) 3.20 (1.1%) 0.0% ( -2% - 2%) 0.977
Fuzzy1 45.64 (3.5%) 45.69 (3.7%) 0.1% ( -6% - 7%) 0.932
OrNotHighHigh 138.92 (3.8%) 139.06 (3.8%) 0.1% ( -7% - 7%) 0.935
OrNotHighMed 106.41 (6.1%) 106.55 (5.9%) 0.1% ( -11% - 12%) 0.946
PKLookup 94.25 (3.5%) 94.44 (3.2%) 0.2% ( -6% - 7%) 0.850
OrHighNotLow 190.58 (4.1%) 191.10 (3.3%) 0.3% ( -6% - 7%) 0.816
HighTermMonthSort 1081.10 (4.7%) 1089.58 (7.1%) 0.8% ( -10% - 13%) 0.680
OrHighHigh 14.63 (5.1%) 14.76 (5.2%) 0.8% ( -9% - 11%) 0.603
OrHighNotMed 125.32 (3.6%) 126.40 (3.9%) 0.9% ( -6% - 8%) 0.463
OrHighNotHigh 187.08 (2.9%) 189.14 (3.4%) 1.1% ( -5% - 7%) 0.273
Wildcard 52.68 (3.2%) 53.31 (3.5%) 1.2% ( -5% - 8%) 0.265
Prefix3 15.10 (2.9%) 16.62 (3.1%) 10.0% ( 3% - 16%) 0.000
```
</details>
<details>
<summary>round 2</summary>
```
TaskQPS baseline StdDevQPS my_modified_version StdDev Pct diff p-value
OrNotHighMed 131.92 (6.5%) 127.91 (6.2%) -3.0% ( -14% - 10%) 0.131
HighTermMonthSort 1150.34 (4.7%) 1117.43 (5.3%) -2.9% ( -12% - 7%) 0.071
TermDTSort 71.29 (6.2%) 69.81 (6.8%) -2.1% ( -14% - 11%) 0.310
AndHighMed 55.29 (5.5%) 54.16 (5.8%) -2.0% ( -12% - 9%) 0.252
OrHighMed 30.76 (5.7%) 30.18 (5.7%) -1.9% ( -12% - 10%) 0.295
OrNotHighHigh 143.93 (4.5%) 141.50 (5.2%) -1.7% ( -10% - 8%) 0.274
OrHighNotHigh 172.51 (4.4%) 169.68 (5.0%) -1.6% ( -10% - 8%) 0.272
LowTerm 227.14 (10.1%) 223.62 (10.2%) -1.6% ( -19% - 20%) 0.629
OrNotHighLow 317.49 (4.1%) 313.04 (5.0%) -1.4% ( -10% - 8%) 0.331
MedPhrase 76.90 (5.5%) 75.84 (5.6%) -1.4% ( -11% - 10%) 0.429
OrHighNotMed 201.60 (4.7%) 199.02 (4.7%) -1.3% ( -10% - 8%) 0.391
LowSloppyPhrase 22.26 (4.6%) 22.00 (4.2%) -1.2% ( -9% - 7%) 0.400
OrHighNotLow 151.23 (5.5%) 149.47 (4.9%) -1.2% ( -10% - 9%) 0.481
AndHighHigh 19.39 (2.7%) 19.18 (2.6%) -1.1% ( -6% - 4%) 0.196
Fuzzy1 35.55 (4.1%) 35.20 (5.0%) -1.0% ( -9% - 8%) 0.495
OrHighLow 204.03 (4.3%) 202.34 (3.3%) -0.8% ( -8% - 7%) 0.493
HighTermTitleSort 71.31 (3.8%) 70.77 (4.4%) -0.7% ( -8% - 7%) 0.566
HighSloppyPhrase 3.55 (4.1%) 3.53 (4.1%) -0.6% ( -8% - 7%) 0.632
MedSloppyPhrase 6.40 (3.6%) 6.37 (3.2%) -0.6% ( -7% - 6%) 0.582
LowSpanNear 9.38 (1.6%) 9.33 (1.7%) -0.6% ( -3% - 2%) 0.287
OrHighHigh 14.17 (2.1%) 14.10 (2.6%) -0.5% ( -5% - 4%) 0.479
Fuzzy2 33.09 (2.7%) 32.94 (4.1%) -0.5% ( -7% - 6%) 0.677
HighPhrase 19.05 (2.9%) 18.97 (2.8%) -0.4% ( -5% - 5%) 0.616
LowPhrase 63.67 (3.9%) 63.39 (4.2%) -0.4% ( -8% - 7%) 0.732
MedTerm 314.53 (5.9%) 313.31 (6.9%) -0.4% ( -12% - 13%) 0.849
HighTermTitleBDVSort 3.43 (3.9%) 3.42 (4.4%) -0.4% ( -8% - 8%) 0.789
MedSpanNear 2.87 (1.7%) 2.86 (2.0%) -0.3% ( -3% - 3%) 0.573
LowIntervalsOrdered 11.62 (2.3%) 11.60 (2.2%) -0.2% ( -4% - 4%) 0.801
HighTerm 312.37 (4.7%) 311.95 (5.4%) -0.1% ( -9% - 10%) 0.933
HighSpanNear 5.53 (2.7%) 5.52 (2.8%) -0.1% ( -5% - 5%) 0.890
HighIntervalsOrdered 2.47 (3.7%) 2.47 (3.4%) -0.0% ( -6% - 7%) 0.987
PKLookup 93.79 (2.4%) 93.90 (3.9%) 0.1% ( -6% - 6%) 0.912
Respell 45.96 (3.0%) 46.04 (3.3%) 0.2% ( -5% - 6%) 0.853
AndHighLow 438.18 (4.3%) 439.42 (3.9%) 0.3% ( -7% - 8%) 0.825
IntNRQ 15.31 (2.9%) 15.36 (3.5%) 0.3% ( -5% - 6%) 0.741
MedIntervalsOrdered 9.29 (2.7%) 9.33 (2.3%) 0.4% ( -4% - 5%) 0.590
HighTermDayOfYearSort 143.87 (3.9%) 144.55 (5.4%) 0.5% ( -8% - 10%) 0.752
Wildcard 20.15 (2.8%) 20.64 (3.9%) 2.5% ( -4% - 9%) 0.024
Prefix3 36.20 (4.0%) 39.46 (5.4%) 9.0% ( 0% - 19%) 0.000
```
</details>
<details>
<summary>round 2</summary>
```
AndHighMed 42.96 (10.2%) 41.58 (8.4%) -3.2% ( -19% - 17%) 0.275
OrHighMed 30.44 (6.6%) 29.73 (5.9%) -2.3% ( -13% - 10%) 0.242
OrHighLow 194.81 (2.8%) 191.87 (2.7%) -1.5% ( -6% - 4%) 0.085
PKLookup 93.67 (2.7%) 92.27 (2.8%) -1.5% ( -6% - 4%) 0.081
OrHighHigh 13.05 (3.0%) 12.86 (2.5%) -1.5% ( -6% - 4%) 0.093
TermDTSort 71.42 (6.9%) 70.50 (6.8%) -1.3% ( -14% - 13%) 0.551
MedPhrase 53.41 (6.1%) 52.75 (5.0%) -1.2% ( -11% - 10%) 0.481
Fuzzy2 18.30 (4.3%) 18.09 (4.1%) -1.2% ( -9% - 7%) 0.383
MedSloppyPhrase 10.14 (4.7%) 10.03 (5.4%) -1.1% ( -10% - 9%) 0.483
LowSpanNear 8.77 (3.7%) 8.68 (3.7%) -1.1% ( -8% - 6%) 0.352
IntNRQ 39.70 (4.8%) 39.35 (4.6%) -0.9% ( -9% - 8%) 0.554
LowSloppyPhrase 8.50 (2.5%) 8.42 (2.6%) -0.9% ( -5% - 4%) 0.281
HighSloppyPhrase 3.75 (3.3%) 3.71 (3.5%) -0.9% ( -7% - 6%) 0.420
MedSpanNear 6.93 (2.6%) 6.88 (2.4%) -0.8% ( -5% - 4%) 0.326
HighPhrase 19.24 (3.8%) 19.10 (2.9%) -0.7% ( -7% - 6%) 0.492
AndHighHigh 21.88 (4.0%) 21.73 (2.9%) -0.7% ( -7% - 6%) 0.548
Fuzzy1 38.02 (3.8%) 37.79 (2.6%) -0.6% ( -6% - 6%) 0.558
LowPhrase 34.81 (4.1%) 34.62 (3.8%) -0.6% ( -8% - 7%) 0.654
HighTermMonthSort 1032.28 (4.5%) 1026.71 (4.9%) -0.5% ( -9% - 9%) 0.717
AndHighLow 340.34 (3.3%) 338.68 (3.5%) -0.5% ( -7% - 6%) 0.651
OrNotHighMed 162.50 (6.2%) 161.78 (6.9%) -0.4% ( -12% - 13%) 0.830
HighSpanNear 0.59 (1.5%) 0.59 (1.3%) -0.4% ( -3% - 2%) 0.317
OrHighNotMed 133.32 (4.1%) 132.99 (5.8%) -0.3% ( -9% - 10%) 0.875
OrHighNotHigh 141.95 (3.9%) 141.76 (4.7%) -0.1% ( -8% - 8%) 0.924
Respell 31.05 (2.0%) 31.03 (1.7%) -0.1% ( -3% - 3%) 0.894
MedTerm 241.09 (7.8%) 241.01 (10.9%) -0.0% ( -17% - 20%) 0.991
HighIntervalsOrdered 3.94 (3.9%) 3.94 (3.7%) 0.0% ( -7% - 7%) 0.995
MedIntervalsOrdered 6.29 (2.8%) 6.30 (2.7%) 0.2% ( -5% - 5%) 0.861
HighTermTitleSort 83.62 (4.2%) 83.78 (2.5%) 0.2% ( -6% - 7%) 0.862
HighTerm 378.46 (4.5%) 379.20 (6.3%) 0.2% ( -10% - 11%) 0.910
LowIntervalsOrdered 4.42 (2.1%) 4.43 (2.0%) 0.2% ( -3% - 4%) 0.711
OrNotHighHigh 105.70 (3.5%) 106.02 (5.1%) 0.3% ( -8% - 9%) 0.831
HighTermTitleBDVSort 2.20 (4.1%) 2.21 (3.6%) 0.5% ( -6% - 8%) 0.671
OrNotHighLow 324.11 (3.0%) 326.31 (2.8%) 0.7% ( -4% - 6%) 0.457
LowTerm 234.84 (10.9%) 236.73 (15.2%) 0.8% ( -22% - 30%) 0.848
OrHighNotLow 208.94 (4.4%) 211.13 (6.0%) 1.0% ( -8% - 11%) 0.527
HighTermDayOfYearSort 159.96 (3.6%) 161.77 (3.9%) 1.1% ( -6% - 9%) 0.343
Wildcard 33.42 (2.2%) 34.03 (2.9%) 1.8% ( -3% - 7%) 0.023
Prefix3 204.96 (3.5%) 219.65 (3.3%) 7.2% ( 0% - 14%) 0.000
```
</details>
If there are other approach of benchmark suggestions, i can also do it :)
[flamegraph_prefix3.zip](https://github.com/apache/lucene/files/13547942/flamegraph_prefix3.zip)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1415234949
##########
lucene/core/src/java/org/apache/lucene/store/DataOutput.java:
##########
@@ -324,4 +326,42 @@ public void writeSetOfStrings(Set<String> set) throws IOException {
writeString(value);
}
}
+
+ /**
+ * Encode integers using group-varint. It uses {@link DataOutput#writeVInt VInt} to encode tail
+ * values that are not enough for a group. we need a long[] because this is what postings are
+ * using, all longs are actually required to be integers.
+ *
+ * @param values the values to write
+ * @param limit the number of values to write.
+ */
+ public void writeGroupVInts(long[] values, int limit) throws IOException {
Review Comment:
I'm tempted to mark it `@lucene.experimental` to allow us to change the signature to use ints in the future. And likewise for its counterpart on `DataInput`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1847102122
It looks good on `byteBuffers` and `MMapDirectory`, the benchmark result is pretty close to previous commit,
but a bit slowdon on `NIOFSDirectory`, i will dig it.
* `*ReadGroupVInt` the current commit
* `*_viaDupCode` the previous commit, using duplicated code.
* `*Baseline` no change.
java17
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.byteBuffersReadGroupVInt 64 thrpt 5 5.156 ± 0.378 ops/us
GroupVIntBenchmark.byteBuffersReadGroupVIntBaseline 64 thrpt 5 2.130 ± 0.039 ops/us
GroupVIntBenchmark.byteBuffersReadGroupVInt_viaDupCode 64 thrpt 5 5.455 ± 0.164 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt 64 thrpt 5 7.632 ± 0.377 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline 64 thrpt 5 7.376 ± 0.485 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt_viaDupCode 64 thrpt 5 7.408 ± 0.532 ops/us
GroupVIntBenchmark.nioReadGroupVInt 64 thrpt 5 6.905 ± 0.589 ops/us
GroupVIntBenchmark.nioReadGroupVIntBaseline 64 thrpt 5 5.574 ± 0.216 ops/us
GroupVIntBenchmark.nioReadGroupVInt_viaDupCode 64 thrpt 5 9.014 ± 0.162 ops/us
```
java21
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.byteBuffersReadGroupVInt 64 thrpt 5 5.539 ± 0.220 ops/us
GroupVIntBenchmark.byteBuffersReadGroupVIntBaseline 64 thrpt 5 1.825 ± 0.055 ops/us
GroupVIntBenchmark.byteBuffersReadGroupVInt_viaDupCode 64 thrpt 5 5.543 ± 0.097 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt 64 thrpt 5 9.428 ± 0.189 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline 64 thrpt 5 5.565 ± 0.080 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt_viaDupCode 64 thrpt 5 10.476 ± 1.343 ops/us
GroupVIntBenchmark.nioReadGroupVInt 64 thrpt 5 8.434 ± 1.887 ops/us
GroupVIntBenchmark.nioReadGroupVIntBaseline 64 thrpt 5 5.431 ± 0.072 ops/us
GroupVIntBenchmark.nioReadGroupVInt_viaDupCode 64 thrpt 5 10.723 ± 0.399 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422507453
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
> +1, we can make sure the static method caller have an efficient implementation of `skipBytes()`(base on `seek()`), Just i guess the `seek()` has an impact on performance, let me try..
Yes, if `skipBytes()` is not efficient (InputStream based DataInput), you can't use that specialized method anyways. IndecInput has an efficient default implementation, so no need to change anything. So we do not need to optimize anything.
Just call skipBytes() and test performance.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420760926
##########
lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java:
##########
@@ -114,4 +115,31 @@ public void testNullParamsIndexInput() throws Exception {
}
}
}
+
+ private void doTestReadingClosedInput(Directory dir, long[] values, int numValues)
Review Comment:
You don't need to test all variants and different sizes here. Just create a file with random data using indexoutput. open it and close it, then call `readGroupVInts`. As this should only trigger the AlreadyClosedException theres no need to repeat this multiple times.
These are IO-heavy tests, so only do the required stuff and don't scrub my SSD. It also slows down those tests.
Just add it here and try to call that method on "two":
- https://github.com/apache/lucene/blob/08d24dd9cb10b0808264b7c44e5b620d7d1a398e/lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseChunkedDirectoryTestCase.java#L70-L74
- https://github.com/apache/lucene/blob/08d24dd9cb10b0808264b7c44e5b620d7d1a398e/lucene/test-framework/src/java/org/apache/lucene/tests/store/BaseChunkedDirectoryTestCase.java#L91-L95
Anyways, I don't think we need this test in reality. Otherwise we would need a call of all public methods.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420793976
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -324,24 +324,9 @@ private void readGroupVInt(long[] dst, int offset) throws IOException {
try {
final int flag = curSegment.get(LAYOUT_BYTE, curPosition++) & 0xFF;
-
- final int n1Minus1 = flag >> 6;
- final int n2Minus1 = (flag >> 4) & 0x03;
- final int n3Minus1 = (flag >> 2) & 0x03;
- final int n4Minus1 = flag & 0x03;
-
- dst[offset] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n1Minus1];
- curPosition += 1 + n1Minus1;
- dst[offset + 1] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n2Minus1];
- curPosition += 1 + n2Minus1;
- dst[offset + 2] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n3Minus1];
- curPosition += 1 + n3Minus1;
- dst[offset + 3] =
- curSegment.get(LAYOUT_LE_INT, curPosition) & GroupVIntUtil.GROUP_VINT_MASKS[n4Minus1];
- curPosition += 1 + n4Minus1;
+ curPosition +=
+ GroupVIntUtil.readGroupVInt(
+ flag, p -> curSegment.get(LAYOUT_LE_INT, p), curPosition, dst, offset);
Review Comment:
Are you sure. It just reads the flag but does not increment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420382794
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,48 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(dst, i);
+ }
+ for (; i < limit; ++i) {
+ dst[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] dst, int offset) throws IOException {
+ if (curSegment.byteSize() - curPosition < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
+ GroupVIntUtil.fallbackReadGroupVInt(this, dst, offset);
+ return;
+ }
+
Review Comment:
the bigger problem here is that it is not in the try-catch block. when the indexinput is closed this fails with NPE or IllegalStateException.
Everything in this method must be in the try-catch. Look at othe rmethods, the NPE/ISE catch block always covers everything.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420379683
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,34 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ for (i = 0; i <= limit - 4; i += 4) {
+ readGroupVInt(dst, i);
+ }
+ for (; i < limit; ++i) {
+ dst[i] = readVInt();
+ }
+ }
+
+ private void readGroupVInt(long[] dst, int offset) throws IOException {
+ final MemorySegment curSegment = this.curSegment;
Review Comment:
This part MUST also be inside they try-catch, as it would throw NPE or IllegalStateException when the input was closed!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1850500493
Hi, the problem of MMapDir is that the seek method has to update also the current block number.
Maybe we pass a second lambda to update the position? Let's just try this out!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1846510407
> Thank you for sharing the code, it seems very clear, another way, could we pass the current block(ByteBuffer) to the decode function like below? this will keep the remaining bytes checking in each indexinputs.
>
> ```java
> private void readGroupVInt(long[] dst, int offset) throws IOException {
> if (buffer.remaining() < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
> GroupVIntUtil.readGroupVInt(this, dst, offset);
> return;
> }
> int pos = buffer.position();
> int len = GroupVIntUtil.readGroupVIntFromByteBuffer(buffer, pos, dst, offset);
> buffer.position(pos + len);
> }
> ```
Thank you for quick impl Adrien, for reference, i tried this approach [code link](https://github.com/easyice/lucene/commit/13851013e98ff8e27f05fa6dc4bc2e450ea6c03d#diff-c81a04bd13d225f3a2dc2c47bde9590686fe5bb0a197c99eeec1a35bf2cc04cc) ,it's no performance regression on `NIOFSDirectory` and `ByteBuffersDataInput`, but terrible performance on `MemorySegment`:
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline 64 thrpt 5 5.395 ± 0.228 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntUseByteBuffer 64 thrpt 5 1.394 ± 1.848 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1849889528
Thanks. Why can't we move the whole loop to the util class? Of course you could benchmark this, but this may also the reson for the slowdown in the NIOFSDir case,
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420843242
##########
lucene/core/src/test/org/apache/lucene/store/TestMMapDirectory.java:
##########
@@ -114,4 +115,31 @@ public void testNullParamsIndexInput() throws Exception {
}
}
}
+
+ private void doTestReadingClosedInput(Directory dir, long[] values, int numValues)
Review Comment:
Thank you @uschindler , It's more simpler, i like this!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1851115440
Thanks for the detailed description, got it! looks better :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1423744250
##########
lucene/core/src/java/org/apache/lucene/store/ByteBuffersIndexInput.java:
##########
@@ -205,6 +205,12 @@ public void readLongs(long[] dst, int offset, int length) throws IOException {
in.readLongs(dst, offset, length);
}
+ @Override
+ public void readGroupVInt(long[] docs, int limit) throws IOException {
Review Comment:
Sorry for the missing change the parameter name and access modifiers!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1852165482
There is no lambda capturing problem. I have no idea why it complains. It really looks like fully inlined. It seems that it is not happy about those ByteBuffers at all.
`ix()` is called all the time, that's hot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1868283615
I also merged the main barnch into the Java 22+ MMapDirectory implementation to make sure the MMAP tester finds any issues during its runs: https://jenkins.thetaphi.de/job/Lucene-MMAPv2-Linux/ and https://jenkins.thetaphi.de/job/Lucene-MMAPv2-Windows/
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1872023239
Thank you for the backport and all great suggestions!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1421459009
##########
lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/GroupVIntBenchmark.java:
##########
@@ -140,10 +155,12 @@ public void init() throws Exception {
}
initByteBufferInput(docs);
initArrayInput(docs);
+ initNioInput(docs);
+ initByteBuffersInput(docs);
}
@Benchmark
- public void byteBufferReadVInt(Blackhole bh) throws IOException {
+ public void mmap_byteBufferReadVInt(Blackhole bh) throws IOException {
Review Comment:
> I would rename all those benchmark methods to have better names including the exact implementation's class name.
How about benchmark methods names like the following?
```
benchMMapDirectoryInputs_readVInt
benchMMapDirectoryInputs_readGroupVInt
benchNIOFSDirectoryInputs_readVInt
benchNIOFSDirectoryInputs_readGroupVInt
benchByteBuffersIndexInput_readVInt
...
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422441239
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
oooooh, no better not on default. DataInput by default reads the bytes in a loop (e.g., when it is an InputStreamDataInput). But in that case the specialized method should never be used. Maybe add this to the documentation. We should add some hint in the Utility's class that the specialized method can only be used if and only if:
- input supports random access
- calling skipBytes only changes file pointer and does *NOT* read bytes (e.g., does not use the default impl).
Of course tests would fail.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422494949
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
+1, we can make sure the static method caller have an efficient implementation of `skipBytes()`(base on `seek()`), Just i guess the `seek()` has an impact on performance, let me try..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1421430301
##########
lucene/core/src/java/org/apache/lucene/store/BufferedIndexInput.java:
##########
@@ -149,6 +150,29 @@ public final int readInt() throws IOException {
}
}
+ @Override
Review Comment:
Maybe that goes away then. There shouldn't be a difference between byte buffers.
It could be caused my the long to int cast?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422396582
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
Same for the byte header... Sorry forgot about this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1422441239
##########
lucene/core/src/java21/org/apache/lucene/store/MemorySegmentIndexInput.java:
##########
@@ -303,6 +304,30 @@ public byte readByte(long pos) throws IOException {
}
}
+ @Override
+ public void readGroupVInts(long[] dst, int limit) throws IOException {
+ int i;
+ try {
+ for (i = 0; i <= limit - 4; i += 4) {
Review Comment:
oooooh, no better not on default. DataInput by default reads the bytes in a loop (e.g., when it is an InputStreamDataInput). But in that case the specialized method should never be used. Maybe add this to the documentation. We should add some hint in the Utility's class that the specialized method can only be used if and only if:
- input supports random access with `IntReader` and is able to return a maximum size to read in randomaccess.
- calling skipBytes only changes file pointer and does *NOT* read bytes (e.g., does not use the default impl).
Of course tests would fail.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1852253188
Even if i used the copy code approach(avoid to using lambda, for test purpose), it was only 15%-20% faster.
like this:
```
@Override
public void readGroupVInts(long[] dst, int limit) throws IOException {
int i;
for (i = 0; i <= limit - 4; i += 4) {
readGroupVInt(dst, i);
}
for (; i < limit; ++i) {
dst[i] = readVInt();
}
}
private void readGroupVInt(long[] dst, int offset) throws IOException {
final ByteBuffer buffer = curBuf;
if (buffer.remaining() < GroupVIntUtil.MAX_LENGTH_PER_GROUP) {
GroupVIntUtil.readGroupVInt(this, dst, offset);
return;
}
final int flag = readByte() & 0xFF;
...
dst[offset] = guard.getInt(buffer, curPosition) & GroupVIntUtil.MASKS[n1Minus1];
...
buffer.position(curPosition);
}
```
copy code approach output:
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 8.991 ± 1.569 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 7.387 ± 0.268 ops/us
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1854866407
> I agree with you, the getInt() seems more expensive than `MemorySegment`, i prefer to revert the change on `ByteBufferIndexInput`, then do the similar improve on java20, java19 (to keep the 3 impls aligned to each other), what do you think?
>
> > for direct buffers (this is what MMap and NIO use
>
> `NIOFSDirectory` seems using `HeapByteBuffer`? the `BufferedIndexInput.refill()->ByteBuffer.allocate()` will return a `HeapByteBuffer`.
I thought NIO works on the native bytebuffers used internally by NIOFSDir. As there is file access involved for optimal performance they should be direct. I can check this tomorrow, but I think there was some override in NioFsDir.
Sorry it is too late, but I am quite sure this is the main difference.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1837150656
Hi,
I have no time to review at moment, will come back next week.
Some thoughts:
- there's copy-paste code missing to MemorySegmentIndexInput for 20 and 19. But wen can do this later.
- ByteBufferIndexInput needs code to support MMapDirectory in older Java versions.
For both cases above make sure to exactly follow all try catch blocks and calling to super as fone in other bulk read methods.
It may also be needed to add a separate test to TestMultiMMap.
Also make sure to run tests with Java 17 and Java 19, 20, 21.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1837534908
Thank you very much for your suggestions, i had fixed the comments from @jpountz, but the related to Mmapdir will be later(such as java19, java20 support), because we need to confirm whether to change it. i agree that we should be cautious here. in my understanding the optimized code is faster than the main branch probably because the optimized code doesn't need a `switch` statement in `GroupVIntUtil#readLongInGroup`, although it was inlined.
The JMH output for currently, it's similar to before we replaced `varHander` with `ByteBuffer#getInt()`
java17
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.byteBuffersReadGroupVInt 64 thrpt 5 4.698 ± 2.039 ops/us
GroupVIntBenchmark.byteBuffersReadGroupVIntBaseline 64 thrpt 5 2.167 ± 0.064 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt 64 thrpt 5 7.386 ± 0.524 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline 64 thrpt 5 7.358 ± 1.316 ops/us
GroupVIntBenchmark.nioReadGroupVInt 64 thrpt 5 8.236 ± 1.052 ops/us
GroupVIntBenchmark.nioReadGroupVIntBaseline 64 thrpt 5 5.381 ± 1.134 ops/us
```
java21
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.byteBuffersReadGroupVInt 64 thrpt 5 4.622 ± 0.880 ops/us
GroupVIntBenchmark.byteBuffersReadGroupVIntBaseline 64 thrpt 5 1.674 ± 0.245 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVInt 64 thrpt 5 10.165 ± 1.083 ops/us
GroupVIntBenchmark.mmap_byteBufferReadGroupVIntBaseline 64 thrpt 5 5.104 ± 0.388 ops/us
GroupVIntBenchmark.nioReadGroupVInt 64 thrpt 5 9.527 ± 1.556 ops/us
GroupVIntBenchmark.nioReadGroupVIntBaseline 64 thrpt 5 5.351 ± 0.621 ops/us
```
@uschindler Thank you for take a look at this, here is the assembly output for `MemorySegmentIndexInput#readGroupVInt`, using command: `java -XX:+UnlockDiagnosticVMOptions -XX:+PrintAssembly --module-path lucene/benchmark-jmh/build/benchmarks --module org.apache.lucene.benchmark.jmh GroupVIntBenchmark.mmap`
<details>
<summary >assembly code</summary>
```
0801============================= C1-compiled nmethod ==============================
----------------------------------- Assembly -----------------------------------
|
00Compiled method (c1) 4890 610 ! 2 org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt (243 bytes)
00 total in heap [0x0000000110a6d290,0x0000000110a710d0] = 15936
relocation [0x0000000110a6d3e8,0x0000000110a6d650] = 616
01 main code [0x0000000110a6d660,0x0000000110a6e7d8] = 4472
e9 stub code [0x0000000110a6e7d8,0x0000000110a6e898] = 192
| oops [0x0000000110a6e898,0x0000000110a6e8a8] = 16
60 metadata [0x0000000110a6e8a8,0x0000000110a6e980] = 216
scopes data [0x0000000110a6e980,0x0000000110a6f788] = 3592
00 scopes pcs [0x0000000110a6f788,0x0000000110a706c8] = 3904
0000 dependencies [0x0000000110a706c8,0x0000000110a706f8] = 48
| 483b handler table [0x0000000110a706f8,0x0000000110a70fe0] = 2280
nul chk table [0x0000000110a70fe0,0x0000000110a710d0] = 240
[Constant Pool (empty)]
[MachCode]
[Entry Point]
b710 # {method} {0x000000016d4d56b0} 'readGroupVInt' '([JI)V' in 'org/apache/lucene/store/MemorySegmentIndexInput'
| 0100 0075 | 0d48 83 # this: rsi:rsi = 'org/apache/lucene/store/MemorySegmentIndexInput'
87 # parm0: rdx:rdx = '[J'
| 1801 # parm1: rcx = int
00 # [sp+0x230] (sp of caller)
00
0x000000010cd98108 0x0000000110a6d660: 448b 5608 | 49bb 0000 | 002c 0100 | 0000 4d03 | d34c 3bd0
: 01
e9 0x0000000110a6d674: ; {runtime_call ic_miss_stub}
4a 0x0000000110a6d674: 0f85 06aa | 5107 660f | 1f44 0000
00 [Verified Entry Point]
| 0000 4883 0x0000000110a6d680: 8984 2400 | c0fe ff55 | 4881 ec20 | 0200 0090 | 4181 7f20 | 0000 0000
|
bf00 0x0000000110a6d698: ; {runtime_call StubRoutines (final stubs)}
0100 | 0000 7517 | 4889 b700 | 0x0000000110a6d698: 7405 e801 | 0e50 0748 | 89b4 2480 | 0100 0048 | 8994 2488 | 0100 0089 | 8c24 9001 | 0000 48bf
0100 0048 0x0000000110a6d6b8: 60d1 526d | 0100 0000 | 8b5f 0883 | c302 895f | 0881 e3fe | 0f00 0083 | fb00 0f84
|
c787 0x0000000110a6d6d4: ;*aload_0 {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@0 (line 319)
0801 | 0000 01 0x0000000110a6d6d4: 4c0e 0000 | 8b7e 3848
00
0x0000000110a6d6dc: ;*getfield curSegment {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@1 (line 319)
0x000000010cd98128: 0000 e929 | 0000 0048 | 83bf 1001 | 0000 00 0x0000000110a6d6dc: c1e7 0348 | 83ff 000f | 842a 0000
75
0x0000000110a6d6e8: ; {metadata('jdk/internal/foreign/AbstractMemorySegmentImpl')}
| 17 0x0000000110a6d6e8: 0049 b8a0 | a40c 2d01 | 0000 0044 | 8b4f 0849 | ba00 0000 | 2c01 0000 | 004d 03ca | 4d3b 4138
48 89b7 | 10 0x0000000110a6d708: 0f85 370e | 0000 e900 | 0000 0048
01
00 0x0000000110a6d714: ;*invokeinterface byteSize {reexecute=0 rethrow=0 return_oop=0}
00 | ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@4 (line 319)
48 0x0000000110a6d714: 8bdf 488b
c7
87 0x0000000110a6d718: ;*getfield length {reexecute=0 rethrow=0 return_oop=0}
18 | 0100 ; - jdk.internal.foreign.AbstractMemorySegmentImpl::byteSize@1 (line 244)
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@4 (line 319)
01 0x0000000110a6d718: 5f10 488b
0x0000000110a6d71c: ;*getfield curPosition {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@10 (line 319)
0x000000010cd98148: 0000 00e9 | 0800 0x0000000110a6d71c: 7e20 482b | df48 bf11 | 0000 0000 | 0000 0048 | 3bdf 0f8c
00 0x0000000110a6d730: ;*lcmp {reexecute=0 rethrow=0 return_oop=0}
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@17 (line 319)
| 0x0000000110a6d730: 2907 0000 | 488b fe48
48
83 87f0 | 0x0000000110a6d738: ;*invokevirtual readByte {reexecute=0 rethrow=0 return_oop=0}
0000 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@29 (line 325)
00 0x0000000110a6d738: 8bf7 0f1f
01
0x000000010cd98158: 0x0000000110a6d73c: ; {optimized virtual_call}
0x0000000110a6d73c: 4400 00e8
; {metadata(method data for {method} {0x000000012817e820} 'unlock' '()V' in 'java/util/concurrent/locks/ReentrantLock')}
0x0000000110a6d740: ; ImmutableOopMap {[384]=Oop [392]=Oop }
0x000000010cd98158: 48be 9898 | 21 ;*invokevirtual readByte {reexecute=0 rethrow=0 return_oop=0}
69 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@29 (line 325)
0x0000000110a6d740: 3cac 5107
01
00 0x0000000110a6d744: ; {other}
0x0000000110a6d744: 0f1f 8400
|
0000 0x0000000110a6d748: ;*invokevirtual readByte {reexecute=0 rethrow=0 return_oop=0}
8b ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@29 (line 325)
be 0x0000000110a6d748: b404 0000 | 25ff 0000 | 0048 8bf8 | c1ff 0689 | bc24 9401 | 0000 488b | d0c1 fa04 | 83e2 0389
| ac 0x0000000110a6d768: 9424 9801 | 0000 488b | c8c1 f902 | 83e1 0389 | 8c24 9c01 | 0000 83e0 | 0389 8424 | a001 0000
00 0000 | 83c7 0289 | beac 0000 | 00 0x0000000110a6d788: 488b b424 | 8001 0000 | 448b 4638
81
0x0000000110a6d794: ;*getfield curSegment {reexecute=0 rethrow=0 return_oop=0}
e7fe ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@65 (line 332)
0x0000000110a6d794: 49c1 e003
| ff 0x0000000110a6d798: ;*getfield curPosition {reexecute=0 rethrow=0 return_oop=0}
1f ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@72 (line 332)
0083
0x000000010cd98178: 0x0000000110a6d798: 488b 5e20 | 4983 f800 | 0f84 2a00
ff
00 0x0000000110a6d7a4: ; {metadata('jdk/internal/foreign/AbstractMemorySegmentImpl')}
0f 0x0000000110a6d7a4: 0000 49bd | a0a4 0c2d | 0100 0000 | 458b 7008 | 49ba 0000 | 002c 0100 | 0000 4d03 | f24d 3b6e
84 | a304 00 0x0000000110a6d7c4: 380f 8584 | 0d00 00e9 | 0000 0000 | 4d8b c849
00
| 0x0000000110a6d7d4: ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
8b7a ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0c 0x0000000110a6d7d4: 3b00 4983 | f800 0f84
48
0x000000010cd98184: ;*getfield sync {reexecute=0 rethrow=0 return_oop=0}
0x0000000110a6d7dc: ;*ifnonnull {reexecute=0 rethrow=0 return_oop=0}
; - ; - java.util.Objects::requireNonNull@1 (line 232)
java.util.concurrent.locks.ReentrantLock::unlock ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
@1 (line 494)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
; - jdk.internal.misc.InternalLock::unlock@4 (line 78)
0x0000000110a6d7dc: ae09 0000 | 4983 f800 | 0f84 2a00
; -
java.io.BufferedOutputStream::flush 0x0000000110a6d7e8: ; {metadata('jdk/internal/foreign/AbstractMemorySegmentImpl')}
@33 (line 242)
0x000000010cd98184: 0x0000000110a6d7e8: 0000 49bb | a0a4 0c2d | 0100 0000 | 458b 6808 | 49ba 0000 | 002c 0100 | 0000 4d03 | ea4d 3b5d
c1e7 03 0x0000000110a6d808: 380f 854a | 0d00 00e9
48
0x0000000110a6d810: ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd98188 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@4 (line 80)
: ;*invokevirtual ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
release {reexecute=0 rethrow=0 return_oop=0} ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.util.concurrent.locks.ReentrantLock::unlock@5 (line 494)
; - jdk.internal.misc.InternalLock::unlock@4 (line 78)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
; - 0x0000000110a6d810: 0000 0000
java.io.BufferedOutputStream::
flush 0x0000000110a6d814: ; implicit exception: dispatches to 0x0000000110a6e562
@33 (line 242) ;*getfield length {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@8 (line 396)
0x000000010cd98188: 3b07 ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
48 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
8b ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x000000010cd9818c: ; {metadata(method data for {method} {0x000000012817e820} 'unlock' '()V' in 'java/util/concurrent/locks/ReentrantLock')}
0x000000010cd9818c: d748 be98 | 9821 0x0000000110a6d814: 4d8b 4810 | 49bb 0400 | 0000 0000 | 0000 4d2b | cb49 bb01 | 0000 0000 | 0000 004d | 03cb 49bb
6901 0x0000000110a6d834: 0000 0000 | 0000 0000 | 493b db0f | 8c22 0d00 | 0049 3bd9 | 0f8d 260d | 0000 4c8b
| 0000
0x0000000110a6d850: ;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
00 ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
48 ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
| 83 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
86 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
f0 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x0000000110a6d850: cb45 8b48 | 1849 c1e1
0x0000000110a6d858: ;*getfield scope {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd9819c: ; - jdk.internal.foreign.AbstractMemorySegmentImpl::sessionImpl@1 (line 422)
; {metadata(method data for {method} {0x00000001281b26a8} 'release' '(I)Z' in 'java/util/concurrent/locks/AbstractQueuedSynchronizer')}
; - java.lang.invoke.VarHandleSegmentAsInts::get@24 (line 109)
0x000000010cd9819c ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
: 0000 01 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
48 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
| 0x0000000110a6d858: 034d 8b58
ba
58 0x0000000110a6d85c: ;*getfield min {reexecute=0 rethrow=0 return_oop=0}
8e21 | 6901 ; - jdk.internal.foreign.NativeMemorySegmentImpl::unsafeGetOffset@1 (line 103)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::offsetNoVMAlignCheck@1 (line 96)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@40 (line 111)
| 008b ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
b2ac | ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0000 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
00 0x0000000110a6d85c: 204c 03db | 4983 f900 | 0f84 3300
83 0x0000000110a6d868: ;*ifnull {reexecute=0 rethrow=0 return_oop=0}
| ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@1 (line 1906)
c602 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
89b2 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
| ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
ac ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
00 0000 | 81e6 feff
0x000000010cd981bc: 0x0000000110a6d868: 0000 458b | 4114 49c1
1f
00 0x0000000110a6d870: ;*getfield owner {reexecute=0 rethrow=0 return_oop=0}
83 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@1 (line 202)
fe ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
| ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
000f ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
8482 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
| 0x0000000110a6d870: e003 4983 | f800 0f84
04
00 0x0000000110a6d878: ;*ifnull {reexecute=0 rethrow=0 return_oop=0}
0048 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@4 (line 202)
0x000000010cd981c8 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; {metadata(method data for {method} {0x00000001281b26a8} 'release' '(I)Z' in 'java/util/concurrent/locks/AbstractQueuedSynchronizer')} ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd981c8: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
8b 0x0000000110a6d878: 1300 0000 | 498b 9f80 | 0300 0048
d7
0x0000000110a6d884: ;*invokestatic currentThread {reexecute=0 rethrow=0 return_oop=0}
48be ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@11 (line 202)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
| 588e 21 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
69 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
| 01 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
00 0x0000000110a6d884: 8b1b 4c3b | c30f 85e2
0000 0x0000000110a6d88c: ;*if_acmpeq {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@14 (line 202)
| 8b52 0849 | ba00 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
00 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
| 28 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
01 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
00 0x0000000110a6d88c: 0800 0045
| 0x0000000110a6d890: ;*getfield state {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@22 (line 205)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
0049 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
03d2 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
| 0x0000000110a6d890: 8b41 0c41 | 83f8 000f | 8caf 0800
48
3b 0x0000000110a6d89c: ;*ifge {reexecute=0 rethrow=0 return_oop=0}
96 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@25 (line 205)
00
0x000000010cd981e8 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
: 01 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
0075 | 0d ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
48 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
8386 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
| 08 0x0000000110a6d89c: 004c 898c | 24a8 0100
01
0x0000000110a6d8a4: ; {oop(a 'jdk/internal/misc/Unsafe'{0x000000061fc02c00})}
00 0x0000000110a6d8a4: 0049 be00 | 2cc0 1f06
00
0x0000000110a6d8ac: ; {oop(nullptr)}
| 0x0000000110a6d8ac: 0000 0048 | ba00 0000 | 0000 0000 | 0049 8bcb | 41b8 0000 | 0000 498b
01e9
6000 | 0000 483b | 0x0000000110a6d8c4: ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
96 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
10 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
0100 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
| 00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
75 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0d ; {optimized virtual_call}
48 0x0000000110a6d8c4: f666 90e8
| 0x0000000110a6d8c8: ; ImmutableOopMap {[384]=Oop [392]=Oop [424]=Oop }
8386 ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
1801
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
0x000000010cd98208: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
00 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
01e9 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
| 0x0000000110a6d8c8: b4aa 5107
4a
00 0x0000000110a6d8cc: ; {other}
0x0000000110a6d8cc: 0f1f 8400
00 0x0000000110a6d8d0: ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
00 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
| 4883 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
be00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
| 01 0x0000000110a6d8d0: 3c06 0001
00
0000 0x0000000110a6d8d4: ; {oop([I{0x000000061ef87078})}
| 7517 4889 | 9600 0100 | 0048 c7 0x0000000110a6d8d4: 48ba 7870 | f81e 0600 | 0000 b904 | 0000 003b | 8c24 9401 | 0000 8bbc | 2494 0100 | 000f 868f
86 0x0000000110a6d8f4: 0c00 0048 | 63cf 8b54
0x0000000110a6d8fc: ;*iaload {reexecute=0 rethrow=0 return_oop=0}
| ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@85 (line 333)
08 0x0000000110a6d8fc: 8a10 4823 | c248 63c0 | 8b8c 2490 | 0100 0048 | 8b94 2488 | 0100 003b | 4a0c 0f83 | 870c 0000
01 0x0000000110a6d91c: 4c63 c14a
0000
0x000000010cd98228: 0100 00 0x0000000110a6d920: ;*lastore {reexecute=0 rethrow=0 return_oop=0}
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@88 (line 333)
| e9 0x0000000110a6d920: 8944 c210 | 488b b424 | 8001 0000
29
0x0000000110a6d92c: ;*getfield curPosition {reexecute=0 rethrow=0 return_oop=0}
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@91 (line 334)
00 0x0000000110a6d92c: 4c8b 4620 | 488b dfff | c348 63db | 4c03 c34c
|
0048 0x0000000110a6d93c: ;*putfield curPosition {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@100 (line 334)
83 0x0000000110a6d93c: 8946 2048 | 8bd9 ffc3 | 899c 24a4 | 0100 008b | 4638 48c1
be | 10 0x0000000110a6d950: ;*getfield curSegment {reexecute=0 rethrow=0 return_oop=0}
01 0000 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@108 (line 335)
| 0075 1748 | 8996 1001 | 0000 0x0000000110a6d950: e003 4883 | f800 0f84 | 2a00 0000
0x0000000110a6d95c: ; {metadata('jdk/internal/foreign/AbstractMemorySegmentImpl')}
48c7 | 86 0x0000000110a6d95c: 49bd a0a4 | 0c2d 0100 | 0000 448b | 7008 49ba | 0000 002c | 0100 0000 | 4d03 f24d | 3b6e 380f
18 0x0000000110a6d97c: 8530 0c00 | 00e9 0000 | 0000 4c8b
01 0x0000000110a6d988: ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x000000010cd98248: 00 0x0000000110a6d988: c848 3b00 | 4883 f800 | 0f84 1f07
01
00 0x0000000110a6d994: ;*ifnonnull {reexecute=0 rethrow=0 return_oop=0}
00 ; - java.util.Objects::requireNonNull@1 (line 232)
| 00e9 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
0800 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
| 00 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
4883 | 86 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
f0 0x0000000110a6d994: 0000 4883 | f800 0f84 | 2a00 0000
00
00 0x0000000110a6d9a0: ; {metadata('jdk/internal/foreign/AbstractMemorySegmentImpl')}
| 0001 ba01 | 0000 0x0000000110a6d9a0: 49b9 a0a4 | 0c2d 0100 | 0000 448b | 5808 49ba | 0000 002c | 0100 0000 | 4d03 da4d | 3b4b 380f
0048 0x0000000110a6d9c0: 85f6 0b00 | 00e9 0000 | 0000 488b
0x000000010cd98260: 0x0000000110a6d9cc: ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
;*invokevirtual ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@4 (line 80)
tryRelease {reexecute=0 rethrow=0 return_oop=0} ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.util.concurrent.locks.AbstractQueuedSynchronizer::release@2 (line 1059)
; - java.util.concurrent.locks.ReentrantLock::unlock@5 (line 494)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; - 0x0000000110a6d9cc: f848 8b47
jdk.internal.misc.InternalLock:: 0x0000000110a6d9d0: ;*getfield length {reexecute=0 rethrow=0 return_oop=0}
unlock ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@8 (line 396)
@4 (line 78) ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
java.io.BufferedOutputStream::flush@33 (line 242)
0x000000010cd98260: 8bf7 48 0x0000000110a6d9d0: 1049 b904 | 0000 0000 | 0000 0049 | 2bc1 49b9 | 0100 0000 | 0000 0000 | 4903 c149 | b900 0000
89 | 4424 0x0000000110a6d9f0: 0000 0000 | 004d 3bc1 | 0f8c cb0b | 0000 4c3b | c00f 8dcf | 0b00 0049
78 0x0000000110a6da08: ;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
48 ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
| ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
897c 24 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
70 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd9826c: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; {optimized virtual_call}
0x0000000110a6da08: 8bc0 8b47 | 1848 c1e0
0x000000010cd9826c 0x0000000110a6da10: ;*getfield scope {reexecute=0 rethrow=0 return_oop=0}
: 66 ; - jdk.internal.foreign.AbstractMemorySegmentImpl::sessionImpl@1 (line 422)
66 ; - java.lang.invoke.VarHandleSegmentAsInts::get@24 (line 109)
90 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
e8 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x0000000110a6da10: 034c 8b4f
0x0000000110a6da14: ;*getfield min {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd98270: ; - jdk.internal.foreign.NativeMemorySegmentImpl::unsafeGetOffset@1 (line 103)
; ImmutableOopMap { ; - java.lang.invoke.VarHandleSegmentAsInts::offsetNoVMAlignCheck@1 (line 96)
[112] ; - java.lang.invoke.VarHandleSegmentAsInts::get@40 (line 111)
=Oop [120]=Oop }
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
;*invokevirtual ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
tryRelease ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
{reexecute=0 rethrow=0 return_oop=0}
0x0000000110a6da14: 204d 03c8 | 4883 f800 | 0f84 3300
; - 0x0000000110a6da20: ;*ifnull {reexecute=0 rethrow=0 return_oop=0}
java.util.concurrent.locks.AbstractQueuedSynchronizer:: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@1 (line 1906)
release@2 (line 1059) ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.util.concurrent.locks.ReentrantLock::unlock@5 (line 494)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; - 0x0000000110a6da20: 0000 448b | 4014 49c1
jdk.internal.misc.InternalLock::
unlock 0x0000000110a6da28: ;*getfield owner {reexecute=0 rethrow=0 return_oop=0}
@4 (line 78)
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@1 (line 202)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
java.io.BufferedOutputStream:: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
flush@33 (line 242)
0x000000010cd98270 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x0000000110a6da28: e003 4983 | f800 0f84
0x0000000110a6da30: ;*ifnull {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@4 (line 202)
0c ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
b1 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
54 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
07
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd98274: ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; {other}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x0000000110a6da30: 1300 0000 | 498b bf80 | 0300 0048
0x000000010cd98274
: 0f 0x0000000110a6da3c: ;*invokestatic currentThread {reexecute=0 rethrow=0 return_oop=0}
1f 8400
0x000000010cd98278 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@11 (line 202)
: ;*invokevirtual ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
tryRelease {reexecute=0 rethrow=0 return_oop=0} ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; - java.util.concurrent.locks.AbstractQueuedSynchronizer::release@2 (line 1059)
0x0000000110a6da3c: 8b3f 4c3b | c70f 8544
0x0000000110a6da44: ;*if_acmpeq {reexecute=0 rethrow=0 return_oop=0}
; - ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@14 (line 202)
java.util.concurrent.locks.ReentrantLock:: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
unlock ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
@5 (line 494) ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; - 0x0000000110a6da44: 0600 0044
jdk.internal.misc.InternalLock::
unlock@4 (line 78) 0x0000000110a6da48: ;*getfield state {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@22 (line 205)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.io.BufferedOutputStream:: ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
flush@33 (line 242)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd98278 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
e4 0x0000000110a6da48: 8b40 0c41 | 83f8 000f | 8c07 0600
0f
0x0000000110a6da54: ;*ifge {reexecute=0 rethrow=0 return_oop=0}
0008 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@25 (line 205)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
0x000000010cd9827c ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; {metadata(method data for {method} {0x00000001281b26a8} 'release' '(I)Z' in 'java/util/concurrent/locks/AbstractQueuedSynchronizer')} ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x000000010cd9827c: 83 0x0000000110a6da54: 0048 8984 | 24b0 0100
f8 00
48 0x0000000110a6da5c: ; {oop(a 'jdk/internal/misc/Unsafe'{0x000000061fc02c00})}
| 0x0000000110a6da5c: 0049 bb00 | 2cc0 1f06
be
58 0x0000000110a6da64: ; {oop(nullptr)}
8e21 | 6901 0000 | 0048 bf28 0x0000000110a6da64: 0000 0048 | ba00 0000 | 0000 0000 | 0049 8bc9 | 41b8 0000 | 0000 498b
| 0x0000000110a6da7c: ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
0100 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
0000 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
| 0000 000f | 840a 0000 | 0048 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
bf ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
38 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; {optimized virtual_call}
0x0000000110a6da7c: f366 90e8
0x000000010cd9829c: 0x0000000110a6da80: ; ImmutableOopMap {[384]=Oop [392]=Oop [432]=Oop }
0100 ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
00 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
| 00 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
48 0x0000000110a6da80: fca8 5107
| 0x0000000110a6da84: ; {other}
8b 0x0000000110a6da84: 0f1f 8400
1c
3e 0x0000000110a6da88: ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
48 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
| 8d ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
5b ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0148 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
| 0x0000000110a6da88: f407 0002
89
1c 0x0000000110a6da8c: ; {oop([I{0x000000061ef87078})}
3e 0x0000000110a6da8c: 48ba 7870 | f81e 0600 | 0000 8b9c | 2498 0100 | 0048 63cb
0f
0x0000000110a6daa0: ;*iaload {reexecute=0 rethrow=0 return_oop=0}
| 84 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@128 (line 336)
39 0000 0x0000000110a6daa0: 8b54 8a10 | 4823 c248 | 63c0 488b | 9424 8801 | 0000 448b | 8424 a401 | 0000 443b | 420c 0f83
0x000000010cd982b4: ;*ifeq {reexecute=0 rethrow=0 return_oop=0}
0x0000000110a6dac0: 240b 0000 | 4963 c848
; - 0x0000000110a6dac8: ;*lastore {reexecute=0 rethrow=0 return_oop=0}
java.util.concurrent.locks.AbstractQueuedSynchronizer:: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@131 (line 336)
release@5 (line 1059)
; - 0x0000000110a6dac8: 8944 ca10 | 488b b424 | 8001 0000
java.util.concurrent.locks.ReentrantLock::
unlock@5 (line 494) 0x0000000110a6dad4: ;*getfield curPosition {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@134 (line 337)
; - jdk.internal.misc.InternalLock::unlock@4 (line 78)
; - java.io.BufferedOutputStream:: 0x0000000110a6dad4: 488b 4e20 | 488b fbff | c748 63ff | 4803 cf48
flush 0x0000000110a6dae4: ;*putfield curPosition {reexecute=0 rethrow=0 return_oop=0}
@33 (line 242)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@143 (line 337)
0x000000010cd982b4: 0048 8b7c 0x0000000110a6dae4: 894e 208b | bc24 9001 | 0000 83c7 | 0289 bc24 | b801 0000 | 8b46 3848
|
2470 0x0000000110a6dafc: ;*getfield curSegment {reexecute=0 rethrow=0 return_oop=0}
8b ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@151 (line 338)
77 | 1448 c1e6
0x000000010cd982c0 0x0000000110a6dafc: c1e0 0348 | 83f8 000f | 842a 0000
:
;*getfield 0x0000000110a6db08: ; {metadata('jdk/internal/foreign/AbstractMemorySegmentImpl')}
head 0x0000000110a6db08: 0049 bda0 | a40c 2d01 | 0000 0044 | 8b70 0849 | ba00 0000 | 2c01 0000 | 004d 03f2 | 4d3b 6e38
{reexecute=0 rethrow=0 return_oop=0}
0x0000000110a6db28: 0f85 c80a | 0000 e900 | 0000 004c | 8bc8 483b
; - java.util.concurrent.locks.AbstractQueuedSynchronizer:: 0x0000000110a6db38: ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
release ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
@9 (line 1060)
; - java.util.concurrent.locks.ReentrantLock::unlock@5 (line 494)
; - jdk.internal.misc.InternalLock::unlock@4 (line 78)
; - 0x0000000110a6db38: 0048 83f8 | 000f 8481
java.io.BufferedOutputStream::
flush 0x0000000110a6db40: ;*ifnonnull {reexecute=0 rethrow=0 return_oop=0}
@33 (line 242)
; - java.util.Objects::requireNonNull@1 (line 232)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; {metadata(method data for {method} {0x00000001281b26a8} 'release' '(I)Z' in 'java/util/concurrent/locks/AbstractQueuedSynchronizer')} ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x000000010cd982c0: 0348 0x0000000110a6db40: 0400 0048 | 83f8 000f | 842a 0000
bf 0x0000000110a6db4c: ; {metadata('jdk/internal/foreign/AbstractMemorySegmentImpl')}
58 | 0x0000000110a6db4c: 0049 b8a0 | a40c 2d01 | 0000 0044 | 8b48 0849 | ba00 0000 | 2c01 0000 | 004d 03ca | 4d3b 4138
8e21 6901 | 00 0x0000000110a6db6c: 0f85 8e0a | 0000 e900 | 0000 004c
00
0x0000000110a6db78: ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
00 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@4 (line 80)
48 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
| 8387 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
4801 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
| 0x0000000110a6db78: 8bc0 498b
00
00 0x0000000110a6db7c: ;*getfield length {reexecute=0 rethrow=0 return_oop=0}
01 ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@8 (line 396)
0f ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
0x000000010cd982d4: ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; {static_call} ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x000000010cd982d4: 1f40 00 0x0000000110a6db7c: 5810 48b8 | 0400 0000 | 0000 0000 | 482b d848 | b801 0000 | 0000 0000 | 0048 03d8 | 48b8 0000
e8
0x000000010cd982d8: ; ImmutableOopMap {[120]= 0x0000000110a6db9c: 0000 0000 | 0000 483b | c80f 8c63 | 0a00 0048 | 3bcb 0f8d | 670a 0000
Oop
} 0x0000000110a6dbb4: ;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
;*invokestatic ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
signalNext ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
{reexecute=0 rethrow=0 return_oop=0}
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.util.concurrent.locks.AbstractQueuedSynchronizer::release ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
@12 (line 1060) ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
; - 0x0000000110a6dbb4: 488b d941 | 8b58 1848
java.util.concurrent.locks.ReentrantLock::
unlock 0x0000000110a6dbbc: ;*getfield scope {reexecute=0 rethrow=0 return_oop=0}
@5 (line 494)
; - ; - jdk.internal.foreign.AbstractMemorySegmentImpl::sessionImpl@1 (line 422)
jdk.internal.misc.InternalLock:: ; - java.lang.invoke.VarHandleSegmentAsInts::get@24 (line 109)
unlock ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
@4 (line 78) ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
java.io.BufferedOutputStream:: 0x0000000110a6dbbc: c1e3 0349
flush
@33 (line 242)
0x0000000110a6dbc0: ;*getfield min {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.NativeMemorySegmentImpl::unsafeGetOffset@1 (line 103)
0x000000010cd982d8: ; - java.lang.invoke.VarHandleSegmentAsInts::offsetNoVMAlignCheck@1 (line 96)
a4b6 5407
0x000000010cd982dc ; - java.lang.invoke.VarHandleSegmentAsInts::get@40 (line 111)
: ; {other}
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd982dc: 0f1f 8400 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x000000010cd982e0 0x0000000110a6dbc0: 8b40 204c | 8bc0 4c03 | c148 83fb | 000f 8430
:
;*invokestatic 0x0000000110a6dbd0: ;*ifnull {reexecute=0 rethrow=0 return_oop=0}
signalNext {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@1 (line 1906)
; - java.util.concurrent.locks.AbstractQueuedSynchronizer::release ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
@12 (line 1060) ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.util.concurrent.locks.ReentrantLock::unlock ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
@5 (line 494)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6dbd0: 0000 008b | 4b14 48c1
0x0000000110a6dbd8: ;*getfield owner {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@1 (line 202)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.InternalLock:: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
unlock@4 (line 78)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
java.io.BufferedOutputStream::flush ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6dbd8: e103 4883 | f900 0f84
@33 (line 242) 0x0000000110a6dbe0: ;*ifnull {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@4 (line 202)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
0x000000010cd982e0 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
: ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
4c10 0009 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
| 0x0000000110a6dbe0: 1300 0000 | 498b 8780 | 0300 0048
b801 0x0000000110a6dbec: ;*invokestatic currentThread {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@11 (line 202)
0000 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
| ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
e9 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
ea ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6dbec: 8b00 483b | c80f 85a9
|
0000 0x0000000110a6dbf4: ;*if_acmpeq {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@14 (line 202)
b800 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
| ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
00 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
e9 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6dbf4: 0300 008b
0x0000000110a6dbf8: ;*getfield state {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd982f4: ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@22 (line 205)
;*pop {reexecute=0 rethrow=0 return_oop=0} ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.util.concurrent.locks.ReentrantLock::unlock ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
@8 (line 494) ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
; - 0x0000000110a6dbf8: 4b0c 83f9 | 000f 8c71
jdk.internal.misc.InternalLock::
unlock 0x0000000110a6dc00: ;*ifge {reexecute=0 rethrow=0 return_oop=0}
@4 (line 78)
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@25 (line 205)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - java.io.BufferedOutputStream:: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
flush@33 (line 242) ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd982f4: e000 00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6dc00: 0300 0048 | 899c 24c0
00 0x0000000110a6dc08: ; {oop(a 'jdk/internal/misc/Unsafe'{0x000000061fc02c00})}
0x0000000110a6dc08: 0100 0048 | b800 2cc0 | 1f06 0000
0x0000000110a6dc14: ; {oop(nullptr)}
0x000000010cd982f8: ; {metadata(method data for {method} {0x000000012800f620} 'flush' '()V' in 'java/io/BufferedOutputStream')}
0x0000000110a6dc14: 0048 ba00 | 0000 0000 | 0000 0049 | 8bc8 41b8 | 0000 0000
0x000000010cd982f8
: 48 0x0000000110a6dc28: ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
b8 78 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
b2 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
| ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
2169 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0100 0x0000000110a6dc28: 488b f00f
| 00 0x0000000110a6dc2c: ; {optimized virtual_call}
00 0x0000000110a6dc2c: 1f40 00e8
ff80
0x0000000110a6dc30: ; ImmutableOopMap {[384]=Oop [392]=Oop [448]=Oop }
0x000000010cd98304: ;*goto {reexecute=0 rethrow=0 return_oop=0} ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
; - java.io.BufferedOutputStream::flush@51 (line 247) ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
0x000000010cd98304 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
: 58 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
02 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
| 0x0000000110a6dc30: 4ca7 5107
48
81 0x0000000110a6dc34: ; {other}
0x0000000110a6dc34: 0f1f 8400
c4
a0 0x0000000110a6dc38: ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
| ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
00 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
5d ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6dc38: a409 0003
|
49 0x0000000110a6dc3c: ; {oop([I{0x000000061ef87078})}
3b 0x0000000110a6dc3c: 48ba 7870 | f81e 0600 | 0000 8b8c | 249c 0100 | 004c 63c1 | 428b 5482
a7d8 0x0000000110a6dc54: ;*iaload {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@171 (line 339)
| 04 0x0000000110a6dc54: 1048 23c2 | 4863 c048 | 8b94 2488 | 0100 008b | bc24 b801 | 0000 3b7a | 0c0f 83ba | 0900 004c
00 0x0000000110a6dc74: 63c7 4a89
00 0x0000000110a6dc78: ;*lastore {reexecute=0 rethrow=0 return_oop=0}
0f ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@174 (line 339)
| 823d 0x0000000110a6dc78: 44c2 1048 | 8bb4 2480 | 0100 004c
00 0x0000000110a6dc84: ;*getfield curPosition {reexecute=0 rethrow=0 return_oop=0}
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@177 (line 340)
| 0x0000000110a6dc84: 8b46 2048 | 8bd9 ffc3 | 4863 db4c | 03c3 4c89
00
49 0x0000000110a6dc94: ;*putfield curPosition {reexecute=0 rethrow=0 return_oop=0}
8bff ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@186 (line 340)
0x0000000110a6dc94: 4620 8b9c | 2490 0100 | 0083 c303 | 899c 24bc | 0100 008b | 4638 48c1
0x0000000110a6dcac: ;*getfield curSegment {reexecute=0 rethrow=0 return_oop=0}
| ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@194 (line 341)
40 0x0000000110a6dcac: e003 4883 | f800 0f84 | 2a00 0000
f6
0x0000000110a6dcb8: ; {metadata('jdk/internal/foreign/AbstractMemorySegmentImpl')}
c40f 0x0000000110a6dcb8: 49bd a0a4 | 0c2d 0100 | 0000 448b | 7008 49ba | 0000 002c | 0100 0000 | 4d03 f24d | 3b6e 380f
0x000000010cd98324: 0f 0x0000000110a6dcd8: 855e 0900 | 00e9 0000 | 0000 4c8b
84
0x0000000110a6dce4: ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
12 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
00 0x0000000110a6dce4: c848 3b00 | 4883 f800 | 0f84 ee01
| 00 0x0000000110a6dcf0: ;*ifnonnull {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@1 (line 232)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
48 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
83 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6dcf0: 0000 4883 | f800 0f84 | 2a00 0000
0x0000000110a6dcfc: ; {metadata('jdk/internal/foreign/AbstractMemorySegmentImpl')}
0x0000000110a6dcfc: 48b9 a0a4 | 0c2d 0100 | 0000 448b | 4808 49ba | 0000 002c | 0100 0000 | 4d03 ca49 | 3b49 380f
0x0000000110a6dd1c: 8524 0900 | 00e9 0000 | 0000 488b
0x0000000110a6dd28: ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@4 (line 80)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd9832c: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6dd28: c848 8b79
0x0000000110a6dd2c: ;*getfield length {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@8 (line 396)
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
; {runtime_call SharedRuntime::enable_stack_reserved_zone(JavaThread*)} 0x0000000110a6dd2c: 1048 b804 | 0000 0000 | 0000 0048 | 2bf8 48b8 | 0100 0000 | 0000 0000 | 4803 f848 | b800 0000
0x0000000110a6dd4c: 0000 0000 | 004c 3bc0 | 0f8c f908 | 0000 4c3b | c70f 8dfd | 0800 0049
0x000000010cd9832c 0x0000000110a6dd64: ;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
: ec ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
08 ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
e8cd ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
| ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
683e ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
f748 0x0000000110a6dd64: 8bf8 8b79 | 1848 c1e7
|
83 0x0000000110a6dd6c: ;*getfield scope {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.AbstractMemorySegmentImpl::sessionImpl@1 (line 422)
; - java.lang.invoke.VarHandleSegmentAsInts::get@24 (line 109)
c4 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
08 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6dd6c: 0348 8b41
e9
0x0000000110a6dd70: ;*getfield min {reexecute=0 rethrow=0 return_oop=0}
| 0500 0000 ; - jdk.internal.foreign.NativeMemorySegmentImpl::unsafeGetOffset@1 (line 103)
; - java.lang.invoke.VarHandleSegmentAsInts::offsetNoVMAlignCheck@1 (line 96)
; - java.lang.invoke.VarHandleSegmentAsInts::get@40 (line 111)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6dd70: 2048 8bc8 | 4903 c848 | 83ff 000f | 8433 0000
0x0000000110a6dd80: ;*ifnull {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@1 (line 1906)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
0x000000010cd9833c ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
: ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6dd80: 0044 8b47 | 1449 c1e0
0x0000000110a6dd88: ;*getfield owner {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@1 (line 202)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6dd88: 0349 83f8 | 000f 8413
0x0000000110a6dd90: ;*ifnull {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@4 (line 202)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; {runtime_call SharedRuntime::enable_stack_reserved_zone(JavaThread*)}
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
0x000000010cd9833c: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
e8 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
bf ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
683e
0x0000000110a6dd90: 0000 0049 | 8b87 8003 | 0000 488b
0x000000010cd98340 0x0000000110a6dd9c: ;*invokestatic currentThread {reexecute=0 rethrow=0 return_oop=0}
: ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@11 (line 202)
; {runtime_call delayed StackOverflowError throw_exception}
0x000000010cd98340: f7e9 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
3a2f ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
0x000000010cd98344 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
: ; {external_word} ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x000000010cd98344: 5007 48bf 0x0000000110a6dd9c: 004c 3bc0 | 0f85 1301
0x0000000110a6dda4: ;*if_acmpeq {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@14 (line 202)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
| 0095 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
3f04 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
| ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0100 0000 | 0x0000000110a6dda4: 0000 448b
48
83 0x0000000110a6dda8: ;*getfield state {reexecute=0 rethrow=0 return_oop=0}
e4 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@22 (line 205)
f0 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6dda8: 470c 4183 | f800 0f8c
0x0000000110a6ddb0: ;*ifge {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd98354 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@25 (line 205)
: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6ddb0: d600 0000 | 4889 bc24 | c801 0000
0x0000000110a6ddbc: ; {oop(a 'jdk/internal/misc/Unsafe'{0x000000061fc02c00})}
0x0000000110a6ddbc: 49b9 002c | c01f 0600
; {runtime_call MacroAssembler::debug64(char*, long long, long long*)} 0x0000000110a6ddc4: ; {oop(nullptr)}
0x000000010cd98354: e8 0x0000000110a6ddc4: 0000 48ba | 0000 0000 | 0000 0000 | 41b8 0000 | 0000 498b
57
0x0000000110a6ddd8: ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
1e26 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
0x000000010cd98358: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; {poll_return}
0x000000010cd98358: f7f4 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
493b ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6ddd8: f166 0f1f
|
a7 0x0000000110a6dddc: ; {optimized virtual_call}
50 0x0000000110a6dddc: 4400 00e8
04
00 0x0000000110a6dde0: ; ImmutableOopMap {[384]=Oop [392]=Oop [456]=Oop }
| 000f ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
8703 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
| 03 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
00c3 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x000000010cd98368: 0x0000000110a6dde0: 9ca5 5107
; {metadata(method data for {method} {0x000000012800f620} 'flush' '()V' in 'java/io/BufferedOutputStream')}
0x000000010cd98368: 48b8 78 0x0000000110a6dde4: ; {other}
b2 0x0000000110a6dde4: 0f1f 8400
|
21 0x0000000110a6dde8: ;*invokevirtual getIntUnaligned {reexecute=0 rethrow=0 return_oop=0}
69 01 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@15 (line 1909)
00 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
| ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0000 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
ff ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
80 0x0000000110a6dde8: 540b 0004
0x0000000110a6ddec: ; {oop([I{0x000000061ef87078})}
0x000000010cd98374: ;*goto {reexecute=0 rethrow=0 return_oop=0}
; - java.io.BufferedOutputStream::flush@38 (line 243)
0x0000000110a6ddec: 48be 7870 | f81e 0600 | 0000 8b9c | 24a0 0100 | 0048 63d3
0x000000010cd98374: 0802
00 0x0000000110a6de00: ;*iaload {reexecute=0 rethrow=0 return_oop=0}
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@214 (line 342)
| 0x0000000110a6de00: 8b74 9610 | 4823 c648 | 63c0 488b | 9424 8801 | 0000 448b | 8424 bc01 | 0000 443b | 420c 0f83
4881 0x0000000110a6de20: 4e08 0000 | 4963 f048
c4 0x0000000110a6de28: ;*lastore {reexecute=0 rethrow=0 return_oop=0}
a0 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@217 (line 342)
| 0000 0x0000000110a6de28: 8944 f210 | 488b b424 | 8001 0000
00 0x0000000110a6de34: ;*getfield curPosition {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@220 (line 343)
5d 0x0000000110a6de34: 488b 4e20 | 488b c3ff | c048 63c0 | 4803 c848
| 0x0000000110a6de44: ;*putfield curPosition {reexecute=0 rethrow=0 return_oop=0}
49 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@229 (line 343)
3b a7 0x0000000110a6de44: 894e 2048 | 81c4 2002
d8 | 0400 000f | 823d 0000 | 0049 8bff | 40f6 c40f
0x000000010cd98394: 0f 0x0000000110a6de4c: ; {poll_return}
84 0x0000000110a6de4c: 0000 5d49 | 3ba7 5004 | 0000 0f87 | 2408 0000
0x0000000110a6de5c: ;*return {reexecute=0 rethrow=0 return_oop=0}
12 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@242 (line 347)
00 0x0000000110a6de5c: c38b 8c24
| 0x0000000110a6de60: ;*invokestatic fallbackReadGroupVInt {reexecute=0 rethrow=0 return_oop=0}
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@24 (line 320)
0x0000000110a6de60: 9001 0000
00
0x0000000110a6de64: ; {static_call}
0x0000000110a6de64: 6666 90e8
48
83 0x0000000110a6de68: ; ImmutableOopMap {}
;*invokestatic fallbackReadGroupVInt {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@24 (line 320)
0x0000000110a6de68: 14ab 5107
0x0000000110a6de6c: ; {other}
0x0000000110a6de6c: 0f1f 8400
0x000000010cd9839c: 0x0000000110a6de70: ;*invokestatic fallbackReadGroupVInt {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@24 (line 320)
0x0000000110a6de70: dc0b 0005 | 4881 c420 | 0200 005d
0x0000000110a6de7c: ; {poll_return}
0x0000000110a6de7c: 493b a750 | 0400 000f | 870d 0800
0x0000000110a6de88: ;*return {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@27 (line 321)
0x0000000110a6de88: 00c3 4889 | bc24 c801 | 0000 4c8b | c38b 9c24 | a001 0000
0x0000000110a6de9c: ; {oop(a 'jdk/internal/misc/ScopedMemoryAccess$ScopedAccessError'{0x000000061ef11a08})}
0x0000000110a6de9c: 48b8 081a | f11e 0600 | 0000 483b
; {runtime_call SharedRuntime::enable_stack_reserved_zone(JavaThread*)}
0x000000010cd9839c: 0x0000000110a6dea8: ; ImmutableOopMap {rsi=Oop rax=Oop [384]=Oop [392]=Oop [456]=Oop }
ec ;*athrow {reexecute=1 rethrow=0 return_oop=0}
08 ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
e85d | 68 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
3e ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
f748 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
; {section_word}
| 0x0000000110a6dea8: 0048 baa9 | dea6 1001
83
c4 0x0000000110a6deb0: ; {runtime_call handle_exception_nofpu Runtime1 stub}
08e9 | 0500 00 0x0000000110a6deb0: 0000 00e8 | 48af 5d07
00
0x0000000110a6deb8: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6deb8: 904c 8bc3 | 8b9c 24a0
0x000000010cd983ac
: 0x0000000110a6dec0: ; {oop(a 'jdk/internal/misc/ScopedMemoryAccess$ScopedAccessError'{0x000000061ef13d90})}
0x0000000110a6dec0: 0100 0048 | b890 3df1 | 1e06 0000
0x0000000110a6decc: ; ImmutableOopMap {rsi=Oop rdi=Oop rax=Oop [384]=Oop [392]=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
; {runtime_call SharedRuntime::enable_stack_reserved_zone(JavaThread*)}
0x0000000110a6decc: 0048 3b00
0x000000010cd983ac
: 0x0000000110a6ded0: ; {section_word}
e8 0x0000000110a6ded0: 48ba d0de | a610 0100
4f
68 0x0000000110a6ded8: ; {runtime_call handle_exception_nofpu Runtime1 stub}
3e 0x0000000110a6ded8: 0000 e821
0x0000000110a6dedc: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
0x000000010cd983b0: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; {runtime_call delayed StackOverflowError throw_exception} ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd983b0 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
: f7e9 ca2e
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6dedc: af5d 0790 | 4c89 8424 | d801 0000
0x000000010cd983b4
: 0x0000000110a6dee8: ; {no_reloc}
; {external_word}
0x0000000110a6dee8: e9d8 0700 | 0000 0000 | 0000 498b | 87b8 0100 | 0048 8d78 | 3049 3bbf | c801 0000 | 0f87 c507
0x000000010cd983b4: 5007 48bf | 0095 3f04 0x0000000110a6df08: 0000 4989 | bfb8 0100 | 0048 c700 | 0100 0000 | 488b ca49 | ba00 0000 | 2c01 0000 | 0049 2bca
| 0x0000000110a6df28: 8948 0848 | 33c9 8948 | 0c48 33c9 | 4889 4810 | 4889 4818 | 4889 4820
01
00 0x0000000110a6df40: ;*new {reexecute=0 rethrow=0 return_oop=0}
0000 | 48 ; - java.util.Objects::requireNonNull@4 (line 233)
83 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
e4 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
f0 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6df40: 4889 4828
0x0000000110a6df44: ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@8 (line 233)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
0x000000010cd983c4: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6df44: 488b f048 | 8984 24d0
0x0000000110a6df4c: ; {optimized virtual_call}
0x0000000110a6df4c: 0100 00e8
; {runtime_call MacroAssembler::debug64(char*, long long, long long*)}
0x000000010cd983c4: 0x0000000110a6df50: ; ImmutableOopMap {[384]=Oop [392]=Oop [464]=Oop }
e8e7 ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@8 (line 233)
1d26 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
0x000000010cd983c8 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
: ; {poll_return}
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x000000010cd983c8: f7f4 0x0000000110a6df50: 2ca4 5107
49
3b 0x0000000110a6df54: ; {other}
0x0000000110a6df54: 0f1f 8400
|
a750 0400 | 000f 87a9
0x000000010cd983d4: 0x0000000110a6df58: ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
;*return {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@8 (line 233)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
java.io.BufferedOutputStream:: 0x0000000110a6df58: c40c 0008 | 488b 8424
flush@59 (line 249)
0x000000010cd983d4: 0x0000000110a6df60: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
02 ;*athrow {reexecute=1 rethrow=0 return_oop=0}
00 ; - (reexecute) java.util.Objects::requireNonNull@11 (line 233)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
c3 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
| 48 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
8b ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
44 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
24 | 78e9 0x0000000110a6df60: d001 0000
e7
02 0x0000000110a6df64: ; {section_word}
0x0000000110a6df64: 48ba 64df | a610 0100
0x0000000110a6df6c: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x000000010cd983e0: 0x0000000110a6df6c: 0000 e88d
;*athrow
{reexecute=0 rethrow=0 return_oop=0} 0x0000000110a6df70: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@11 (line 233)
; - java.io.BufferedOutputStream:: ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
flush@37 (line 243)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd983e0: ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0000 498b 0x0000000110a6df70: ae5d 0790 | 4889 9c24 | c001 0000 | 8b8c 249c
|
8700 0x0000000110a6df80: ; {oop(a 'jdk/internal/misc/ScopedMemoryAccess$ScopedAccessError'{0x000000061ef11a08})}
0x0000000110a6df80: 0100 0048 | b808 1af1 | 1e06 0000
05
00 0x0000000110a6df8c: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop [448]=Oop }
| ;*athrow {reexecute=1 rethrow=0 return_oop=0}
004d ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
33 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
d2 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
| 4d ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
89 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
9700 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6df8c: 0048 3b00
|
05 0x0000000110a6df90: ; {section_word}
00 0x0000000110a6df90: 48ba 90df | a610 0100
00 0x0000000110a6df98: ; {runtime_call handle_exception_nofpu Runtime1 stub}
4d 0x0000000110a6df98: 0000 e861
| 0x0000000110a6df9c: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
33d2 4d89 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
| ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
97 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
08 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0500 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6df9c: ae5d 0790 | 8b8c 249c
|
0048 8bf0 0x0000000110a6dfa4: ; {oop(a 'jdk/internal/misc/ScopedMemoryAccess$ScopedAccessError'{0x000000061ef13d90})}
0x0000000110a6dfa4: 0100 0048 | b890 3df1 | 1e06 0000
0x000000010cd98400 0x0000000110a6dfb0: ; ImmutableOopMap {rbx=Oop rax=Oop [384]=Oop [392]=Oop }
: ;*athrow {reexecute=1 rethrow=0 return_oop=0}
488d 8424 | ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
80 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
| 488b 3848 0x0000000110a6dfb0: 0048 3b00
| 0x0000000110a6dfb4: ; {section_word}
85 0x0000000110a6dfb4: 48ba b4df | a610 0100
ff
0x0000000110a6dfbc: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0f 0x0000000110a6dfbc: 0000 e83d
84
0x0000000110a6dfc0: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
| 0f00 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
0000 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
| ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
48 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
8b ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
5808 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
| ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
f048 0fb1 | 3b 0x0000000110a6dfc0: ae5d 0790 | 4889 8c24 | e801 0000 | 0f1f 4000
0f
0x0000000110a6dfd0: ; {no_reloc}
8573 0x0000000110a6dfd0: e920 0700 | 0000 0000 | 0000 498b | 87b8 0100 | 0048 8d78 | 3049 3bbf | c801 0000 | 0f87 0d07
0x000000010cd98420: 0200 0049 | ff8f 50 0x0000000110a6dff0: 0000 4989 | bfb8 0100 | 0048 c700 | 0100 0000 | 488b ca49 | ba00 0000 | 2c01 0000 | 0049 2bca
05
0x000000010cd98428: ;*monitorexit {reexecute=0 rethrow=0 return_oop=0}
0x0000000110a6e010: 8948 0848 | 33c9 8948 | 0c48 33c9 | 4889 4810 | 4889 4818 | 4889 4820
; - 0x0000000110a6e028: ;*new {reexecute=0 rethrow=0 return_oop=0}
java.io.BufferedOutputStream:: ; - java.util.Objects::requireNonNull@4 (line 233)
flush@56 (line 247)
0x000000010cd98428: ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
0000 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
488b | c6e9 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
97 0x0000000110a6e028: 4889 4828
02
0x0000000110a6e02c: ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd98430 ; - java.util.Objects::requireNonNull@8 (line 233)
: ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; {metadata({method} {0x000000012800f620} 'flush' '()V' in 'java/io/BufferedOutputStream')} ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd98430 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0000 49ba | 20 0x0000000110a6e02c: 488b f048 | 8984 24e0
f6
00 0x0000000110a6e034: ; {optimized virtual_call}
28 0x0000000110a6e034: 0100 00e8
| 01 0x0000000110a6e038: ; ImmutableOopMap {[384]=Oop [392]=Oop [480]=Oop }
00 ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@8 (line 233)
0000 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
| 4c89 54 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
24 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
| ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0848 0x0000000110a6e038: 44a3 5107
c7
04 0x0000000110a6e03c: ; {other}
0x0000000110a6e03c: 0f1f 8400
|
24 0x0000000110a6e040: ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@8 (line 233)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
ff ffff
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd98448 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
: 0x0000000110a6e040: ac0d 000c | 488b 8424
; {runtime_call counter_overflow Runtime1 stub}
0x0000000110a6e048: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
0x000000010cd98448 ;*athrow {reexecute=1 rethrow=0 return_oop=0}
: ; - (reexecute) java.util.Objects::requireNonNull@11 (line 233)
ff ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
e8 b2 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
14
0x000000010cd9844c: ; ImmutableOopMap {rsi=Oop [96]=Oop } ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
;*synchronization entry 0x0000000110a6e048: e001 0000
0x0000000110a6e04c: ; {section_word}
; - 0x0000000110a6e04c: 48ba 4ce0 | a610 0100
java.io.BufferedOutputStream::flush
@-1 (line 237)
0x0000000110a6e054: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x0000000110a6e054: 0000 e8a5
0x000000010cd9844c
: 0x0000000110a6e058: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
61 ; - java.util.Objects::requireNonNull@11 (line 233)
07 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
e9 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
b9 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd98450: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x000000010cd98450 0x0000000110a6e058: ad5d 0790 | 4889 8424 | b001 0000 | 4c8b c38b | 9c24 9801
:
f1 0x0000000110a6e06c: ; {oop(a 'jdk/internal/misc/ScopedMemoryAccess$ScopedAccessError'{0x000000061ef11a08})}
ff 0x0000000110a6e06c: 0000 48b8 | 081a f11e | 0600 0000
ff 0x0000000110a6e078: ; implicit exception: dispatches to 0x0000000110a6e70c
e8 ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop [432]=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
0x000000010cd98454 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
: ; ImmutableOopMap {rdi=Oop ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
[96] ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
=Oop ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
} ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; {section_word}
;*invokevirtual 0x0000000110a6e078: 483b 0048 | ba7b e0a6 | 1001 0000
lock
{reexecute=0 rethrow=0 return_oop=0} 0x0000000110a6e084: ; {runtime_call handle_exception_nofpu Runtime1 stub}
; - java.io.BufferedOutputStream::flush 0x0000000110a6e084: 00e8 76ad
@11 (line 238)
0x0000000110a6e088: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd98454: ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
a8a1 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
6007 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
0x000000010cd98458 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
: ; {metadata({method} {0x000000012810f7d8} 'lock' '()V' in 'jdk/internal/misc/InternalLock')} ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x000000010cd98458: 0x0000000110a6e088: 5d07 904c | 8bc3 8b9c | 2498 0100 | 0048 8bf0
0x0000000110a6e098: ; {oop(a 'jdk/internal/misc/ScopedMemoryAccess$ScopedAccessError'{0x000000061ef13d90})}
49ba 0x0000000110a6e098: 48b8 903d | f11e 0600 | 0000 483b
d8 0x0000000110a6e0a4: ; ImmutableOopMap {rsi=Oop rax=Oop [384]=Oop [392]=Oop }
f7 ;*athrow {reexecute=1 rethrow=0 return_oop=0}
| ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
10 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
28 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
01 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
00 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
| ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0000 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
4c89 | 54 ; {section_word}
24 0x0000000110a6e0a4: 0048 baa5 | e0a6 1001
0848 0x0000000110a6e0ac: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x0000000110a6e0ac: 0000 00e8 | 4cad 5d07
|
c7 0x0000000110a6e0b4: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
04 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
24ff ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd9846c: ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; {runtime_call counter_overflow Runtime1 stub}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x000000010cd9846c 0x0000000110a6e0b4: 904c 8984 | 24f8 0100 | 0066 6690
:
ff 0x0000000110a6e0c0: ; {no_reloc}
ff ffe8
0x0000000110a6e0c0: e960 0600 | 0000 0000 | 0000 498b | 87b8 0100 | 0048 8d78 | 3049 3bbf | c801 0000 | 0f87 4d06
0x0000000110a6e0e0: 0000 4989 | bfb8 0100 | 0048 c700 | 0100 0000 | 488b ca49 | ba00 0000 | 2c01 0000 | 0049 2bca
0x000000010cd98470: 0x0000000110a6e100: 8948 0848 | 33c9 8948 | 0c48 33c9 | 4889 4810 | 4889 4818 | 4889 4820
;
ImmutableOopMap { 0x0000000110a6e118: ;*new {reexecute=0 rethrow=0 return_oop=0}
rdi= ; - java.util.Objects::requireNonNull@4 (line 233)
Oop ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
[96]= ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
Oop ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x0000000110a6e118: 4889 4828
;*synchronization entry 0x0000000110a6e11c: ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@8 (line 233)
; - jdk.internal.misc.InternalLock:: ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
lock@-1 (line 74) ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - java.io.BufferedOutputStream:: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
flush 0x0000000110a6e11c: 488b f048 | 8984 24f0
@11 (line 238)
0x0000000110a6e124: ; {optimized virtual_call}
0x000000010cd98470 0x0000000110a6e124: 0100 00e8
:
8c14 0x0000000110a6e128: ; ImmutableOopMap {[384]=Oop [392]=Oop [496]=Oop }
6107 ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@8 (line 233)
| e9 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
13 f2ff
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd98478 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x000000010cd98478 0x0000000110a6e128: 54a2 5107
:
ffe8 82a1 0x0000000110a6e12c: ; {other}
0x0000000110a6e12c: 0f1f 8400
0x000000010cd9847c: 0x0000000110a6e130: ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
; ; - java.util.Objects::requireNonNull@8 (line 233)
ImmutableOopMap {rdi ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
=Oop ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
[96] ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
=Oop ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x0000000110a6e130: 9c0e 0010 | 488b 8424
}
;*invokevirtual 0x0000000110a6e138: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
lock ; - (reexecute) java.util.Objects::requireNonNull@11 (line 233)
{reexecute=0 rethrow=0 return_oop=0}
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - jdk.internal.misc.InternalLock:: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
lock@4 (line 74) ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x0000000110a6e138: f001 0000
; - java.io.BufferedOutputStream::
flush@11 (line 238)
; {metadata({method} {0x000000012817e7c8} 'lock' '()V' in 'java/util/concurrent/locks/ReentrantLock')} 0x0000000110a6e13c: ; {section_word}
0x0000000110a6e13c: 48ba 3ce1 | a610 0100
0x000000010cd9847c
: 0x0000000110a6e144: ; {runtime_call handle_exception_nofpu Runtime1 stub}
60 0x0000000110a6e144: 0000 e8b5
07
0x0000000110a6e148: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
49ba | c8e7 ; - java.util.Objects::requireNonNull@11 (line 233)
17 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
28 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
| ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
01 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
00 0x0000000110a6e148: ac5d 0790 | 4c89 8c24 | a801 0000
00
| 0x0000000110a6e154: ; {oop(a 'jdk/internal/misc/ScopedMemoryAccess$ScopedAccessError'{0x000000061ef11a08})}
4c 0x0000000110a6e154: 48b8 081a | f11e 0600 | 0000 483b
89
54 0x0000000110a6e160: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop [424]=Oop }
24 ;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
| 08 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
48 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
c7 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
04 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
| 24 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
ff ; {section_word}
0x0000000110a6e160: 0048 ba61 | e1a6 1001
ff
ff 0x0000000110a6e168: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x0000000110a6e168: 0000 00e8 | 90ac 5d07
0x0000000110a6e170: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd98494 ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; {runtime_call counter_overflow Runtime1 stub}
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
0x000000010cd98494: ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
ffe8 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
6614 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
; {oop(a 'jdk/internal/misc/ScopedMemoryAccess$ScopedAccessError'{0x000000061ef13d90})}
0x0000000110a6e170: 9048 b890 | 3df1 1e06 | 0000 0048
0x000000010cd98498: 0x0000000110a6e17c: ; ImmutableOopMap {r9=Oop rax=Oop [384]=Oop [392]=Oop }
; ;*athrow {reexecute=1 rethrow=0 return_oop=0}
ImmutableOopMap {rdi= ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
Oop [96] ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
=Oop ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
}
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
;*synchronization entry
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
; - ; {section_word}
java.util.concurrent.locks.ReentrantLock::lock 0x0000000110a6e17c: 3b00 48ba | 7ee1 a610 | 0100 0000
@-1 (line 322)
0x0000000110a6e188: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x0000000110a6e188: e873 ac5d
; - 0x0000000110a6e18c: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
jdk.internal.misc.InternalLock:: ; - jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
lock@4 (line 74) ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.io.BufferedOutputStream::flush@11 (line 238)
0x000000010cd98498: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
6107 e9b1
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd9849c: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
; {runtime_call throw_null_pointer_exception Runtime1 stub} 0x0000000110a6e18c: 0790 4889 | 9c24 0802 | 0000 6690
0x0000000110a6e198: ; {no_reloc}
0x000000010cd9849c: 0x0000000110a6e198: e9b8 0500 | 0000 0000 | 0000 498b | 87b8 0100 | 0048 8d78 | 3049 3bbf | c801 0000 | 0f87 a505
f2ff 0x0000000110a6e1b8: 0000 4989 | bfb8 0100 | 0048 c700 | 0100 0000 | 488b ca49 | ba00 0000 | 2c01 0000 | 0049 2bca
ff 0x0000000110a6e1d8: 8948 0848 | 33c9 8948 | 0c48 33c9 | 4889 4810 | 4889 4818 | 4889 4820
e8
0x0000000110a6e1f0: ;*new {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@4 (line 233)
0x000000010cd984a0: ; ImmutableOopMap {rdi=Oop [96] ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
=Oop ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
}
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
;*invokevirtual ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
lock 0x0000000110a6e1f0: 4889 4828
{reexecute=0 rethrow=0 return_oop=0}
0x0000000110a6e1f4: ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@8 (line 233)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
java.util.concurrent.locks.ReentrantLock:: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
lock@4 (line 322) 0x0000000110a6e1f4: 488b f048 | 8984 2400
0x0000000110a6e1fc: ; {optimized virtual_call}
0x0000000110a6e1fc: 0200 00e8
; - jdk.internal.misc.InternalLock::lock@4 (line 74)
0x0000000110a6e200: ; ImmutableOopMap {[384]=Oop [392]=Oop [512]=Oop }
;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@8 (line 233)
; - java.io.BufferedOutputStream:: ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
flush ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
@11 (line 238)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x000000010cd984a0 0x0000000110a6e200: 7ca1 5107
: 5ca1
6007 0x0000000110a6e204: ; {other}
0x0000000110a6e204: 0f1f 8400
0x0000000110a6e208: ;*invokespecial <init> {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@8 (line 233)
0x000000010cd984a4 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
: ; {metadata({method} {0x00000001281b34b8} 'lock' '()V' in 'java/util/concurrent/locks/ReentrantLock$Sync')}
0x000000010cd984a4 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
49 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
ba ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x0000000110a6e208: 740f 0014 | 488b 8424
b834
0x0000000110a6e210: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
| ;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) java.util.Objects::requireNonNull@11 (line 233)
1b ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
28 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
01 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
00 | 0000 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x0000000110a6e210: 0002 0000
4c
89 | 5424 0x0000000110a6e214: ; {section_word}
08 0x0000000110a6e214: 48ba 14e2 | a610 0100
48
| 0x0000000110a6e21c: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x0000000110a6e21c: 0000 e8dd
c7 0x0000000110a6e220: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
04 ; - java.util.Objects::requireNonNull@11 (line 233)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
24 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
ff ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x0000000110a6e220: ab5d 0790 | 498b 8700 | 0500 004d | 33d2 4d89 | 9700 0500 | 004d 33d2 | 4d89 9708
0x0000000110a6e23c: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
0x000000010cd984b8: ;*athrow {reexecute=1 rethrow=0 return_oop=0}
; {runtime_call counter_overflow Runtime1 stub}
; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@35 (line 1912)
0x000000010cd984b8 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
: ff ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
ff ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
ff ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
e8 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
; {section_word}
0x0000000110a6e23c: 0500 0048 | ba3f e2a6 | 1001 0000
0x000000010cd984bc 0x0000000110a6e248: ; {runtime_call handle_exception_nofpu Runtime1 stub}
: 0x0000000110a6e248: 00e8 b2ab
;
ImmutableOopMap {rdi= 0x0000000110a6e24c: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
Oop [96]= ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@35 (line 1912)
Oop }
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
;*synchronization entry ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
; - 0x0000000110a6e24c: 5d07 9049 | 8b87 0005 | 0000 4d33 | d24d 8997 | 0005 0000 | 4d33 d24d | 8997 0805 | 0000 8b70
0x0000000110a6e26c: 2448 c1e6
java.util.concurrent.locks.ReentrantLock$Sync::
lock@-1 (line 152) 0x0000000110a6e270: ;*getfield runtimeExceptionSupplier {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@1 (line 113)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
; - ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
java.util.concurrent.locks.ReentrantLock:: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
lock@4 (line 322)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
jdk.internal.misc.InternalLock:: 0x0000000110a6e270: 030f 1f40 | 0048 b8ff | ffff ffff
lock
@4 (line 74) 0x0000000110a6e27c: ; {virtual_call}
0x0000000110a6e27c: ffff ffe8
0x0000000110a6e280: ; ImmutableOopMap {[384]=Oop [392]=Oop }
;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
; - ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@4 (line 113)
java.io.BufferedOutputStream::flush ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
@11 (line 238) ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd984bc ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x0000000110a6e280: fca3 5107
4014 0x0000000110a6e284: ; {other}
61 0x0000000110a6e284: 0f1f 8400
07
0x0000000110a6e288: ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
| e9 ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@4 (line 113)
d1 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
f2 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
ff ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x0000000110a6e288: f40f 0017 | 4883 f800 | 0f84 2900
0x000000010cd984c4 0x0000000110a6e294: ; {metadata('java/lang/RuntimeException')}
: 0x0000000110a6e294: 0000 48be | 20f0 052c | 0100 0000 | 8b78 0849 | ba00 0000 | 2c01 0000 | 0049 03fa | 483b 7748
0x0000000110a6e2b4: 0f85 b204 | 0000 e900
; {metadata({method} {0x00000001284576e0} 'implFlush' '()V' in 'java/io/BufferedOutputStream')}
0x000000010cd984c4 0x0000000110a6e2bc: ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
: ff ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@9 (line 113)
49 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
ba ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
e0 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
| ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
76 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
45 0x0000000110a6e2bc: 0000 0048
2801 0x0000000110a6e2c0: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
| 00 ; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
00 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
004c ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
| ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
89 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
54 ; {section_word}
24 0x0000000110a6e2c0: 3b00 48ba | c2e2 a610 | 0100 0000
08
0x0000000110a6e2cc: ; {runtime_call handle_exception_nofpu Runtime1 stub}
| 0x0000000110a6e2cc: e82f ab5d
48
c7 0x0000000110a6e2d0: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
04 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
24 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
| ffff ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
ffff
0x0000000110a6e2d0: 0790 498b | 8700 0500 | 004d 33d2 | 4d89 9700 | 0500 004d | 33d2 4d89 | 9708 0500
0x000000010cd984dc 0x0000000110a6e2ec: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
: ; {runtime_call counter_overflow Runtime1 stub} ;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@35 (line 1912)
0x000000010cd984dc: e8 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
1f ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
14 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
61 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; {section_word}
0x000000010cd984e0: 0x0000000110a6e2ec: 0048 baed | e2a6 1001
;
ImmutableOopMap { 0x0000000110a6e2f4: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x0000000110a6e2f4: 0000 00e8 | 04ab 5d07
rsi
=Oop 0x0000000110a6e2fc: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
[96]= ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@35 (line 1912)
Oop ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
} ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x0000000110a6e2fc: 9049 8b87 | 0005 0000 | 4d33 d24d | 8997 0005 | 0000 4d33 | d24d 8997 | 0805 0000 | 8b70 2448
0x0000000110a6e31c: ;*getfield runtimeExceptionSupplier {reexecute=0 rethrow=0 return_oop=0}
;*synchronization entry ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@1 (line 113)
; - ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
java.io.BufferedOutputStream::implFlush ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
@-1 (line 252) ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; - java.io.BufferedOutputStream:: 0x0000000110a6e31c: c1e6 0366 | 0f1f 4400 | 0048 b8ff | ffff ffff
flush
@15 (line 240)
0x000000010cd984e0: 07e9 0x0000000110a6e32c: ; {virtual_call}
10f4 0x0000000110a6e32c: ffff ffe8
0x000000010cd984e4: 0x0000000110a6e330: ; ImmutableOopMap {[384]=Oop [392]=Oop }
; {metadata({method} {0x00000001284575d8} 'flushBuffer' '()V' in 'java/io/BufferedOutputStream')} ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@4 (line 113)
0x000000010cd984e4: ff ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
ff 49ba | ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
d8 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
75 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
4528 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
| 01 0x0000000110a6e330: 4ca3 5107
00
0x0000000110a6e334: ; {other}
00 0x0000000110a6e334: 0f1f 8400
00
| 0x0000000110a6e338: ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
4c ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@4 (line 113)
89 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
54 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
24 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
| 0848 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
c7 0x0000000110a6e338: a410 001a | 4883 f800 | 0f84 2900
04
0x0000000110a6e344: ; {metadata('java/lang/RuntimeException')}
| 24ff ffff
0x000000010cd984fc: ; {runtime_call counter_overflow Runtime1 stub} 0x0000000110a6e344: 0000 48be | 20f0 052c | 0100 0000 | 8b78 0849 | ba00 0000 | 2c01 0000 | 0049 03fa | 483b 7748
0x0000000110a6e364: 0f85 1004 | 0000 e900
0x000000010cd984fc
: 0x0000000110a6e36c: ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
ff ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@9 (line 113)
e8 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
fe13 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd98500 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
: 0x0000000110a6e36c: 0000 0048
;
ImmutableOopMap {rsi=Oop [96]= 0x0000000110a6e370: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
Oop ; {section_word}
} 0x0000000110a6e370: 3b00 48ba | 72e3 a610 | 0100 0000
0x0000000110a6e37c: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x0000000110a6e37c: e87f aa5d
;*synchronization entry
0x0000000110a6e380: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
; - java.io.BufferedOutputStream:: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
flushBuffer ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
@-1 (line 124)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; - java.io.BufferedOutputStream::implFlush@1 (line 252)
; - 0x0000000110a6e380: 0790 498b | 8700 0500 | 004d 33d2 | 4d89 9700 | 0500 004d | 33d2 4d89 | 9708 0500
java.io.BufferedOutputStream::
flush 0x0000000110a6e39c: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
@15 (line 240) ;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@35 (line 1912)
0x000000010cd98500: 6107 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
e92c
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
; {section_word}
0x000000010cd98504 0x0000000110a6e39c: 0048 ba9d | e3a6 1001
:
0x0000000110a6e3a4: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x0000000110a6e3a4: 0000 00e8 | 54aa 5d07
; {runtime_call throw_null_pointer_exception Runtime1 stub} 0x0000000110a6e3ac: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@35 (line 1912)
0x000000010cd98504 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
: f4 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
ff ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
ff ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6e3ac: 9049 8b87 | 0005 0000 | 4d33 d24d | 8997 0005 | 0000 4d33 | d24d 8997 | 0805 0000 | 8b70 2448
e8
0x0000000110a6e3cc: ;*getfield runtimeExceptionSupplier {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd98508 ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@1 (line 113)
: ; ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
ImmutableOopMap { ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
rsi= ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
Oop rdi=Oop rdx= ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
Oop [96] ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
= 0x0000000110a6e3cc: c1e6 0366 | 0f1f 4400 | 0048 b8ff | ffff ffff
Oop
}
0x0000000110a6e3dc: ; {virtual_call}
0x0000000110a6e3dc: ffff ffe8
;*invokevirtual
0x0000000110a6e3e0: ; ImmutableOopMap {[384]=Oop [392]=Oop }
write {reexecute=0 rethrow=0 return_oop=0}
; - java.io.BufferedOutputStream::flushBuffer ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
@20 (line 125)
; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@4 (line 113)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
java.io.BufferedOutputStream:: ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
implFlush ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
@1 (line 252) 0x0000000110a6e3e0: 9ca2 5107
0x0000000110a6e3e4: ; {other}
0x0000000110a6e3e4: 0f1f 8400
0x0000000110a6e3e8: ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
; - ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@4 (line 113)
java.io.BufferedOutputStream::flush ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
@15 (line 240)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
0x000000010cd98508: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
f4 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
a0 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
60 0x0000000110a6e3e8: 5411 001d | 4883 f800 | 0f84 2900
07
0x0000000110a6e3f4: ; {metadata('java/lang/RuntimeException')}
0x000000010cd9850c: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x000000010cd9850c: e8ef a060
0x000000010cd98510: ; ImmutableOopMap { 0x0000000110a6e3f4: 0000 48be | 20f0 052c | 0100 0000 | 8b78 0849 | ba00 0000 | 2c01 0000 | 0049 03fa | 483b 7748
rsi 0x0000000110a6e414: 0f85 6e03 | 0000 e900
=
Oop 0x0000000110a6e41c: ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
rdi= ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@9 (line 113)
Oop ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
[96] ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
= ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
Oop ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6e41c: 0000 0048
}
0x0000000110a6e420: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
;*invokevirtual flush {reexecute=0 rethrow=0 return_oop=0}
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
java.io.BufferedOutputStream::implFlush ; {section_word}
@8 (line 253)
0x0000000110a6e420: 3b00 48ba | 22e4 a610 | 0100 0000
; - 0x0000000110a6e42c: ; {runtime_call handle_exception_nofpu Runtime1 stub}
java.io.BufferedOutputStream::flush@15 (line 240) 0x0000000110a6e42c: e8cf a95d
0x0000000110a6e430: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x000000010cd98510: 07e8 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
ea ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
a0 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x000000010cd98514: ; ImmutableOopMap {rdx=Oop } 0x0000000110a6e430: 0790 498b | 8700 0500 | 004d 33d2 | 4d89 9700 | 0500 004d | 33d2 4d89 | 9708 0500
0x0000000110a6e44c: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
;*invokevirtual ;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@35 (line 1912)
unlock {reexecute=0 rethrow=0 return_oop=0} ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.io.BufferedOutputStream::flush@22 (line 242)
; {metadata({method} {0x000000012810fa68} 'unlock' '()V' in 'jdk/internal/misc/InternalLock')}
0x000000010cd98514: ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
6007 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
49 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
ba ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
| 68 ; {section_word}
fa 0x0000000110a6e44c: 0048 ba4d | e4a6 1001
1028 0x0000000110a6e454: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x0000000110a6e454: 0000 00e8 | a4a9 5d07
|
0100 0x0000000110a6e45c: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
0000 | 4c89 5424 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@35 (line 1912)
| 0848 c7 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
04 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
| ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
24 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
ff ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
ffff 0x0000000110a6e45c: 9049 8b87 | 0005 0000 | 4d33 d24d | 8997 0005 | 0000 4d33 | d24d 8997 | 0805 0000 | 8b70 2448
0x0000000110a6e47c: ;*getfield runtimeExceptionSupplier {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@1 (line 113)
0x000000010cd9852c ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
: ; {runtime_call counter_overflow Runtime1 stub}
0x000000010cd9852c: ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
ffe8 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
ce13 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6e47c: c1e6 0366 | 0f1f 4400 | 0048 b8ff | ffff ffff
0x0000000110a6e48c: ; {virtual_call}
0x0000000110a6e48c: ffff ffe8
0x000000010cd98530
: ; ImmutableOopMap {rdx=Oop }
;*synchronization entry
0x0000000110a6e490: ; ImmutableOopMap {[384]=Oop [392]=Oop }
; - ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
jdk.internal.misc.InternalLock:: ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@4 (line 113)
unlock ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
@-1 (line 78)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
java.io.BufferedOutputStream::flush ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
@22 (line 242)
0x0000000110a6e490: eca1 5107
0x0000000110a6e494: ; {other}
0x000000010cd98530 0x0000000110a6e494: 0f1f 8400
:
61 0x0000000110a6e498: ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
07 ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@4 (line 113)
e911 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd98534 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x000000010cd98534 0x0000000110a6e498: 0412 0020 | 4883 f800 | 0f84 2900
: 0x0000000110a6e4a4: ; {metadata('java/lang/RuntimeException')}
f6 0x0000000110a6e4a4: 0000 48be | 20f0 052c | 0100 0000 | 8b78 0849 | ba00 0000 | 2c01 0000 | 0049 03fa | 483b 7748
ff ffe8
0x0000000110a6e4c4: 0f85 cc02 | 0000 e900
0x000000010cd98538 0x0000000110a6e4cc: ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
: ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@9 (line 113)
; ImmutableOopMap { ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
rdx ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
=Oop }
;*invokevirtual unlock {reexecute=0 rethrow=0 return_oop=0}
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6e4cc: 0000 0048
; - 0x0000000110a6e4d0: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
jdk.internal.misc.InternalLock:: ;*athrow {reexecute=1 rethrow=0 return_oop=0}
unlock ; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
@4 (line 78) ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.io.BufferedOutputStream::flush@22 (line 242)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd98538: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
c4 ; {section_word}
a0 0x0000000110a6e4d0: 3b00 48ba | d2e4 a610 | 0100 0000
60 0x0000000110a6e4dc: ; {runtime_call handle_exception_nofpu Runtime1 stub}
0x0000000110a6e4dc: e81f a95d
07
0x0000000110a6e4e0: ;*athrow {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd9853c: ; {metadata({method} {0x000000012817e820} 'unlock' '()V' in 'java/util/concurrent/locks/ReentrantLock')}
0x000000010cd9853c: 49ba 20e8 | 1728 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0100 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
| 00 0x0000000110a6e4e0: 0790 488b | b424 8001 | 0000 498b | 8700 0500 | 004d 33d2 | 4d89 9700 | 0500 004d | 33d2 4d89
00 0x0000000110a6e500: 9708 0500
4c89 0x0000000110a6e504: ;*invokevirtual alreadyClosed {reexecute=0 rethrow=0 return_oop=0}
| ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@238 (line 345)
5424 0848 0x0000000110a6e504: 0048 8bd0 | 0f1f 8000
|
c7 0x0000000110a6e50c: ; {optimized virtual_call}
04 0x0000000110a6e50c: 0000 00e8
24 0x0000000110a6e510: ; ImmutableOopMap {}
ff ;*invokevirtual alreadyClosed {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@238 (line 345)
0x0000000110a6e510: 6c9e 5107
0x000000010cd98550
0x0000000110a6e514: ; {other}
: 0x0000000110a6e514: 0f1f 8400
; {runtime_call counter_overflow Runtime1 stub}
0x000000010cd98550: ffff ff 0x0000000110a6e518: ;*invokevirtual alreadyClosed {reexecute=0 rethrow=0 return_oop=0}
e8 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@238 (line 345)
0x0000000110a6e518: 8412 0022
0x000000010cd98554 0x0000000110a6e51c: ; implicit exception: dispatches to 0x0000000110a6e7a4
: 0x0000000110a6e51c: 483b 00e9 | a202 0000
;
ImmutableOopMap {rdx 0x0000000110a6e524: ; {metadata({method} {0x000000016d4d56b0} 'readGroupVInt' '([JI)V' in 'org/apache/lucene/store/MemorySeg=mentIndexInput')}
Oop }
;*synchronization entry
; - 0x0000000110a6e524: 49ba b056 | 4d6d 0100 | 0000 4c89 | 5424 0848 | c704 24ff
java.util.concurrent.locks.ReentrantLock::
unlock@-1 (line 494) 0x0000000110a6e538: ; {runtime_call counter_overflow Runtime1 stub}
0x0000000110a6e538: ffff ffe8
0x0000000110a6e53c: ; ImmutableOopMap {rsi=Oop rdx=Oop [384]=Oop [392]=Oop }
; - ;*synchronization entry
jdk.internal.misc.InternalLock:: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@-1 (line 319)
unlock 0x0000000110a6e53c: c0f1 5d07 | e993 f1ff
@4 (line 78)
; - java.io.BufferedOutputStream::flush@22 (line 242)
0x000000010cd98554: a813 0x0000000110a6e544: ; {runtime_call throw_incompatible_class_change_error Runtime1 stub}
6107 0x0000000110a6e544: ffe8 36c5
| e9b0 f6 0x0000000110a6e548: ; ImmutableOopMap {rsi=Oop rdx=Oop rdi=Oop [384]=Oop [392]=Oop }
ff ;*invokeinterface byteSize {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@4 (line 319)
; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x000000010cd9855c 0x0000000110a6e548: 5d07 e8b1
:
; {runtime_call throw_null_pointer_exception Runtime1 stub} 0x0000000110a6e54c: ; ImmutableOopMap {rsi=Oop rdx=Oop rdi=Oop [384]=Oop [392]=Oop }
0x000000010cd9855c: ffe8 ;*invokeinterface byteSize {reexecute=0 rethrow=0 return_oop=0}
9e ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@4 (line 319)
a0 ; {runtime_call throw_incompatible_class_change_error Runtime1 stub}
0x0000000110a6e54c: 905d 07e8
0x000000010cd98560: ; ImmutableOopMap {rdi=
Oop 0x0000000110a6e550: ; ImmutableOopMap {rsi=Oop r8=Oop [384]=Oop [392]=Oop }
}
;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
;*invokevirtual release {reexecute=0 rethrow=0 return_oop=0}
0x0000000110a6e550: 2cc5 5d07
; - 0x0000000110a6e554: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
java.util.concurrent.locks.ReentrantLock::unlock 0x0000000110a6e554: e8a7 905d
@5 (line 494)
0x0000000110a6e558: ; ImmutableOopMap {rsi=Oop r8=Oop [384]=Oop [392]=Oop }
;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
; - ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
jdk.internal.misc.InternalLock::unlock 0x0000000110a6e558: 074c 8904
@4 (line 78)
0x0000000110a6e55c: ; {runtime_call throw_class_cast_exception Runtime1 stub}
0x0000000110a6e55c: 24e8 9ebd
; - java.io.BufferedOutputStream::flush@22 (line 242)
; {metadata({method} {0x00000001281b26a8} 'release' '(I)Z' in 'java/util/concurrent/locks/AbstractQueuedSynchronizer')}
0x0000000110a6e560: ; ImmutableOopMap {rsi=Oop [384]=Oop [392]=Oop }
0x000000010cd98560 ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
: ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@4 (line 80)
6007 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
49 ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e560: 5d07 e899
ba 0x0000000110a6e564: ; ImmutableOopMap {rsi=Oop r8=Oop [384]=Oop [392]=Oop }
| a826 ;*invokevirtual checkAccess {reexecute=0 rethrow=0 return_oop=0}
1b28 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
| ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
01 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
00 0x0000000110a6e564: 905d 0748 | c704 24e4
| 4c 0x0000000110a6e56c: ; {runtime_call deoptimize Runtime1 stub}
89 54 0x0000000110a6e56c: ffff ffe8
24
| 0x0000000110a6e570: ; ImmutableOopMap {rsi=Oop r8=Oop [384]=Oop [392]=Oop }
08 ;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
48 ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
c7 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
04 | 24ff ffff
0x000000010cd98578: ; {runtime_call counter_overflow Runtime1 stub}
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
0x000000010cd98578 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
: ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
ff ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
e8 0x0000000110a6e570: 0cd7 5d07 | 48c7 0424 | e4ff ffff
82
13 0x0000000110a6e57c: ; {runtime_call deoptimize Runtime1 stub}
0x0000000110a6e57c: e8ff d65d
0x000000010cd9857c: ; ImmutableOopMap {rdi=Oop }
0x0000000110a6e580: ; ImmutableOopMap {rsi=Oop r8=Oop [384]=Oop [392]=Oop }
;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
;*synchronization entry ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
; - ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
java.util.concurrent.locks.AbstractQueuedSynchronizer::release ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
@-1 (line 1059) ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
; {runtime_call throw_null_pointer_exception Runtime1 stub}
; - java.util.concurrent.locks.ReentrantLock:: 0x0000000110a6e580: 07e8 7a90
unlock@5 (line 494)
; - 0x0000000110a6e584: ; ImmutableOopMap {rsi=Oop r9=Oop [384]=Oop [392]=Oop }
jdk.internal.misc.InternalLock:: ;*invokevirtual checkValidStateRaw {reexecute=0 rethrow=0 return_oop=0}
unlock@4 (line 78) ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
java.io.BufferedOutputStream::flush ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
@22 (line 242)
0x000000010cd9857c 0x0000000110a6e584: 5d07 4889 | 3c24 4889
: 6107
e9 0x0000000110a6e58c: ; {runtime_call throw_range_check_failed Runtime1 stub}
d1 0x0000000110a6e58c: 5424 08e8
|
f6ff 0x0000000110a6e590: ; ImmutableOopMap {rdx=Oop [384]=Oop [392]=Oop }
ff ;*iaload {reexecute=0 rethrow=0 return_oop=0}
48 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@85 (line 333)
| 8974 2408 | 48 0x0000000110a6e590: 6c87 5d07
89
14 0x0000000110a6e594: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
24 0x0000000110a6e594: e867 905d
0x0000000110a6e598: ; ImmutableOopMap {[384]=Oop [392]=Oop }
0x000000010cd9858c ;*iaload {reexecute=0 rethrow=0 return_oop=0}
: ; {runtime_call monitorenter_nofpu Runtime1 stub} ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@85 (line 333)
0x000000010cd9858c: e8 ; {runtime_call throw_null_pointer_exception Runtime1 stub}
6f 0x0000000110a6e598: 07e8 6290
e260
0x0000000110a6e59c: ; ImmutableOopMap {rdx=Oop [384]=Oop [392]=Oop }
;*lastore {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd98590: ; ImmutableOopMap {rsi= ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@88 (line 333)
Oop ; {runtime_call throw_null_pointer_exception Runtime1 stub}
[96] 0x0000000110a6e59c: 5d07 e85d
=Oop
[136] 0x0000000110a6e5a0: ; ImmutableOopMap {rdx=Oop [384]=Oop [392]=Oop }
= ;*lastore {reexecute=0 rethrow=0 return_oop=0}
Oop } ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@88 (line 333)
0x0000000110a6e5a0: 905d 0748 | 890c 2448 | 8954 2408
;*monitorenter {reexecute=0 rethrow=0 return_oop=0}
0x0000000110a6e5ac: ; {runtime_call throw_range_check_failed Runtime1 stub}
0x0000000110a6e5ac: e84f 875d
; - java.io.BufferedOutputStream::flush@44 (line 245)
0x000000010cd98590: 07e9 0x0000000110a6e5b0: ; ImmutableOopMap {rdx=Oop [384]=Oop [392]=Oop }
34 ;*lastore {reexecute=0 rethrow=0 return_oop=0}
f8 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@88 (line 333)
; {runtime_call throw_incompatible_class_change_error Runtime1 stub}
0x0000000110a6e5b0: 07e8 cac4
0x000000010cd98594 0x0000000110a6e5b4: ; ImmutableOopMap {rdx=Oop rsi=Oop rax=Oop [384]=Oop [392]=Oop }
: ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
; {metadata({method} {0x00000001284576e0} 'implFlush' '()V' in 'java/io/BufferedOutputStream')}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x000000010cd98594: ff ; {runtime_call throw_null_pointer_exception Runtime1 stub}
ff 49ba 0x0000000110a6e5b4: 5d07 e845
|
e076 4528 0x0000000110a6e5b8: ; ImmutableOopMap {rdx=Oop rsi=Oop rax=Oop [384]=Oop [392]=Oop }
;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
| ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
01 0x0000000110a6e5b8: 905d 0748
00 0x0000000110a6e5bc: ; {runtime_call throw_class_cast_exception Runtime1 stub}
00 0x0000000110a6e5bc: 8904 24e8
00 0x0000000110a6e5c0: ; ImmutableOopMap {rdx=Oop rsi=Oop [384]=Oop [392]=Oop }
| ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
4c ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@4 (line 80)
89 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
54 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
24 | 0848 c704 0x0000000110a6e5c0: 3cbd 5d07
|
24 0x0000000110a6e5c4: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
ff 0x0000000110a6e5c4: e837 905d
ffff 0x0000000110a6e5c8: ; ImmutableOopMap {rdx=Oop rsi=Oop rdi=Oop [384]=Oop [392]=Oop }
;*invokevirtual checkAccess {reexecute=0 rethrow=0 return_oop=0}
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
0x000000010cd985ac ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
: ; {runtime_call counter_overflow Runtime1 stub}
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd985ac: ffe8 4e13
0x000000010cd985b0: ; ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
ImmutableOopMap {rsi ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
= 0x0000000110a6e5c8: 0748 c704 | 24e4 ffff
Oop
0x0000000110a6e5d0: ; {runtime_call deoptimize Runtime1 stub}
0x0000000110a6e5d0: ffe8 aad6
[96]
= 0x0000000110a6e5d4: ; ImmutableOopMap {rdx=Oop rsi=Oop rdi=Oop [384]=Oop [392]=Oop }
Oop ;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
[136] ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
=Oop ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
} ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
;*synchronization entry
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; - java.io.BufferedOutputStream:: 0x0000000110a6e5d4: 5d07 48c7 | 0424 e4ff
implFlush
0x0000000110a6e5dc: ; {runtime_call deoptimize Runtime1 stub}
@-1 (line 252) 0x0000000110a6e5dc: ffff e89d
0x0000000110a6e5e0: ; ImmutableOopMap {rdx=Oop rsi=Oop rdi=Oop [384]=Oop [392]=Oop }
;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
; - java.io.BufferedOutputStream:: ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
flush ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
@46 (line 246) ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd985b0: 6107 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
e9 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
50 ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e5e0: d65d 07e8
0x0000000110a6e5e4: ; ImmutableOopMap {rdx=Oop rsi=Oop rax=Oop [384]=Oop [392]=Oop }
;*invokevirtual checkValidStateRaw {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
0x000000010cd985b4 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
: ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; {metadata({method} {0x00000001284575d8} 'flushBuffer' '()V' in 'java/io/BufferedOutputStream')} ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x000000010cd985b4: 0x0000000110a6e5e4: 1890 5d07 | 4c89 0424 | 4889 5424
f8
ff 0x0000000110a6e5f0: ; {runtime_call throw_range_check_failed Runtime1 stub}
0x0000000110a6e5f0: 08e8 0a87
ff 0x0000000110a6e5f4: ; ImmutableOopMap {rdx=Oop [384]=Oop [392]=Oop }
49 ;*lastore {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@131 (line 336)
| ; {runtime_call throw_incompatible_class_change_error Runtime1 stub}
ba 0x0000000110a6e5f4: 5d07 e885
d8 75 0x0000000110a6e5f8: ; ImmutableOopMap {rdx=Oop rsi=Oop rax=Oop [384]=Oop [392]=Oop }
45 ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
| ; {runtime_call throw_null_pointer_exception Runtime1 stub}
28 0x0000000110a6e5f8: c45d 07e8
01
0x0000000110a6e5fc: ; ImmutableOopMap {rdx=Oop rsi=Oop rax=Oop [384]=Oop [392]=Oop }
0000 ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
| ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
00 0x0000000110a6e5fc: 0090 5d07 | 4889 0424
4c
0x0000000110a6e604: ; {runtime_call throw_class_cast_exception Runtime1 stub}
89 0x0000000110a6e604: e8f7 bc5d
54 0x0000000110a6e608: ; ImmutableOopMap {rdx=Oop rsi=Oop [384]=Oop [392]=Oop }
;*checkcast {reexecute=0 rethrow=0 return_oop=0}
| ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@4 (line 80)
24 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
08 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
48 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
c7 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
| ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0424 ffff 0x0000000110a6e608: 07e8 f28f
0x0000000110a6e60c: ; ImmutableOopMap {rdx=Oop rsi=Oop r8=Oop [384]=Oop [392]=Oop }
;*invokevirtual checkAccess {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd985cc ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
: ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; {runtime_call counter_overflow Runtime1 stub} ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x000000010cd985cc: 0x0000000110a6e60c: 5d07 48c7 | 0424 e4ff
ff
ff 0x0000000110a6e614: ; {runtime_call deoptimize Runtime1 stub}
e8 0x0000000110a6e614: ffff e865
2d
0x0000000110a6e618: ; ImmutableOopMap {rdx=Oop rsi=Oop r8=Oop [384]=Oop [392]=Oop }
0x000000010cd985d0 ;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
: ; ImmutableOopMap {rsi=Oop [96] ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
=Oop ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
[136] ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
=Oop ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
} ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
;*synchronization entry
0x0000000110a6e618: d65d 0748 | c704 24e4
0x0000000110a6e620: ; {runtime_call deoptimize Runtime1 stub}
0x0000000110a6e620: ffff ffe8
; -
java.io.BufferedOutputStream:: 0x0000000110a6e624: ; ImmutableOopMap {rdx=Oop rsi=Oop r8=Oop [384]=Oop [392]=Oop }
flushBuffer@-1 (line 124) ;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
; - java.io.BufferedOutputStream:: ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
implFlush@1 (line 252) ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
java.io.BufferedOutputStream:: 0x0000000110a6e624: 58d6 5d07
flush
@46 (line 246)
0x0000000110a6e628: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e628: e8d3 8f5d
0x000000010cd985d0: 0x0000000110a6e62c: ; ImmutableOopMap {rdx=Oop rsi=Oop rbx=Oop [384]=Oop [392]=Oop }
13 ;*invokevirtual checkValidStateRaw {reexecute=0 rethrow=0 return_oop=0}
61 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
07e9 | 6c ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
f8 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
ff ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
ff ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6e62c: 0748 893c | 2448 8954
0x000000010cd985d8: 0x0000000110a6e634: ; {runtime_call throw_range_check_failed Runtime1 stub}
; {runtime_call throw_null_pointer_exception Runtime1 stub} 0x0000000110a6e634: 2408 e8c5
0x000000010cd985d8 0x0000000110a6e638: ; ImmutableOopMap {rdx=Oop [384]=Oop [392]=Oop }
: e823 ;*lastore {reexecute=0 rethrow=0 return_oop=0}
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@174 (line 339)
a0 ; {runtime_call throw_incompatible_class_change_error Runtime1 stub}
60 0x0000000110a6e638: 865d 07e8
0x0000000110a6e63c: ; ImmutableOopMap {rdx=Oop rsi=Oop rax=Oop [384]=Oop [392]=Oop }
0x000000010cd985dc: ; ;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
ImmutableOopMap { ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
rsi 0x0000000110a6e63c: 40c4 5d07
=
Oop rdi=Oop 0x0000000110a6e640: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e640: e8bb 8f5d
rdx
=Oop 0x0000000110a6e644: ; ImmutableOopMap {rdx=Oop rsi=Oop rax=Oop [384]=Oop [392]=Oop }
;*invokeinterface get {reexecute=0 rethrow=0 return_oop=0}
[96]= ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
Oop 0x0000000110a6e644: 0748 8904
[136]= 0x0000000110a6e648: ; {runtime_call throw_class_cast_exception Runtime1 stub}
Oop 0x0000000110a6e648: 24e8 b2bc
} 0x0000000110a6e64c: ; ImmutableOopMap {rdx=Oop rsi=Oop [384]=Oop [392]=Oop }
;*checkcast {reexecute=0 rethrow=0 return_oop=0}
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@4 (line 80)
;*invokevirtual write {reexecute=0 rethrow=0 return_oop=0}
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
java.io.BufferedOutputStream::flushBuffer ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e64c: 5d07 e8ad
@20 (line 125)
0x0000000110a6e650: ; ImmutableOopMap {rdx=Oop rsi=Oop rcx=Oop [384]=Oop [392]=Oop }
;*invokevirtual checkAccess {reexecute=0 rethrow=0 return_oop=0}
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
java.io.BufferedOutputStream:: ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
implFlush@1 (line 252)
0x0000000110a6e650: 8f5d 0748 | c704 24e4
0x0000000110a6e658: ; {runtime_call deoptimize Runtime1 stub}
; - 0x0000000110a6e658: ffff ffe8
java.io.BufferedOutputStream::
flush 0x0000000110a6e65c: ; ImmutableOopMap {rdx=Oop rsi=Oop rcx=Oop [384]=Oop [392]=Oop }
@46 (line 246) ;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; {runtime_call throw_null_pointer_exception Runtime1 stub} ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x000000010cd985dc 0x0000000110a6e65c: 20d6 5d07 | 48c7 0424 | e4ff ffff
:
07e8 0x0000000110a6e668: ; {runtime_call deoptimize Runtime1 stub}
0x0000000110a6e668: e813 d65d
1e
0x0000000110a6e66c: ; ImmutableOopMap {rdx=Oop rsi=Oop rcx=Oop [384]=Oop [392]=Oop }
;*invokestatic checkIndex {reexecute=0 rethrow=0 return_oop=0}
a0 ; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkBounds@16 (line 396)
; - jdk.internal.foreign.AbstractMemorySegmentImpl::checkAccess@26 (line 356)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@15 (line 81)
0x000000010cd985e0 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
: ; ImmutableOopMap { ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
rsi= ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
Oop ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
rdi= ; {runtime_call throw_null_pointer_exception Runtime1 stub}
Oop 0x0000000110a6e66c: 07e8 8e8f
[96]=Oop [136]= 0x0000000110a6e670: ; ImmutableOopMap {rdx=Oop rsi=Oop rdi=Oop [384]=Oop [392]=Oop }
Oop ;*invokevirtual checkValidStateRaw {reexecute=0 rethrow=0 return_oop=0}
} ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
;*invokevirtual ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
flush ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
{reexecute=0 rethrow=0 return_oop=0}
0x0000000110a6e670: 5d07 4c89 | 0424 4889
; - java.io.BufferedOutputStream::implFlush@8 (line 253)
0x0000000110a6e678: ; {runtime_call throw_range_check_failed Runtime1 stub}
; - 0x0000000110a6e678: 5424 08e8
java.io.BufferedOutputStream::
flush 0x0000000110a6e67c: ; ImmutableOopMap {rdx=Oop [384]=Oop [392]=Oop }
@46 (line 246) ;*lastore {reexecute=0 rethrow=0 return_oop=0}
0x000000010cd985e0: 6007 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@217 (line 342)
488d 0x0000000110a6e67c: 8086 5d07
| 0x0000000110a6e680: ; {internal_word}
84 0x0000000110a6e680: 49ba 4fde | a610 0100 | 0000 4d89 | 9768 0400
24
8000 0x0000000110a6e690: ; {runtime_call SafepointBlob}
| 00 0x0000000110a6e690: 00e9 6a09
00
0x0000000110a6e694: ; {internal_word}
48 0x0000000110a6e694: 5207 49ba | 7cde a610 | 0100 0000 | 4d89 9768
89
0x0000000110a6e6a4: ; {runtime_call SafepointBlob}
0x0000000110a6e6a4: 0400 00e9 | 5409 5207
0x0000000110a6e6ac: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x000000010cd985ec: 0x0000000110a6e6ac: e84f 8f5d
; {runtime_call monitorexit_nofpu Runtime1 stub}
0x000000010cd985ec 0x0000000110a6e6b0: ; ImmutableOopMap {rsi=Oop rax=Oop [384]=Oop [392]=Oop [456]=Oop }
: 0424 ;*athrow {reexecute=1 rethrow=0 return_oop=0}
e80d | e860 ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
07e9 | ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
46fa ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
ff ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
ff ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e6b0: 07e8 4a8f
0x000000010cd985f8: 0x0000000110a6e6b4: ; ImmutableOopMap {rsi=Oop rdi=Oop rax=Oop [384]=Oop [392]=Oop }
; {runtime_call throw_null_pointer_exception Runtime1 stub}
;*athrow {reexecute=1 rethrow=0 return_oop=0}
0x000000010cd985f8 ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
e803 a060 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd985fc ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
: ; ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
ImmutableOopMap {rax ; {metadata(nullptr)}
=Oop 0x0000000110a6e6b4: 5d07 48ba | 0000 0000 | 0000 0000 | b800 0f05
rdx= 0x0000000110a6e6c4: ; {runtime_call load_klass_patching Runtime1 stub}
Oop 0x0000000110a6e6c4: 0ae8 36e1
}
0x0000000110a6e6c8: ; ImmutableOopMap {[384]=Oop [392]=Oop }
;*new {reexecute=1 rethrow=0 return_oop=0}
;*invokevirtual unlock {reexecute=0 rethrow=0 return_oop=0}
; - (reexecute) java.util.Objects::requireNonNull@4 (line 233)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
java.io.BufferedOutputStream::flush@33 (line 242)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; {metadata({method} {0x000000012810fa68} 'unlock' '()V' in 'jdk/internal/misc/InternalLock')} ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6e6c8: 5d07 e919 | f8ff ff48
0x000000010cd985fc
: 0x0000000110a6e6d0: ; {runtime_call fast_new_instance Runtime1 stub}
0749 0x0000000110a6e6d0: 8bd2 e829
ba68 0x0000000110a6e6d4: ; ImmutableOopMap {[384]=Oop [392]=Oop }
| ;*new {reexecute=0 rethrow=0 return_oop=0}
fa ; - java.util.Objects::requireNonNull@4 (line 233)
10 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
2801 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
| 00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
00 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
004c | 0x0000000110a6e6d4: 985d 07e9 | 68f8 ffff
8954 0x0000000110a6e6dc: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e6dc: e81f 8f5d
2408 0x0000000110a6e6e0: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop [448]=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
| ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
48 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
c7 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
0424 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
| ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
ffff ffff ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e6e0: 07e8 1a8f
0x0000000110a6e6e4: ; ImmutableOopMap {rbx=Oop rax=Oop [384]=Oop [392]=Oop }
0x000000010cd98614: ;*athrow {reexecute=1 rethrow=0 return_oop=0}
; {runtime_call counter_overflow Runtime1 stub} ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
0x000000010cd98614 ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
: e8 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
e7 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
12 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
61 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
; {metadata(nullptr)}
0x000000010cd98618: ; 0x0000000110a6e6e4: 5d07 48ba | 0000 0000 | 0000 0000 | b800 0f05
ImmutableOopMap {
rax=Oop rdx=Oop 0x0000000110a6e6f4: ; {runtime_call load_klass_patching Runtime1 stub}
} 0x0000000110a6e6f4: 0ae8 06e1
;*synchronization entry 0x0000000110a6e6f8: ; ImmutableOopMap {[384]=Oop [392]=Oop }
;*new {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) java.util.Objects::requireNonNull@4 (line 233)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6e6f8: 5d07 e9d1 | f8ff ff48
jdk.internal.misc.InternalLock::
unlock 0x0000000110a6e700: ; {runtime_call fast_new_instance Runtime1 stub}
@-1 (line 78) 0x0000000110a6e700: 8bd2 e8f9
0x0000000110a6e704: ; ImmutableOopMap {[384]=Oop [392]=Oop }
;*new {reexecute=0 rethrow=0 return_oop=0}
; - java.io.BufferedOutputStream:: ; - java.util.Objects::requireNonNull@4 (line 233)
flush ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
@33 (line 242) ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
0x000000010cd98618: 07 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
e9 9dfa
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6e704: 975d 07e9 | 20f9 ffff
0x000000010cd9861c
: 0x0000000110a6e70c: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x000000010cd9861c 0x0000000110a6e70c: e8ef 8e5d
: ffff
e8 0x0000000110a6e710: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop [432]=Oop }
dd ;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
0x000000010cd98620: ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; ImmutableOopMap {rax=Oop rdx=Oop } ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
;*invokevirtual ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
unlock ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
{reexecute=0 rethrow=0 return_oop=0} ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e710: 07e8 ea8e
0x0000000110a6e714: ; ImmutableOopMap {rsi=Oop rax=Oop [384]=Oop [392]=Oop }
; - ;*athrow {reexecute=1 rethrow=0 return_oop=0}
jdk.internal.misc.InternalLock:: ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
unlock@4 (line 78) ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - java.io.BufferedOutputStream:: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
flush@33 (line 242) ; {metadata(nullptr)}
0x0000000110a6e714: 5d07 48ba | 0000 0000 | 0000 0000 | b800 0f05
0x0000000110a6e724: ; {runtime_call load_klass_patching Runtime1 stub}
; {metadata({method} {0x000000012817e820} 'unlock' '()V' in 'java/util/concurrent/locks/ReentrantLock')}
0x0000000110a6e724: 0ae8 d6e0
0x000000010cd98620 0x0000000110a6e728: ; ImmutableOopMap {[384]=Oop [392]=Oop }
: ;*new {reexecute=1 rethrow=0 return_oop=0}
9f60 ; - (reexecute) java.util.Objects::requireNonNull@4 (line 233)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
0749 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
| ba ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
20 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
0x0000000110a6e728: 5d07 e991 | f9ff ff48
0x0000000110a6e730: ; {runtime_call fast_new_instance Runtime1 stub}
0x0000000110a6e730: 8bd2 e8c9
e8 0x0000000110a6e734: ; ImmutableOopMap {[384]=Oop [392]=Oop }
17 ;*new {reexecute=0 rethrow=0 return_oop=0}
; - java.util.Objects::requireNonNull@4 (line 233)
| 28 ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
01 ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
00 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
| ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
004c 89 0x0000000110a6e734: 975d 07e9 | e0f9 ffff
54
0x0000000110a6e73c: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
| 0x0000000110a6e73c: e8bf 8e5d
24
08 0x0000000110a6e740: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop [424]=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
48c7 ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@31 (line 206)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
| ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
0424 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
ff ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
ff ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x000000010cd98638 ; {runtime_call throw_null_pointer_exception Runtime1 stub}
: ; {runtime_call counter_overflow Runtime1 stub} 0x0000000110a6e740: 07e8 ba8e
0x0000000110a6e744: ; ImmutableOopMap {r9=Oop rax=Oop [384]=Oop [392]=Oop }
0x000000010cd98638 ;*athrow {reexecute=1 rethrow=0 return_oop=0}
: ; - (reexecute) jdk.internal.foreign.MemorySessionImpl::checkValidStateRaw@20 (line 203)
; - jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal@5 (line 1907)
ff ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@6 (line 1897)
ff ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
e8 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
c1 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
; {metadata(nullptr)}
0x0000000110a6e744: 5d07 48ba | 0000 0000 | 0000 0000 | b800 0f05
0x000000010cd9863c: ; ImmutableOopMap { 0x0000000110a6e754: ; {runtime_call load_klass_patching Runtime1 stub}
rax= 0x0000000110a6e754: 0ae8 a6e0
Oop
0x0000000110a6e758: ; ImmutableOopMap {[384]=Oop [392]=Oop }
rdx ;*new {reexecute=1 rethrow=0 return_oop=0}
= ; - (reexecute) java.util.Objects::requireNonNull@4 (line 233)
Oop ; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
} ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x0000000110a6e758: 5d07 e939 | faff ff48
;*synchronization entry
0x0000000110a6e760: ; {runtime_call fast_new_instance Runtime1 stub}
0x0000000110a6e760: 8bd2 e899
0x0000000110a6e764: ; ImmutableOopMap {[384]=Oop [392]=Oop }
; - ;*new {reexecute=0 rethrow=0 return_oop=0}
java.util.concurrent.locks.ReentrantLock::unlock@-1 (line 494)
; - java.util.Objects::requireNonNull@4 (line 233)
; - java.lang.invoke.VarHandleSegmentAsInts::checkAddress@1 (line 80)
; - ; - java.lang.invoke.VarHandleSegmentAsInts::get@14 (line 108)
jdk.internal.misc.InternalLock:: ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
unlock ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
@4 (line 78)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
0x0000000110a6e764: 975d 07e9 | 88fa ffff | 4889 0424
0x0000000110a6e770: ; {runtime_call throw_class_cast_exception Runtime1 stub}
0x0000000110a6e770: e88b bb5d
; -
java.io.BufferedOutputStream:: 0x0000000110a6e774: ; ImmutableOopMap {[384]=Oop [392]=Oop }
flush@33 (line 242) ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@9 (line 113)
0x000000010cd9863c ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
: 1261 ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
07 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
e9 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
; {runtime_call throw_null_pointer_exception Runtime1 stub}
| 0x0000000110a6e774: 07e8 868e
3c 0x0000000110a6e778: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
fb ;*athrow {reexecute=1 rethrow=0 return_oop=0}
ff ; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
ff ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
0x000000010cd98644: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x000000010cd98644: e8 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@75 (line 333)
b7 0x0000000110a6e778: 5d07 4889
9f
60 0x0000000110a6e77c: ; {runtime_call throw_class_cast_exception Runtime1 stub}
0x0000000110a6e77c: 0424 e87d
0x000000010cd98648 0x0000000110a6e780: ; ImmutableOopMap {[384]=Oop [392]=Oop }
: ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
; ImmutableOopMap {rax ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@9 (line 113)
=Oop ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
rdi ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
= ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
Oop ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
} ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e780: bb5d 07e8
;*invokevirtual release {reexecute=0 rethrow=0 return_oop=0}
0x0000000110a6e784: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
; - java.util.concurrent.locks.ReentrantLock:: ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
unlock@5 (line 494) ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - jdk.internal.misc.InternalLock:: ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@118 (line 336)
unlock@4 (line 78) 0x0000000110a6e784: 788e 5d07 | 4889 0424
0x0000000110a6e78c: ; {runtime_call throw_class_cast_exception Runtime1 stub}
0x0000000110a6e78c: e86f bb5d
; - java.io.BufferedOutputStream:: 0x0000000110a6e790: ; ImmutableOopMap {[384]=Oop [392]=Oop }
flush ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
@33 (line 242)
; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@9 (line 113)
; {metadata({method} {0x00000001281b26a8} 'release' '(I)Z' in 'java/util/concurrent/locks/AbstractQueuedSynchronizer')} ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
0x000000010cd98648 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
: 07 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
49 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
ba ; {runtime_call throw_null_pointer_exception Runtime1 stub}
a8 0x0000000110a6e790: 07e8 6a8e
| 0x0000000110a6e794: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
261b ;*athrow {reexecute=1 rethrow=0 return_oop=0}
28 ; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
01 | ; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
0000 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
00 ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
4c | 8954 ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@161 (line 339)
0x0000000110a6e794: 5d07 4889
24
08 0x0000000110a6e798: ; {runtime_call throw_class_cast_exception Runtime1 stub}
0x0000000110a6e798: 0424 e861
|
48 0x0000000110a6e79c: ; ImmutableOopMap {[384]=Oop [392]=Oop }
c7 ;*checkcast {reexecute=0 rethrow=0 return_oop=0}
0424 ; - jdk.internal.misc.ScopedMemoryAccess$ScopedAccessError::newRuntimeException@9 (line 113)
| ff ; - jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@14 (line 1899)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
ff ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
; - java.lang.foreign.MemorySegment::get@9 (line 1517)
ffff ; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e79c: bb5d 07e8
0x000000010cd98660:
; {runtime_call counter_overflow Runtime1 stub}
0x0000000110a6e7a0: ; ImmutableOopMap {rax=Oop [384]=Oop [392]=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
0x000000010cd98660: ; - (reexecute) jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned@17 (line 1899)
; - java.lang.invoke.VarHandleSegmentAsInts::get@48 (line 109)
e8 ; - java.lang.invoke.VarHandleGuards::guard_LJ_I@49 (line 999)
9b ; - java.lang.foreign.MemorySegment::get@9 (line 1517)
; - org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@204 (line 342)
0x0000000110a6e7a0: 5c8e 5d07
12
61 0x0000000110a6e7a4: ; {runtime_call throw_null_pointer_exception Runtime1 stub}
0x0000000110a6e7a4: e857 8e5d
0x0000000110a6e7a8: ; ImmutableOopMap {rax=Oop }
;*athrow {reexecute=1 rethrow=0 return_oop=0}
; - (reexecute) org.apache.lucene.store.MemorySegmentIndexInput::readGroupVInt@241 (line 345)
0x000000010cd98664: 0x0000000110a6e7a8: 0749 8b87 | 0005 0000 | 49c7 8700 | 0500 0000 | 0000 0049 | c787 0805 | 0000 0000 | 0000 4881
; 0x0000000110a6e7c8: c420 0200
ImmutableOopMap {rax 0x0000000110a6e7cc: ; {runtime_call unwind_exception Runtime1 stub}
= 0x0000000110a6e7cc: 005d e9ad | 7a5d 07f4 | f4f4 f4f4
Oop[Stub Code]
0x0000000110a6e7d8: ; {no_reloc}
0x0000000110a6e7d8: 0f1f 4400
rdi
=Oop 0x0000000110a6e7dc: ; {static_stub}
0x0000000110a6e7dc: 0048 bb00 | 0000 0000
}
0x0000000110a6e7e4: ; {runtime_call}
;*synchronization entry
; - java.util.concurrent.locks.AbstractQueuedSynchronizer:: 0x0000000110a6e7e4: 0000 00e9 | fbff ffff
release
@-1 (line 1059) 0x0000000110a6e7ec: ; {static_stub}
0x0000000110a6e7ec: 9048 bb00 | 0000 0000
0x0000000110a6e7f4: ; {runtime_call}
; - 0x0000000110a6e7f4: 0000 00e9 | fbff ffff
java.util.concurrent.locks.ReentrantLock::
unlock 0x0000000110a6e7fc: ; {static_stub}
@5 (line 494) 0x0000000110a6e7fc: 9048 bb00 | 0000 0000
0x0000000110a6e804: ; {runtime_call}
; - jdk.internal.misc.InternalLock::unlock 0x0000000110a6e804: 0000 00e9 | fbff ffff
@4 (line 78)
0x0000000110a6e80c: ; {static_stub}
0x0000000110a6e80c: 9048 bb00 | 0000 0000
; - 0x0000000110a6e814: ; {runtime_call}
java.io.BufferedOutputStream:: 0x0000000110a6e814: 0000 00e9 | fbff ffff
flush
@33 (line 242)
0x0000000110a6e81c: ; {static_stub}
0x000000010cd98664: 07e9 5d 0x0000000110a6e81c: 9048 bb00 | 0000 0000
fb
0x0000000110a6e824: ; {runtime_call}
0x0000000110a6e824: 0000 00e9 | fbff ffff
0x000000010cd98668:
; {internal_word} 0x0000000110a6e82c: ; {static_stub}
0x0000000110a6e82c: 48bb 0000 | 0000 0000
0x000000010cd98668: 0x0000000110a6e834: ; {runtime_call}
ff 0x0000000110a6e834: 0000 e9fb
ff 49ba | 5a
83 0x0000000110a6e838: ; {static_stub}
0x0000000110a6e838: ffff ff48 | bb00 0000 | 0000 0000
d9 0x0000000110a6e844: ; {runtime_call}
0c 0x0000000110a6e844: 00e9 fbff
|
0100 0x0000000110a6e848: ; {static_stub}
0000 | 4d89 0x0000000110a6e848: ffff 48bb | 0000 0000 | 0000 0000
97
68 0x0000000110a6e854: ; {runtime_call}
0x0000000110a6e854: e9fb ffff
0x0000000110a6e858: ; {static_stub}
0x000000010cd98678 0x0000000110a6e858: ff48 bb00 | 0000 0000
:
; {runtime_call SafepointBlob} 0x0000000110a6e860: ; {runtime_call}
0x000000010cd98678: 04 0x0000000110a6e860: 0000 00e9 | fbff ffff
00 [Exception Handler]
00e9 0x0000000110a6e868: ; {runtime_call handle_exception_from_callee Runtime1 stub}
0x0000000110a6e868: e893 ab5d
|
80 0x0000000110a6e86c: ; {external_word}
19 5507
0x000000010cd98680: ; {internal_word}
0x000000010cd98680: 49 0x0000000110a6e86c: 0748 bf00 | e509 0801 | 0000 0048
ba
ca83 | d90c 0100 | 0x0000000110a6e878: ; {runtime_call MacroAssembler::debug64(char*, long long, long long*)}
0x0000000110a6e878: 83e4 f0e8 | 3009 23f7
00
00 0x0000000110a6e880: ; {section_word}
4d89 | 97 0x0000000110a6e880: f449 ba81 | e8a6 1001 | 0000 0041
68
0x0000000110a6e88c: ; {runtime_call DeoptimizationBlob}
0400 0x0000000110a6e88c: 52e9 0efa | 5107 f4f4 | f4f4 f4f4
[/MachCode]
0x000000010cd98690: ; {runtime_call SafepointBlob}
0x000000010cd98690: 00e9 6a19 | 5507 488d | 8424 8000 | 0000 4889
```
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420375351
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -62,4 +62,42 @@ private static long readLongInGroup(DataInput in, int numBytesMinus1) throws IOE
return in.readInt() & 0xFFFFFFFFL;
}
}
+
+ /**
+ * Provides an abstraction for read int values, so that decoding logic can be reused in different DataInput.
+ *
+ */
+ public static interface IntReader {
+ int read(long v);
+ }
+
+ /**
+ * Faster implementation of read single group, It read values from the buffer that would not cross
+ * boundaries.
+ *
+ * @param flag the flag of group varint.
+ * @param reader the supplier of read int.
+ * @param dst the array to read ints into.
Review Comment:
parameter "pos" is missing in javadocs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on code in PR #12841:
URL: https://github.com/apache/lucene/pull/12841#discussion_r1420451580
##########
lucene/core/src/java/org/apache/lucene/util/GroupVIntUtil.java:
##########
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.lucene.util;
+
+import java.io.IOException;
+import org.apache.lucene.store.DataInput;
+
+/**
+ * This class contains utility methods and constants for group varint
+ *
+ * @lucene.internal
+ */
+public final class GroupVIntUtil {
+ // the maximum length of a single group-varint is 4 integers + 1 byte flag.
+ public static final int MAX_LENGTH_PER_GROUP = 17;
+ private static final int[] MASKS = new int[] {0xFF, 0xFFFF, 0xFFFFFF, 0xFFFFFFFF};
+
+ /**
+ * Default implementation of read single group, for optimal performance, you should use {@link
+ * DataInput#readGroupVInts(long[], int)} instead.
+ *
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ */
+ public static void readGroupVInt(DataInput in, long[] dst, int offset) throws IOException {
+ final int flag = in.readByte() & 0xFF;
+
+ final int n1Minus1 = flag >> 6;
+ final int n2Minus1 = (flag >> 4) & 0x03;
+ final int n3Minus1 = (flag >> 2) & 0x03;
+ final int n4Minus1 = flag & 0x03;
+
+ dst[offset] = readLongInGroup(in, n1Minus1);
+ dst[offset + 1] = readLongInGroup(in, n2Minus1);
+ dst[offset + 2] = readLongInGroup(in, n3Minus1);
+ dst[offset + 3] = readLongInGroup(in, n4Minus1);
+ }
+
+ private static long readLongInGroup(DataInput in, int numBytesMinus1) throws IOException {
+ switch (numBytesMinus1) {
+ case 0:
+ return in.readByte() & 0xFFL;
+ case 1:
+ return in.readShort() & 0xFFFFL;
+ case 2:
+ return (in.readShort() & 0xFFFFL) | ((in.readByte() & 0xFFL) << 16);
+ default:
+ return in.readInt() & 0xFFFFFFFFL;
+ }
+ }
+
+ /**
+ * Provides an abstraction for read int values, so that decoding logic can be reused in different
+ * DataInput.
+ */
+ public static interface IntReader {
+ int read(long v);
+ }
+
+ /**
+ * Faster implementation of read single group, It read values from the buffer that would not cross
+ * boundaries.
+ *
+ * @param flag the flag of group varint.
+ * @param reader the supplier of read int.
+ * @param dst the array to read ints into.
+ * @param offset the offset in the array to start storing ints.
+ * @return the number of bytes read, it is a positive number and less than {@link
+ * #MAX_LENGTH_PER_GROUP}
+ */
+ public static int readGroupVInt(int flag, IntReader reader, long pos, long[] dst, int offset)
+ throws IOException {
Review Comment:
All public methods in MemorySegmentIndexInput need the try catch. Everything private not.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1852013823
Hi, I added the implementation for `ByteBufferIndexInput`, Unfortunately, the benchmark shows a bit regression:
java17
```
Benchmark (size) Mode Cnt Score Error Units
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVInt 64 thrpt 5 6.591 ± 1.333 ops/us
GroupVIntBenchmark.benchMMapDirectoryInputs_readGroupVIntBaseline 64 thrpt 5 7.253 ± 0.443 ops/us
```
Probably that the `ix()` has a bit overhead, or capturing lambda problem like `NIOFSDirectory`?
DirectByteBuffer#getInt():
```java
public short getShort(int i) {
try {
return getShort(ix(checkIndex(i, (1 << 1))));
} finally {
Reference.reachabilityFence(this);
}
}
```
I ran with `-XX:+PrintInlining` parameter, it shows the methods are fully inlined:
```
@ 139 org.apache.lucene.store.ByteBufferIndexInput$$Lambda$75/0x0000000800c84ca8::read (9 bytes) inline (hot)
@ 5 org.apache.lucene.store.ByteBufferIndexInput::lambda$readGroupVInt$0 (10 bytes) inline (hot)
! @ 6 java.nio.DirectByteBuffer::getInt (28 bytes) inline (hot)
\-> TypeProfile (30309/30309 counts) = java/nio/DirectByteBufferR
@ 5 java.nio.Buffer::checkIndex (24 bytes) inline (hot)
@ 8 java.nio.DirectByteBuffer::ix (10 bytes) inline (hot)
! @ 11 java.nio.DirectByteBuffer::getInt (36 bytes) inline (hot)
@ 4 java.nio.Buffer::scope (17 bytes) force inline by annotation
! @ 13 jdk.internal.misc.ScopedMemoryAccess::getIntUnaligned (22 bytes) force inline by annotation
! @ 6 jdk.internal.misc.ScopedMemoryAccess::getIntUnalignedInternal (38 bytes) force inline by annotation
@ 17 jdk.internal.misc.Unsafe::getIntUnaligned (12 bytes) inline (hot)
@ 5 jdk.internal.misc.Unsafe::getIntUnaligned (83 bytes) (intrinsic)
@ 8 jdk.internal.misc.Unsafe::convEndian (16 bytes) inline (hot)
@ 23 java.lang.ref.Reference::reachabilityFence (1 bytes) force inline by annotation
@ 21 java.lang.ref.Reference::reachabilityFence (1 bytes) force inline by annotation
@ 16 java.lang.ref.Reference::reachabilityFence (1 bytes) force inline by annotation
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1841102583
Thank you @rmuir, the new assembly output is here:) CC @uschindler
https://github.com/easyice/lucene_files/blob/main/MemorySegmentIndexInput.readGroupVInt.asm.txt
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "easyice (via GitHub)" <gi...@apache.org>.
easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1844310878
@uschindler Thanks for review!
> With unaligned random reads you mean that you read with positional reads from the area where the buffer is saved? With default DataInput you can only go forward, so you need to read everything and also in order.
The optimized decode for an integer value using `getInt(pos) & mask`, it interprets the following bytes as intger, then use `mask` to remove unnecessary, since the length of each value is not fixed, the `getInt(pos)` will like `getInt(1); getInt(2); getInt(4); getInt(7)`, so it is unaligned random reads. This random access is not supported in `DataInput`, and possibility a bit heavy if use `RandomAccessInput` directly.
> The best idea that I have instead of VarHandles: Create an implementation for ByteBuffer
do you mean create an implementation to get the current block as `ByteBuffer` for `BufferedIndexInput` `ByteBuffersDataInput` and `MemorySegmentIndexInput` like "wrapSliceAsByteBuffer()" ? then put the decode function `readGroupVInt` to `DataInput`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1867386417
Hi,
Yes we can. I was waiting for some comment from Adrien. Let me invite him for a review.
As this is main branch only, we can find-rube and change APIs later.
Uwe
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "uschindler (via GitHub)" <gi...@apache.org>.
uschindler merged PR #12841:
URL: https://github.com/apache/lucene/pull/12841
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org
Re: [PR] Move group-varint encoding/decoding logic to DataOutput/DataInput [lucene]
Posted by "jpountz (via GitHub)" <gi...@apache.org>.
jpountz commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1887173459
FYI I pushed an annotation to nightly benchmarks, it should show up tomorrow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org