@@ -29,15 +29,16 @@ $ cargo +nightly rustc -- -Z self-profile
29
29
```
30
30
31
31
The commands above will run ` rustc ` with the flag that enables profiling. You should now
32
- have three files in your directory named ` pid-{pid}.events ` , ` pid-{pid}.string_data ` and
33
- ` pid-{pid}.string_index ` , which contain the profiler data. (If you just got a
34
- ` regex.profile_events.json ` file instead, your compiler is too old.)
32
+ have a file in your directory named ` regex-{pid}.mm_profdata ` which contains the profiler data. (If
33
+ you got three files instead, you will need to use an older version of the ` summarize ` tool such as
34
+ the ` 0.7.1 ` release to read the data:
35
+ ` cargo install --git https://github.com/rust-lang/measureme --tag 0.7.1 summarize ` )
35
36
36
37
You can now use the ` summarize ` tool we installed in the previous section to view the
37
38
contents of these files:
38
39
39
40
``` bash
40
- $ summarize summarize id -{pid}
41
+ $ summarize summarize regex -{pid}.mm_profdata
41
42
+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
42
43
| Item | Self time | % of total time | Item count | Cache hits | Blocked time | Incremental load time |
43
44
+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
@@ -92,7 +93,7 @@ as before: (with regex as example)
92
93
$ git clone https://github.com/rust-lang/regex.git
93
94
$ cd regex
94
95
$ cargo +mytoolchain rustc -- -Z self-profile
95
- $ summarize summarize pid -{pid}
96
+ $ summarize summarize regex -{pid}.mm_profdata
96
97
+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
97
98
| Item | Self time | % of total time | Item count | Cache hits | Blocked time | Incremental load time |
98
99
+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
@@ -146,7 +147,7 @@ The `diff` sub command allows you to compare the performance of two different pr
146
147
The output is a table like that of the ` summarize ` sub command but it instead shows the differences in each metric.
147
148
148
149
``` bash
149
- $ summarize diff base-profile changed-profile
150
+ $ summarize diff base-profile.mm_profdata changed-profile.mm_profdata
150
151
+---------------------------+--------------+------------+------------+--------------+-----------------------+
151
152
| Item | Self Time | Item count | Cache hits | Blocked time | Incremental load time |
152
153
+---------------------------+--------------+------------+------------+--------------+-----------------------+
0 commit comments