interface

jsc.SamplingProfileStackFrame

interface SamplingProfileStackFrame

One sampled stack frame in a SamplingProfileStackTraces trace.

  • category: string

    The tier the function was running in when sampled: "LLInt", "Baseline", "DFG", or "FTL" for JavaScript functions, or one of the other names from the tier breakdown in SamplingProfile.bytecodes (native functions show up as "Unknown Executable").

  • column: number

    1-based column of the sampled location. 4294967295 when unknown.

  • flags: number

    1 if the function is part of the JavaScript built into Bun (JavaScriptCore's own builtins and Bun's built-in modules such as node:events), 0 if it is yours.

  • inliner?: { category: string; column: number; line: number; location: string; name: string }

    Present when the function had been inlined into another function's optimized code: describes the function it was inlined into and the position in it.

  • line: number

    1-based line of the sampled location. 4294967295 when unknown, such as for native functions.

  • location: string

    Where in the function the sample landed, as the function's code hash, the tier, and the bytecode index, for example "#A4IKxq:Baseline:bc#78". This is the same notation SamplingProfile.bytecodes uses. "#<nil>:None:<nil>" for native functions.

  • name: string

    The function's name, "" for anonymous functions, or "(module)" for a module's top-level code.

  • sourceID: number

    Identifies the source file; matches the sourceID of an entry in SamplingProfileStackTraces.sources. 4294967295 for native functions, which have no source.

  • sourceURL?: string

    Path or URL of the source file (or the specifier of a built-in module, such as "node:events"), mapped through its source map when it has one. Absent for native functions.