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 dump-dep-graph` tells the compiler to "dump" various files that
33
-
describe the compilation dependencies.
36
+
that profiles the queries made by the main compiler thread(s).
37
+
-`-Z incremental=cache` tells the compiler to "cache" various files
38
+
that describe the compilation dependencies, in the subdirectory
39
+
`cache`.
34
40
35
41
This command will generate the following files:
36
42
37
43
-`profile_queries.html` consists of an HTML-based representation of
38
44
the [trace of queries](#trace-of-queries).
39
45
-`profile_queries.counts.txt` consists of a histogram, where each histogram "bucket" is a query provider.
40
46
41
-
### 3. Inspect the output
42
-
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.
43
47
44
-
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`:
49
+
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).
45
54
46
-
3(c). Older stuff, also generated as output (you can _ignore these files_; we won't discuss them further here):
55
+
### 4. Inspect the output
47
56
48
-
-`dep_graph.dot` consists of old stuff: a representation of dependencies that are _outside_ the newer query model.
49
-
-`dep_graph.txt` consists of old stuff: a representation of dependencies that are _outside_ the newer query model.
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.
50
64
51
65
52
66
## Interpret the HTML Output
@@ -69,27 +83,28 @@ The trace of the queries has a formal structure; see
69
83
70
84
We style this formal structure as follows:
71
85
72
-
- Blue dots represent query hits. They consist of leaves in the
73
-
trace's tree. (CSS class: `hit`).
74
-
- Red boxes represent query misses. They consist of internal nodes in
75
-
the trace's tree. (CSS class: `miss`).
76
-
- Many red boxes contain _nested boxes and dots_. This nesting structure
77
-
reflects that some providers _depend on_ results from other
78
-
providers, which consist of their nested children.
79
-
- For example, the red box labeled as `typeck_tables_of` depends
80
-
on the one labeled `adt_dtorck_constraint`, which itself
81
-
depends on one labeled `coherent_trait`.
82
-
- Some red boxes are _labeled_ with text, and have highlighted borders
83
-
(light red, and bolded). (See [heuristics](#heuristics) for
84
-
details). Where they are present, the labels give the following
85
-
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:
86
91
- The [query's _provider_](#queries), sans its _key_ and its _result_,
87
92
which are often too long to include in these labels.
88
93
- The _duration_ of the provider, as a fraction of the total time
89
94
(for the entire trace). This fraction includes the query's
90
95
entire extent (that is, the sum total of all of its
91
96
sub-queries).
92
-
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