Use the inferno tool from the measureme repository to convert profiling data files into a flamegraph. After generating the .events, .string_data, and .string_index files via rustc -Zself-profile, run the following command:
$ ../measureme/target/release/inferno <crate-name>-<pid>
Alternatively, if profiling Clippy with perf, generate the flamegraph from the resulting perf.data file using the flamegraph tool:
$ perf script -i ./target/lintcheck/sources/<package>/perf.data | flamegraph/flamegraph.pl > out.svg