You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`-Z profile-queries` tells the compiler to run a separate thread
31
-
that profiles the queries made by the main compiler thread(s). -
32
-
`-Z incremental=cache` tells the compiler to "cache" various files
36
+
that profiles the queries made by the main compiler thread(s).
37
+
-`-Z incremental=cache` tells the compiler to "cache" various files
33
38
that describe the compilation dependencies, in the subdirectory
34
39
`cache`.
35
40
@@ -39,15 +44,23 @@ This command will generate the following files:
39
44
the [trace of queries](#trace-of-queries).
40
45
-`profile_queries.counts.txt` consists of a histogram, where each histogram "bucket" is a query provider.
41
46
42
-
### 3. Inspect the output
43
-
3(a). Open the HTML file (`profile_queries.html`) with a browser. See [this section](#interpret-the-html-output) for an explanation of this file.
44
47
45
-
3(b). Open the data file (`profile_queries.counts.txt`) with a text editor, or spreadsheet. See [this section](#interpret-the-data-output) for an explanation of this file.
48
+
### 3. Run `rustc`, with `-Z time-passes`:
46
49
47
-
3(c). Older stuff, also generated as output (you can _ignore these files_; we won't discuss them further here):
50
+
- This additional flag will add all timed passes to the output files
51
+
mentioned above, in step 2. As described below, these passes appear
52
+
visually distinct from the queries in the HTML output (they
53
+
currently appear as green boxes, via CSS).
48
54
49
-
-`dep_graph.dot` consists of old stuff: a representation of dependencies that are _outside_ the newer query model.
50
-
-`dep_graph.txt` consists of old stuff: a representation of dependencies that are _outside_ the newer query model.
55
+
### 4. Inspect the output
56
+
57
+
- 4(a). Open the HTML file (`profile_queries.html`) with a browser.
58
+
See [this section](#interpret-the-html-output) for an explanation of
59
+
this file.
60
+
- 4(b). Open the data file (`profile_queries.counts.txt`) with a text
61
+
editor, or spreadsheet. See [this
62
+
section](#interpret-the-data-output) for an explanation of this
63
+
file.
51
64
52
65
53
66
## Interpret the HTML Output
@@ -70,27 +83,28 @@ The trace of the queries has a formal structure; see
70
83
71
84
We style this formal structure as follows:
72
85
73
-
- Blue dots represent query hits. They consist of leaves in the
74
-
trace's tree. (CSS class: `hit`).
75
-
- Red boxes represent query misses. They consist of internal nodes in
76
-
the trace's tree. (CSS class: `miss`).
77
-
- Many red boxes contain _nested boxes and dots_. This nesting structure
78
-
reflects that some providers _depend on_ results from other
79
-
providers, which consist of their nested children.
80
-
- For example, the red box labeled as `typeck_tables_of` depends
81
-
on the one labeled `adt_dtorck_constraint`, which itself
82
-
depends on one labeled `coherent_trait`.
83
-
- Some red boxes are _labeled_ with text, and have highlighted borders
84
-
(light red, and bolded). (See [heuristics](#heuristics) for
85
-
details). Where they are present, the labels give the following
86
-
information:
86
+
-**Timed passes:** Green boxes, when present (via `-Z time-passes`), represent _timed
87
+
passes_ in the compiler. In future versions, these passes may be
88
+
replaced by queries, explained below.
89
+
-**Labels:** Some green and red boxes are labeled with text. Where they are
90
+
present, the labels give the following information:
87
91
- The [query's _provider_](#queries), sans its _key_ and its _result_,
88
92
which are often too long to include in these labels.
89
93
- The _duration_ of the provider, as a fraction of the total time
90
94
(for the entire trace). This fraction includes the query's
91
95
entire extent (that is, the sum total of all of its
92
96
sub-queries).
93
-
97
+
-**Query hits:** Blue dots represent query hits. They consist of leaves in the
98
+
trace's tree. (CSS class: `hit`).
99
+
-**Query misses:** Red boxes represent query misses. They consist of internal nodes in
100
+
the trace's tree. (CSS class: `miss`).
101
+
-**Nesting structure:** Many red boxes contain _nested boxes and
102
+
dots_. This nesting structure reflects that some providers _depend
103
+
on_ results from other providers, which consist of their nested
104
+
children.
105
+
- Some red boxes are _labeled_ with text, and have highlighted borders
106
+
(light red, and bolded). (See [heuristics](#heuristics) for
0 commit comments