Skip to content

Improved query-integrated debug output and profiling  #42678

Closed
@nikomatsakis

Description

@nikomatsakis

The new query system kind of up-ends our existing -Ztime-passes. In addition, RUST_LOG is obviously a very primitive logging system, with no ability to track indentation or give you much for context. We have to do better.

@matthewhammer has been working on a nifty new system for visualizing what a rust compilation is doing and where it spends its time. The rough idea is -- when enabled, of course -- to intercept when queries start and end and plot that information visually. This lets us see which queries ran and in which order, and whether there were cache hits or misses. There is a bunch of other information that I would like access to:

  • How much time did we spend in each query (and each kind of query)?
    • Maybe useful to separate that into "own" time and "child" time.
  • What debug logs were emitted during each query?
  • Which items was each query processing -- it'd be great to be able to get "just the logs that were emitted when processing foo"

Anyway, this is intended as a general tracking and discussion issue for this work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions