RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Debug DrawingGPU Mesh StructsImGui FFIMath Structs (FFI)FFI C DefinitionsPID ControllersCSV LibraryDelay LineDequeDevelopment UtilitiesEvent ReferenceExtension SystemSignal FiltersGraph PathfindingUI BridgeInput Filter Constants2D Bilinear InterpolationIntrospectionJBeam Pretty PrinterJSON AST ParserSJSON ParserJSON Debug ParserJSON Pretty PrinterK-D Tree (2D Boxes)K-D Tree (3D)K-D Tree (3D)Lua SerializerC++/Lua BindingLua CoreLua ProfilerMath LibraryParticlesQuadtreeSettingsTCP ServerTimer SchedulerUtility Library
jit/ - LuaJIT Compiler & Profiler ModulesLuaJIT ProfilerVerbose JIT CompilerLuaJIT VM DefinitionsProfiler Zones

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API Referencecommonjit

Verbose JIT Compiler

Module defined in `lua/common/jit/v.lua`. Verbose mode for the LuaJIT compiler - prints one line per generated trace showing compilation progress, trace linking, and abort reasons.

Module defined in lua/common/jit/v.lua. Verbose mode for the LuaJIT compiler - prints one line per generated trace showing compilation progress, trace linking, and abort reasons.


Exports

No M table exports. Used via luajit -jv or require("jit.v").on(outfile).

Entry Points

start(outfile)

Alias for dumpon. Opens output file and attaches trace dump handlers.

  • Parameters:
    • outfile - string|nil - Output file (- for stdout, nil for stderr)

Internal Functions

dumpon(outfile)

Attaches JIT trace event handlers via jit.attach.

dumpoff()

Detaches all dump handlers.

dump_trace(what, tr, func, pc, otr, oex)

Callback for trace events. Formats trace start/stop/abort messages.

Output Format

[TRACE   1 (command line):1 loop]
[TRACE   2 (1/3) (command line):1 -> 1]
[TRACE --- foo.lua:44 -- leaving loop in root trace at foo.lua:50]

Internal Notes

  • Trace numbers, file
    , parent trace/exit shown for side traces
  • Arrow shows trace link target
  • Aborted traces prefixed with --- and include reason
  • Uses jit.util for function info and jit.vmdef for IR names

See Also

  • jit/ - LuaJIT Compiler & Profiler Modules - Directory overview
  • jit.p (LuaJIT Profiler) Reference - Related reference
  • jit.vmdef (VM Definitions) Reference - Related reference
  • jit.zone (Profiler Zones) Reference - Related reference
  • Common Libraries Overview - Guide

LuaJIT Profiler

Module defined in `lua/common/jit/p.lua`. LuaJIT's built-in low-overhead profiler CLI interface. Collects stack samples and outputs top-N lists, annotated source, or raw data for flame graphs.

LuaJIT VM Definitions

Module defined in `lua/common/jit/vmdef.lua`. Auto-generated file containing LuaJIT VM bytecode names, IR names, IR field definitions, and C function call mappings. **DO NOT EDIT** - generated by LuaJ

On this page

ExportsEntry Pointsstart(outfile)Internal Functionsdumpon(outfile)dumpoff()dump_trace(what, tr, func, pc, otr, oex)Output FormatInternal NotesSee Also