Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
73 lines (49 sloc) 2.35 KB


Tracing options available in the Niecza (.NET) runtime


Boolean options only care about the presence or absence of the named environment variable.



This enables per-operation tracing by instrumenting the trampoline. It may be set to all or stat. If it is set to all, then the call tree will be printed in real time; each trampoline bounce displays a node and the current call depth. If it is set to stat, then the call stack will be printed every 1 million bounces (by default).

The all mode is useful for debugging the context of crashes, especially infinite loops in a single operation. For Perl 6-level infinite loops, stat is more useful; stat can also be used as a primitive profiler, though its utility is limited by the fact that it does not count real time.


This dumps all edges in the callgraph for profiling purposes. The perf/ script transforms the output into a more readable form.


This sets the display interval for NIECZA_TRACE=stat. Defaults to 1000000. Setting it lower is potentially useful in a profiling context.



Throw an exception and generate a stack dump at a specific point in the parsing process. Only meaningful in conjunction with NIECZA_HIGHWATER_TRACE; for instance, setting this to 53 will die immediately after the generation of the "53%" status report.


Generates running status reports for all regex matches against long strings (greater than 100 characters). The status measured is the high-water mark, the highest character position yet seen (for speed reasons, this is only sampled when backtracking, at the end of rules, and on entry to longest-term matching).


Generates extensive reports on the construction and use of longest-term automata.


Traces some regex primitives (currently only <ws>, was more before newrx was merged). Each time ws is called, this will be reported, along with the position of the attempt and whether it succeeded.



Encode unencodable objects as the string "UNSERIALIZABLE Type", to make it easier to find them in the data structure.

Jump to Line
Something went wrong with that request. Please try again.