MCPcopy Index your code
hub / github.com/nodejs/node / processCodeDeopt

Method processCodeDeopt

deps/v8/tools/system-analyzer/processor.mjs:378–406  ·  view source on GitHub ↗
(
      timestamp, codeSize, instructionStart, inliningId, scriptOffset,
      deoptKind, deoptLocation, deoptReason)

Source from the content-addressed store, hash-verified

376 }
377
378 processCodeDeopt(
379 timestamp, codeSize, instructionStart, inliningId, scriptOffset,
380 deoptKind, deoptLocation, deoptReason) {
381 this._lastTimestamp = timestamp;
382 const profCodeEntry = this._profile.findEntry(instructionStart);
383 const logEntry = new DeoptLogEntry(
384 deoptKind, timestamp, profCodeEntry, deoptReason, deoptLocation,
385 scriptOffset, instructionStart, codeSize, inliningId);
386 profCodeEntry.logEntry.add(logEntry);
387 this._deoptTimeline.push(logEntry);
388 this.addSourcePosition(profCodeEntry, logEntry);
389 logEntry.functionSourcePosition = logEntry.sourcePosition;
390 // custom parse deopt location
391 if (deoptLocation === '<unknown>') return;
392 // Handle deopt location for inlined code: <location> inlined at <location>
393 const inlinedPos = deoptLocation.indexOf(' inlined at ');
394 if (inlinedPos > 0) {
395 deoptLocation = deoptLocation.substring(0, inlinedPos)
396 }
397 const script = this.getProfileEntryScript(profCodeEntry);
398 if (!script) return;
399 const colSeparator = deoptLocation.lastIndexOf(':');
400 const rowSeparator = deoptLocation.lastIndexOf(':', colSeparator - 1);
401 const line =
402 parseInt(deoptLocation.substring(rowSeparator + 1, colSeparator));
403 const column = parseInt(
404 deoptLocation.substring(colSeparator + 1, deoptLocation.length - 1));
405 logEntry.sourcePosition = script.addSourcePosition(line, column, logEntry);
406 }
407
408 processFeedbackVector(
409 timestamp, fbv_address, fbv_length, instructionStart, optimization_marker,

Callers

nothing calls this directly

Calls 6

addSourcePositionMethod · 0.95
getProfileEntryScriptMethod · 0.95
addMethod · 0.65
findEntryMethod · 0.45
pushMethod · 0.45
indexOfMethod · 0.45

Tested by

no test coverage detected