about summary refs log tree commit diff
path: root/compiler/rustc_data_structures/src/profiling.rs
AgeCommit message (Collapse)AuthorLines
2024-12-22Adjust syntaxCaio-0/+63
2024-07-29Reformat `use` declarations.Nicholas Nethercote-5/+4
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-05-30Apply x clippy --fix and x fmtr0cky-1/+1
2024-05-08Remove `extern crate tracing`.Nicholas Nethercote-0/+1
`use` is a nicer way of doing things.
2024-02-18windows bump to 0.52klensy-4/+2
2023-12-30Update to bitflags 2 in the compilerNilstrieb-7/+8
This involves lots of breaking changes. There are two big changes that force changes. The first is that the bitflag types now don't automatically implement normal derive traits, so we need to derive them manually. Additionally, bitflags now have a hidden inner type by default, which breaks our custom derives. The bitflags docs recommend using the impl form in these cases, which I did.
2023-10-19Initiate the inner usage of `cfg_match`Caio-5/+8
2023-09-25Rename `cold_path` to `outline`John Kåre Alsaker-2/+2
2023-05-09bump windows crate 0.46 -> 0.48 in workspaceklensy-2/+4
2023-05-07Use smaller ints for bitflagsNilstrieb-1/+1
2023-04-18Rollup merge of #110417 - jsoref:spelling-compiler, r=NilstriebGuillaume Gomez-1/+1
Spelling compiler This is per https://github.com/rust-lang/rust/pull/110392#issuecomment-1510193656 I'm going to delay performing a squash because I really don't expect people to be perfectly happy w/ my changes, I really am a human and I really do make mistakes. r? Nilstrieb I'm going to be flying this evening, but I should be able to squash / respond to reviews w/in a day or two. I tried to be careful about dropping changes to `tests`, afaict only two files had changes that were likely related to the changes for a given commit (this is where not having eagerly squashed should have given me an advantage), but, that said, picking things apart can be error prone.
2023-04-17Spelling - compilerJosh Soref-1/+1
* account * achieved * advising * always * ambiguous * analysis * annotations * appropriate * build * candidates * cascading * category * character * clarification * compound * conceptually * constituent * consts * convenience * corresponds * debruijn * debug * debugable * debuggable * deterministic * discriminant * display * documentation * doesn't * ellipsis * erroneous * evaluability * evaluate * evaluation * explicitly * fallible * fulfill * getting * has * highlighting * illustrative * imported * incompatible * infringing * initialized * into * intrinsic * introduced * javascript * liveness * metadata * monomorphization * nonexistent * nontrivial * obligation * obligations * offset * opaque * opportunities * opt-in * outlive * overlapping * paragraph * parentheses * poisson * precisely * predecessors * predicates * preexisting * propagated * really * reentrant * referent * responsibility * rustonomicon * shortcircuit * simplifiable * simplifications * specify * stabilized * structurally * suggestibility * translatable * transmuting * two * unclosed * uninhabited * visibility * volatile * workaround Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-04-16Don't use `serde_json` to serialize a simple JSON objectNilstrieb-8/+33
This avoids `rustc_data_structures` depending on `serde_json` which allows it to be compiled much earlier, unlocking most of rustc.
2023-04-09Inline format_argsNilstrieb-1/+1
Co-authored-by: Michael Goulet <michael@errs.io>
2023-04-09Some simple `clippy::perf` fixesNilstrieb-1/+1
2023-03-21Remove `unique` and move `VerboseTimingGuard` fields into a new structJohn Kåre Alsaker-31/+29
2023-03-21Add `-Z time-passes-format` to allow specifying a JSON output for `-Z ↵John Kåre Alsaker-13/+59
time-passes`
2023-03-20migrate compiler, bootstrap, and compiletest to windows-rsAndy Russell-14/+19
2023-02-16`if $c:expr { Some($r:expr) } else { None }` =>> `$c.then(|| $r)`Maybe Waffle-7/+4
2023-02-06Make an optimal cold path for query_cache_hitJohn Kåre Alsaker-19/+22
2023-02-06Don't inline query_cache_hit to reduce code size of the query hot path.John Kåre Alsaker-1/+1
2023-01-05Fix `uninlined_format_args` for some compiler cratesnils-1/+1
Convert all the crates that have had their diagnostic migration completed (except save_analysis because that will be deleted soon and apfloat because of the licensing problem).
2022-12-20rustc: Remove needless lifetimesJeremy Stucki-7/+4
2022-12-10compiler: remove unnecessary imports and qualified pathsKaDiWa-1/+0
2022-12-01Remove useless borrows and derefsMaybe Waffle-3/+3
2022-10-06Be consistent about deciding whether to print pass data.Nicholas Nethercote-19/+21
`print_time_passes_entry` unconditionally prints data about a pass. The most commonly used call site, in `VerboseTimingGuard::drop`, guards it with a `should_print_passes` test. But there are a couple of other call sites that don't do that test. This commit moves the `should_print_passes` test within `print_time_passes_entry` so that all passes are treated equally.
2022-10-06Remove `-Ztime` option.Nicholas Nethercote-18/+6
The compiler currently has `-Ztime` and `-Ztime-passes`. I've used `-Ztime-passes` for years but only recently learned about `-Ztime`. What's the difference? Let's look at the `-Zhelp` output: ``` -Z time=val -- measure time of rustc processes (default: no) -Z time-passes=val -- measure time of each rustc pass (default: no) ``` The `-Ztime-passes` description is clear, but the `-Ztime` one is less so. Sounds like it measures the time for the entire process? No. The real difference is that `-Ztime-passes` prints out info about passes, and `-Ztime` does the same, but only for a subset of those passes. More specifically, there is a distinction in the profiling code between a "verbose generic activity" and an "extra verbose generic activity". `-Ztime-passes` prints both kinds, while `-Ztime` only prints the first one. (It took me a close reading of the source code to determine this difference.) In practice this distinction has low value. Perhaps in the past the "extra verbose" output was more voluminous, but now that we only print stats for a pass if it exceeds 5ms or alters the RSS, `-Ztime-passes` is less spammy. Also, a lot of the "extra verbose" cases are for individual lint passes, and you need to also use `-Zno-interleave-lints` to see those anyway. Therefore, this commit removes `-Ztime` and the associated machinery. One thing to note is that the existing "extra verbose" activities all have an extra string argument, so the commit adds the ability to accept an extra argument to the "verbose" activities.
2022-10-06Fix some comments.Nicholas Nethercote-4/+4
- It's `--print`, not `--prints`. - `-Ztime` and `-Ztime-passes` print to stderr, not stdout.
2022-06-22Fixed RSS reporting on macOSRida Dzhaafar-0/+18
2022-06-18Remove `likely!` and `unlikely!` macro from compilerGary Guo-1/+2
2022-06-13Integrate measureme's hardware performance counter support.Eduard-Mihai Burtescu-4/+10
2022-05-06Auto merge of #95454 - randomicon00:fix95444, r=wesleywiserbors-1/+20
Fixing #95444 by only displaying passes that take more than 5 millise… As discussed in #95444, I have added the code to test and only display prints that are greater than 5 milliseconds. r? `@jyn514`
2022-05-05Fixing #95444 by only displaying passes that take more than 5 millisecondsPeh-1/+20
95444: Adding passes that include memory increase Fix95444: Change the substraction with the abs_diff() method Fix95444: Change the substraction with abs_diff() method
2022-04-07add `generic_activity_with_arg_recorder` to the self-profilerRémy Rakic-0/+88
This allows profiling costly arguments to be recorded only when `-Zself-profile-events=args` is on: using a closure that takes an `EventArgRecorder` and call its `record_arg` or `record_args` methods.
2022-04-07turn `exec` comment into doc commentRémy Rakic-5/+5
2021-12-09Remove redundant [..]sest31-1/+1
2021-10-07Add support for artifact size profilingRyan Levick-3/+40
2021-08-22Fix typos “a”→“an”Frank Steffahn-1/+1
2021-07-07Add docs to new methodsRyan Levick-2/+6
2021-07-07Profile incremental hashingRyan Levick-11/+45
2021-02-18Print -Ztime-passes (and misc stats/logs) on stderr, not stdout.Eduard-Mihai Burtescu-1/+1
2021-02-05Indicate change in RSS from start to end of pass in time-passes outputTyson Nottingham-14/+11
Previously, this was omitted because it could be misleading, but the functionality seems too useful not to include.
2021-01-29Indicate both start and end of pass RSS in time-passes outputTyson Nottingham-18/+38
Previously, only the end of pass RSS was indicated. This could easily lead one to believe that the change in RSS from one pass to the next was attributable to the second pass, when in fact it occurred between the end of the first pass and the start of the second. Also, improve alignment of columns.
2021-01-14Use Option::map_or instead of `.map(..).unwrap_or(..)`LingMan-1/+1
2020-11-03[self-profiling] Include the estimated size of each cgu in the profileWesley Wiser-0/+22
This is helpful when looking for CGUs where the size estimate isn't a good indicator of compilation time. I verified that moving the profiling timer call doesn't affect the results.
2020-10-24Upgrade to measureme 9.0.0Wesley Wiser-18/+4
2020-10-22Remove unused ProfileCategory.Camille GILLOT-11/+0
2020-09-20Use as_secs_f64 in profiling.rsest31-4/+1
2020-08-30mv compiler to compiler/mark-0/+643