@@ -29,15 +29,16 @@ $ cargo +nightly rustc -- -Z self-profile
2929```
3030
3131The 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 ` )
3536
3637You can now use the ` summarize ` tool we installed in the previous section to view the
3738contents of these files:
3839
3940``` bash
40- $ summarize summarize id -{pid}
41+ $ summarize summarize regex -{pid}.mm_profdata
4142+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
4243| Item | Self time | % of total time | Item count | Cache hits | Blocked time | Incremental load time |
4344+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
@@ -92,7 +93,7 @@ as before: (with regex as example)
9293$ git clone https://github.com/rust-lang/regex.git
9394$ cd regex
9495$ cargo +mytoolchain rustc -- -Z self-profile
95- $ summarize summarize pid -{pid}
96+ $ summarize summarize regex -{pid}.mm_profdata
9697+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
9798| Item | Self time | % of total time | Item count | Cache hits | Blocked time | Incremental load time |
9899+------------------------+-----------+-----------------+------------+------------+--------------+-----------------------+
@@ -146,7 +147,7 @@ The `diff` sub command allows you to compare the performance of two different pr
146147The output is a table like that of the ` summarize ` sub command but it instead shows the differences in each metric.
147148
148149``` bash
149- $ summarize diff base-profile changed-profile
150+ $ summarize diff base-profile.mm_profdata changed-profile.mm_profdata
150151+---------------------------+--------------+------------+------------+--------------+-----------------------+
151152| Item | Self Time | Item count | Cache hits | Blocked time | Incremental load time |
152153+---------------------------+--------------+------------+------------+--------------+-----------------------+
0 commit comments