Package autodesk_toxik :: Module debug
[frames] | no frames]

Module debug

Debugging utility module.

This module provides access to the Toxik internal debugging utilities. It is concerned with control of internal tracing capabilities, information about dynamically-loaded libraries, heap management, debugging information, threads and performance testing.

Trace Control

The following functions are available on an existing singleton instance of the TraceOptions class, available through:

  autodesk_toxik.debug.traceOptions

For example:

  from autodesk_toxik import debug
  debug.traceOptions.on()
  debug.traceOptions.showAll()
Classes
  TraceOptions
Encapsulates the trace options as an object to perform conversions.
  LibInfo
Contains information about a DLL loaded in memory.
  PerfTestWrapper
This Python class wraps a C++ performance test class.
Functions
 
dumpLibraryList(infos)
Generate a nicely formatted dump of the library list.
[PerfTestWrapper]
getPerfTestList(...)
Returns: The list of available performance tests.
 
heapCheck(...)
Check heap.
str
heapDump(...)
Returns: Heap manager information.
 
heapLeak(...)
Purposely leak a specified amount of memory.
 
heapLeakAndCorrupt(...)
Leak some memory and corrupt it.
str
heapMallocStats(...)
Returns: Malloc statistics.
 
heapReportLeakage(...)
Report leakage between two checkpoints.
 
heapSetCheckPoint(...)
Set the current value of the heap checkpoint, number cp (int).
list
libraryList(...)
Returns: A list of library information for the currently loaded DLLs.
 
libraryListDump(...)
str
threadsDump(...)
Returns: A dump of a listing of the active threads.
Variables
  traceOptions = TraceOptions()
  __package__ = 'autodesk_toxik'
Function Details

dumpLibraryList(infos)

 

Generate a nicely formatted dump of the library list. The input is assumed to be the return value of the libraryList() function.

Parameters:
  • infos (list)

getPerfTestList(...)

 
Returns: [PerfTestWrapper]
The list of available performance tests. Several tests are provided by the toxik core. Some tests are provided by plugins and will only be available once loaded.

heapDump(...)

 
Returns: str
Heap manager information.

heapLeak(...)

 

Purposely leak a specified amount of memory. This is used for testing purposes.

Parameters:
  • nbBytes (int)

heapLeakAndCorrupt(...)

 

Leak some memory and corrupt it. This is used for testing purposes.

Parameters:
  • allocBytes (int)
  • writtenBytes (int)
  • byte (int)

heapMallocStats(...)

 
Returns: str
Malloc statistics.

heapReportLeakage(...)

 

Report leakage between two checkpoints. Specify the two integer numbers of the checkpoints to check.

Parameters:
  • cp1 (int)
  • cp2 (int)

heapSetCheckPoint(...)

 

Set the current value of the heap checkpoint, number cp (int).

Parameters:
  • cp (int)

libraryList(...)

 
Returns: list
A list of library information for the currently loaded DLLs.

See Also: LibInfo.

threadsDump(...)

 
Returns: str
A dump of a listing of the active threads.