- Method trace
This function changes the trace level for the subsystem identified by
facilityis zero or left out, it changes the global trace level which affects all subsystems.
Enabling tracing causes messages to be printed to stderr. A higher trace level includes the output from all lower levels. The lowest level is zero which disables all trace messages.
See the -t command-line option for more information.
facilityis specified then there is typically only one trace level for it, i.e. it's an on-or-off toggle. The global trace levels, when
facilityisn't specified, are:
Trace calls to Pike functions and garbage collector runs.
Trace calls to builtin functions.
Trace every interpreted opcode.
Also trace the opcode arguments.
Valid facilities are:
Trace the doings of the garbage collector. The setting is never thread local.
levelhas two different meanings:
Trace the start and end of each gc run.
Additionally show info about the collected garbage, to aid hunting down garbage problems. This currently shows gc'd trampolines. Note that the output can be very bulky and is somewhat low-level technical. Also note that pike currently has to be configured with
--with-rtldebugto enable this.
Trace levels are normally thread local, so changes affect only the current thread. To change the level in all threads, pass a nonzero value in this argument.
The old trace level in the current thread is returned.