├── project ├── build.properties └── plugins.sbt ├── .gitignore ├── src ├── main │ └── scala │ │ ├── search │ │ └── algorithm │ │ │ ├── SearchAlgorithm.java │ │ │ ├── MultiSearchAlgorithm.java │ │ │ ├── MultiSearchProcessor.java │ │ │ ├── SearchProcessor.java │ │ │ ├── MultiSearchResult.java │ │ │ ├── UnrolledSearchProcessor.java │ │ │ ├── KnuthMorrisPratt.java │ │ │ ├── ShiftingBitMask.java │ │ │ └── AhoCorasic.java │ │ ├── worksheet.sc │ │ └── benchmark │ │ ├── SearchInput.scala │ │ └── SearchBenchmark.scala └── test │ └── scala │ └── search │ └── algorithm │ ├── ByteBufferConverter.scala │ ├── IndexOfTest.scala │ ├── IndexOfMultipleTest.scala │ └── IndexOfRepeatedTest.scala ├── README.md ├── results ├── before-unrolling_assembly.txt ├── unrolling-step-4_assembly.txt ├── unrolling-step-5_assembly.txt ├── unrolling-step-3_assembly.txt ├── unrolling-step-2_assembly.txt ├── aho-corasic_assembly.txt └── unrolling-step-1_assembly.txt └── LICENSE /project/build.properties: -------------------------------------------------------------------------------- 1 | sbt.version = 1.3.7 -------------------------------------------------------------------------------- /project/plugins.sbt: -------------------------------------------------------------------------------- 1 | addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.3.7") 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | classes 2 | target 3 | .idea 4 | .idea_modules 5 | *.icode 6 | project/local.sbt 7 | hsdis-amd64.dylib 8 | -------------------------------------------------------------------------------- /src/main/scala/search/algorithm/SearchAlgorithm.java: -------------------------------------------------------------------------------- 1 | package search.algorithm; 2 | 3 | public interface SearchAlgorithm { 4 | SearchProcessor newProcessor(); 5 | } 6 | -------------------------------------------------------------------------------- /src/main/scala/search/algorithm/MultiSearchAlgorithm.java: -------------------------------------------------------------------------------- 1 | package search.algorithm; 2 | 3 | public interface MultiSearchAlgorithm extends SearchAlgorithm { 4 | MultiSearchProcessor newProcessor(); 5 | } 6 | -------------------------------------------------------------------------------- /src/test/scala/search/algorithm/ByteBufferConverter.scala: -------------------------------------------------------------------------------- 1 | package search.algorithm 2 | 3 | import java.nio.{ByteBuffer, ByteOrder} 4 | 5 | trait ByteBufferConverter { 6 | 7 | protected def toByteBuffer(bytes: Array[Byte]): ByteBuffer = { 8 | ByteBuffer.wrap(bytes).order(ByteOrder.LITTLE_ENDIAN) 9 | } 10 | 11 | protected def toByteBuffer(s: String): ByteBuffer = { 12 | toByteBuffer(s.getBytes) 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /src/main/scala/search/algorithm/MultiSearchProcessor.java: -------------------------------------------------------------------------------- 1 | package search.algorithm; 2 | 3 | import java.nio.ByteBuffer; 4 | 5 | public interface MultiSearchProcessor extends SearchProcessor { 6 | 7 | int getFoundNeedleId(); 8 | 9 | default MultiSearchResult indexOfMultiple(ByteBuffer haystack) { 10 | 11 | final int foundAt = indexOf(haystack); 12 | 13 | return foundAt < 0 ? MultiSearchResult.NOT_FOUND : new MultiSearchResult(foundAt, getFoundNeedleId()); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/scala/search/algorithm/SearchProcessor.java: -------------------------------------------------------------------------------- 1 | package search.algorithm; 2 | 3 | import java.nio.ByteBuffer; 4 | 5 | public interface SearchProcessor { 6 | 7 | int needleLength(); 8 | 9 | boolean process(byte value); 10 | 11 | void reset(); 12 | 13 | default int indexOf(ByteBuffer haystack) { 14 | 15 | while (haystack.hasRemaining()) { 16 | if (!process(haystack.get())) { 17 | return haystack.position() - needleLength(); 18 | } 19 | } 20 | 21 | return -1; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/scala/worksheet.sc: -------------------------------------------------------------------------------- 1 | import java.nio.{ByteBuffer, ByteOrder} 2 | 3 | import search.algorithm.ShiftingBitMask 4 | 5 | val haystackBytes = "bababbaabaaba".getBytes 6 | 7 | val processor = ShiftingBitMask.init("ba".getBytes).newProcessor 8 | 9 | val haystack = ByteBuffer.wrap(haystackBytes).order(ByteOrder.LITTLE_ENDIAN) 10 | 11 | haystack.remaining() 12 | 13 | processor.indexOf(haystack) 14 | processor.indexOf(haystack) 15 | processor.indexOf(haystack) 16 | processor.indexOf(haystack) 17 | processor.indexOf(haystack) 18 | processor.indexOf(haystack) 19 | -------------------------------------------------------------------------------- /src/main/scala/benchmark/SearchInput.scala: -------------------------------------------------------------------------------- 1 | package benchmark 2 | 3 | import java.nio.{ByteBuffer, ByteOrder} 4 | 5 | import com.google.common.io.Resources 6 | 7 | 8 | object SearchInput { 9 | 10 | lazy val Haystack: ByteBuffer = { 11 | val url = Resources.getResource("en.wikipedia.org_wiki_String-searching_algorithm.html") 12 | val haystackBytes = Resources.toByteArray(url) 13 | val haystack = ByteBuffer.allocate(1_000_000_000).order(ByteOrder.LITTLE_ENDIAN) 14 | for (_ <- 1 to haystack.capacity / haystackBytes.length) { 15 | haystack.put(haystackBytes) 16 | } 17 | haystack.put(haystackBytes.take(haystack.capacity % haystackBytes.length)) 18 | 19 | haystack 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /src/main/scala/search/algorithm/MultiSearchResult.java: -------------------------------------------------------------------------------- 1 | package search.algorithm; 2 | 3 | import java.util.Objects; 4 | 5 | public final class MultiSearchResult { 6 | 7 | final static MultiSearchResult NOT_FOUND = new MultiSearchResult(-1, -1); 8 | 9 | private final int foundAt, foundNeedleId; 10 | 11 | MultiSearchResult(int foundAt, int foundNeedleId) { 12 | this.foundAt = foundAt; 13 | this.foundNeedleId = foundNeedleId; 14 | } 15 | 16 | @Override 17 | public boolean equals(Object o) { 18 | if (this == o) return true; 19 | if (o == null || getClass() != o.getClass()) return false; 20 | MultiSearchResult that = (MultiSearchResult) o; 21 | return foundAt == that.foundAt && 22 | foundNeedleId == that.foundNeedleId; 23 | } 24 | 25 | @Override 26 | public int hashCode() { 27 | return Objects.hash(foundAt, foundNeedleId); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Code for my blog posts on string search algorithms: 2 | 1. [Beating Textbook Algorithms in String Search](https://medium.com/wix-engineering/beating-textbook-algorithms-in-string-search-5d24b2f1bbd0) - branch [blog-post-1](https://github.com/linasm/string-search-algos/tree/blog-post-1) 3 | 2. [Can You Optimise These 2 Lines of Code?](https://medium.com/wix-engineering/can-you-optimise-these-2-lines-of-code-633dd81b1862) - branch [blog-post-2](https://github.com/linasm/string-search-algos/tree/blog-post-2) 4 | 3. [An Interesting Case of Loop Unrolling](https://medium.com/wix-engineering/an-interesting-case-of-loop-unrolling-8ea04cf08959) - branch [blog-post-3](https://github.com/linasm/string-search-algos/tree/blog-post-3) 5 | 6 | Requires Java 8 or higher (recommended: [GraalVM (20.0.0 CE, based on OpenJDK 11)](https://github.com/graalvm/graalvm-ce-builds/releases/tag/vm-20.0.0)). 7 | 1. Download / install SBT: https://www.scala-sbt.org/download.html 8 | 2. Clone this repository: `git clone git@github.com:linasm/string-search-algos.git` 9 | 3. `cd string-search-algos` 10 | 4. `sbt` 11 | 5. From SBT console: `jmh:run` to run the benchmarks 12 | -------------------------------------------------------------------------------- /src/main/scala/search/algorithm/UnrolledSearchProcessor.java: -------------------------------------------------------------------------------- 1 | package search.algorithm; 2 | 3 | import com.google.common.base.Preconditions; 4 | 5 | import java.nio.ByteBuffer; 6 | import java.nio.ByteOrder; 7 | import java.nio.LongBuffer; 8 | 9 | public interface UnrolledSearchProcessor extends SearchProcessor { 10 | 11 | boolean process(long value); 12 | 13 | boolean hasPreviouslyFound(); 14 | 15 | int nextOffset(); 16 | 17 | default int indexOf(ByteBuffer haystack) { 18 | 19 | Preconditions.checkArgument( 20 | haystack.order().equals(ByteOrder.LITTLE_ENDIAN), 21 | "LITTLE_ENDIAN buffer required"); 22 | 23 | if (hasPreviouslyFound()) { 24 | return haystack.position() - nextOffset(); 25 | } 26 | 27 | while (haystack.remaining() >= 8) { 28 | if (!process(haystack.getLong())) { 29 | return haystack.position() - nextOffset(); 30 | } 31 | } 32 | 33 | return SearchProcessor.super.indexOf(haystack); 34 | } 35 | 36 | default int indexOf(LongBuffer haystack) { 37 | 38 | Preconditions.checkArgument( 39 | haystack.order().equals(ByteOrder.LITTLE_ENDIAN), 40 | "LITTLE_ENDIAN buffer required"); 41 | 42 | if (hasPreviouslyFound()) { 43 | return haystack.position() - nextOffset(); 44 | } 45 | 46 | while (haystack.remaining() >= 8) { 47 | if (!process(haystack.get())) { 48 | return haystack.position() - nextOffset(); 49 | } 50 | } 51 | 52 | return -1; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/scala/benchmark/SearchBenchmark.scala: -------------------------------------------------------------------------------- 1 | package benchmark 2 | 3 | import java.nio.charset.Charset 4 | import java.nio.{ByteBuffer, ByteOrder} 5 | import java.util.concurrent.TimeUnit 6 | 7 | import org.openjdk.jmh.annotations._ 8 | import search.algorithm._ 9 | 10 | 11 | @OutputTimeUnit(TimeUnit.SECONDS) 12 | @BenchmarkMode(Array(Mode.Throughput)) 13 | @Measurement(iterations = 5, time = 5, timeUnit = TimeUnit.SECONDS) 14 | @Warmup(iterations = 5, time = 5, timeUnit = TimeUnit.SECONDS) 15 | @State(Scope.Benchmark) 16 | @Fork( 17 | value = 1, 18 | // Requires hsdis-amd64.dylib: 19 | //jvmArgs = Array("-XX:+UnlockDiagnosticVMOptions", "-XX:CompileCommand=print,*.shiftingBitMask", "-XX:PrintAssemblyOptions=intel") 20 | ) 21 | class SearchBenchmark { 22 | 23 | private var needleBytes: Array[Byte] = _ 24 | private var haystack: ByteBuffer = _ 25 | 26 | private var kmpContext: KnuthMorrisPratt = _ 27 | private var shiftingBitMaskContext: ShiftingBitMask = _ 28 | private var ahoCorasicContext: AhoCorasic = _ 29 | 30 | @Setup 31 | def setup(): Unit = { 32 | 33 | haystack = SearchInput.Haystack 34 | needleBytes = "This text will not be found.".getBytes(Charset.forName("us-ascii")) 35 | 36 | kmpContext = KnuthMorrisPratt.init(needleBytes) 37 | shiftingBitMaskContext = ShiftingBitMask.init(needleBytes) 38 | ahoCorasicContext = AhoCorasic.init(needleBytes) 39 | } 40 | 41 | @Benchmark 42 | @CompilerControl(CompilerControl.Mode.DONT_INLINE) 43 | def ahoCorasic: Int = { 44 | haystack.rewind() 45 | ahoCorasicContext.newProcessor.indexOf(haystack) 46 | } 47 | 48 | @Benchmark 49 | @CompilerControl(CompilerControl.Mode.DONT_INLINE) 50 | def kmp: Int = { 51 | haystack.rewind() 52 | kmpContext.newProcessor.indexOf(haystack) 53 | } 54 | 55 | @Benchmark 56 | @CompilerControl(CompilerControl.Mode.DONT_INLINE) 57 | def shiftingBitMaskUnrolled: Int = { 58 | haystack.rewind() 59 | shiftingBitMaskContext.newProcessor.indexOf(haystack) 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/scala/search/algorithm/KnuthMorrisPratt.java: -------------------------------------------------------------------------------- 1 | package search.algorithm; 2 | 3 | /** 4 | * Knuth-Morris-Pratt string search algorithm. 5 | * https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm 6 | */ 7 | public final class KnuthMorrisPratt implements SearchAlgorithm { 8 | 9 | private final int[] jumpTable; 10 | private final byte[] needle; 11 | 12 | public final static class Processor implements SearchProcessor { 13 | 14 | private final byte[] needle; 15 | private final int[] jumpTable; 16 | 17 | private int currentPosition; 18 | 19 | private Processor(byte[] needle, int[] jumpTable) { 20 | this.needle = needle; 21 | this.jumpTable = jumpTable; 22 | } 23 | 24 | @Override 25 | public boolean process(byte value) { 26 | while (currentPosition > 0 && needle[currentPosition] != value) { 27 | currentPosition = jumpTable[currentPosition]; 28 | } 29 | if (needle[currentPosition] == value) { 30 | currentPosition++; 31 | } 32 | if (currentPosition == needle.length) { 33 | currentPosition = jumpTable[currentPosition]; 34 | return false; 35 | } 36 | 37 | return true; 38 | } 39 | 40 | @Override 41 | public int needleLength() { 42 | return needle.length; 43 | } 44 | 45 | @Override 46 | public void reset() { 47 | currentPosition = 0; 48 | } 49 | 50 | } 51 | 52 | private KnuthMorrisPratt(byte[] needle) { 53 | this.needle = needle.clone(); 54 | this.jumpTable = new int[needle.length + 1]; 55 | 56 | int j = 0; 57 | for (int i = 1; i < needle.length; i++) { 58 | while (j > 0 && needle[j] != needle[i]) { 59 | j = jumpTable[j]; 60 | } 61 | if (needle[j] == needle[i]) { 62 | j++; 63 | } 64 | jumpTable[i + 1] = j; 65 | } 66 | } 67 | 68 | @Override 69 | public Processor newProcessor() { 70 | return new Processor(needle, jumpTable); 71 | } 72 | 73 | public static KnuthMorrisPratt init(byte[] needle) { 74 | return new KnuthMorrisPratt(needle); 75 | } 76 | 77 | } 78 | -------------------------------------------------------------------------------- /src/test/scala/search/algorithm/IndexOfTest.scala: -------------------------------------------------------------------------------- 1 | package search.algorithm 2 | 3 | import java.util 4 | 5 | import org.scalacheck.Arbitrary.arbitrary 6 | import org.scalacheck.Prop.{forAll, propBoolean} 7 | import org.scalacheck.{Gen, Properties, Test} 8 | 9 | 10 | abstract class IndexOfTest(algorithmClass: Class[_], algorithm: Array[Byte] => SearchAlgorithm) 11 | extends Properties(s"indexOf(${algorithmClass.getSimpleName})") 12 | with ByteBufferConverter { 13 | 14 | override def overrideParameters(p: Test.Parameters): Test.Parameters = { 15 | p.withMinSuccessfulTests(10000) 16 | } 17 | 18 | property("find existing needle in a haystack") = forAll(Gen.nonEmptyListOf(arbitrary[Byte])) { haystackList => 19 | 20 | val haystack = haystackList.toArray 21 | val maxIndex = math.max(0, haystack.length - 1) 22 | 23 | forAll( 24 | Gen.choose(0, maxIndex), 25 | Gen.choose(0, maxIndex)) { (a, b) => 26 | 27 | val from = math.min(a, b) 28 | val until = math.min(from + 57, math.max(a, b) + 1) 29 | 30 | val needle = haystack.slice(from, until) 31 | 32 | val searchProcessor = algorithm(needle).newProcessor 33 | 34 | val indexOf = searchProcessor.indexOf(toByteBuffer(haystack)) 35 | 36 | indexOf <= from && 37 | util.Arrays.equals(needle, haystack.slice(indexOf, indexOf + needle.length)) 38 | } 39 | } 40 | 41 | property("report a missing needle in a haystack") = forAll { (haystackList: List[Byte], needleList: List[Byte]) => 42 | 43 | val haystack = haystackList.toArray 44 | val needle = needleList.toArray 45 | 46 | (needle.length <= 57 && haystack.indexOfSlice(needle) == -1) ==> { 47 | 48 | val searchProcessor = algorithm(needle).newProcessor 49 | 50 | searchProcessor.indexOf(toByteBuffer(haystack)) == -1 51 | } 52 | } 53 | 54 | } 55 | 56 | object AhoCorasicIndexOfTest extends IndexOfTest(classOf[AhoCorasic], AhoCorasic.init(_)) 57 | 58 | object KmpIndexOfTest extends IndexOfTest(classOf[KnuthMorrisPratt], KnuthMorrisPratt.init) 59 | 60 | object ShiftingBitMaskIndexOfTest extends IndexOfTest(classOf[ShiftingBitMask], ShiftingBitMask.init) 61 | -------------------------------------------------------------------------------- /src/test/scala/search/algorithm/IndexOfMultipleTest.scala: -------------------------------------------------------------------------------- 1 | package search.algorithm 2 | 3 | import org.scalatest.matchers.should.Matchers 4 | import org.scalatest.wordspec.AnyWordSpec 5 | import search.algorithm.MultiSearchResult.NOT_FOUND 6 | 7 | 8 | abstract class IndexOfMultipleTest(algorithm: Array[Array[Byte]] => MultiSearchAlgorithm) 9 | extends AnyWordSpec with Matchers with ByteBufferConverter { 10 | 11 | "find single needle repeatedly" in { 12 | 13 | val haystack = toByteBuffer("aabbaabbaa") 14 | 15 | val processor = algorithm(Array("aa".getBytes)).newProcessor 16 | 17 | processor.indexOfMultiple(haystack) shouldEqual found(foundAt = 0, foundNeedleId = 0) 18 | processor.indexOfMultiple(haystack) shouldEqual found(foundAt = 4, foundNeedleId = 0) 19 | processor.indexOfMultiple(haystack) shouldEqual found(foundAt = 8, foundNeedleId = 0) 20 | processor.indexOfMultiple(haystack) shouldEqual NOT_FOUND 21 | } 22 | 23 | "find multiple needles" in { 24 | 25 | val haystack = toByteBuffer("aabbccdd") 26 | 27 | val processor = algorithm(Array("aa".getBytes, "bb".getBytes, "cc".getBytes)).newProcessor 28 | 29 | processor.indexOfMultiple(haystack) shouldEqual found(foundAt = 0, foundNeedleId = 0) 30 | processor.indexOfMultiple(haystack) shouldEqual found(foundAt = 2, foundNeedleId = 1) 31 | processor.indexOfMultiple(haystack) shouldEqual found(foundAt = 4, foundNeedleId = 2) 32 | processor.indexOfMultiple(haystack) shouldEqual NOT_FOUND 33 | } 34 | 35 | "find multiple overlapping needles" in { 36 | 37 | val haystack = toByteBuffer("abcd") 38 | 39 | val processor = algorithm(Array("ab".getBytes, "bc".getBytes, "cd".getBytes)).newProcessor 40 | 41 | processor.indexOfMultiple(haystack) shouldEqual found(foundAt = 0, foundNeedleId = 0) 42 | processor.indexOfMultiple(haystack) shouldEqual found(foundAt = 1, foundNeedleId = 1) 43 | processor.indexOfMultiple(haystack) shouldEqual found(foundAt = 2, foundNeedleId = 2) 44 | processor.indexOfMultiple(haystack) shouldEqual NOT_FOUND 45 | } 46 | 47 | private def found(foundAt: Int, foundNeedleId: Int) = new MultiSearchResult(foundAt, foundNeedleId) 48 | 49 | } 50 | 51 | class AhoCorasicIndexOfMultipleTest extends IndexOfMultipleTest(AhoCorasic.init(_: _*)) 52 | -------------------------------------------------------------------------------- /src/test/scala/search/algorithm/IndexOfRepeatedTest.scala: -------------------------------------------------------------------------------- 1 | package search.algorithm 2 | 3 | import java.nio.charset.Charset 4 | 5 | import org.scalatest.matchers.should.Matchers 6 | import org.scalatest.wordspec.AnyWordSpec 7 | 8 | 9 | abstract class IndexOfRepeatedTest(algorithm: Array[Byte] => SearchAlgorithm) 10 | extends AnyWordSpec with Matchers with ByteBufferConverter { 11 | 12 | private val utf8 = Charset.forName("Utf-8") 13 | 14 | "find the needle repeatedly" in { 15 | 16 | val haystack = toByteBuffer("abababaabab") 17 | 18 | val processor = AhoCorasic.init("ba".getBytes).newProcessor 19 | 20 | processor.indexOf(haystack) shouldEqual 1 21 | processor.indexOf(haystack) shouldEqual 3 22 | processor.indexOf(haystack) shouldEqual 5 23 | processor.indexOf(haystack) shouldEqual 8 24 | processor.indexOf(haystack) shouldEqual -1 25 | } 26 | 27 | "find the self-overlapping needle repeatedly" in { 28 | 29 | val haystack = toByteBuffer("abcabcabcabc") 30 | 31 | val processor = AhoCorasic.init("abcab".getBytes).newProcessor 32 | 33 | processor.indexOf(haystack) shouldEqual 0 34 | processor.indexOf(haystack) shouldEqual 3 35 | processor.indexOf(haystack) shouldEqual 6 36 | processor.indexOf(haystack) shouldEqual -1 37 | } 38 | 39 | "find a long needle" in { 40 | 41 | val haystack = toByteBuffer(Array.tabulate(256)(_.toByte)) 42 | val needle = Array.tabulate(57)(x => (x + 16).toByte) 43 | 44 | val processor = algorithm(needle).newProcessor 45 | 46 | processor.indexOf(haystack) shouldEqual 16 47 | processor.indexOf(haystack) shouldEqual -1 48 | } 49 | 50 | "find UTF symbols" in { 51 | 52 | val haystack = toByteBuffer("Šešios žąsys su šešiais žąsyčiais.".getBytes(utf8)) 53 | 54 | val processor = algorithm("žąs".getBytes(utf8)).newProcessor 55 | 56 | processor.indexOf(haystack) shouldEqual 9 57 | processor.indexOf(haystack) shouldEqual 30 58 | processor.indexOf(haystack) shouldEqual -1 59 | } 60 | 61 | } 62 | 63 | class AhoCorasicIndexOfRepeatedTest extends IndexOfRepeatedTest(AhoCorasic.init(_)) 64 | 65 | class KmpIndexOfRepeatedTest extends IndexOfRepeatedTest(KnuthMorrisPratt.init) 66 | 67 | class ShiftingBitMaskIndexOfRepeatedTest extends IndexOfRepeatedTest(ShiftingBitMask.init) 68 | -------------------------------------------------------------------------------- /src/main/scala/search/algorithm/ShiftingBitMask.java: -------------------------------------------------------------------------------- 1 | package search.algorithm; 2 | 3 | import java.util.Arrays; 4 | 5 | /** 6 | * String search algorithm known as Bitap / Shift-or / Shift-and / Baeza-Yates–Gonnet. 7 | * https://en.wikipedia.org/wiki/Bitap_algorithm 8 | */ 9 | public final class ShiftingBitMask implements SearchAlgorithm { 10 | 11 | private final long[] bitMasks = new long[8 * 256 + 1]; 12 | private final long successBitMask; 13 | private final long unrolledSuccessBitMask; 14 | private final int needleLength; 15 | 16 | public final static class Processor implements UnrolledSearchProcessor { 17 | 18 | private final long[] bitMasks; 19 | private final long successBitMask; 20 | private final long unrolledSuccessBitMask; 21 | private final int needleLength; 22 | 23 | private long currentMask; 24 | private long previouslyFound; 25 | 26 | private Processor(long[] bitMasks, long successBitMask, long unrolledSuccessBitMask, int needleLength) { 27 | this.bitMasks = bitMasks; 28 | this.successBitMask = successBitMask; 29 | this.unrolledSuccessBitMask = unrolledSuccessBitMask; 30 | this.needleLength = needleLength; 31 | } 32 | 33 | @Override 34 | public boolean process(byte value) { 35 | currentMask = ((currentMask << 1) | 1) & bitMasks[Byte.toUnsignedInt(value) << 3]; 36 | return (currentMask & successBitMask) == 0; 37 | } 38 | 39 | @Override 40 | public boolean process(long value) { 41 | 42 | currentMask = ((currentMask << 8) | 255) & bitMasks[8 * 256] & 43 | bitMasks[(int) (((value << 3) & (0xFF << 3)) + 7)] & 44 | bitMasks[(int) (((value >>> 5) & (0xFF << 3)) + 6)] & 45 | bitMasks[(int) (((value >>> 13) & (0xFF << 3)) + 5)] & 46 | bitMasks[(int) (((value >>> 21) & (0xFF << 3)) + 4)] & 47 | bitMasks[(int) (((value >>> 29) & (0xFF << 3)) + 3)] & 48 | bitMasks[(int) (((value >>> 37) & (0xFF << 3)) + 2)] & 49 | bitMasks[(int) (((value >>> 45) & (0xFF << 3)) + 1)] & 50 | bitMasks[(int) ((value >>> 53) & (0xFF << 3)) ]; 51 | 52 | final long result = currentMask & unrolledSuccessBitMask; 53 | 54 | if (result == 0) return true; 55 | else { 56 | previouslyFound = result; 57 | return false; 58 | } 59 | } 60 | 61 | @Override 62 | public int needleLength() { 63 | return needleLength; 64 | } 65 | 66 | @Override 67 | public boolean hasPreviouslyFound() { 68 | return previouslyFound != 0; 69 | } 70 | 71 | @Override 72 | public int nextOffset() { 73 | assert previouslyFound != 0; 74 | 75 | final int offset = 64 - Long.numberOfLeadingZeros(previouslyFound); 76 | previouslyFound ^= 1L << (offset - 1); 77 | 78 | return offset; 79 | } 80 | 81 | @Override 82 | public void reset() { 83 | currentMask = 0; 84 | previouslyFound = 0; 85 | } 86 | 87 | } 88 | 89 | private ShiftingBitMask(byte[] needle) { 90 | 91 | if (needle.length > 57) { 92 | throw new IllegalArgumentException("Maximum supported search pattern length is 57, got " + needle.length); 93 | } 94 | 95 | final long initial = -(1L << (needle.length)); 96 | Arrays.fill(bitMasks, initial); 97 | bitMasks[8 * 256] = -1L; 98 | 99 | long bit = 1L; 100 | for (byte c : needle) { 101 | bitMasks[Byte.toUnsignedInt(c) << 3] |= bit; 102 | bit <<= 1; 103 | } 104 | 105 | for (int i = 1; i < 8; i++) { 106 | for (int c = 0; c < 256; c++) { 107 | bitMasks[i + (c << 3)] = (bitMasks[i - 1 + (c << 3)] << 1) | 1; 108 | } 109 | } 110 | 111 | successBitMask = 1L << (needle.length - 1); 112 | unrolledSuccessBitMask = 255L << (needle.length - 1); 113 | needleLength = needle.length; 114 | } 115 | 116 | @Override 117 | public Processor newProcessor() { 118 | return new Processor(bitMasks, successBitMask, unrolledSuccessBitMask, needleLength); 119 | } 120 | 121 | public static ShiftingBitMask init(byte[] needle) { 122 | return new ShiftingBitMask(needle); 123 | } 124 | 125 | } 126 | -------------------------------------------------------------------------------- /src/main/scala/search/algorithm/AhoCorasic.java: -------------------------------------------------------------------------------- 1 | package search.algorithm; 2 | 3 | import com.google.common.base.Preconditions; 4 | 5 | import java.util.ArrayDeque; 6 | import java.util.ArrayList; 7 | import java.util.Arrays; 8 | import java.util.Queue; 9 | 10 | /** 11 | * Aho-Corasic string search algorithm. 12 | * https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm 13 | */ 14 | public final class AhoCorasic implements MultiSearchAlgorithm { 15 | 16 | private static final int BITS_PER_SYMBOL = 8; 17 | private static final int ALPHABET_SIZE = 1 << BITS_PER_SYMBOL; 18 | 19 | private final int[] jumpTable; 20 | private final int[] matchForNeedleId; 21 | private final int[] needleLengths; 22 | 23 | public final static class Processor implements MultiSearchProcessor { 24 | 25 | private final int[] jumpTable; 26 | private final int[] matchForNeedleId; 27 | private final int[] needleLengths; 28 | 29 | private int currentPosition; 30 | 31 | private Processor(int[] jumpTable, int[] matchForNeedleId, int[] needleLengths) { 32 | this.jumpTable = jumpTable; 33 | this.matchForNeedleId = matchForNeedleId; 34 | this.needleLengths = needleLengths; 35 | } 36 | 37 | @Override 38 | public boolean process(byte value) { 39 | currentPosition = jumpTable[currentPosition | Byte.toUnsignedInt(value)]; 40 | if (currentPosition < 0) { 41 | currentPosition = -currentPosition; 42 | return false; 43 | } 44 | return true; 45 | } 46 | 47 | @Override 48 | public int getFoundNeedleId() { 49 | return matchForNeedleId[currentPosition >> BITS_PER_SYMBOL]; 50 | } 51 | 52 | @Override 53 | public void reset() { 54 | currentPosition = 0; 55 | } 56 | 57 | @Override 58 | public int needleLength() { 59 | int foundNeedleId = getFoundNeedleId(); 60 | return foundNeedleId >= 0 ? needleLengths[foundNeedleId] : 0; 61 | } 62 | 63 | } 64 | 65 | private AhoCorasic(byte[]... needles) { 66 | 67 | for (byte[] needle : needles) { 68 | Preconditions.checkArgument(needle.length > 0, "Needle must be non empty"); 69 | } 70 | 71 | ArrayList jumpTableBuilder = new ArrayList<>(ALPHABET_SIZE); 72 | for (int i = 0; i < ALPHABET_SIZE; i++) { 73 | jumpTableBuilder.add(-1); 74 | } 75 | 76 | ArrayList matchForBuilder = new ArrayList<>(); 77 | matchForBuilder.add(-1); 78 | 79 | needleLengths = new int[needles.length]; 80 | 81 | for (int needleId = 0; needleId < needles.length; needleId++) { 82 | byte[] needle = needles[needleId]; 83 | needleLengths[needleId] = needle.length; 84 | int currentPosition = 0; 85 | 86 | for (byte ch0 : needle) { 87 | 88 | final int ch = Byte.toUnsignedInt(ch0); 89 | final int next = currentPosition + ch; 90 | 91 | if (jumpTableBuilder.get(next) == -1) { 92 | jumpTableBuilder.set(next, jumpTableBuilder.size()); 93 | for (int i = 0; i < ALPHABET_SIZE; i++) { 94 | jumpTableBuilder.add(-1); 95 | } 96 | matchForBuilder.add(-1); 97 | } 98 | 99 | currentPosition = jumpTableBuilder.get(next); 100 | } 101 | 102 | matchForBuilder.set(currentPosition >> BITS_PER_SYMBOL, needleId); 103 | } 104 | 105 | jumpTable = new int[jumpTableBuilder.size()]; 106 | matchForNeedleId = new int[matchForBuilder.size()]; 107 | 108 | for (int i = 0; i < jumpTableBuilder.size(); i++) { 109 | jumpTable[i] = jumpTableBuilder.get(i); 110 | } 111 | 112 | for (int i = 0; i < matchForBuilder.size(); i++) { 113 | matchForNeedleId[i] = matchForBuilder.get(i); 114 | } 115 | 116 | linkSuffixes(); 117 | 118 | for (int i = 0; i < jumpTable.length; i++) { 119 | if (matchForNeedleId[jumpTable[i] >> BITS_PER_SYMBOL] >= 0) { 120 | jumpTable[i] = -jumpTable[i]; 121 | } 122 | } 123 | } 124 | 125 | private void linkSuffixes() { 126 | 127 | Queue queue = new ArrayDeque<>(); 128 | queue.add(0); 129 | 130 | int[] suffixLinks = new int[matchForNeedleId.length]; 131 | Arrays.fill(suffixLinks, -1); 132 | 133 | while (!queue.isEmpty()) { 134 | 135 | final int v = queue.remove(); 136 | int vPosition = v >> BITS_PER_SYMBOL; 137 | final int u = suffixLinks[vPosition] == -1 ? 0 : suffixLinks[vPosition]; 138 | 139 | if (matchForNeedleId[vPosition] == -1) { 140 | matchForNeedleId[vPosition] = matchForNeedleId[u >> BITS_PER_SYMBOL]; 141 | } 142 | 143 | for (int ch = 0; ch < ALPHABET_SIZE; ch++) { 144 | 145 | final int vIndex = v | ch; 146 | final int uIndex = u | ch; 147 | 148 | final int jumpV = jumpTable[vIndex]; 149 | final int jumpU = jumpTable[uIndex]; 150 | 151 | if (jumpV != -1) { 152 | suffixLinks[jumpV >> BITS_PER_SYMBOL] = v > 0 && jumpU != -1 ? jumpU : 0; 153 | queue.add(jumpV); 154 | } else { 155 | jumpTable[vIndex] = jumpU != -1 ? jumpU : 0; 156 | } 157 | } 158 | } 159 | } 160 | 161 | @Override 162 | public MultiSearchProcessor newProcessor() { 163 | return new Processor(jumpTable, matchForNeedleId, needleLengths); 164 | } 165 | 166 | public static AhoCorasic init(byte[] ...needles) { 167 | return new AhoCorasic(needles); 168 | } 169 | 170 | } 171 | -------------------------------------------------------------------------------- /results/before-unrolling_assembly.txt: -------------------------------------------------------------------------------- 1 | ....[Hottest Region 1].............................................................................. 2 | jvmci, level 4, search.algorithm.SearchProcessor::indexOf, version 841 (70 bytes) 3 | ; - search.algorithm.SearchProcessor::indexOf@9 (line 16) 4 | 0x000000011ce87b06: mov QWORD PTR [rsi+0x18],rbp ;*putfield currentMask {reexecute=0 rethrow=0 return_oop=0} 5 | ; - search.algorithm.ShiftingBitMask$Processor::process@19 (line 25) 6 | ; - search.algorithm.SearchProcessor::indexOf@12 (line 16) 7 | 0x000000011ce87b0a: mov rcx,rbp 8 | ╭ 0x000000011ce87b0d: jmp 0x000000011ce87b66 ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 9 | │ ; - search.algorithm.SearchProcessor::indexOf@0 (line 15) 10 | │ 0x000000011ce87b12: data16 nop WORD PTR [rax+rax*1+0x0] 11 | │ 0x000000011ce87b1c: data16 data16 xchg ax,ax ;*ifeq {reexecute=0 rethrow=0 return_oop=0} 12 | │ ; - search.algorithm.SearchProcessor::indexOf@4 (line 15) 13 | 12.75% │↗ 0x000000011ce87b20: mov ebp,r10d 14 | 4.07% ││ 0x000000011ce87b23: add ebp,r9d ;*iadd {reexecute=0 rethrow=0 return_oop=0} 15 | ││ ; - java.nio.HeapByteBuffer::ix@5 (line 152) 16 | ││ ; - java.nio.HeapByteBuffer::get@9 (line 162) 17 | ││ ; - search.algorithm.SearchProcessor::indexOf@9 (line 16) 18 | 2.35% ││ 0x000000011ce87b26: cmp r8d,ebp 19 | ││ 0x000000011ce87b29: jbe 0x000000011ce87be7 20 | 2.74% ││ 0x000000011ce87b2f: movsx ebp,BYTE PTR [rbp+r11*8+0x10] 21 | ││ ;*baload {reexecute=0 rethrow=0 return_oop=0} 22 | ││ ; - java.nio.HeapByteBuffer::get@12 (line 162) 23 | ││ ; - search.algorithm.SearchProcessor::indexOf@9 (line 16) 24 | 14.22% ││ 0x000000011ce87b35: movzx r14d,bpl ;*iand {reexecute=0 rethrow=0 return_oop=0} 25 | ││ ; - java.lang.Byte::toUnsignedInt@4 (line 510) 26 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@14 (line 25) 27 | ││ ; - search.algorithm.SearchProcessor::indexOf@12 (line 16) 28 | 4.35% ││ 0x000000011ce87b39: cmp edi,r14d 29 | ││ 0x000000011ce87b3c: jbe 0x000000011ce87bd7 30 | 2.74% ││ 0x000000011ce87b42: movzx ebp,bpl ;*laload {reexecute=0 rethrow=0 return_oop=0} 31 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@17 (line 25) 32 | ││ ; - search.algorithm.SearchProcessor::indexOf@12 (line 16) 33 | 2.13% ││ 0x000000011ce87b46: shl rcx,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 34 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@6 (line 25) 35 | ││ ; - search.algorithm.SearchProcessor::indexOf@12 (line 16) 36 | 12.63% ││ 0x000000011ce87b49: or rcx,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 37 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@8 (line 25) 38 | ││ ; - search.algorithm.SearchProcessor::indexOf@12 (line 16) 39 | 4.24% ││ 0x000000011ce87b4d: and rcx,QWORD PTR [rbx+rbp*8+0x10] 40 | ││ ;*land {reexecute=0 rethrow=0 return_oop=0} 41 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@18 (line 25) 42 | ││ ; - search.algorithm.SearchProcessor::indexOf@12 (line 16) 43 | 14.08% ││ 0x000000011ce87b52: test rcx,r13 44 | 0.01% ││ 0x000000011ce87b55: jne 0x000000011ce87bb9 ;*ifne {reexecute=0 rethrow=0 return_oop=0} 45 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@33 (line 26) 46 | ││ ; - search.algorithm.SearchProcessor::indexOf@12 (line 16) 47 | 14.32% ││ 0x000000011ce87b5b: inc r10d ;*iadd {reexecute=0 rethrow=0 return_oop=0} 48 | ││ ; - java.nio.Buffer::nextGetIndex@26 (line 642) 49 | ││ ; - java.nio.HeapByteBuffer::get@6 (line 162) 50 | ││ ; - search.algorithm.SearchProcessor::indexOf@9 (line 16) 51 | 3.93% ││ 0x000000011ce87b5e: mov DWORD PTR [rdx+0x18],r10d 52 | ││ ;*putfield position {reexecute=0 rethrow=0 return_oop=0} 53 | ││ ; - java.nio.Buffer::nextGetIndex@27 (line 642) 54 | ││ ; - java.nio.HeapByteBuffer::get@6 (line 162) 55 | ││ ; - search.algorithm.SearchProcessor::indexOf@9 (line 16) 56 | 2.69% ││ 0x000000011ce87b62: mov QWORD PTR [rsi+0x18],rcx ;*putfield currentMask {reexecute=0 rethrow=0 return_oop=0} 57 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@19 (line 25) 58 | ││ ; - search.algorithm.SearchProcessor::indexOf@12 (line 16) 59 | 2.28% ↘│ 0x000000011ce87b66: cmp eax,r10d 60 | ╰ 0x000000011ce87b69: jg 0x000000011ce87b20 ;*ifeq {reexecute=0 rethrow=0 return_oop=0} 61 | ; - search.algorithm.SearchProcessor::indexOf@4 (line 15) 62 | 0x000000011ce87b6b: mov eax,0xffffffff ;*ireturn {reexecute=0 rethrow=0 return_oop=0} 63 | ; - search.algorithm.SearchProcessor::indexOf@33 (line 21) 64 | 0x000000011ce87b70: mov rbp,QWORD PTR [rsp+0x10] 65 | 0x000000011ce87b75: add rsp,0x18 66 | 0x000000011ce87b79: mov rcx,QWORD PTR [r15+0x108] 67 | 0x000000011ce87b80: test DWORD PTR [rcx],eax ; {poll_return} 68 | .................................................................................................... 69 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /results/unrolling-step-4_assembly.txt: -------------------------------------------------------------------------------- 1 | ....[Hottest Region 1].............................................................................. 2 | jvmci, level 4, search.algorithm.UnrolledSearchProcessor::indexOf, version 828 (300 bytes) 3 | 0x00000001210c6800: mov rdi,r13 4 | 0x00000001210c6803: mov r10d,r9d 5 | 0x00000001210c6806: mov r9,QWORD PTR [rsp] 6 | 0x00000001210c680a: mov rbx,QWORD PTR [rsp+0x38] 7 | 0x00000001210c680f: mov ecx,DWORD PTR [rsp+0x14] 8 | 0x00000001210c6813: mov r8d,DWORD PTR [rsp+0x44] 9 | ╭ 0x00000001210c6818: jmp 0x00000001210c6941 ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 10 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@36 (line 27) 11 | │ 0x00000001210c681d: data16 xchg ax,ax ;*ireturn {reexecute=0 rethrow=0 return_oop=0} 12 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@75 (line 33) 13 | 0.96% │↗ 0x00000001210c6820: lea ebp,[r10+0x8] ;*iadd {reexecute=0 rethrow=0 return_oop=0} 14 | ││ ; - java.nio.Buffer::nextGetIndex@32 (line 649) 15 | ││ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 16 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 17 | 0.34% ││ 0x00000001210c6824: mov DWORD PTR [rdx+0x18],ebp ;*putfield position {reexecute=0 rethrow=0 return_oop=0} 18 | ││ ; - java.nio.Buffer::nextGetIndex@33 (line 649) 19 | ││ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 20 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 21 | 0.54% ││ 0x00000001210c6827: movsxd r13,r10d ;*i2l {reexecute=0 rethrow=0 return_oop=0} 22 | ││ ; - java.nio.HeapByteBuffer::getLong@14 (line 439) 23 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 24 | 3.66% ││ 0x00000001210c682a: add r13,rbx ;*ladd {reexecute=0 rethrow=0 return_oop=0} 25 | ││ ; - java.nio.HeapByteBuffer::byteOffset@5 (line 157) 26 | ││ ; - java.nio.HeapByteBuffer::getLong@15 (line 439) 27 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 28 | 0.98% ││ 0x00000001210c682d: mov r13,QWORD PTR [r13+rcx*8+0x0] 29 | ││ ;* unwind (locked if synchronized) 30 | ││ ; - jdk.internal.misc.Unsafe::getLongUnaligned@-3 31 | ││ ; - jdk.internal.misc.Unsafe::getLongUnaligned@5 (line 3432) 32 | ││ ; - java.nio.HeapByteBuffer::getLong@22 (line 439) 33 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 34 | 1.23% ││ 0x00000001210c6832: mov r14,r13 35 | 0.45% ││ 0x00000001210c6835: and r14,0xff ;*land {reexecute=0 rethrow=0 return_oop=0} 36 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@23 (line 42) 37 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 38 | 4.00% ││ 0x00000001210c683c: mov DWORD PTR [rsp+0x2c],r10d 39 | 0.89% ││ 0x00000001210c6841: lea r10,[r14+0x700] ;*ladd {reexecute=0 rethrow=0 return_oop=0} 40 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@24 (line 42) 41 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 42 | 0.56% ││ 0x00000001210c6848: mov r10d,r10d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 43 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@25 (line 42) 44 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 45 | 1.05% ││ 0x00000001210c684b: cmp r8d,r10d 46 | ││ 0x00000001210c684e: jbe 0x00000001210c6b01 47 | 3.94% ││ 0x00000001210c6854: mov DWORD PTR [rsp+0x28],ebp 48 | 0.85% ││ 0x00000001210c6858: mov r10,QWORD PTR [r9+r14*8+0x3810] 49 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 50 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@26 (line 42) 51 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 52 | 3.36% ││ 0x00000001210c6860: mov r14,r13 53 | 0.40% ││ 0x00000001210c6863: shr r14,0x8 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 54 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@38 (line 42) 55 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 56 | 2.38% ││ 0x00000001210c6867: and r14,0xff ;*land {reexecute=0 rethrow=0 return_oop=0} 57 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@42 (line 42) 58 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 59 | 0.69% ││ 0x00000001210c686e: mov r14,QWORD PTR [r9+r14*8+0x3010] 60 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 61 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@45 (line 42) 62 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 63 | 3.62% ││ 0x00000001210c6876: mov r11,r13 64 | 0.41% ││ 0x00000001210c6879: shr r11,0x10 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 65 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@57 (line 42) 66 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 67 | 2.03% ││ 0x00000001210c687d: and r11,0xff ;*land {reexecute=0 rethrow=0 return_oop=0} 68 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@61 (line 42) 69 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 70 | 0.62% ││ 0x00000001210c6884: mov r11,QWORD PTR [r9+r11*8+0x2810] 71 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 72 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@64 (line 42) 73 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 74 | 4.42% ││ 0x00000001210c688c: mov r8,r13 75 | 0.35% ││ 0x00000001210c688f: shr r8,0x18 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 76 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@76 (line 42) 77 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 78 | 1.94% ││ 0x00000001210c6893: and r8,0xff ;*land {reexecute=0 rethrow=0 return_oop=0} 79 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@80 (line 42) 80 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 81 | 0.59% ││ 0x00000001210c689a: mov r8,QWORD PTR [r9+r8*8+0x2010] 82 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 83 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@83 (line 42) 84 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 85 | 3.54% ││ 0x00000001210c68a2: mov rcx,r13 86 | 0.29% ││ 0x00000001210c68a5: shr rcx,0x20 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 87 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@95 (line 42) 88 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 89 | 1.56% ││ 0x00000001210c68a9: and rcx,0xff ;*land {reexecute=0 rethrow=0 return_oop=0} 90 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@99 (line 42) 91 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 92 | 0.53% ││ 0x00000001210c68b0: mov rcx,QWORD PTR [r9+rcx*8+0x1810] 93 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 94 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@102 (line 42) 95 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 96 | 3.77% ││ 0x00000001210c68b8: mov rbx,r13 97 | 0.34% ││ 0x00000001210c68bb: shr rbx,0x28 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 98 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@114 (line 42) 99 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 100 | 1.54% ││ 0x00000001210c68bf: and rbx,0xff ;*land {reexecute=0 rethrow=0 return_oop=0} 101 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@118 (line 42) 102 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 103 | 0.53% ││ 0x00000001210c68c6: mov rbx,QWORD PTR [r9+rbx*8+0x1010] 104 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 105 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@121 (line 42) 106 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 107 | 3.46% ││ 0x00000001210c68ce: mov rdx,r13 108 | 0.38% ││ 0x00000001210c68d1: shr rdx,0x30 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 109 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@133 (line 42) 110 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 111 | 1.51% ││ 0x00000001210c68d5: and rdx,0xff ;*land {reexecute=0 rethrow=0 return_oop=0} 112 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@137 (line 42) 113 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 114 | 0.49% ││ 0x00000001210c68dc: mov rdx,QWORD PTR [r9+rdx*8+0x810] 115 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 116 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@140 (line 42) 117 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 118 | 3.53% ││ 0x00000001210c68e4: mov rbp,r13 119 | 0.37% ││ 0x00000001210c68e7: shr rbp,0x38 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 120 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@149 (line 42) 121 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 122 | 1.60% ││ 0x00000001210c68eb: shl rdi,0x8 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 123 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@7 (line 42) 124 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 125 | 0.39% ││ 0x00000001210c68ef: or rdi,0xff ;*lor {reexecute=0 rethrow=0 return_oop=0} 126 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@11 (line 42) 127 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 128 | 3.19% ││ 0x00000001210c68f6: and rdi,r10 ;*land {reexecute=0 rethrow=0 return_oop=0} 129 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@27 (line 42) 130 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 131 | 0.34% ││ 0x00000001210c68f9: and rdi,r14 ;*land {reexecute=0 rethrow=0 return_oop=0} 132 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@46 (line 42) 133 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 134 | 1.36% ││ 0x00000001210c68fc: and rdi,r11 ;*land {reexecute=0 rethrow=0 return_oop=0} 135 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@65 (line 42) 136 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 137 | 0.42% ││ 0x00000001210c68ff: and rdi,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 138 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@84 (line 42) 139 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 140 | 3.43% ││ 0x00000001210c6902: and rdi,rcx ;*land {reexecute=0 rethrow=0 return_oop=0} 141 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@103 (line 42) 142 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 143 | 0.34% ││ 0x00000001210c6905: and rdi,rbx ;*land {reexecute=0 rethrow=0 return_oop=0} 144 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@122 (line 42) 145 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 146 | 1.49% ││ 0x00000001210c6908: and rdi,rdx ;*land {reexecute=0 rethrow=0 return_oop=0} 147 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@141 (line 42) 148 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 149 | 0.82% ││ 0x00000001210c690b: and rdi,QWORD PTR [r9+rbp*8+0x10] 150 | ││ ;*land {reexecute=0 rethrow=0 return_oop=0} 151 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@152 (line 42) 152 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 153 | 3.51% ││ 0x00000001210c6910: test rdi,rax 154 | ││ 0x00000001210c6913: jne 0x00000001210c6ad4 ;*ifne {reexecute=0 rethrow=0 return_oop=0} 155 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@169 (line 54) 156 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 157 | 4.15% ││ 0x00000001210c6919: mov ebp,DWORD PTR [rsp+0x28] 158 | 1.04% ││ 0x00000001210c691d: mov QWORD PTR [rsi+0x20],rdi ;*putfield currentMask {reexecute=0 rethrow=0 return_oop=0} 159 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@153 (line 42) 160 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 161 | 0.29% ││ 0x00000001210c6921: mov r10,QWORD PTR [r15+0x108] 162 | ││ ; ImmutableOopMap{rsi=Oop r9=Oop [8]=Oop [20]=NarrowOop [24]=Oop [32]=Oop } 163 | ││ ;*aload_0 {reexecute=1 rethrow=0 return_oop=0} 164 | ││ ; - (reexecute) search.algorithm.ShiftingBitMask$Processor::process@156 (line 52) 165 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 166 | 0.32% ││ 0x00000001210c6928: test DWORD PTR [r10],eax ; {poll} 167 | 4.03% ││ 0x00000001210c692b: mov r10d,ebp 168 | 0.92% ││ 0x00000001210c692e: mov rbx,QWORD PTR [rsp+0x38] 169 | 0.27% ││ 0x00000001210c6933: mov ecx,DWORD PTR [rsp+0x14] 170 | 0.31% ││ 0x00000001210c6937: mov r8d,DWORD PTR [rsp+0x44] 171 | 3.94% ││ 0x00000001210c693c: mov r11d,DWORD PTR [rsp+0x30] 172 | ││ ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 173 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@36 (line 27) 174 | 1.03% ↘│ 0x00000001210c6941: mov rdx,QWORD PTR [rsp+0x18] 175 | 0.24% │ 0x00000001210c6946: mov ebp,r11d 176 | 0.29% │ 0x00000001210c6949: sub ebp,r10d ;*isub {reexecute=0 rethrow=0 return_oop=0} 177 | │ ; - java.nio.Buffer::nextGetIndex@8 (line 646) 178 | │ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 179 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 180 | 3.85% │ 0x00000001210c694c: cmp ebp,0x8 181 | ╰ 0x00000001210c694f: jge 0x00000001210c6820 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 182 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@42 (line 27) 183 | 0x00000001210c6955: cmp r11d,r10d 184 | 0x00000001210c6958: jg 0x00000001210c6976 ;*ifeq {reexecute=0 rethrow=0 return_oop=0} 185 | ; - search.algorithm.SearchProcessor::indexOf@4 (line 15) 186 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@72 (line 33) 187 | 0x00000001210c695e: mov eax,0xffffffff ;*ireturn {reexecute=0 rethrow=0 return_oop=0} 188 | .................................................................................................... 189 | -------------------------------------------------------------------------------- /results/unrolling-step-5_assembly.txt: -------------------------------------------------------------------------------- 1 | ....[Hottest Region 1].............................................................................. 2 | jvmci, level 4, search.algorithm.UnrolledSearchProcessor::indexOf, version 841 (277 bytes) 3 | 0x000000011559ee75: mov r8d,DWORD PTR [rsp+0x30] 4 | 0x000000011559ee7a: mov QWORD PTR [rsi+0x20],rdi ;*putfield currentMask {reexecute=0 rethrow=0 return_oop=0} 5 | ; - search.algorithm.ShiftingBitMask$Processor::process@165 (line 42) 6 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 7 | 0x000000011559ee7e: mov rbx,QWORD PTR [rsp+0x8] 8 | 0x000000011559ee83: mov rcx,QWORD PTR [rsp+0x38] 9 | ╭ 0x000000011559ee88: jmp 0x000000011559ef95 ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 10 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@36 (line 27) 11 | │ 0x000000011559ee8d: data16 xchg ax,ax ;*ireturn {reexecute=0 rethrow=0 return_oop=0} 12 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@75 (line 33) 13 | 1.20% │↗ 0x000000011559ee90: lea r13d,[r8+0x8] ;*iadd {reexecute=0 rethrow=0 return_oop=0} 14 | ││ ; - java.nio.Buffer::nextGetIndex@32 (line 649) 15 | ││ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 16 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 17 | 0.39% ││ 0x000000011559ee94: mov DWORD PTR [rdx+0x18],r13d 18 | ││ ;*putfield position {reexecute=0 rethrow=0 return_oop=0} 19 | ││ ; - java.nio.Buffer::nextGetIndex@33 (line 649) 20 | ││ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 21 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 22 | 2.09% ││ 0x000000011559ee98: movsxd r14,r8d ;*i2l {reexecute=0 rethrow=0 return_oop=0} 23 | ││ ; - java.nio.HeapByteBuffer::getLong@14 (line 439) 24 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 25 | 2.08% ││ 0x000000011559ee9b: add r14,rcx ;*ladd {reexecute=0 rethrow=0 return_oop=0} 26 | ││ ; - java.nio.HeapByteBuffer::byteOffset@5 (line 157) 27 | ││ ; - java.nio.HeapByteBuffer::getLong@15 (line 439) 28 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 29 | 1.10% ││ 0x000000011559ee9e: mov r14,QWORD PTR [r14+r9*8] ;* unwind (locked if synchronized) 30 | ││ ; - jdk.internal.misc.Unsafe::getLongUnaligned@-3 31 | ││ ; - jdk.internal.misc.Unsafe::getLongUnaligned@5 (line 3432) 32 | ││ ; - java.nio.HeapByteBuffer::getLong@22 (line 439) 33 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 34 | 1.23% ││ 0x000000011559eea2: mov r10,r14 35 | 1.45% ││ 0x000000011559eea5: shl r10,0x3 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 36 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@30 (line 42) 37 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 38 | 2.30% ││ 0x000000011559eea9: and r10,0x7f8 ;*land {reexecute=0 rethrow=0 return_oop=0} 39 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@34 (line 42) 40 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 41 | 1.40% ││ 0x000000011559eeb0: mov r10,QWORD PTR [rbx+r10*8+0x48] 42 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 43 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@37 (line 42) 44 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 45 | 7.06% ││ 0x000000011559eeb5: mov DWORD PTR [rsp+0x30],r8d 46 | 1.66% ││ 0x000000011559eeba: mov r8,r14 47 | 1.20% ││ 0x000000011559eebd: shr r8,0x5 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 48 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@48 (line 42) 49 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 50 | 0.62% ││ 0x000000011559eec1: and r8,0x7f8 ;*land {reexecute=0 rethrow=0 return_oop=0} 51 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@52 (line 42) 52 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 53 | 2.49% ││ 0x000000011559eec8: mov r8,QWORD PTR [rbx+r8*8+0x40] 54 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 55 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@55 (line 42) 56 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 57 | 1.81% ││ 0x000000011559eecd: mov r11,r14 58 | 1.23% ││ 0x000000011559eed0: shr r11,0xd ;*lushr {reexecute=0 rethrow=0 return_oop=0} 59 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@67 (line 42) 60 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 61 | 0.62% ││ 0x000000011559eed4: and r11,0x7f8 ;*land {reexecute=0 rethrow=0 return_oop=0} 62 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@71 (line 42) 63 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 64 | 1.98% ││ 0x000000011559eedb: mov r11,QWORD PTR [rbx+r11*8+0x38] 65 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 66 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@74 (line 42) 67 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 68 | 2.60% ││ 0x000000011559eee0: mov r9,r14 69 | 1.19% ││ 0x000000011559eee3: shr r9,0x15 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 70 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@86 (line 42) 71 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 72 | 0.47% ││ 0x000000011559eee7: and r9,0x7f8 ;*land {reexecute=0 rethrow=0 return_oop=0} 73 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@90 (line 42) 74 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 75 | 1.93% ││ 0x000000011559eeee: mov r9,QWORD PTR [rbx+r9*8+0x30] 76 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 77 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@93 (line 42) 78 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 79 | 2.03% ││ 0x000000011559eef3: mov rcx,r14 80 | 1.17% ││ 0x000000011559eef6: shr rcx,0x1d ;*lushr {reexecute=0 rethrow=0 return_oop=0} 81 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@105 (line 42) 82 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 83 | 0.45% ││ 0x000000011559eefa: and rcx,0x7f8 ;*land {reexecute=0 rethrow=0 return_oop=0} 84 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@109 (line 42) 85 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 86 | 2.04% ││ 0x000000011559ef01: mov rcx,QWORD PTR [rbx+rcx*8+0x28] 87 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 88 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@112 (line 42) 89 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 90 | 1.94% ││ 0x000000011559ef06: mov rdx,r14 91 | 1.13% ││ 0x000000011559ef09: shr rdx,0x25 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 92 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@124 (line 42) 93 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 94 | 0.50% ││ 0x000000011559ef0d: and rdx,0x7f8 ;*land {reexecute=0 rethrow=0 return_oop=0} 95 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@128 (line 42) 96 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 97 | 2.12% ││ 0x000000011559ef14: mov rdx,QWORD PTR [rbx+rdx*8+0x20] 98 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 99 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@131 (line 42) 100 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 101 | 2.07% ││ 0x000000011559ef19: mov DWORD PTR [rsp+0x2c],r13d 102 | 1.35% ││ 0x000000011559ef1e: mov r13,r14 103 | 0.42% ││ 0x000000011559ef21: shr r13,0x2d ;*lushr {reexecute=0 rethrow=0 return_oop=0} 104 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@141 (line 42) 105 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 106 | 1.91% ││ 0x000000011559ef25: and r13,0x7f8 ;*land {reexecute=0 rethrow=0 return_oop=0} 107 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@145 (line 42) 108 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 109 | 1.79% ││ 0x000000011559ef2c: mov r13,QWORD PTR [rbx+r13*8+0x18] 110 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 111 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@148 (line 42) 112 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 113 | 1.59% ││ 0x000000011559ef31: mov rsi,r14 114 | 0.49% ││ 0x000000011559ef34: shr rsi,0x35 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 115 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@157 (line 42) 116 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 117 | 1.69% ││ 0x000000011559ef38: and rsi,0x7f8 ;*land {reexecute=0 rethrow=0 return_oop=0} 118 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@161 (line 42) 119 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 120 | 1.75% ││ 0x000000011559ef3f: shl rdi,0x8 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 121 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@7 (line 42) 122 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 123 | 1.37% ││ 0x000000011559ef43: or rdi,0xff ;*lor {reexecute=0 rethrow=0 return_oop=0} 124 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@11 (line 42) 125 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 126 | 0.48% ││ 0x000000011559ef4a: and rdi,rbp ;*land {reexecute=0 rethrow=0 return_oop=0} 127 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@20 (line 42) 128 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 129 | 1.96% ││ 0x000000011559ef4d: and rdi,r10 ;*land {reexecute=0 rethrow=0 return_oop=0} 130 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@38 (line 42) 131 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 132 | 1.79% ││ 0x000000011559ef50: and rdi,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 133 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@56 (line 42) 134 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 135 | 1.30% ││ 0x000000011559ef53: and rdi,r11 ;*land {reexecute=0 rethrow=0 return_oop=0} 136 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@75 (line 42) 137 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 138 | 0.55% ││ 0x000000011559ef56: and rdi,r9 ;*land {reexecute=0 rethrow=0 return_oop=0} 139 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@94 (line 42) 140 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 141 | 1.93% ││ 0x000000011559ef59: and rdi,rcx ;*land {reexecute=0 rethrow=0 return_oop=0} 142 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@113 (line 42) 143 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 144 | 1.99% ││ 0x000000011559ef5c: and rdi,rdx ;*land {reexecute=0 rethrow=0 return_oop=0} 145 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@132 (line 42) 146 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 147 | 1.44% ││ 0x000000011559ef5f: and rdi,r13 ;*land {reexecute=0 rethrow=0 return_oop=0} 148 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@149 (line 42) 149 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 150 | 0.82% ││ 0x000000011559ef62: and rdi,QWORD PTR [rbx+rsi*8+0x10] 151 | ││ ;*land {reexecute=0 rethrow=0 return_oop=0} 152 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@164 (line 42) 153 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 154 | 2.63% ││ 0x000000011559ef67: test rdi,rax 155 | ││ 0x000000011559ef6a: jne 0x000000011559f189 ;*ifne {reexecute=0 rethrow=0 return_oop=0} 156 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@181 (line 54) 157 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 158 | 2.91% ││ 0x000000011559ef70: mov r13d,DWORD PTR [rsp+0x2c] 159 | 1.11% ││ 0x000000011559ef75: mov rsi,QWORD PTR [rsp+0x20] 160 | 0.41% ││ 0x000000011559ef7a: mov QWORD PTR [rsi+0x20],rdi ;*putfield currentMask {reexecute=0 rethrow=0 return_oop=0} 161 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@165 (line 42) 162 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 163 | 2.33% ││ 0x000000011559ef7e: mov r10,QWORD PTR [r15+0x108] 164 | ││ ; ImmutableOopMap{rbx=Oop rsi=Oop [0]=Oop [20]=NarrowOop [24]=Oop [32]=Oop } 165 | ││ ;*aload_0 {reexecute=1 rethrow=0 return_oop=0} 166 | ││ ; - (reexecute) search.algorithm.ShiftingBitMask$Processor::process@168 (line 52) 167 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 168 | 2.60% ││ 0x000000011559ef85: test DWORD PTR [r10],eax ; {poll} 169 | 1.57% ││ 0x000000011559ef88: mov r8d,r13d 170 | 0.45% ││ 0x000000011559ef8b: mov rcx,QWORD PTR [rsp+0x38] 171 | 1.70% ││ 0x000000011559ef90: mov r9d,DWORD PTR [rsp+0x14] ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 172 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@36 (line 27) 173 | 2.55% ↘│ 0x000000011559ef95: mov r11d,DWORD PTR [rsp+0x44] 174 | 1.44% │ 0x000000011559ef9a: mov rdx,QWORD PTR [rsp+0x18] 175 | 0.38% │ 0x000000011559ef9f: mov r13d,r11d 176 | 1.42% │ 0x000000011559efa2: sub r13d,r8d ;*isub {reexecute=0 rethrow=0 return_oop=0} 177 | │ ; - java.nio.Buffer::nextGetIndex@8 (line 646) 178 | │ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 179 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 180 | 2.12% │ 0x000000011559efa5: cmp r13d,0x8 181 | ╰ 0x000000011559efa9: jge 0x000000011559ee90 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 182 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@42 (line 27) 183 | 0x000000011559efaf: mov rsi,QWORD PTR [rsp+0x20] 184 | 0x000000011559efb4: cmp r11d,r8d 185 | 0x000000011559efb7: jg 0x000000011559efd5 ;*ifeq {reexecute=0 rethrow=0 return_oop=0} 186 | ; - search.algorithm.SearchProcessor::indexOf@4 (line 15) 187 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@72 (line 33) 188 | .................................................................................................... 189 | -------------------------------------------------------------------------------- /results/unrolling-step-3_assembly.txt: -------------------------------------------------------------------------------- 1 | ....[Hottest Region 1].............................................................................. 2 | jvmci, level 4, search.algorithm.UnrolledSearchProcessor::indexOf, version 839 (339 bytes) 3 | 0x00000001236eca2f: mov r8d,DWORD PTR [rsp+0x30] 4 | 0x00000001236eca34: mov QWORD PTR [rsi+0x20],rdi ;*putfield currentMask {reexecute=0 rethrow=0 return_oop=0} 5 | ; - search.algorithm.ShiftingBitMask$Processor::process@176 (line 38) 6 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 7 | 0x00000001236eca38: mov rbx,QWORD PTR [rsp+0x8] 8 | 0x00000001236eca3d: mov rcx,QWORD PTR [rsp+0x38] 9 | ╭ 0x00000001236eca42: jmp 0x00000001236ecb8f ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 10 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@36 (line 27) 11 | │ 0x00000001236eca47: nop WORD PTR [rax+rax*1+0x0] ;*ireturn {reexecute=0 rethrow=0 return_oop=0} 12 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@75 (line 33) 13 | 1.08% │↗ 0x00000001236eca50: lea r13d,[r8+0x8] ;*iadd {reexecute=0 rethrow=0 return_oop=0} 14 | ││ ; - java.nio.Buffer::nextGetIndex@32 (line 649) 15 | ││ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 16 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 17 | 1.16% ││ 0x00000001236eca54: mov DWORD PTR [rdx+0x18],r13d 18 | ││ ;*putfield position {reexecute=0 rethrow=0 return_oop=0} 19 | ││ ; - java.nio.Buffer::nextGetIndex@33 (line 649) 20 | ││ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 21 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 22 | 1.38% ││ 0x00000001236eca58: movsxd r14,r8d ;*i2l {reexecute=0 rethrow=0 return_oop=0} 23 | ││ ; - java.nio.HeapByteBuffer::getLong@14 (line 439) 24 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 25 | 1.01% ││ 0x00000001236eca5b: add r14,rcx ;*ladd {reexecute=0 rethrow=0 return_oop=0} 26 | ││ ; - java.nio.HeapByteBuffer::byteOffset@5 (line 157) 27 | ││ ; - java.nio.HeapByteBuffer::getLong@15 (line 439) 28 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 29 | 0.91% ││ 0x00000001236eca5e: mov r14,QWORD PTR [r14+r9*8] ;* unwind (locked if synchronized) 30 | ││ ; - jdk.internal.misc.Unsafe::getLongUnaligned@-3 31 | ││ ; - jdk.internal.misc.Unsafe::getLongUnaligned@5 (line 3432) 32 | ││ ; - java.nio.HeapByteBuffer::getLong@22 (line 439) 33 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 34 | 1.98% ││ 0x00000001236eca62: mov r10d,r14d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 35 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@26 (line 38) 36 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 37 | 1.02% ││ 0x00000001236eca65: and r10d,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 38 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@30 (line 38) 39 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 40 | 1.20% ││ 0x00000001236eca6c: mov r10,QWORD PTR [rbx+r10*8+0x10] 41 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 42 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@31 (line 38) 43 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 44 | 4.92% ││ 0x00000001236eca71: mov DWORD PTR [rsp+0x30],r8d 45 | 1.04% ││ 0x00000001236eca76: mov r8,r14 46 | 0.58% ││ 0x00000001236eca79: shr r8,0x8 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 47 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@47 (line 38) 48 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 49 | 0.76% ││ 0x00000001236eca7d: mov r8d,r8d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 50 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@48 (line 38) 51 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 52 | 2.09% ││ 0x00000001236eca80: and r8d,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 53 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@52 (line 38) 54 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 55 | 0.63% ││ 0x00000001236eca87: mov r8,QWORD PTR [rbx+r8*8+0x10] 56 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 57 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@53 (line 38) 58 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 59 | 3.85% ││ 0x00000001236eca8c: mov r11,r14 60 | 0.92% ││ 0x00000001236eca8f: shr r11,0x10 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 61 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@69 (line 38) 62 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 63 | 0.65% ││ 0x00000001236eca93: mov r11d,r11d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 64 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@70 (line 38) 65 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 66 | 0.43% ││ 0x00000001236eca96: and r11d,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 67 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@74 (line 38) 68 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 69 | 2.44% ││ 0x00000001236eca9d: mov r11,QWORD PTR [rbx+r11*8+0x10] 70 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 71 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@75 (line 38) 72 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 73 | 2.08% ││ 0x00000001236ecaa2: mov r9,r14 74 | 0.61% ││ 0x00000001236ecaa5: shr r9,0x18 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 75 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@90 (line 38) 76 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 77 | 0.44% ││ 0x00000001236ecaa9: mov r9d,r9d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 78 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@91 (line 38) 79 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 80 | 1.75% ││ 0x00000001236ecaac: and r9d,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 81 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@95 (line 38) 82 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 83 | 1.48% ││ 0x00000001236ecab3: mov r9,QWORD PTR [rbx+r9*8+0x10] 84 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 85 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@96 (line 38) 86 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 87 | 1.94% ││ 0x00000001236ecab8: mov rcx,r14 88 | 0.54% ││ 0x00000001236ecabb: shr rcx,0x20 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 89 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@111 (line 38) 90 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 91 | 1.25% ││ 0x00000001236ecabf: mov ecx,ecx ;*l2i {reexecute=0 rethrow=0 return_oop=0} 92 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@112 (line 38) 93 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 94 | 1.30% ││ 0x00000001236ecac1: and ecx,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 95 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@116 (line 38) 96 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 97 | 1.55% ││ 0x00000001236ecac7: mov rcx,QWORD PTR [rbx+rcx*8+0x10] 98 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 99 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@117 (line 38) 100 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 101 | 1.77% ││ 0x00000001236ecacc: mov rdx,r14 102 | 1.10% ││ 0x00000001236ecacf: shr rdx,0x28 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 103 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@132 (line 38) 104 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 105 | 0.92% ││ 0x00000001236ecad3: mov edx,edx ;*l2i {reexecute=0 rethrow=0 return_oop=0} 106 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@133 (line 38) 107 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 108 | 1.08% ││ 0x00000001236ecad5: and edx,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 109 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@137 (line 38) 110 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 111 | 1.06% ││ 0x00000001236ecadb: mov rdx,QWORD PTR [rbx+rdx*8+0x10] 112 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 113 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@138 (line 38) 114 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 115 | 1.79% ││ 0x00000001236ecae0: mov DWORD PTR [rsp+0x2c],r13d 116 | 0.92% ││ 0x00000001236ecae5: mov r13,r14 117 | 1.04% ││ 0x00000001236ecae8: shr r13,0x30 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 118 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@153 (line 38) 119 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 120 | 0.98% ││ 0x00000001236ecaec: mov r13d,r13d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 121 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@154 (line 38) 122 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 123 | 1.48% ││ 0x00000001236ecaef: and r13d,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 124 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@158 (line 38) 125 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 126 | 0.90% ││ 0x00000001236ecaf6: mov r13,QWORD PTR [rbx+r13*8+0x10] 127 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 128 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@159 (line 38) 129 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 130 | 1.38% ││ 0x00000001236ecafb: mov rsi,r14 131 | 0.88% ││ 0x00000001236ecafe: shr rsi,0x38 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 132 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@172 (line 38) 133 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 134 | 1.32% ││ 0x00000001236ecb02: shl rdi,0x8 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 135 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@7 (line 38) 136 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 137 | 0.93% ││ 0x00000001236ecb06: or rdi,0xff ;*lor {reexecute=0 rethrow=0 return_oop=0} 138 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@11 (line 38) 139 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 140 | 1.12% ││ 0x00000001236ecb0d: and rdi,rbp ;*land {reexecute=0 rethrow=0 return_oop=0} 141 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@20 (line 38) 142 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 143 | 0.98% ││ 0x00000001236ecb10: shl r10,0x7 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 144 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@34 (line 38) 145 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 146 | 1.24% ││ 0x00000001236ecb14: or r10,0x7f ;*lor {reexecute=0 rethrow=0 return_oop=0} 147 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@38 (line 38) 148 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 149 | 1.00% ││ 0x00000001236ecb18: and rdi,r10 ;*land {reexecute=0 rethrow=0 return_oop=0} 150 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@39 (line 38) 151 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 152 | 1.23% ││ 0x00000001236ecb1b: shl r8,0x6 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 153 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@56 (line 38) 154 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 155 | 1.00% ││ 0x00000001236ecb1f: or r8,0x3f ;*lor {reexecute=0 rethrow=0 return_oop=0} 156 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@60 (line 38) 157 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 158 | 1.35% ││ 0x00000001236ecb23: and rdi,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 159 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@61 (line 38) 160 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 161 | 1.06% ││ 0x00000001236ecb26: shl r11,0x5 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 162 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@77 (line 38) 163 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 164 | 1.24% ││ 0x00000001236ecb2a: or r11,0x1f ;*lor {reexecute=0 rethrow=0 return_oop=0} 165 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@81 (line 38) 166 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 167 | 0.86% ││ 0x00000001236ecb2e: and rdi,r11 ;*land {reexecute=0 rethrow=0 return_oop=0} 168 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@82 (line 38) 169 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 170 | 1.41% ││ 0x00000001236ecb31: shl r9,0x4 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 171 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@98 (line 38) 172 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 173 | 0.94% ││ 0x00000001236ecb35: or r9,0xf ;*lor {reexecute=0 rethrow=0 return_oop=0} 174 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@102 (line 38) 175 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 176 | 1.12% ││ 0x00000001236ecb39: and rdi,r9 ;*land {reexecute=0 rethrow=0 return_oop=0} 177 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@103 (line 38) 178 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 179 | 1.03% ││ 0x00000001236ecb3c: shl rcx,0x3 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 180 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@119 (line 38) 181 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 182 | 1.29% ││ 0x00000001236ecb40: or rcx,0x7 ;*lor {reexecute=0 rethrow=0 return_oop=0} 183 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@123 (line 38) 184 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 185 | 0.89% ││ 0x00000001236ecb44: and rdi,rcx ;*land {reexecute=0 rethrow=0 return_oop=0} 186 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@124 (line 38) 187 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 188 | 1.14% ││ 0x00000001236ecb47: shl rdx,0x2 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 189 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@140 (line 38) 190 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 191 | 0.96% ││ 0x00000001236ecb4b: or rdx,0x3 ;*lor {reexecute=0 rethrow=0 return_oop=0} 192 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@144 (line 38) 193 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 194 | 1.35% ││ 0x00000001236ecb4f: and rdi,rdx ;*land {reexecute=0 rethrow=0 return_oop=0} 195 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@145 (line 38) 196 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 197 | 0.89% ││ 0x00000001236ecb52: shl r13,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 198 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@161 (line 38) 199 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 200 | 1.11% ││ 0x00000001236ecb55: or r13,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 201 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@163 (line 38) 202 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 203 | 0.89% ││ 0x00000001236ecb59: and rdi,r13 ;*land {reexecute=0 rethrow=0 return_oop=0} 204 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@164 (line 38) 205 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 206 | 1.37% ││ 0x00000001236ecb5c: and rdi,QWORD PTR [rbx+rsi*8+0x10] 207 | ││ ;*land {reexecute=0 rethrow=0 return_oop=0} 208 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@175 (line 38) 209 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 210 | 1.14% ││ 0x00000001236ecb61: test rdi,rax 211 | ││ 0x00000001236ecb64: jne 0x00000001236ecd71 ;*ifne {reexecute=0 rethrow=0 return_oop=0} 212 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@192 (line 50) 213 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 214 | 1.23% ││ 0x00000001236ecb6a: mov r13d,DWORD PTR [rsp+0x2c] 215 | 0.89% ││ 0x00000001236ecb6f: mov rsi,QWORD PTR [rsp+0x20] 216 | 1.27% ││ 0x00000001236ecb74: mov QWORD PTR [rsi+0x20],rdi ;*putfield currentMask {reexecute=0 rethrow=0 return_oop=0} 217 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@176 (line 38) 218 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 219 | 1.53% ││ 0x00000001236ecb78: mov r10,QWORD PTR [r15+0x108] 220 | ││ ; ImmutableOopMap{rbx=Oop rsi=Oop [0]=Oop [20]=NarrowOop [24]=Oop [32]=Oop } 221 | ││ ;*aload_0 {reexecute=1 rethrow=0 return_oop=0} 222 | ││ ; - (reexecute) search.algorithm.ShiftingBitMask$Processor::process@179 (line 48) 223 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 224 | 1.04% ││ 0x00000001236ecb7f: test DWORD PTR [r10],eax ; {poll} 225 | 1.00% ││ 0x00000001236ecb82: mov r8d,r13d 226 | 1.23% ││ 0x00000001236ecb85: mov rcx,QWORD PTR [rsp+0x38] 227 | 1.04% ││ 0x00000001236ecb8a: mov r9d,DWORD PTR [rsp+0x14] ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 228 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@36 (line 27) 229 | 1.26% ↘│ 0x00000001236ecb8f: mov r11d,DWORD PTR [rsp+0x44] 230 | 0.91% │ 0x00000001236ecb94: mov rdx,QWORD PTR [rsp+0x18] 231 | 1.16% │ 0x00000001236ecb99: mov r13d,r11d 232 | 0.96% │ 0x00000001236ecb9c: sub r13d,r8d ;*isub {reexecute=0 rethrow=0 return_oop=0} 233 | │ ; - java.nio.Buffer::nextGetIndex@8 (line 646) 234 | │ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 235 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 236 | 1.05% │ 0x00000001236ecb9f: cmp r13d,0x8 237 | 0.00% ╰ 0x00000001236ecba3: jge 0x00000001236eca50 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 238 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@42 (line 27) 239 | 0x00000001236ecba9: mov rsi,QWORD PTR [rsp+0x20] 240 | 0x00000001236ecbae: cmp r11d,r8d 241 | 0x00000001236ecbb1: jg 0x00000001236ecbcf ;*ifeq {reexecute=0 rethrow=0 return_oop=0} 242 | ; - search.algorithm.SearchProcessor::indexOf@4 (line 15) 243 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@72 (line 33) 244 | 0x00000001236ecbb7: mov eax,0xffffffff ;*ireturn {reexecute=0 rethrow=0 return_oop=0} 245 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@75 (line 33) 246 | 0x00000001236ecbbc: mov rbp,QWORD PTR [rsp+0x50] 247 | 0x00000001236ecbc1: add rsp,0x58 248 | .................................................................................................... 249 | -------------------------------------------------------------------------------- /results/unrolling-step-2_assembly.txt: -------------------------------------------------------------------------------- 1 | ....[Hottest Region 1].............................................................................. 2 | jvmci, level 4, search.algorithm.UnrolledSearchProcessor::indexOf, version 819 (410 bytes) 3 | 0x0000000128bba55b: mov QWORD PTR [rsi+0x20],r11 ;*putfield currentMask {reexecute=0 rethrow=0 return_oop=0} 4 | ; - search.algorithm.ShiftingBitMask$Processor::process@167 (line 38) 5 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 6 | 0x0000000128bba55f: mov rdi,r11 7 | 0x0000000128bba562: mov r10d,r9d 8 | 0x0000000128bba565: mov r9,QWORD PTR [rsp] 9 | ╭ 0x0000000128bba569: jmp 0x0000000128bba6f1 ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 10 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@36 (line 27) 11 | │ 0x0000000128bba56e: xchg ax,ax ;*ireturn {reexecute=0 rethrow=0 return_oop=0} 12 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@75 (line 33) 13 | 0.54% │↗ 0x0000000128bba570: lea ebp,[r10+0x8] ;*iadd {reexecute=0 rethrow=0 return_oop=0} 14 | ││ ; - java.nio.Buffer::nextGetIndex@32 (line 649) 15 | ││ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 16 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 17 | 0.97% ││ 0x0000000128bba574: mov DWORD PTR [rdx+0x18],ebp ;*putfield position {reexecute=0 rethrow=0 return_oop=0} 18 | ││ ; - java.nio.Buffer::nextGetIndex@33 (line 649) 19 | ││ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 20 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 21 | 2.42% ││ 0x0000000128bba577: movsxd r13,r10d ;*i2l {reexecute=0 rethrow=0 return_oop=0} 22 | ││ ; - java.nio.HeapByteBuffer::getLong@14 (line 439) 23 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 24 | 0.32% ││ 0x0000000128bba57a: add r13,rbx ;*ladd {reexecute=0 rethrow=0 return_oop=0} 25 | ││ ; - java.nio.HeapByteBuffer::byteOffset@5 (line 157) 26 | ││ ; - java.nio.HeapByteBuffer::getLong@15 (line 439) 27 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 28 | 0.54% ││ 0x0000000128bba57d: mov r13,QWORD PTR [r13+rcx*8+0x0] 29 | ││ ;* unwind (locked if synchronized) 30 | ││ ; - jdk.internal.misc.Unsafe::getLongUnaligned@-3 31 | ││ ; - jdk.internal.misc.Unsafe::getLongUnaligned@5 (line 3432) 32 | ││ ; - java.nio.HeapByteBuffer::getLong@22 (line 439) 33 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 34 | 2.85% ││ 0x0000000128bba582: mov r14d,r13d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 35 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@17 (line 38) 36 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 37 | 1.75% ││ 0x0000000128bba585: and r14d,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 38 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@21 (line 38) 39 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 40 | 0.98% ││ 0x0000000128bba58c: cmp r8d,r14d 41 | ││ 0x0000000128bba58f: jbe 0x0000000128bba989 ;*laload {reexecute=0 rethrow=0 return_oop=0} 42 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@22 (line 38) 43 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 44 | 1.45% ││ 0x0000000128bba595: mov DWORD PTR [rsp+0x34],r10d 45 | 0.88% ││ 0x0000000128bba59a: mov r10,r13 46 | 1.29% ││ 0x0000000128bba59d: shr r10,0x8 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 47 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@38 (line 38) 48 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 49 | 0.24% ││ 0x0000000128bba5a1: mov r10d,r10d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 50 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@39 (line 38) 51 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 52 | 1.25% ││ 0x0000000128bba5a4: and r10d,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 53 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@43 (line 38) 54 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 55 | 1.72% ││ 0x0000000128bba5ab: cmp r8d,r10d 56 | 0.00% ││ 0x0000000128bba5ae: jbe 0x0000000128bba95a ;*laload {reexecute=0 rethrow=0 return_oop=0} 57 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@44 (line 38) 58 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 59 | 2.92% ││ 0x0000000128bba5b4: mov r11,r13 60 | 0.23% ││ 0x0000000128bba5b7: shr r11,0x10 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 61 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@60 (line 38) 62 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 63 | 0.18% ││ 0x0000000128bba5bb: mov r11d,r11d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 64 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@61 (line 38) 65 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 66 | 0.77% ││ 0x0000000128bba5be: and r11d,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 67 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@65 (line 38) 68 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 69 | 2.79% ││ 0x0000000128bba5c5: cmp r8d,r11d 70 | 0.00% ││ 0x0000000128bba5c8: jbe 0x0000000128bba948 ;*laload {reexecute=0 rethrow=0 return_oop=0} 71 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@66 (line 38) 72 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 73 | 1.19% ││ 0x0000000128bba5ce: mov rcx,r13 74 | 0.17% ││ 0x0000000128bba5d1: shr rcx,0x18 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 75 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@81 (line 38) 76 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 77 | 0.54% ││ 0x0000000128bba5d5: mov ecx,ecx ;*l2i {reexecute=0 rethrow=0 return_oop=0} 78 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@82 (line 38) 79 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 80 | 2.06% ││ 0x0000000128bba5d7: and ecx,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 81 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@86 (line 38) 82 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 83 | 1.23% ││ 0x0000000128bba5dd: cmp r8d,ecx 84 | ││ 0x0000000128bba5e0: jbe 0x0000000128bba936 ;*laload {reexecute=0 rethrow=0 return_oop=0} 85 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@87 (line 38) 86 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 87 | 1.07% ││ 0x0000000128bba5e6: mov rbx,r13 88 | 0.46% ││ 0x0000000128bba5e9: shr rbx,0x20 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 89 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@102 (line 38) 90 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 91 | 1.29% ││ 0x0000000128bba5ed: mov ebx,ebx ;*l2i {reexecute=0 rethrow=0 return_oop=0} 92 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@103 (line 38) 93 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 94 | 0.94% ││ 0x0000000128bba5ef: and ebx,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 95 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@107 (line 38) 96 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 97 | 1.45% ││ 0x0000000128bba5f5: cmp r8d,ebx 98 | ││ 0x0000000128bba5f8: jbe 0x0000000128bba924 ;*laload {reexecute=0 rethrow=0 return_oop=0} 99 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@108 (line 38) 100 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 101 | 1.44% ││ 0x0000000128bba5fe: mov rdx,r13 102 | 0.92% ││ 0x0000000128bba601: shr rdx,0x28 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 103 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@123 (line 38) 104 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 105 | 0.66% ││ 0x0000000128bba605: mov edx,edx ;*l2i {reexecute=0 rethrow=0 return_oop=0} 106 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@124 (line 38) 107 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 108 | 0.75% ││ 0x0000000128bba607: and edx,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 109 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@128 (line 38) 110 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 111 | 1.29% ││ 0x0000000128bba60d: cmp r8d,edx 112 | ││ 0x0000000128bba610: jbe 0x0000000128bba90d ;*laload {reexecute=0 rethrow=0 return_oop=0} 113 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@129 (line 38) 114 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 115 | 1.41% ││ 0x0000000128bba616: mov DWORD PTR [rsp+0x30],ebp 116 | 0.67% ││ 0x0000000128bba61a: mov rbp,r13 117 | 0.57% ││ 0x0000000128bba61d: shr rbp,0x30 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 118 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@144 (line 38) 119 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 120 | 1.04% ││ 0x0000000128bba621: mov ebp,ebp ;*l2i {reexecute=0 rethrow=0 return_oop=0} 121 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@145 (line 38) 122 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 123 | 1.58% ││ 0x0000000128bba623: and ebp,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 124 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@149 (line 38) 125 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 126 | 0.62% ││ 0x0000000128bba629: cmp r8d,ebp 127 | ││ 0x0000000128bba62c: jbe 0x0000000128bba8f6 ;*laload {reexecute=0 rethrow=0 return_oop=0} 128 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@150 (line 38) 129 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 130 | 0.90% ││ 0x0000000128bba632: mov rsi,r13 131 | 1.09% ││ 0x0000000128bba635: shr rsi,0x38 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 132 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@163 (line 38) 133 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 134 | 1.31% ││ 0x0000000128bba639: mov QWORD PTR [rsp+0x28],r13 135 | 0.89% ││ 0x0000000128bba63e: mov r13d,esi ;*l2i {reexecute=0 rethrow=0 return_oop=0} 136 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@164 (line 38) 137 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 138 | 0.80% ││ 0x0000000128bba641: cmp r8d,r13d 139 | ││ 0x0000000128bba644: jbe 0x0000000128bba8c9 ;*laload {reexecute=0 rethrow=0 return_oop=0} 140 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@165 (line 38) 141 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 142 | 1.00% ││ 0x0000000128bba64a: mov r13,QWORD PTR [r9+r14*8+0x10] 143 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 144 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@22 (line 38) 145 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 146 | 1.30% ││ 0x0000000128bba64f: mov r10,QWORD PTR [r9+r10*8+0x10] 147 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 148 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@44 (line 38) 149 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 150 | 0.60% ││ 0x0000000128bba654: mov r11,QWORD PTR [r9+r11*8+0x10] 151 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 152 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@66 (line 38) 153 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 154 | 0.91% ││ 0x0000000128bba659: mov rcx,QWORD PTR [r9+rcx*8+0x10] 155 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 156 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@87 (line 38) 157 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 158 | 1.16% ││ 0x0000000128bba65e: mov rbx,QWORD PTR [r9+rbx*8+0x10] 159 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 160 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@108 (line 38) 161 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 162 | 1.43% ││ 0x0000000128bba663: mov rdx,QWORD PTR [r9+rdx*8+0x10] 163 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 164 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@129 (line 38) 165 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 166 | 0.83% ││ 0x0000000128bba668: mov rbp,QWORD PTR [r9+rbp*8+0x10] 167 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 168 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@150 (line 38) 169 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 170 | 2.55% ││ 0x0000000128bba66d: shl rdi,0x8 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 171 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@7 (line 38) 172 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 173 | 0.64% ││ 0x0000000128bba671: or rdi,0xff ;*lor {reexecute=0 rethrow=0 return_oop=0} 174 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@11 (line 38) 175 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 176 | 0.77% ││ 0x0000000128bba678: shl r13,0x7 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 177 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@25 (line 38) 178 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 179 | 0.54% ││ 0x0000000128bba67c: or r13,0x7f ;*lor {reexecute=0 rethrow=0 return_oop=0} 180 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@29 (line 38) 181 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 182 | 1.80% ││ 0x0000000128bba680: and rdi,r13 ;*land {reexecute=0 rethrow=0 return_oop=0} 183 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@30 (line 38) 184 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 185 | 0.70% ││ 0x0000000128bba683: shl r10,0x6 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 186 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@47 (line 38) 187 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 188 | 0.69% ││ 0x0000000128bba687: or r10,0x3f ;*lor {reexecute=0 rethrow=0 return_oop=0} 189 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@51 (line 38) 190 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 191 | 0.64% ││ 0x0000000128bba68b: and rdi,r10 ;*land {reexecute=0 rethrow=0 return_oop=0} 192 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@52 (line 38) 193 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 194 | 1.87% ││ 0x0000000128bba68e: shl r11,0x5 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 195 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@68 (line 38) 196 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 197 | 0.58% ││ 0x0000000128bba692: or r11,0x1f ;*lor {reexecute=0 rethrow=0 return_oop=0} 198 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@72 (line 38) 199 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 200 | 0.73% ││ 0x0000000128bba696: and rdi,r11 ;*land {reexecute=0 rethrow=0 return_oop=0} 201 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@73 (line 38) 202 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 203 | 0.63% ││ 0x0000000128bba699: shl rcx,0x4 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 204 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@89 (line 38) 205 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 206 | 1.77% ││ 0x0000000128bba69d: or rcx,0xf ;*lor {reexecute=0 rethrow=0 return_oop=0} 207 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@93 (line 38) 208 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 209 | 0.62% ││ 0x0000000128bba6a1: and rdi,rcx ;*land {reexecute=0 rethrow=0 return_oop=0} 210 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@94 (line 38) 211 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 212 | 0.90% ││ 0x0000000128bba6a4: shl rbx,0x3 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 213 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@110 (line 38) 214 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 215 | 0.49% ││ 0x0000000128bba6a8: or rbx,0x7 ;*lor {reexecute=0 rethrow=0 return_oop=0} 216 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@114 (line 38) 217 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 218 | 1.81% ││ 0x0000000128bba6ac: and rdi,rbx ;*land {reexecute=0 rethrow=0 return_oop=0} 219 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@115 (line 38) 220 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 221 | 0.81% ││ 0x0000000128bba6af: shl rdx,0x2 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 222 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@131 (line 38) 223 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 224 | 0.77% ││ 0x0000000128bba6b3: or rdx,0x3 ;*lor {reexecute=0 rethrow=0 return_oop=0} 225 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@135 (line 38) 226 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 227 | 0.56% ││ 0x0000000128bba6b7: and rdi,rdx ;*land {reexecute=0 rethrow=0 return_oop=0} 228 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@136 (line 38) 229 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 230 | 1.97% ││ 0x0000000128bba6ba: shl rbp,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 231 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@152 (line 38) 232 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 233 | 0.58% ││ 0x0000000128bba6bd: or rbp,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 234 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@154 (line 38) 235 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 236 | 0.72% ││ 0x0000000128bba6c1: and rdi,rbp ;*land {reexecute=0 rethrow=0 return_oop=0} 237 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@155 (line 38) 238 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 239 | 1.02% ││ 0x0000000128bba6c4: and rdi,QWORD PTR [r9+rsi*8+0x10] 240 | ││ ;*land {reexecute=0 rethrow=0 return_oop=0} 241 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@166 (line 38) 242 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 243 | 2.57% ││ 0x0000000128bba6c9: test rdi,rax 244 | ││ 0x0000000128bba6cc: jne 0x0000000128bbaa0a ;*ifne {reexecute=0 rethrow=0 return_oop=0} 245 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@183 (line 50) 246 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 247 | 2.31% ││ 0x0000000128bba6d2: mov r13,QWORD PTR [rsp+0x28] 248 | 0.30% ││ 0x0000000128bba6d7: mov ebp,DWORD PTR [rsp+0x30] 249 | 0.19% ││ 0x0000000128bba6db: mov rsi,QWORD PTR [rsp+0x20] 250 | 1.02% ││ 0x0000000128bba6e0: mov QWORD PTR [rsi+0x20],rdi ;*putfield currentMask {reexecute=0 rethrow=0 return_oop=0} 251 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@167 (line 38) 252 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 253 | 3.29% ││ 0x0000000128bba6e4: mov r10,QWORD PTR [r15+0x108] 254 | ││ ; ImmutableOopMap{rsi=Oop r9=Oop [8]=Oop [20]=NarrowOop [24]=Oop [32]=Oop } 255 | ││ ;*aload_0 {reexecute=1 rethrow=0 return_oop=0} 256 | ││ ; - (reexecute) search.algorithm.ShiftingBitMask$Processor::process@170 (line 48) 257 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 258 | 0.40% ││ 0x0000000128bba6eb: test DWORD PTR [r10],eax ; {poll} 259 | 0.72% ││ 0x0000000128bba6ee: mov r10d,ebp ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 260 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@36 (line 27) 261 | 0.92% ↘│ 0x0000000128bba6f1: mov rbx,QWORD PTR [rsp+0x40] 262 | 2.18% │ 0x0000000128bba6f6: mov ecx,DWORD PTR [rsp+0x14] 263 | 0.26% │ 0x0000000128bba6fa: mov r11d,DWORD PTR [rsp+0x38] 264 | 0.60% │ 0x0000000128bba6ff: mov rdx,QWORD PTR [rsp+0x18] 265 | 0.97% │ 0x0000000128bba704: mov ebp,r11d 266 | 2.01% │ 0x0000000128bba707: sub ebp,r10d ;*isub {reexecute=0 rethrow=0 return_oop=0} 267 | │ ; - java.nio.Buffer::nextGetIndex@8 (line 646) 268 | │ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 269 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 270 | 0.28% │ 0x0000000128bba70a: cmp ebp,0x8 271 | ╰ 0x0000000128bba70d: jge 0x0000000128bba570 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 272 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@42 (line 27) 273 | 0x0000000128bba713: mov rsi,QWORD PTR [rsp+0x20] 274 | 0x0000000128bba718: cmp r11d,r10d 275 | 0x0000000128bba71b: jg 0x0000000128bba739 ;*ifeq {reexecute=0 rethrow=0 return_oop=0} 276 | ; - search.algorithm.SearchProcessor::indexOf@4 (line 15) 277 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@72 (line 33) 278 | .................................................................................................... 279 | -------------------------------------------------------------------------------- /results/aho-corasic_assembly.txt: -------------------------------------------------------------------------------- 1 | ============================= C2-compiled nmethod ============================== 2 | ----------------------------------- Assembly ----------------------------------- 3 | Compiled method (c2) 904 771 4 benchmark.SearchBenchmark::ahoCorasic (26 bytes) 4 | total in heap [0x00000001166c0310,0x00000001166c0d88] = 2680 5 | relocation [0x00000001166c0470,0x00000001166c0490] = 32 6 | main code [0x00000001166c04a0,0x00000001166c0760] = 704 7 | stub code [0x00000001166c0760,0x00000001166c0778] = 24 8 | oops [0x00000001166c0778,0x00000001166c0790] = 24 9 | metadata [0x00000001166c0790,0x00000001166c07f8] = 104 10 | scopes data [0x00000001166c07f8,0x00000001166c09e0] = 488 11 | scopes pcs [0x00000001166c09e0,0x00000001166c0d60] = 896 12 | dependencies [0x00000001166c0d60,0x00000001166c0d68] = 8 13 | nul chk table [0x00000001166c0d68,0x00000001166c0d88] = 32 14 | -------------------------------------------------------------------------------- 15 | [Constant Pool (empty)] 16 | -------------------------------------------------------------------------------- 17 | [Entry Point] 18 | # {method} {0x0000000128d44b68} 'ahoCorasic' '()I' in 'benchmark/SearchBenchmark' 19 | # [sp+0x40] (sp of caller) 20 | 0x00000001166c04a0: mov 0x8(%rsi),%r10d 21 | 0x00000001166c04a4: shl $0x3,%r10 22 | 0x00000001166c04a8: movabs $0x800000000,%r12 23 | 0x00000001166c04b2: add %r12,%r10 24 | 0x00000001166c04b5: xor %r12,%r12 25 | 0x00000001166c04b8: cmp %r10,%rax 26 | 0x00000001166c04bb: jne 0x000000010ec00d00 ; {runtime_call ic_miss_stub} 27 | 0x00000001166c04c1: data16 xchg %ax,%ax 28 | 0x00000001166c04c4: nopl 0x0(%rax,%rax,1) 29 | 0x00000001166c04cc: data16 data16 xchg %ax,%ax 30 | [Verified Entry Point] 31 | 0x00000001166c04d0: mov %eax,-0x14000(%rsp) 32 | 0x00000001166c04d7: push %rbp 33 | 0x00000001166c04d8: sub $0x30,%rsp ;*synchronization entry 34 | ; - benchmark.SearchBenchmark::ahoCorasic@-1 (line 60) 35 | 0x00000001166c04dc: mov 0x28(%rsi),%r8d ;*getfield ahoCorasicContext {reexecute=0 rethrow=0 return_oop=0} 36 | ; - benchmark.SearchBenchmark::ahoCorasicContext@1 (line 33) 37 | ; - benchmark.SearchBenchmark::ahoCorasic@8 (line 60) 38 | 0x00000001166c04e0: mov 0x8(%r12,%r8,8),%r11d ; implicit exception: dispatches to 0x00000001166c072f 39 | 0x00000001166c04e5: mov 0x1c(%rsi),%edi ;*getfield haystackBytes {reexecute=0 rethrow=0 return_oop=0} 40 | ; - benchmark.SearchBenchmark::haystackBytes@1 (line 31) 41 | ; - benchmark.SearchBenchmark::ahoCorasic@4 (line 60) 42 | 0x00000001166c04e8: cmp $0x180def,%r11d ; {metadata('search/algorithm/AhoCorasic$Context')} 43 | 0x00000001166c04ef: jne 0x00000001166c070e ;*invokeinterface newProcessor {reexecute=0 rethrow=0 return_oop=0} 44 | ; - benchmark.SearchBenchmark::ahoCorasic@11 (line 60) 45 | 0x00000001166c04f5: mov 0xc(%r12,%rdi,8),%eax ; implicit exception: dispatches to 0x00000001166c073e 46 | ;*arraylength {reexecute=0 rethrow=0 return_oop=0} 47 | ; - search.engine.SearchEngine$::indexOfImpl@19 (line 31) 48 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 49 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 50 | 0x00000001166c04fa: test %eax,%eax 51 | 0x00000001166c04fc: jbe 0x00000001166c067f ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0} 52 | ; - search.engine.SearchEngine$::indexOfImpl@20 (line 31) 53 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 54 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 55 | 0x00000001166c0502: lea (%r12,%r8,8),%r10 ;*invokeinterface newProcessor {reexecute=0 rethrow=0 return_oop=0} 56 | ; - benchmark.SearchBenchmark::ahoCorasic@11 (line 60) 57 | 0x00000001166c0506: mov 0xc(%r10),%ebx ;*getfield jumpTable {reexecute=0 rethrow=0 return_oop=0} 58 | ; - search.algorithm.AhoCorasic$Context::newProcessor@5 (line 48) 59 | ; - search.algorithm.AhoCorasic$Context::newProcessor@1 (line 43) 60 | ; - benchmark.SearchBenchmark::ahoCorasic@11 (line 60) 61 | 0x00000001166c050a: mov 0x14(%r10),%edx ;*getfield needleLengths {reexecute=0 rethrow=0 return_oop=0} 62 | ; - search.algorithm.AhoCorasic$Context::newProcessor@13 (line 48) 63 | ; - search.algorithm.AhoCorasic$Context::newProcessor@1 (line 43) 64 | ; - benchmark.SearchBenchmark::ahoCorasic@11 (line 60) 65 | 0x00000001166c050e: mov 0x10(%r10),%r10d ;*getfield matchFor {reexecute=0 rethrow=0 return_oop=0} 66 | ; - search.algorithm.AhoCorasic$Context::newProcessor@9 (line 48) 67 | ; - search.algorithm.AhoCorasic$Context::newProcessor@1 (line 43) 68 | ; - benchmark.SearchBenchmark::ahoCorasic@11 (line 60) 69 | 0x00000001166c0512: vmovd %r10d,%xmm1 70 | 0x00000001166c0517: mov %eax,%r10d 71 | 0x00000001166c051a: dec %r10d 72 | 0x00000001166c051d: cmp %eax,%r10d 73 | 0x00000001166c0520: jae 0x00000001166c06ea 74 | 0x00000001166c0526: mov 0xc(%r12,%rbx,8),%esi ; implicit exception: dispatches to 0x00000001166c06ea 75 | ;*iaload {reexecute=0 rethrow=0 return_oop=0} 76 | ; - search.algorithm.AhoCorasic$Processor::process@14 (line 22) 77 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 78 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 79 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 80 | 0x00000001166c052b: movzbl 0x10(%r12,%rdi,8),%r9d ;*iand {reexecute=0 rethrow=0 return_oop=0} 81 | ; - java.lang.Byte::toUnsignedInt@4 (line 523) 82 | ; - search.algorithm.AhoCorasic$Processor::process@10 (line 22) 83 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 84 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 85 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 86 | 0x00000001166c0531: xor %ecx,%ecx 87 | 0x00000001166c0533: cmp %esi,%r9d 88 | 0x00000001166c0536: jae 0x00000001166c070a 89 | 0x00000001166c053c: lea (%r12,%rbx,8),%r8 90 | 0x00000001166c0540: mov 0x10(%r8,%r9,4),%ebp ;*iaload {reexecute=0 rethrow=0 return_oop=0} 91 | ; - search.algorithm.AhoCorasic$Processor::process@14 (line 22) 92 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 93 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 94 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 95 | 0x00000001166c0545: test %ebp,%ebp 96 | 0x00000001166c0547: jl 0x00000001166c06c9 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 97 | ; - search.algorithm.AhoCorasic$Processor::process@23 (line 23) 98 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 99 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 100 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 101 | 0x00000001166c054d: mov %eax,%r14d 102 | 0x00000001166c0550: add $0xfffffffd,%r14d 103 | 0x00000001166c0554: lea (%r12,%rdi,8),%r13 ;*getfield haystackBytes {reexecute=0 rethrow=0 return_oop=0} 104 | ; - benchmark.SearchBenchmark::haystackBytes@1 (line 31) 105 | ; - benchmark.SearchBenchmark::ahoCorasic@4 (line 60) 106 | 0x00000001166c0558: mov $0x80000000,%r9d 107 | 0x00000001166c055e: cmp %r14d,%r10d 108 | 0x00000001166c0561: cmovl %r9d,%r14d 109 | 0x00000001166c0565: mov $0x1,%r10d 110 | 0x00000001166c056b: cmp $0x1,%r14d 111 | 0x00000001166c056f: jle 0x00000001166c0650 ;*goto {reexecute=0 rethrow=0 return_oop=0} 112 | ; - search.engine.SearchEngine$::indexOfImpl@45 (line 31) 113 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 114 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 115 | 0x00000001166c0575: jmp 0x00000001166c057b 116 | 0x00000001166c0577: vmovd %xmm0,%edx 117 | 0x00000001166c057b: mov %r14d,%r11d 118 | 0x00000001166c057e: sub %r10d,%r11d 119 | 0x00000001166c0581: mov $0xfa0,%r9d 120 | 0x00000001166c0587: cmp %r9d,%r11d 121 | 0x00000001166c058a: cmovg %r9d,%r11d 122 | 0x00000001166c058e: add %r10d,%r11d 123 | 0x00000001166c0591: vmovd %edx,%xmm0 124 | 0x00000001166c0595: data16 data16 nopw 0x0(%rax,%rax,1) ;*getfield currentPosition {reexecute=0 rethrow=0 return_oop=0} 125 | ; - search.algorithm.AhoCorasic$Processor::process@6 (line 22) 126 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 127 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 128 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 129 | 0x00000001166c05a0: movslq %r10d,%rdx ;*baload {reexecute=0 rethrow=0 return_oop=0} 130 | ; - search.engine.SearchEngine$::indexOfImpl@27 (line 32) 131 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 132 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 133 | 0x00000001166c05a3: movzbl 0x10(%r13,%rdx,1),%r9d 134 | 0x00000001166c05a9: or %ebp,%r9d ;*ior {reexecute=0 rethrow=0 return_oop=0} 135 | ; - search.algorithm.AhoCorasic$Processor::process@13 (line 22) 136 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 137 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 138 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 139 | 0x00000001166c05ac: cmp %esi,%r9d 140 | 0x00000001166c05af: jae 0x00000001166c0694 141 | 0x00000001166c05b5: mov 0x10(%r8,%r9,4),%ebp ;*iaload {reexecute=0 rethrow=0 return_oop=0} 142 | ; - search.algorithm.AhoCorasic$Processor::process@14 (line 22) 143 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 144 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 145 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 146 | 0x00000001166c05ba: test %ebp,%ebp 147 | 0x00000001166c05bc: jl 0x00000001166c06c2 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 148 | ; - search.algorithm.AhoCorasic$Processor::process@23 (line 23) 149 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 150 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 151 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 152 | 0x00000001166c05c2: movzbl 0x11(%r13,%rdx,1),%r9d 153 | 0x00000001166c05c8: or %ebp,%r9d ;*ior {reexecute=0 rethrow=0 return_oop=0} 154 | ; - search.algorithm.AhoCorasic$Processor::process@13 (line 22) 155 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 156 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 157 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 158 | 0x00000001166c05cb: mov %r10d,%ecx 159 | 0x00000001166c05ce: inc %ecx ;*iadd {reexecute=0 rethrow=0 return_oop=0} 160 | ; - search.engine.SearchEngine$::indexOfImpl@42 (line 33) 161 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 162 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 163 | 0x00000001166c05d0: cmp %esi,%r9d 164 | 0x00000001166c05d3: jae 0x00000001166c0697 165 | 0x00000001166c05d9: mov 0x10(%r8,%r9,4),%ebp ;*iaload {reexecute=0 rethrow=0 return_oop=0} 166 | ; - search.algorithm.AhoCorasic$Processor::process@14 (line 22) 167 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 168 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 169 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 170 | 0x00000001166c05de: test %ebp,%ebp 171 | 0x00000001166c05e0: jl 0x00000001166c06c5 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 172 | ; - search.algorithm.AhoCorasic$Processor::process@23 (line 23) 173 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 174 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 175 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 176 | 0x00000001166c05e6: movzbl 0x12(%r13,%rdx,1),%r9d 177 | 0x00000001166c05ec: or %ebp,%r9d ;*ior {reexecute=0 rethrow=0 return_oop=0} 178 | ; - search.algorithm.AhoCorasic$Processor::process@13 (line 22) 179 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 180 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 181 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 182 | 0x00000001166c05ef: mov %r10d,%ecx 183 | 0x00000001166c05f2: add $0x2,%ecx ;*iadd {reexecute=0 rethrow=0 return_oop=0} 184 | ; - search.engine.SearchEngine$::indexOfImpl@42 (line 33) 185 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 186 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 187 | 0x00000001166c05f5: cmp %esi,%r9d 188 | 0x00000001166c05f8: jae 0x00000001166c0697 189 | 0x00000001166c05fe: mov 0x10(%r8,%r9,4),%ebp ;*iaload {reexecute=0 rethrow=0 return_oop=0} 190 | ; - search.algorithm.AhoCorasic$Processor::process@14 (line 22) 191 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 192 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 193 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 194 | 0x00000001166c0603: test %ebp,%ebp 195 | 0x00000001166c0605: jl 0x00000001166c06c5 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 196 | ; - search.algorithm.AhoCorasic$Processor::process@23 (line 23) 197 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 198 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 199 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 200 | 0x00000001166c060b: movzbl 0x13(%r13,%rdx,1),%r9d 201 | 0x00000001166c0611: or %ebp,%r9d ;*ior {reexecute=0 rethrow=0 return_oop=0} 202 | ; - search.algorithm.AhoCorasic$Processor::process@13 (line 22) 203 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 204 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 205 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 206 | 0x00000001166c0614: mov %r10d,%ecx 207 | 0x00000001166c0617: add $0x3,%ecx ;*iadd {reexecute=0 rethrow=0 return_oop=0} 208 | ; - search.engine.SearchEngine$::indexOfImpl@42 (line 33) 209 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 210 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 211 | 0x00000001166c061a: cmp %esi,%r9d 212 | 0x00000001166c061d: jae 0x00000001166c0697 213 | 0x00000001166c061f: mov 0x10(%r8,%r9,4),%ebp ;*iaload {reexecute=0 rethrow=0 return_oop=0} 214 | ; - search.algorithm.AhoCorasic$Processor::process@14 (line 22) 215 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 216 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 217 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 218 | 0x00000001166c0624: test %ebp,%ebp 219 | 0x00000001166c0626: jl 0x00000001166c06c5 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 220 | ; - search.algorithm.AhoCorasic$Processor::process@23 (line 23) 221 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 222 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 223 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 224 | 0x00000001166c062c: add $0x4,%r10d ;*iadd {reexecute=0 rethrow=0 return_oop=0} 225 | ; - search.engine.SearchEngine$::indexOfImpl@42 (line 33) 226 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 227 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 228 | 0x00000001166c0630: cmp %r11d,%r10d 229 | 0x00000001166c0633: jl 0x00000001166c05a0 ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0} 230 | ; - search.engine.SearchEngine$::indexOfImpl@20 (line 31) 231 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 232 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 233 | 0x00000001166c0639: mov 0x108(%r15),%r11 ; ImmutableOopMap {r8=Oop rbx=NarrowOop rdi=NarrowOop r13=Oop xmm0=NarrowOop xmm1=NarrowOop } 234 | ;*goto {reexecute=1 rethrow=0 return_oop=0} 235 | ; - (reexecute) search.engine.SearchEngine$::indexOfImpl@45 (line 31) 236 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 237 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 238 | 0x00000001166c0640: test %eax,(%r11) ;*goto {reexecute=0 rethrow=0 return_oop=0} 239 | ; - search.engine.SearchEngine$::indexOfImpl@45 (line 31) 240 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 241 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 242 | ; {poll} 243 | 0x00000001166c0643: cmp %r14d,%r10d 244 | 0x00000001166c0646: jl 0x00000001166c0577 245 | 0x00000001166c064c: vmovd %xmm0,%edx 246 | 0x00000001166c0650: cmp %eax,%r10d 247 | 0x00000001166c0653: jge 0x00000001166c067f 248 | 0x00000001166c0655: data16 xchg %ax,%ax ;*getfield currentPosition {reexecute=0 rethrow=0 return_oop=0} 249 | ; - search.algorithm.AhoCorasic$Processor::process@6 (line 22) 250 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 251 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 252 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 253 | 0x00000001166c0658: movzbl 0x10(%r13,%r10,1),%r9d 254 | 0x00000001166c065e: or %ebp,%r9d ;*ior {reexecute=0 rethrow=0 return_oop=0} 255 | ; - search.algorithm.AhoCorasic$Processor::process@13 (line 22) 256 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 257 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 258 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 259 | 0x00000001166c0661: cmp %esi,%r9d 260 | 0x00000001166c0664: jae 0x00000001166c0722 261 | 0x00000001166c066a: mov 0x10(%r8,%r9,4),%ebp ;*iaload {reexecute=0 rethrow=0 return_oop=0} 262 | ; - search.algorithm.AhoCorasic$Processor::process@14 (line 22) 263 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 264 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 265 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 266 | 0x00000001166c066f: test %ebp,%ebp 267 | 0x00000001166c0671: jl 0x00000001166c072a ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 268 | ; - search.algorithm.AhoCorasic$Processor::process@23 (line 23) 269 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 270 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 271 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 272 | 0x00000001166c0677: inc %r10d ;*iadd {reexecute=0 rethrow=0 return_oop=0} 273 | ; - search.engine.SearchEngine$::indexOfImpl@42 (line 33) 274 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 275 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 276 | 0x00000001166c067a: cmp %eax,%r10d 277 | 0x00000001166c067d: jl 0x00000001166c0658 ;*iconst_m1 {reexecute=0 rethrow=0 return_oop=0} 278 | ; - search.engine.SearchEngine$::indexOfImpl@48 (line 36) 279 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 280 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 281 | 0x00000001166c067f: mov $0xffffffff,%eax 282 | 0x00000001166c0684: add $0x30,%rsp 283 | 0x00000001166c0688: pop %rbp 284 | 0x00000001166c0689: mov 0x108(%r15),%r10 285 | 0x00000001166c0690: test %eax,(%r10) ; {poll_return} 286 | 0x00000001166c0693: retq 287 | 0x00000001166c0694: mov %r10d,%ecx 288 | 0x00000001166c0697: vmovd %xmm0,%edx 289 | 0x00000001166c069b: mov $0xffffffe4,%esi 290 | 0x00000001166c06a0: mov %ecx,(%rsp) 291 | 0x00000001166c06a3: mov %r9d,0x4(%rsp) 292 | 0x00000001166c06a8: mov %edi,0x8(%rsp) 293 | 0x00000001166c06ac: mov %ebx,0x10(%rsp) 294 | 0x00000001166c06b0: mov %edx,0x14(%rsp) 295 | 0x00000001166c06b4: vmovss %xmm1,0x18(%rsp) 296 | 0x00000001166c06ba: nop 297 | 0x00000001166c06bb: callq 0x000000010ebfed80 ; ImmutableOopMap {[8]=NarrowOop [16]=NarrowOop [20]=NarrowOop [24]=NarrowOop } 298 | ;*iaload {reexecute=0 rethrow=0 return_oop=0} 299 | ; - search.algorithm.AhoCorasic$Processor::process@14 (line 22) 300 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 301 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 302 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 303 | ; {runtime_call UncommonTrapBlob} 304 | 0x00000001166c06c0: ud2 ;*iaload {reexecute=0 rethrow=0 return_oop=0} 305 | ; - search.algorithm.AhoCorasic$Processor::process@14 (line 22) 306 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 307 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 308 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 309 | 0x00000001166c06c2: mov %r10d,%ecx 310 | 0x00000001166c06c5: vmovd %xmm0,%edx 311 | 0x00000001166c06c9: mov $0xffffff45,%esi 312 | 0x00000001166c06ce: mov %ecx,(%rsp) 313 | 0x00000001166c06d1: mov %edi,0x8(%rsp) 314 | 0x00000001166c06d5: mov %ebx,0xc(%rsp) 315 | 0x00000001166c06d9: mov %edx,0x10(%rsp) 316 | 0x00000001166c06dd: vmovss %xmm1,0x14(%rsp) 317 | 0x00000001166c06e3: callq 0x000000010ebfed80 ; ImmutableOopMap {[8]=NarrowOop [12]=NarrowOop [16]=NarrowOop [20]=NarrowOop } 318 | ;*if_icmplt {reexecute=1 rethrow=0 return_oop=0} 319 | ; - (reexecute) search.algorithm.AhoCorasic$Processor::process@23 (line 23) 320 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 321 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 322 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 323 | ; {runtime_call UncommonTrapBlob} 324 | 0x00000001166c06e8: ud2 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 325 | ; - search.algorithm.AhoCorasic$Processor::process@23 (line 23) 326 | ; - search.engine.SearchEngine$::indexOfImpl@28 (line 32) 327 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 328 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 329 | 0x00000001166c06ea: mov $0xffffff76,%esi 330 | 0x00000001166c06ef: mov %edi,%ebp 331 | 0x00000001166c06f1: mov %eax,(%rsp) 332 | 0x00000001166c06f4: mov %ebx,0x4(%rsp) 333 | 0x00000001166c06f8: mov %edx,0x8(%rsp) 334 | 0x00000001166c06fc: vmovss %xmm1,0xc(%rsp) 335 | 0x00000001166c0702: nop 336 | 0x00000001166c0703: callq 0x000000010ebfed80 ; ImmutableOopMap {rbp=NarrowOop [4]=NarrowOop [8]=NarrowOop [12]=NarrowOop } 337 | ;*if_icmpge {reexecute=1 rethrow=0 return_oop=0} 338 | ; - (reexecute) search.engine.SearchEngine$::indexOfImpl@20 (line 31) 339 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 340 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 341 | ; {runtime_call UncommonTrapBlob} 342 | 0x00000001166c0708: ud2 ;*if_icmpge {reexecute=0 rethrow=0 return_oop=0} 343 | ; - search.engine.SearchEngine$::indexOfImpl@20 (line 31) 344 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 345 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 346 | 0x00000001166c070a: xor %ebp,%ebp 347 | 0x00000001166c070c: jmp 0x00000001166c069b 348 | 0x00000001166c070e: mov $0xffffffde,%esi 349 | 0x00000001166c0713: mov %edi,%ebp 350 | 0x00000001166c0715: mov %r8d,(%rsp) 351 | 0x00000001166c0719: xchg %ax,%ax 352 | 0x00000001166c071b: callq 0x000000010ebfed80 ; ImmutableOopMap {rbp=NarrowOop [0]=NarrowOop } 353 | ;*invokeinterface newProcessor {reexecute=0 rethrow=0 return_oop=0} 354 | ; - benchmark.SearchBenchmark::ahoCorasic@11 (line 60) 355 | ; {runtime_call UncommonTrapBlob} 356 | 0x00000001166c0720: ud2 357 | 0x00000001166c0722: mov %r10d,%ecx 358 | 0x00000001166c0725: jmpq 0x00000001166c069b 359 | 0x00000001166c072a: mov %r10d,%ecx 360 | 0x00000001166c072d: jmp 0x00000001166c06c9 361 | 0x00000001166c072f: mov $0xfffffff6,%esi 362 | 0x00000001166c0734: data16 xchg %ax,%ax 363 | 0x00000001166c0737: callq 0x000000010ebfed80 ; ImmutableOopMap {} 364 | ;*invokeinterface newProcessor {reexecute=0 rethrow=0 return_oop=0} 365 | ; - benchmark.SearchBenchmark::ahoCorasic@11 (line 60) 366 | ; {runtime_call UncommonTrapBlob} 367 | 0x00000001166c073c: ud2 ;*invokeinterface newProcessor {reexecute=0 rethrow=0 return_oop=0} 368 | ; - benchmark.SearchBenchmark::ahoCorasic@11 (line 60) 369 | 0x00000001166c073e: mov $0xfffffff6,%esi 370 | 0x00000001166c0743: callq 0x000000010ebfed80 ; ImmutableOopMap {} 371 | ;*arraylength {reexecute=0 rethrow=0 return_oop=0} 372 | ; - search.engine.SearchEngine$::indexOfImpl@19 (line 31) 373 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 374 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 375 | ; {runtime_call UncommonTrapBlob} 376 | 0x00000001166c0748: ud2 ;*arraylength {reexecute=0 rethrow=0 return_oop=0} 377 | ; - search.engine.SearchEngine$::indexOfImpl@19 (line 31) 378 | ; - search.engine.SearchEngine$::indexOf@4 (line 11) 379 | ; - benchmark.SearchBenchmark::ahoCorasic@22 (line 60) 380 | 0x00000001166c074a: hlt 381 | 0x00000001166c074b: hlt 382 | 0x00000001166c074c: hlt 383 | 0x00000001166c074d: hlt 384 | 0x00000001166c074e: hlt 385 | 0x00000001166c074f: hlt 386 | 0x00000001166c0750: hlt 387 | 0x00000001166c0751: hlt 388 | 0x00000001166c0752: hlt 389 | 0x00000001166c0753: hlt 390 | 0x00000001166c0754: hlt 391 | 0x00000001166c0755: hlt 392 | 0x00000001166c0756: hlt 393 | 0x00000001166c0757: hlt 394 | 0x00000001166c0758: hlt 395 | 0x00000001166c0759: hlt 396 | 0x00000001166c075a: hlt 397 | 0x00000001166c075b: hlt 398 | 0x00000001166c075c: hlt 399 | 0x00000001166c075d: hlt 400 | 0x00000001166c075e: hlt 401 | 0x00000001166c075f: hlt 402 | [Exception Handler] 403 | 0x00000001166c0760: jmpq 0x000000010ecac280 ; {no_reloc} 404 | [Deopt Handler Code] 405 | 0x00000001166c0765: callq 0x00000001166c076a 406 | 0x00000001166c076a: subq $0x5,(%rsp) 407 | 0x00000001166c076f: jmpq 0x000000010ebff0a0 ; {runtime_call DeoptimizationBlob} 408 | 0x00000001166c0774: hlt 409 | 0x00000001166c0775: hlt 410 | 0x00000001166c0776: hlt 411 | 0x00000001166c0777: hlt 412 | -------------------------------------------------------------------------------- 413 | -------------------------------------------------------------------------------- /results/unrolling-step-1_assembly.txt: -------------------------------------------------------------------------------- 1 | ....[Hottest Region 1].............................................................................. 2 | jvmci, level 4, search.algorithm.UnrolledSearchProcessor::indexOf, version 845 (496 bytes) 3 | 0x000000011ed1afb2: mov rdi,r11 4 | 0x000000011ed1afb5: mov r10d,r9d 5 | 0x000000011ed1afb8: mov rbx,QWORD PTR [rsp+0x40] 6 | 0x000000011ed1afbd: mov ecx,DWORD PTR [rsp+0x14] 7 | 0x000000011ed1afc1: mov r9d,DWORD PTR [rsp+0x34] 8 | ╭ 0x000000011ed1afc6: jmp 0x000000011ed1b1b0 ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 9 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@36 (line 27) 10 | │ 0x000000011ed1afcb: nop DWORD PTR [rax+rax*1+0x0] 11 | │ ;*ireturn {reexecute=0 rethrow=0 return_oop=0} 12 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@75 (line 33) 13 | 0.06% │↗ 0x000000011ed1afd0: lea ebp,[r10+0x8] ;*iadd {reexecute=0 rethrow=0 return_oop=0} 14 | ││ ; - java.nio.Buffer::nextGetIndex@32 (line 649) 15 | ││ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 16 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 17 | 0.01% ││ 0x000000011ed1afd4: mov DWORD PTR [rdx+0x18],ebp ;*putfield position {reexecute=0 rethrow=0 return_oop=0} 18 | ││ ; - java.nio.Buffer::nextGetIndex@33 (line 649) 19 | ││ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 20 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 21 | 2.51% ││ 0x000000011ed1afd7: movsxd r13,r10d ;*i2l {reexecute=0 rethrow=0 return_oop=0} 22 | ││ ; - java.nio.HeapByteBuffer::getLong@14 (line 439) 23 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 24 | 0.36% ││ 0x000000011ed1afda: add r13,rbx ;*ladd {reexecute=0 rethrow=0 return_oop=0} 25 | ││ ; - java.nio.HeapByteBuffer::byteOffset@5 (line 157) 26 | ││ ; - java.nio.HeapByteBuffer::getLong@15 (line 439) 27 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 28 | 0.03% ││ 0x000000011ed1afdd: mov r13,QWORD PTR [r13+rcx*8+0x0] 29 | ││ ;* unwind (locked if synchronized) 30 | ││ ; - jdk.internal.misc.Unsafe::getLongUnaligned@-3 31 | ││ ; - jdk.internal.misc.Unsafe::getLongUnaligned@5 (line 3432) 32 | ││ ; - java.nio.HeapByteBuffer::getLong@22 (line 439) 33 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 34 | 0.38% ││ 0x000000011ed1afe2: mov r14,r13 35 | 2.65% ││ 0x000000011ed1afe5: and r14,0xff ;*land {reexecute=0 rethrow=0 return_oop=0} 36 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@17 (line 35) 37 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 38 | 0.38% ││ 0x000000011ed1afec: mov DWORD PTR [rsp+0x34],r10d 39 | 0.06% ││ 0x000000011ed1aff1: mov r10d,r14d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 40 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@18 (line 35) 41 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 42 | 0.01% ││ 0x000000011ed1aff4: cmp r9d,r10d 43 | ││ 0x000000011ed1aff7: jbe 0x000000011ed1b418 ;*laload {reexecute=0 rethrow=0 return_oop=0} 44 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@19 (line 35) 45 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 46 | 2.73% ││ 0x000000011ed1affd: mov r10,r13 47 | 0.31% ││ 0x000000011ed1b000: shr r10,0x8 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 48 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@50 (line 38) 49 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 50 | 0.07% ││ 0x000000011ed1b004: mov r10d,r10d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 51 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@51 (line 38) 52 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 53 | 0.01% ││ 0x000000011ed1b007: and r10d,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 54 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@55 (line 38) 55 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 56 | 2.31% ││ 0x000000011ed1b00e: cmp r9d,r10d 57 | ││ 0x000000011ed1b011: jbe 0x000000011ed1b3f1 ;*laload {reexecute=0 rethrow=0 return_oop=0} 58 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@56 (line 38) 59 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 60 | 0.41% ││ 0x000000011ed1b017: mov r11,r13 61 | 0.03% ││ 0x000000011ed1b01a: shr r11,0x10 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 62 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@91 (line 41) 63 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 64 | 0.02% ││ 0x000000011ed1b01e: mov r11d,r11d ;*l2i {reexecute=0 rethrow=0 return_oop=0} 65 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@92 (line 41) 66 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 67 | 2.46% ││ 0x000000011ed1b021: and r11d,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 68 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@96 (line 41) 69 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 70 | 0.39% ││ 0x000000011ed1b028: cmp r9d,r11d 71 | ││ 0x000000011ed1b02b: jbe 0x000000011ed1b3e4 ;*laload {reexecute=0 rethrow=0 return_oop=0} 72 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@97 (line 41) 73 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 74 | 0.05% ││ 0x000000011ed1b031: mov rcx,r13 75 | 0.01% ││ 0x000000011ed1b034: shr rcx,0x18 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 76 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@132 (line 44) 77 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 78 | 2.72% ││ 0x000000011ed1b038: mov ecx,ecx ;*l2i {reexecute=0 rethrow=0 return_oop=0} 79 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@133 (line 44) 80 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 81 | 0.37% ││ 0x000000011ed1b03a: and ecx,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 82 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@137 (line 44) 83 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 84 | 0.08% ││ 0x000000011ed1b040: cmp r9d,ecx 85 | ││ 0x000000011ed1b043: jbe 0x000000011ed1b3d7 ;*laload {reexecute=0 rethrow=0 return_oop=0} 86 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@138 (line 44) 87 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 88 | 0.02% ││ 0x000000011ed1b049: mov rbx,r13 89 | 2.53% ││ 0x000000011ed1b04c: shr rbx,0x20 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 90 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@173 (line 47) 91 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 92 | 0.35% ││ 0x000000011ed1b050: mov ebx,ebx ;*l2i {reexecute=0 rethrow=0 return_oop=0} 93 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@174 (line 47) 94 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 95 | 0.06% ││ 0x000000011ed1b052: and ebx,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 96 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@178 (line 47) 97 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 98 | 0.02% ││ 0x000000011ed1b058: cmp r9d,ebx 99 | ││ 0x000000011ed1b05b: jbe 0x000000011ed1b3ca ;*laload {reexecute=0 rethrow=0 return_oop=0} 100 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@179 (line 47) 101 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 102 | 2.47% ││ 0x000000011ed1b061: mov rdx,r13 103 | 0.36% ││ 0x000000011ed1b064: shr rdx,0x28 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 104 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@214 (line 50) 105 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 106 | 0.06% ││ 0x000000011ed1b068: mov edx,edx ;*l2i {reexecute=0 rethrow=0 return_oop=0} 107 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@215 (line 50) 108 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 109 | 0.03% ││ 0x000000011ed1b06a: and edx,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 110 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@219 (line 50) 111 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 112 | 2.56% ││ 0x000000011ed1b070: cmp r9d,edx 113 | ││ 0x000000011ed1b073: jbe 0x000000011ed1b3b8 ;*laload {reexecute=0 rethrow=0 return_oop=0} 114 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@220 (line 50) 115 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 116 | 0.33% ││ 0x000000011ed1b079: mov DWORD PTR [rsp+0x30],ebp 117 | 0.06% ││ 0x000000011ed1b07d: mov rbp,r13 118 | 0.01% ││ 0x000000011ed1b080: shr rbp,0x30 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 119 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@255 (line 53) 120 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 121 | 2.68% ││ 0x000000011ed1b084: mov ebp,ebp ;*l2i {reexecute=0 rethrow=0 return_oop=0} 122 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@256 (line 53) 123 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 124 | 0.37% ││ 0x000000011ed1b086: and ebp,0xff ;*iand {reexecute=0 rethrow=0 return_oop=0} 125 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@260 (line 53) 126 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 127 | 0.07% ││ 0x000000011ed1b08c: cmp r9d,ebp 128 | ││ 0x000000011ed1b08f: jbe 0x000000011ed1b3a6 ;*laload {reexecute=0 rethrow=0 return_oop=0} 129 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@261 (line 53) 130 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 131 | 0.02% ││ 0x000000011ed1b095: mov rsi,r13 132 | 2.63% ││ 0x000000011ed1b098: shr rsi,0x38 ;*lushr {reexecute=0 rethrow=0 return_oop=0} 133 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@296 (line 56) 134 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 135 | 0.37% ││ 0x000000011ed1b09c: mov QWORD PTR [rsp+0x28],r13 136 | 0.09% ││ 0x000000011ed1b0a1: mov r13d,esi ;*l2i {reexecute=0 rethrow=0 return_oop=0} 137 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@297 (line 56) 138 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 139 | 0.01% ││ 0x000000011ed1b0a4: cmp r9d,r13d 140 | ││ 0x000000011ed1b0a7: jbe 0x000000011ed1b379 ;*laload {reexecute=0 rethrow=0 return_oop=0} 141 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@298 (line 56) 142 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 143 | 2.52% ││ 0x000000011ed1b0ad: mov r13,QWORD PTR [rax+r14*8+0x10] 144 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 145 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@19 (line 35) 146 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 147 | 0.35% ││ 0x000000011ed1b0b2: mov r10,QWORD PTR [rax+r10*8+0x10] 148 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 149 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@56 (line 38) 150 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 151 | 0.05% ││ 0x000000011ed1b0b7: mov r11,QWORD PTR [rax+r11*8+0x10] 152 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 153 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@97 (line 41) 154 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 155 | 0.03% ││ 0x000000011ed1b0bc: mov rcx,QWORD PTR [rax+rcx*8+0x10] 156 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 157 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@138 (line 44) 158 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 159 | 2.72% ││ 0x000000011ed1b0c1: mov rbx,QWORD PTR [rax+rbx*8+0x10] 160 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 161 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@179 (line 47) 162 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 163 | 0.44% ││ 0x000000011ed1b0c6: mov rdx,QWORD PTR [rax+rdx*8+0x10] 164 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 165 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@220 (line 50) 166 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 167 | 0.09% ││ 0x000000011ed1b0cb: mov rbp,QWORD PTR [rax+rbp*8+0x10] 168 | ││ ;*laload {reexecute=0 rethrow=0 return_oop=0} 169 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@261 (line 53) 170 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 171 | 0.06% ││ 0x000000011ed1b0d0: shl rdi,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 172 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@6 (line 35) 173 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 174 | 2.28% ││ 0x000000011ed1b0d3: or rdi,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 175 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@8 (line 35) 176 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 177 | 0.28% ││ 0x000000011ed1b0d7: and rdi,r13 ;*land {reexecute=0 rethrow=0 return_oop=0} 178 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@20 (line 35) 179 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 180 | 0.06% ││ 0x000000011ed1b0da: mov r13,rdi 181 | 0.04% ││ 0x000000011ed1b0dd: and r13,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 182 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@32 (line 36) 183 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 184 | 2.62% ││ 0x000000011ed1b0e0: shl r13,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 185 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@63 (line 39) 186 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 187 | 0.38% ││ 0x000000011ed1b0e3: shl rdi,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 188 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@40 (line 38) 189 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 190 | 0.06% ││ 0x000000011ed1b0e6: or rdi,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 191 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@42 (line 38) 192 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 193 | 0.05% ││ 0x000000011ed1b0ea: and rdi,r10 ;*land {reexecute=0 rethrow=0 return_oop=0} 194 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@57 (line 38) 195 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 196 | 2.52% ││ 0x000000011ed1b0ed: mov r10,rdi 197 | 0.28% ││ 0x000000011ed1b0f0: and r10,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 198 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@72 (line 39) 199 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 200 | 0.05% ││ 0x000000011ed1b0f3: or r13,r10 ;*lor {reexecute=0 rethrow=0 return_oop=0} 201 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@73 (line 39) 202 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 203 | 0.05% ││ 0x000000011ed1b0f6: shl r13,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 204 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@104 (line 42) 205 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 206 | 2.54% ││ 0x000000011ed1b0f9: shl rdi,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 207 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@81 (line 41) 208 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 209 | 0.32% ││ 0x000000011ed1b0fc: or rdi,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 210 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@83 (line 41) 211 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 212 | 0.05% ││ 0x000000011ed1b100: and rdi,r11 ;*land {reexecute=0 rethrow=0 return_oop=0} 213 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@98 (line 41) 214 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 215 | 0.06% ││ 0x000000011ed1b103: mov r10,rdi 216 | 2.51% ││ 0x000000011ed1b106: and r10,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 217 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@113 (line 42) 218 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 219 | 0.37% ││ 0x000000011ed1b109: or r13,r10 ;*lor {reexecute=0 rethrow=0 return_oop=0} 220 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@114 (line 42) 221 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 222 | 0.10% ││ 0x000000011ed1b10c: shl r13,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 223 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@145 (line 45) 224 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 225 | 0.09% ││ 0x000000011ed1b10f: shl rdi,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 226 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@122 (line 44) 227 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 228 | 2.52% ││ 0x000000011ed1b112: or rdi,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 229 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@124 (line 44) 230 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 231 | 0.35% ││ 0x000000011ed1b116: and rdi,rcx ;*land {reexecute=0 rethrow=0 return_oop=0} 232 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@139 (line 44) 233 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 234 | 0.09% ││ 0x000000011ed1b119: mov r10,rdi 235 | 0.04% ││ 0x000000011ed1b11c: and r10,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 236 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@154 (line 45) 237 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 238 | 2.49% ││ 0x000000011ed1b11f: or r13,r10 ;*lor {reexecute=0 rethrow=0 return_oop=0} 239 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@155 (line 45) 240 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 241 | 0.39% ││ 0x000000011ed1b122: shl r13,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 242 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@186 (line 48) 243 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 244 | 0.17% ││ 0x000000011ed1b125: shl rdi,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 245 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@163 (line 47) 246 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 247 | 0.02% ││ 0x000000011ed1b128: or rdi,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 248 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@165 (line 47) 249 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 250 | 2.55% ││ 0x000000011ed1b12c: and rdi,rbx ;*land {reexecute=0 rethrow=0 return_oop=0} 251 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@180 (line 47) 252 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 253 | 0.39% ││ 0x000000011ed1b12f: mov r10,rdi 254 | 0.11% ││ 0x000000011ed1b132: and r10,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 255 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@195 (line 48) 256 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 257 | 0.08% ││ 0x000000011ed1b135: or r13,r10 ;*lor {reexecute=0 rethrow=0 return_oop=0} 258 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@196 (line 48) 259 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 260 | 2.71% ││ 0x000000011ed1b138: shl r13,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 261 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@227 (line 51) 262 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 263 | 0.65% ││ 0x000000011ed1b13b: shl rdi,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 264 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@204 (line 50) 265 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 266 | 0.04% ││ 0x000000011ed1b13e: or rdi,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 267 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@206 (line 50) 268 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 269 | 0.02% ││ 0x000000011ed1b142: and rdi,rdx ;*land {reexecute=0 rethrow=0 return_oop=0} 270 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@221 (line 50) 271 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 272 | 2.31% ││ 0x000000011ed1b145: mov r10,rdi 273 | 0.51% ││ 0x000000011ed1b148: and r10,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 274 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@236 (line 51) 275 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 276 | 0.15% ││ 0x000000011ed1b14b: or r13,r10 ;*lor {reexecute=0 rethrow=0 return_oop=0} 277 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@237 (line 51) 278 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 279 | 0.66% ││ 0x000000011ed1b14e: shl r13,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 280 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@268 (line 54) 281 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 282 | 2.72% ││ 0x000000011ed1b151: shl rdi,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 283 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@245 (line 53) 284 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 285 | 0.15% ││ 0x000000011ed1b154: or rdi,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 286 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@247 (line 53) 287 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 288 | 0.05% ││ 0x000000011ed1b158: and rdi,rbp ;*land {reexecute=0 rethrow=0 return_oop=0} 289 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@262 (line 53) 290 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 291 | 0.35% ││ 0x000000011ed1b15b: mov r10,rdi 292 | 2.45% ││ 0x000000011ed1b15e: and r10,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 293 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@277 (line 54) 294 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 295 | 0.56% ││ 0x000000011ed1b161: or r13,r10 ;*lor {reexecute=0 rethrow=0 return_oop=0} 296 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@278 (line 54) 297 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 298 | 1.31% ││ 0x000000011ed1b164: mov r10,r13 299 | 0.00% ││ 0x000000011ed1b167: shl r10,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 300 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@305 (line 57) 301 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 302 | 2.82% ││ 0x000000011ed1b16a: shl rdi,1 ;*lshl {reexecute=0 rethrow=0 return_oop=0} 303 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@286 (line 56) 304 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 305 | 0.14% ││ 0x000000011ed1b16d: or rdi,0x1 ;*lor {reexecute=0 rethrow=0 return_oop=0} 306 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@288 (line 56) 307 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 308 | 0.12% ││ 0x000000011ed1b171: and rdi,QWORD PTR [rax+rsi*8+0x10] 309 | ││ ;*land {reexecute=0 rethrow=0 return_oop=0} 310 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@299 (line 56) 311 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 312 | 1.13% ││ 0x000000011ed1b176: mov rsi,rdi 313 | 1.90% ││ 0x000000011ed1b179: and rsi,r8 ;*land {reexecute=0 rethrow=0 return_oop=0} 314 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@314 (line 57) 315 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 316 | 1.04% ││ 0x000000011ed1b17c: or r10,rsi ;*lor {reexecute=0 rethrow=0 return_oop=0} 317 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@315 (line 57) 318 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 319 | 2.20% ││ 0x000000011ed1b17f: test r10,r10 320 | ││ 0x000000011ed1b182: jne 0x000000011ed1b496 ;*ifne {reexecute=0 rethrow=0 return_oop=0} 321 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@320 (line 59) 322 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 323 | 2.48% ││ 0x000000011ed1b188: mov r10,QWORD PTR [rsp+0x28] 324 | 0.34% ││ 0x000000011ed1b18d: mov ebp,DWORD PTR [rsp+0x30] 325 | 0.05% ││ 0x000000011ed1b191: mov rsi,QWORD PTR [rsp+0x20] 326 | 0.01% ││ 0x000000011ed1b196: mov QWORD PTR [rsi+0x18],rdi ;*putfield currentMask {reexecute=0 rethrow=0 return_oop=0} 327 | ││ ; - search.algorithm.ShiftingBitMask$Processor::process@300 (line 56) 328 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 329 | 2.60% ││ 0x000000011ed1b19a: mov r11,QWORD PTR [r15+0x108] 330 | ││ ; ImmutableOopMap{rax=Oop rsi=Oop [8]=Oop [20]=NarrowOop [24]=Oop [32]=Oop } 331 | ││ ;*lload_3 {reexecute=1 rethrow=0 return_oop=0} 332 | ││ ; - (reexecute) search.algorithm.ShiftingBitMask$Processor::process@303 (line 57) 333 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@50 (line 28) 334 | 0.44% ││ 0x000000011ed1b1a1: test DWORD PTR [r11],eax ; {poll} 335 | 0.06% ││ 0x000000011ed1b1a4: mov r10d,ebp 336 | 0.01% ││ 0x000000011ed1b1a7: mov rbx,QWORD PTR [rsp+0x40] 337 | 2.71% ││ 0x000000011ed1b1ac: mov ecx,DWORD PTR [rsp+0x14] ;*aload_1 {reexecute=0 rethrow=0 return_oop=0} 338 | ││ ; - search.algorithm.UnrolledSearchProcessor::indexOf@36 (line 27) 339 | 0.26% ↘│ 0x000000011ed1b1b0: mov r11d,DWORD PTR [rsp+0x38] 340 | 0.07% │ 0x000000011ed1b1b5: mov rdx,QWORD PTR [rsp+0x18] 341 | 0.00% │ 0x000000011ed1b1ba: mov ebp,r11d 342 | 2.59% │ 0x000000011ed1b1bd: sub ebp,r10d ;*isub {reexecute=0 rethrow=0 return_oop=0} 343 | │ ; - java.nio.Buffer::nextGetIndex@8 (line 646) 344 | │ ; - java.nio.HeapByteBuffer::getLong@11 (line 439) 345 | │ ; - search.algorithm.UnrolledSearchProcessor::indexOf@47 (line 28) 346 | 0.43% │ 0x000000011ed1b1c0: cmp ebp,0x8 347 | ╰ 0x000000011ed1b1c3: jge 0x000000011ed1afd0 ;*if_icmplt {reexecute=0 rethrow=0 return_oop=0} 348 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@42 (line 27) 349 | 0x000000011ed1b1c9: mov rsi,QWORD PTR [rsp+0x20] 350 | 0x000000011ed1b1ce: cmp r11d,r10d 351 | 0x000000011ed1b1d1: jg 0x000000011ed1b1ef ;*ifeq {reexecute=0 rethrow=0 return_oop=0} 352 | ; - search.algorithm.SearchProcessor::indexOf@4 (line 15) 353 | ; - search.algorithm.UnrolledSearchProcessor::indexOf@72 (line 33) 354 | .................................................................................................... 355 | --------------------------------------------------------------------------------