The drmemtrace scheduler framework schedules or interleaves various thread traces into one or more core-sharded traces. Each core-shard is typically processed by a different thread; e.g., in our drmemtrace analyzer framework's core-sharded mode.
Since the app threads may freely move between cores, maintaining per-thread state becomes difficult for analysis tools (or any user of the drmemtrace scheduler), as it would require adding more locks. But the drmemtrace scheduler itself is in a good position to provide such per-thread state as it already has the required synchronization and locks internally.
This will be useful for tools like the drmemtrace invariant checker which primarily operates on per-thread state and, as of #7665, has to "reset" this state when it sees a context switch in a core-shard.