Class ProfilingEntryInstr

java.lang.Object
org.ek9lang.compiler.ir.instructions.IRInstr
org.ek9lang.compiler.ir.instructions.ProfilingEntryInstr
All Implemented Interfaces:
INode

public final class ProfilingEntryInstr extends IRInstr
Specialized IR instruction for profiling function entry (PROFILING_ENTRY).

Profiling entry probes are inserted at function entry when profiling is enabled. Each probe records the entry timestamp for duration calculation.

The instruction carries a function ID (reused from coverage infrastructure) and uses operands for human-readable IR output.

  • Method Details

    • entry

      public static ProfilingEntryInstr entry(long functionId, String functionName, DebugInfo debugInfo)
      Create a profiling entry instruction.
      Parameters:
      functionId - Globally unique function ID (FNV-1a hash)
      functionName - Human-readable function name
      debugInfo - Optional source location debug info
    • getFunctionId

      public long getFunctionId()
      Get the function ID for this probe.
    • getFunctionName

      public String getFunctionName()
      Get the function name for this probe.
    • accept

      public void accept(INodeVisitor visitor)
      Specified by:
      accept in interface INode
      Overrides:
      accept in class IRInstr
    • toString

      public String toString()
      Overrides:
      toString in class IRInstr