Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dump: Handle cycles in graphviz #1977

Closed
wants to merge 3 commits into from

Commits on Oct 29, 2024

  1. utils: Identify graph entry nodes to skip

    Identify if the current graph entry must be skipped druing `dump`, which
    is done during the add_graph_entry() procedure.
    
    Basic idea is to find recursive calls, but the first recursive call
    cannot be skipped. For example, if the call trace shows:
    
    main - fib - fib - fib
    
    then the first (fib - fib) must be present but the second must be
    skipped, making the graph look like:
    
    main - fib - fib
    
    To separate recursive calls from the first recursive call, determine
    if the node's name is the same with curr and additionally check if
    curr->parent's name is the same as well.
    
    Signed-off-by: Daon Park <[email protected]>
    deepseafishy committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    c5f0903 View commit details
    Browse the repository at this point in the history
  2. utils: Transfer skipped node's nr_calls

    If a node is skipped due to being a recursive call, then it's nr_calls
    must be correctly appended to the first recursive call. During the
    `add_graph_entry()` procedure, it looks for the source of the first
    recursive call and saves it to recursive_src. Next, if the current
    graph entry node is skipped, then the nr_calls is added to the
    add_calls_tgt.
    
    Signed-off-by: Daon Park <[email protected]>
    deepseafishy committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    8d47c7f View commit details
    Browse the repository at this point in the history
  3. dump: Skip nodes during graphviz dump

    If a node is marked as True in the skip variable, the dump file will
    not record that node.
    
    Signed-off-by: Daon Park <[email protected]>
    deepseafishy committed Oct 29, 2024
    Configuration menu
    Copy the full SHA
    7e089cd View commit details
    Browse the repository at this point in the history