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

Synopsis

Tracing options available in the Niecza (.NET) runtime

General

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

Kernel.cs

NIECZA_TRACE

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.

NIECZA_TRACE_CALLS

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

NIECZA_TRACE_PERIOD

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

Cursor.cs

NIECZA_DIE_AT_PCT

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.

NIECZA_HIGHWATER_TRACE

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).

NIECZA_LTM_TRACE

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

NIECZA_RX_TRACE

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.

JSYNC.cs

NIECZA_JSYNC_WRITER_FAILSOFT

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.