Skip to content

Make GC debugging and configuration first-class #87

Open

Description

@dimensionscape

Debugging the GC is harder than it needs to be, and its configurations are easy to break:

  • The verifier prints its findings with buffered printf and then traps, so the message is usually lost with the process. DebuggerTrap only fires once, and reports give an address with no class or allocation context.
  • Debug aids such as HX_WATCH, HX_GC_FIXED_BLOCKS and SHOW_MEM_EVENTS are enabled by editing Immix.cpp, and HXCPP_GC_DEBUG_LEVEL changes how marking works (single-threaded, recursive), so it can hide the bug being chased.
  • Block geometry is spread through hand-sized types. Narrowing the row counters to uint8_t silently broke HXCPP_GC_BIG_BLOCKS; the types should follow from the block size, with static checks.
  • Most combinations of the GC defines are never built or run together.

Related: HaxeFoundation/hxcpp#1409, HaxeFoundation/hxcpp#1417, #82, #83, #85.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions