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

Method processTick

deps/v8/tools/system-analyzer/processor.mjs:439–466  ·  view source on GitHub ↗
(
      pc, time_ns, is_external_callback, tos_or_external_callback, vmState,
      stack)

Source from the content-addressed store, hash-verified

437 }
438
439 processTick(
440 pc, time_ns, is_external_callback, tos_or_external_callback, vmState,
441 stack) {
442 if (is_external_callback) {
443 // Don't use PC when in external callback code, as it can point
444 // inside callback's code, and we will erroneously report
445 // that a callback calls itself. Instead we use tos_or_external_callback,
446 // as simply resetting PC will produce unaccounted ticks.
447 pc = tos_or_external_callback;
448 tos_or_external_callback = this.kZero;
449 } else if (tos_or_external_callback) {
450 // Find out, if top of stack was pointing inside a JS function
451 // meaning that we have encountered a frameless invocation.
452 const funcEntry = this._profile.findEntry(tos_or_external_callback);
453 if (!funcEntry?.isJSFunction?.()) {
454 tos_or_external_callback = this.kZero;
455 }
456 }
457 const entryStack = this._profile.recordTick(
458 time_ns, vmState,
459 this.processStack(pc, tos_or_external_callback, stack));
460 const newEntry = new TickLogEntry(time_ns, vmState, entryStack);
461 this._tickTimeline.push(newEntry);
462 if (this._lastTickLogEntry !== undefined) {
463 this._lastTickLogEntry.end(time_ns);
464 }
465 this._lastTickLogEntry = newEntry;
466 }
467
468 processCodeSourceInfo(
469 start, scriptId, startPos, endPos, sourcePositions, inliningPositions,

Callers

nothing calls this directly

Calls 6

recordTickMethod · 0.80
processStackMethod · 0.80
findEntryMethod · 0.45
isJSFunctionMethod · 0.45
pushMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected