about summary refs log tree commit diff
path: root/src/librustc/util
AgeCommit message (Collapse)AuthorLines
2019-02-15print more information for closures when `-Zverbose` is givenNiko Matsakis-0/+9
Ideally, we'd probably print the closure substs themselves actually.
2019-02-14Rollup merge of #58309 - wesleywiser:add_more_profiler_events, ↵Mazdak Farrokhzad-18/+57
r=michaelwoerister Add more profiler events - Adds Start\Stop events for time spent loading incremental query results from disk. - Adds Start\Stop events for time spent blocked waiting for queries to complete (when parallel queries are enabled). r? @michaelwoerister
2019-02-11[self-profiler] Misc cleanupsWesley Wiser-15/+4
2019-02-11Capture time spent blocked waiting on queriesWesley Wiser-2/+26
This captures time spent blocked when a query is waiting for another query to finish executing in another thread.
2019-02-11Add self profiler events for loading incremental query results from diskWesley Wiser-3/+29
2019-02-10rustc: doc commentsAlexander Regueiro-21/+20
2019-02-10Auto merge of #58151 - ljedrz:HirIdify_rustc, r=Zoxcbors-1/+1
Partially HirId-ify rustc Another step towards https://github.com/rust-lang/rust/pull/57578.
2019-02-10Auto merge of #58085 - wesleywiser:profiler_2, r=wesleywiserbors-173/+353
Implement more detailed self profiling Timing data and cache hits/misses are now recorded at the query level. This allows us to show detailed per query information such as total time for each query. To see detailed query information in the summary pass the `-Z verbose` flag. For example: ``` rustc -Z self-profile -Z verbose hello_world.rs ``` results in something like: ```md Self profiling results: | Phase | Time (ms) | Time (%) | Queries | Hits (%) | ----------------------------------------- | -------------- | -------- | -------------- | -------- | Other | 177 | 54.97 | 8094 | 45.47 | - {time spent not running queries} | 113 | 35.09 | 0 | 0.00 | - const_eval | 16 | 4.97 | 26 | 11.54 | - type_of | 9 | 2.80 | 627 | 27.75 | - const_eval_raw | 8 | 2.48 | 22 | 0.00 | - adt_def | 7 | 2.17 | 381 | 11.55 | - visible_parent_map | 7 | 2.17 | 99 | 98.99 | - item_attrs | 6 | 1.86 | 698 | 50.14 | - item_children | 5 | 1.55 | 2815 | 0.00 | - adt_dtorck_constraint | 4 | 1.24 | 2 | 0.00 | - adt_destructor | 2 | 0.62 | 15 | 86.67 | TypeChecking | 53 | 16.46 | 2834 | 79.89 | - trait_impls_of | 9 | 2.80 | 65 | 86.15 | - evaluate_obligation | 7 | 2.17 | 80 | 2.50 | - const_is_rvalue_promotable_to_static | 6 | 1.86 | 1 | 0.00 | - is_copy_raw | 6 | 1.86 | 29 | 58.62 | - rvalue_promotable_map | 6 | 1.86 | 2 | 50.00 | - {time spent not running queries} | 6 | 1.86 | 0 | 0.00 | - typeck_item_bodies | 5 | 1.55 | 1 | 0.00 | - typeck_tables_of | 5 | 1.55 | 19 | 94.74 | - dropck_outlives | 2 | 0.62 | 1 | 0.00 | - layout_raw | 1 | 0.31 | 668 | 87.87 | Linking | 48 | 14.91 | 43 | 46.51 | - {time spent not running queries} | 48 | 14.91 | 0 | 0.00 | Codegen | 29 | 9.01 | 420 | 61.90 | - {time spent not running queries} | 16 | 4.97 | 0 | 0.00 | - collect_and_partition_mono_items | 11 | 3.42 | 13 | 92.31 | - mir_const | 1 | 0.31 | 1 | 0.00 | - mir_validated | 1 | 0.31 | 3 | 66.67 | Expansion | 14 | 4.35 | 0 | 0.00 | - {time spent not running queries} | 14 | 4.35 | 0 | 0.00 | BorrowChecking | 1 | 0.31 | 12 | 41.67 | - borrowck | 1 | 0.31 | 2 | 50.00 | Parsing | 0 | 0.00 | 0 | 0.00 Optimization level: No Incremental: off ``` <details> <summary>Rendered</summary> Self profiling results: | Phase | Time (ms) | Time (%) | Queries | Hits (%) | ----------------------------------------- | -------------- | -------- | -------------- | -------- | **Other** | **177** | **54.97** | **8094** | **45.47** | - {time spent not running queries} | 113 | 35.09 | 0 | 0.00 | - const_eval | 16 | 4.97 | 26 | 11.54 | - type_of | 9 | 2.80 | 627 | 27.75 | - const_eval_raw | 8 | 2.48 | 22 | 0.00 | - adt_def | 7 | 2.17 | 381 | 11.55 | - visible_parent_map | 7 | 2.17 | 99 | 98.99 | - item_attrs | 6 | 1.86 | 698 | 50.14 | - item_children | 5 | 1.55 | 2815 | 0.00 | - adt_dtorck_constraint | 4 | 1.24 | 2 | 0.00 | - adt_destructor | 2 | 0.62 | 15 | 86.67 | TypeChecking | 53 | 16.46 | 2834 | 79.89 | - trait_impls_of | 9 | 2.80 | 65 | 86.15 | - evaluate_obligation | 7 | 2.17 | 80 | 2.50 | - const_is_rvalue_promotable_to_static | 6 | 1.86 | 1 | 0.00 | - is_copy_raw | 6 | 1.86 | 29 | 58.62 | - rvalue_promotable_map | 6 | 1.86 | 2 | 50.00 | - {time spent not running queries} | 6 | 1.86 | 0 | 0.00 | - typeck_item_bodies | 5 | 1.55 | 1 | 0.00 | - typeck_tables_of | 5 | 1.55 | 19 | 94.74 | - dropck_outlives | 2 | 0.62 | 1 | 0.00 | - layout_raw | 1 | 0.31 | 668 | 87.87 | Linking | 48 | 14.91 | 43 | 46.51 | - {time spent not running queries} | 48 | 14.91 | 0 | 0.00 | Codegen | 29 | 9.01 | 420 | 61.90 | - {time spent not running queries} | 16 | 4.97 | 0 | 0.00 | - collect_and_partition_mono_items | 11 | 3.42 | 13 | 92.31 | - mir_const | 1 | 0.31 | 1 | 0.00 | - mir_validated | 1 | 0.31 | 3 | 66.67 | Expansion | 14 | 4.35 | 0 | 0.00 | - {time spent not running queries} | 14 | 4.35 | 0 | 0.00 | BorrowChecking | 1 | 0.31 | 12 | 41.67 | - borrowck | 1 | 0.31 | 2 | 50.00 | Parsing | 0 | 0.00 | 0 | 0.00 Optimization level: No Incremental: off </details> cc @nikomatsakis @michaelwoerister @Zoxc Fixes #54141
2019-02-07Add const params to Defvarkor-0/+1
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
2019-02-07Calculate self-times not total timesWesley Wiser-7/+18
2019-02-07Add #[inline] annotationsWesley Wiser-0/+7
2019-02-07Implement more detailed self profilingWesley Wiser-173/+335
Timing data and cache hits/misses are now recorded at the query level. This allows us to show detailed per query information such as total time for each query. To see detailed query information in the summary pass the `-Z verbose` flag. For example: ``` rustc -Z self-profile -Z verbose hello_world.rs ```
2019-02-05rustc: partially HirIdifyljedrz-1/+1
2019-02-05move librustc to 2018Mark Mansi-20/+20
2019-01-10integrate trait aliases into def-paths / metadataNiko Matsakis-0/+1
Co-authored-by: Alexander Regueiro <alexreg@me.com>
2019-01-08Auto merge of #56988 - alexcrichton:monotonic-instant, r=sfacklerbors-15/+2
std: Force `Instant::now()` to be monotonic This commit is an attempt to force `Instant::now` to be monotonic through any means possible. We tried relying on OS/hardware/clock implementations, but those seem buggy enough that we can't rely on them in practice. This commit implements the same hammer Firefox recently implemented (noted in #56612) which is to just keep whatever the lastest `Instant::now()` return value was in memory, returning that instead of the OS looks like it's moving backwards. Closes #48514 Closes #49281 cc #51648 cc #56560 Closes #56612 Closes #56940
2019-01-07Rename some functionsJohn Kåre Alsaker-1/+1
2019-01-07Fix and optimize query profilingJohn Kåre Alsaker-7/+9
2019-01-07std: Force `Instant::now()` to be monotonicAlex Crichton-15/+2
This commit is an attempt to force `Instant::now` to be monotonic through any means possible. We tried relying on OS/hardware/clock implementations, but those seem buggy enough that we can't rely on them in practice. This commit implements the same hammer Firefox recently implemented (noted in #56612) which is to just keep whatever the lastest `Instant::now()` return value was in memory, returning that instead of the OS looks like it's moving backwards. Closes #48514 Closes #49281 cc #51648 cc #56560 Closes #56612 Closes #56940
2019-01-05Auto merge of #56837 - arielb1:nonprincipal-trait-objects, r=nikomatsakisbors-13/+35
Add support for trait-objects without a principal The hard-error version of #56481 - should be merged after we do something about the `traitobject` crate. Fixes #33140. Fixes #57057. r? @nikomatsakis
2019-01-04Auto merge of #56723 - oli-obk:lazy_const, r=nikomatsakisbors-5/+4
Don't emit `Unevaluated` from `const_eval` cc @eddyb @RalfJung
2019-01-04alphabetize marker traits when printedAriel Ben-Yehuda-2/+15
This makes sure they are printed in a compiler-version-independent order, avoiding ui test instability.
2019-01-04fix ppauxAriel Ben-Yehuda-1/+8
2019-01-04add support for principal-less trait object typesAriel Ben-Yehuda-10/+12
should be a pure refactoring.
2019-01-03Display `impl Sized` correctlyMatthew Jasper-0/+2
It used to display as just `impl`
2019-01-02pacify the mercilous tidyNiko Matsakis-7/+9
2019-01-02refactor highlighting to take any RegionKind, making it more generalNiko Matsakis-66/+84
2019-01-02add the ability to highlight placeholdersNiko Matsakis-2/+81
2019-01-02generalize region highlights into a structNiko Matsakis-45/+79
2019-01-02make `get_highlight_region_for_regionvid` only affect re-vidNiko Matsakis-4/+9
In NLL, ReVid is all there is, but I might want to repurpose.
2019-01-01Move the `Unevaluated` constant arm upwards in the type structureOliver Scherer-5/+4
2019-01-01Address review commentsVadim Petrochenkov-0/+3
Say "trait" instead of "type" in diagnostics for `dyn Trait`
2018-12-25Remove licensesMark Rousskov-70/+0
2018-12-10[self-profiler] Add column for percent of total timeWesley Wiser-4/+9
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-12-07Auto merge of #56502 - Zoxc:hir-func, r=eddybbors-8/+8
Use a function to access the Hir map to be able to turn it into a query later r? @eddyb
2018-12-07Rollup merge of #56555 - Mark-Simulacrum:stderr-profile, r=wesleywiserkennytm-3/+3
Send textual profile data to stderr, not stdout This makes it possible to run with RUSTFLAGS="-Zself-profile" without having to redirect compiler output; otherwise Cargo will error out due to non-empty compiler stdout. r? @wesleywiser
2018-12-06Use a function to access the Hir map to be able to turn it into a query laterJohn Kåre Alsaker-8/+8
2018-12-05Send textual profile data to stderr, not stdoutMark Rousskov-3/+3
This makes it possible to run with RUSTFLAGS="-Zself-profile" without having to redirect compiler output; otherwise Cargo will error out due to non-empty compiler stdout.
2018-12-04cleanup: remove static lifetimes from constsljedrz-1/+1
2018-11-30proc_macro: introduce a "bridge" between clients (proc macros) and servers ↵Eduard-Mihai Burtescu-8/+5
(compiler front-ends).
2018-11-25Make JSON output from -Zprofile-json validMark Rousskov-1/+1
2018-11-25Rollup merge of #56170 - wesleywiser:fix_self_profiler_windows, r=estebankPietro Albini-2/+15
Fix self profiler ICE on Windows Fixes #51648
2018-11-24[Windows] Work around non-monotonic clocks in the self-profilerWesley Wiser-2/+15
On Windows, the high-resolution timestamp api doesn't seem to always be monotonic. This can cause panics when the self-profiler uses the `Instant` api to find elapsed time. Work around this by detecting the case where now is less than the start time and just use 0 elapsed ticks as the measurement. Fixes #51648
2018-11-24Move `BoundTy` debruijn index to the `TyKind` enum variantscalexm-3/+3
2018-11-24Introduce `TyKind::Placeholder` variantscalexm-1/+4
2018-11-24Distinguish between placeholder kindsscalexm-1/+1
2018-11-24Rollup merge of #56091 - wesleywiser:fix_self_profiler_json, r=petrochenkovkennytm-2/+13
Fix json output in the self-profiler Fix missing ',' array element separators and convert NaN's to 0. cc @Mark-Simulacrum
2018-11-21rustc: remove {FxHash,Node,DefId,HirId,ItemLocal}{Map,Set} "constructor" fns.Eduard-Mihai Burtescu-4/+0
2018-11-19Fix json output in the self-profilerWesley Wiser-2/+13
Fix missing ',' array element separators and convert NaN's to 0.