diff options
| author | whitequark <whitequark@whitequark.org> | 2017-02-13 09:57:50 +0000 |
|---|---|---|
| committer | whitequark <whitequark@whitequark.org> | 2017-05-01 09:16:20 +0000 |
| commit | 42754ce710a777b38402b12728daf54d68ea2b50 (patch) | |
| tree | 471e30da0626a6b7b2182799280742ba11466ac6 /src/bootstrap/config.toml.example | |
| parent | 06fb4d25642a3f223db1441972dd5962085cfba1 (diff) | |
Add profiling support, through the rustc -Z profile flag.
When -Z profile is passed, the GCDAProfiling LLVM pass is added to the pipeline, which uses debug information to instrument the IR. After compiling with -Z profile, the $(OUT_DIR)/$(CRATE_NAME).gcno file is created, containing initial profiling information. After running the program built, the $(OUT_DIR)/$(CRATE_NAME).gcda file is created, containing branch counters. The created *.gcno and *.gcda files can be processed using the "llvm-cov gcov" and "lcov" tools. The profiling data LLVM generates does not faithfully follow the GCC's format for *.gcno and *.gcda files, and so it will probably not work with other tools (such as gcov itself) that consume these files.
Diffstat (limited to 'src/bootstrap/config.toml.example')
| -rw-r--r-- | src/bootstrap/config.toml.example | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/config.toml.example b/src/bootstrap/config.toml.example index 0309eca0e5d..93997027dbb 100644 --- a/src/bootstrap/config.toml.example +++ b/src/bootstrap/config.toml.example @@ -147,6 +147,9 @@ # Build the sanitizer runtimes #sanitizers = false +# Build the profiler runtime +#profiler = false + # Indicates whether the OpenSSL linked into Cargo will be statically linked or # not. If static linkage is specified then the build system will download a # known-good version of OpenSSL, compile it, and link it to Cargo. |
