Skip to content

Add a debug listener to ChampSim #645

Open

Description

@dpuckett98

Currently, ChampSim's debug feature is implemented as a series of print statements throughout many different .cc files. They are all toggled on or off with a single switch, and many of the print statements are actually out of date (e.g., they throw exceptions if you actually turn on the debug switch). I think creating a debug listener could significantly update and improve ChampSim's debug feature:

  • Bring all the print statements to a single location -- don't have to search throughout all of ChampSim to understand what debug will or won't print
  • Can easily add more specific toggles to control printing (e.g., just print debug statements from L1D cache)
  • Convenient time to update/correct print statements

Activity

  1. ngober commented on Sep 12, 2025

    @ngober
    Collaborator

    There's an interesting idea embedded in your second bullet point. It could be interesting if there was a syntax like --listeners=debug[execute] that passed "execute" to the listener as some sort of parameter. That might open the door for some interesting other listeners.

  2. archie-2006 commented on Oct 2, 2026

    @archie-2006

    @dpuckett98 @ngober

    there are quite a lot of debug prints in cache.cc, so how should they be mapped onto events? Should each print be their own event or should they all be grouped under one cache event that says which kind it is (hit, miss etc)?

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions