Home
last modified time | relevance | path

Searched refs:slice (Results 1 – 25 of 53) sorted by relevance

123

/tools/apksig/src/test/java/com/android/apksig/util/
DDataSourceTestBase.java60 DataSource slice = ds.slice(3, 5); in testSlice() local
61 assertGetByteBufferEquals("lo123", slice, 0, 5); in testSlice()
69 assertSliceEquals("", slice, 0, 0); in testSlice()
70 assertSliceEquals("", slice, 1, 0); in testSlice()
71 assertSliceEquals("", slice, slice.size() - 2, 0); in testSlice()
72 assertSliceEquals("", slice, slice.size() - 1, 0); in testSlice()
73 assertSliceEquals("", slice, slice.size(), 0); in testSlice()
77 assertSliceThrowsIOOB(slice, -1, 0); in testSlice()
79 assertSliceThrowsIOOB(slice, -1, 2); in testSlice()
81 assertSliceThrowsIOOB(slice, -1, 20); in testSlice()
[all …]
DDataSourceFromRAFChunkTest.java48 DataSource slice = ds.slice(3, 2); in testFileSizeChangesNotVisible() local
51 assertGetByteBufferEquals("de", slice, 0, (int) slice.size()); in testFileSizeChangesNotVisible()
53 assertFeedEquals("e", slice, 1, 1); in testFileSizeChangesNotVisible()
55 assertCopyToEquals("e", slice, 1, 1); in testFileSizeChangesNotVisible()
57 assertSliceEquals("e", slice, 1, 1); in testFileSizeChangesNotVisible()
64 assertGetByteBufferEquals("de", slice, 0, (int) slice.size()); in testFileSizeChangesNotVisible()
DDataSourceFromRAFTest.java50 DataSource slice = ds.slice(3, 2); in testFileSizeChangesVisible() local
53 assertGetByteBufferEquals("de", slice, 0, (int) slice.size()); in testFileSizeChangesVisible()
55 assertFeedEquals("e", slice, 1, 1); in testFileSizeChangesVisible()
57 assertCopyToEquals("e", slice, 1, 1); in testFileSizeChangesVisible()
59 assertSliceEquals("e", slice, 1, 1); in testFileSizeChangesVisible()
67 assertGetByteBufferEquals("de", slice, 0, (int) slice.size()); in testFileSizeChangesVisible()
/tools/trebuchet/core/common/src/test/kotlin/trebuchet/model/
DSliceGroupBuilderTest.kt31 val slice = group.endSlice { in testSimpleBuild() constant
34 assertEquals(1.0, slice.startTime) in testSimpleBuild()
35 assertEquals(2.0, slice.endTime) in testSimpleBuild()
36 assertEquals("first", slice.name) in testSimpleBuild()
37 assertEquals(slice, group.slices.first()) in testSimpleBuild()
57 val slice = group.endSlice { in testNestedBuild() constant
60 assertEquals(1.0, slice.startTime) in testNestedBuild()
61 assertEquals(2.0, slice.endTime) in testNestedBuild()
62 assertEquals("first", slice.name) in testNestedBuild()
64 assertEquals(slice, group.slices.first()) in testNestedBuild()
[all …]
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/queries/
DSliceQueries.kt42 fun beginSlice(slice: Slice): TraverseAction = TraverseAction.VISIT_CHILDREN in beginSlice()
43 fun endSlice(slice: Slice) {} in beginSlice()
326 return this.selectFirst { slice -> in ProcessModel() method
327 val sliceInfo = parseSliceName(slice.name) in ProcessModel()
331 lowerBound <= slice.startTime && in ProcessModel()
332 slice.startTime <= upperBound in ProcessModel()
349 return this.selectFirst { slice -> in ProcessModel() method
350 pattern.find(slice.name) != null && in ProcessModel()
351 lowerBound <= slice.startTime && in ProcessModel()
352 slice.startTime <= upperBound in ProcessModel()
[all …]
/tools/trebuchet/core/model/src/main/kotlin/trebuchet/model/fragments/
DAsyncSlicesBuilder.kt46 val slice = openSlices.remove(key(name, cookie)) ?: return in closeAsyncSlice() constant
47 slice.endTime = endTime in closeAsyncSlice()
48 slice.didNotFinish = false in closeAsyncSlice()
49 slice.endThreadId = pid in closeAsyncSlice()
50 asyncSlices.add(slice) in closeAsyncSlice()
54 for (slice in openSlices.values) { in autoCloseOpenSlices() method
55 slice.endTime = maxTimestamp in autoCloseOpenSlices()
56 slice.didNotFinish = true in autoCloseOpenSlices()
57 slice.endThreadId = InvalidId in autoCloseOpenSlices()
58 asyncSlices.add(slice) in autoCloseOpenSlices()
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/util/
DBufferReader.kt103 fun slice(group: Int): DataSlice { in slice() method in trebuchet.util.MatchResult
147 fun reset(slice: DataSlice, stringCache: StringCache?) { in reset()
148 this.buffer = slice.buffer in reset()
149 this.index = slice.startIndex in reset()
150 this.endIndexExclusive = slice.endIndex in reset()
154 …inline fun <T> read(slice: DataSlice, stringCache: StringCache? = null, init: BufferReader.() -> T… in read()
155 this.reset(slice, stringCache) in read()
201 val slice = sliceTo(tempSlice, init) in stringTo() constant
202 return stringCache?.stringFor(slice) ?: slice.toString() in stringTo()
205 inline fun sliceTo(slice: DataSlice = DataSlice(), init: PreviewReader.() -> Unit): DataSlice { in sliceTo()
[all …]
DByteArrayList.kt53 fun put(slice: DataSlice) { in put()
54 put(slice.buffer, slice.startIndex, slice.length) in put()
58 val slice = array.asSlice(size) in reset() constant
61 return slice in reset()
DStringCache.kt26 fun stringFor(slice: DataSlice): String { in stringFor()
27 var ret = cache[slice] in stringFor()
29 ret = slice.toString() in stringFor()
30 cache.putIfAbsent(slice.compact(), ret) in stringFor()
/tools/trebuchet/trebuchet/startup-common/src/
DStartupCommon.kt175 override fun beginSlice(slice : Slice) : TraverseAction { in Model()
176 val sliceContents = parseSliceName(slice.name) in Model()
183 if (slice.startTime < systemServerSlice.endTime) { in Model()
190 … undifferentiatedTime += (slice.startTime - this.lastTopLevelSlice!!.endTime) in Model()
193 if (slice.endTime <= systemServerSlice.endTime) { in Model()
197 aggregateSliceInfo(allSlicesInfo, sliceContents, slice.duration) in Model()
200 … aggregateSliceInfo(undifferentiatedSliceInfo, sliceContents, slice.durationSelf) in Model()
204 aggregateSliceInfo(topLevelSliceInfo, sliceContents, slice.duration) in Model()
209 … aggregateSliceInfo(nonNestedSliceInfo, sliceContents, slice.duration) in Model()
223 override fun endSlice(slice : Slice) { in Model()
[all …]
/tools/trebuchet/trebuchet/viewer/src/main/kotlin/traceviewer/ui/tracks/
DSliceTrack.kt70 open fun drawLabel(slice: T, g: Graphics, metrics: FontMetrics, x: Int, y: Int, width: Int) { in drawLabel()
73 while (strLimit < slice.name.length && strWidth <= width) { in drawLabel()
74 strWidth += metrics.charWidth(slice.name[strLimit]) in drawLabel()
80 g.drawString(slice.name.substring(0, strLimit), x, y) in drawLabel()
84 open fun colorFor(slice: T): Color { in colorFor()
85 return colors[Math.abs(slice.name.hashCode()) % colors.size] in colorFor()
DMultiLineTrack.kt62 fun addSlice(slice: SliceGroup) { in addSlice()
63 row.add(slice) in addSlice()
64 if (slice.children.isNotEmpty()) { in addSlice()
66 slice.children.forEach { addSlice(it) } in addSlice()
DSchedTrack.kt30 override fun colorFor(slice: SchedSlice): Color { in colorFor()
31 return when (slice.state) { in colorFor()
40 …override fun drawLabel(slice: SchedSlice, g: Graphics, metrics: FontMetrics, x: Int, y: Int, width… in drawLabel()
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/io/
DStreamingReader.kt62 yield(win.slice) in iter()
64 yield(win.slice.slice((startIndex - win.globalStartIndex).toInt())) in iter()
98 class Window(val slice: DataSlice, val globalStartIndex: Long, val globalEndIndex: Long) { constant in trebuchet.io.Window
100 inline operator fun get(i: Long): Byte = slice[(i - globalStartIndex).toInt()] in get()
/tools/trebuchet/trebuchet/traceutils/src/
DTraceUtils.kt70 val slice = it.slice in copy() constant
71 output.write(slice.buffer, slice.startIndex, slice.length) in copy()
/tools/apksig/src/main/java/com/android/apksig/internal/util/
DVerityTreeBuilder.java157 slice(verityBuffer, levelOffset[i], levelOffset[i + 1])); in generateVerityTree()
163 src = DataSources.asDataSource(slice(verityBuffer.asReadOnlyBuffer(), in generateVerityTree()
183 ByteBuffer firstPage = slice(verityBuffer.asReadOnlyBuffer(), 0, CHUNK_SIZE); in getRootHashFromTree()
254 ByteBuffer chunk = slice(buffer, offset, offset + CHUNK_SIZE); in digestDataByChunks()
295 private static ByteBuffer slice(ByteBuffer buffer, int begin, int end) { in slice() method in VerityTreeBuilder
300 return b.slice(); in slice()
DChainedDataSource.java102 public DataSource slice(long offset, long size) { in slice() method in ChainedDataSource
110 return beginSource.slice(beginLocalOffset, size); in slice()
115 sources.add(beginSource.slice( in slice()
126 sources.add(mSources[endIndex].slice(0, endLocalOffset + 1)); in slice()
DByteArrayDataSink.java120 return ByteBuffer.wrap(mArray, (int) offset, size).slice(); in getByteBuffer()
162 public DataSource slice(long offset, long size) { in slice() method in ByteArrayDataSink
198 return ByteBuffer.wrap(mArray, (int) (mSliceOffset + offset), size).slice(); in getByteBuffer()
210 public DataSource slice(long offset, long size) { in slice() method in ByteArrayDataSink.SliceDataSource
DByteBufferDataSource.java45 mBuffer = (sliceRequired) ? buffer.slice() : buffer; in ByteBufferDataSource()
73 return mBuffer.slice(); in getByteBuffer()
91 public ByteBufferDataSource slice(long offset, long size) { in slice() method in ByteBufferDataSource
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/importers/ftrace/events/
DFtraceEvent.kt47 fun tryParseText(state: EventParserState, slice: DataSlice): FtraceEvent? { in <lambda>()
48 state.ifMatches(ftraceLineMatcher, slice) { in <lambda>()
58 details = state.detailsForText(function, slice(7)) in <lambda>()
61 state.ifMatches(cpuBufferStarted, slice) { in <lambda>()
DEventParserState.kt39 typealias EventDetailsParser = (state: EventParserState, slice: DataSlice) -> FtraceEventDetails?
104 inline fun ifMatches(matcher: Int, slice: DataSlice, result: MatchResult.() -> Unit): Boolean { in createEventParser()
105 reader.reset(slice, stringCache) in createEventParser()
/tools/trebuchet/trebuchet/analyzer/src/
DAnalyzer.kt57 latchBuffers.forEachIndexed { index, slice -> in measureRotator() method
61 && it.startTime > slice.endTime in measureRotator()
65 val duration = retire.endTime - slice.startTime in measureRotator()
68 latchStart = slice.startTime in measureRotator()
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/extractors/
DSystraceExtractor.kt66 pipe.add(window.slice) in <lambda>()
70 pipe.add(window.slice.slice(sliceStart.toInt(), sliceEnd.toInt())) in <lambda>()
/tools/apksig/src/main/java/com/android/apksig/internal/asn1/
DAsn1OpaqueObject.java28 mEncoded = encoded.slice(); in Asn1OpaqueObject()
36 return mEncoded.slice(); in getEncoded()
/tools/apksig/src/main/java/com/android/apksig/internal/zip/
DCentralDirectoryRecord.java173 recordBuf = buf.slice(); in getRecord()
194 output.put(mData.slice()); in copyTo()
200 result.put(mData.slice()); in createWithModifiedLocalFileHeaderOffset()

123