equal
deleted
inserted
replaced
200 return null; |
200 return null; |
201 } |
201 } |
202 long lastValid = absoluteChunkEnd; |
202 long lastValid = absoluteChunkEnd; |
203 long metadataPoistion = chunkHeader.getMetataPosition(); |
203 long metadataPoistion = chunkHeader.getMetataPosition(); |
204 long contantPosition = chunkHeader.getConstantPoolPosition(); |
204 long contantPosition = chunkHeader.getConstantPoolPosition(); |
205 chunkFinished = awaitUpdatedHeader(absoluteChunkEnd); |
205 chunkFinished = awaitUpdatedHeader(absoluteChunkEnd, configuration.filterEnd); |
206 if (chunkFinished) { |
206 if (chunkFinished) { |
207 Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "At chunk end"); |
207 Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "At chunk end"); |
208 return null; |
208 return null; |
209 } |
209 } |
210 absoluteChunkEnd = chunkHeader.getEnd(); |
210 absoluteChunkEnd = chunkHeader.getEnd(); |
277 if (CheckPointType.FLUSH.is(typeFlags)) { |
277 if (CheckPointType.FLUSH.is(typeFlags)) { |
278 flushOperation.run(); |
278 flushOperation.run(); |
279 } |
279 } |
280 } |
280 } |
281 |
281 |
282 private boolean awaitUpdatedHeader(long absoluteChunkEnd) throws IOException { |
282 private boolean awaitUpdatedHeader(long absoluteChunkEnd, long filterEnd) throws IOException { |
283 if (Logger.shouldLog(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO)) { |
283 if (Logger.shouldLog(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO)) { |
284 Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "Waiting for more data (streaming). Read so far: " + chunkHeader.getChunkSize() + " bytes"); |
284 Logger.log(LogTag.JFR_SYSTEM_PARSER, LogLevel.INFO, "Waiting for more data (streaming). Read so far: " + chunkHeader.getChunkSize() + " bytes"); |
285 } |
285 } |
286 while (true) { |
286 while (true) { |
|
287 if (chunkHeader.getLastNanos() > filterEnd) { |
|
288 return true; |
|
289 } |
287 chunkHeader.refresh(); |
290 chunkHeader.refresh(); |
288 if (absoluteChunkEnd != chunkHeader.getEnd()) { |
291 if (absoluteChunkEnd != chunkHeader.getEnd()) { |
289 return false; |
292 return false; |
290 } |
293 } |
291 if (chunkHeader.isFinished()) { |
294 if (chunkHeader.isFinished()) { |