about summary refs log tree commit diff
path: root/src/librustc/ty/query/plumbing.rs
AgeCommit message (Collapse)AuthorLines
2019-04-12Use measureme in self-profilerWesley Wiser-27/+40
Related to #58372 Related to #58967
2019-03-30Move query definitions over to the proc macroJohn Kåre Alsaker-230/+14
2019-03-29rustc(codegen): uncache `def_symbol_name` prefix from `symbol_name`.Eduard-Mihai Burtescu-3/+1
2019-03-28Rollup merge of #59091 - Zoxc:eval_always, r=michaelwoeristerMazdak Farrokhzad-3/+7
Combine input and eval_always query types Hardcoding `Krate` as a dependency of `eval_always` queries doesn't really make sense if we want to use the query system before HIR lowering / hashing. Without that hardcoding they become pretty much identical to `input` queries, so I combined them to a single type. This will regress the `clean` incremental scenario, but that isn't terribly common. r? @michaelwoerister
2019-03-27Rollup merge of #57293 - Zoxc:incr-passes3, r=michaelwoeristerJosh Stone-0/+1
Make some lints incremental Blocked on https://github.com/rust-lang/rust/pull/57253 r? @michaelwoerister
2019-03-26Combine input and eval_always query typesJohn Kåre Alsaker-3/+7
2019-03-25Make some lints incrementalJohn Kåre Alsaker-0/+1
2019-03-20Add eval_always to query macro and move a query overJohn Kåre Alsaker-1/+0
2019-03-20Add anon to query macro and move a query overJohn Kåre Alsaker-1/+0
2019-03-20Add no_force to query macro and move some queries overJohn Kåre Alsaker-8/+1
2019-03-20Add no_hash to query macro and move some queries overJohn Kåre Alsaker-8/+2
2019-03-18Add load_cached query modifier and keep dep node names consistent with query ↵John Kåre Alsaker-5/+3
names
2019-03-18Define queries using a proc macroJohn Kåre Alsaker-12/+20
2019-03-15rustc: move the contents of ty::item_path to ty::print.Eduard-Mihai Burtescu-3/+2
2019-03-06Rename check_privacy to check_private_in_publicJohn Kåre Alsaker-1/+1
2019-03-06Split up privacy checking so privacy_access_levels only does computations ↵John Kåre Alsaker-0/+1
required for AccessLevels
2019-02-28Introduce rustc_interface and move some methods thereJohn Kåre Alsaker-0/+1
2019-02-15Always emit an error for a query cycleJohn Kåre Alsaker-65/+44
2019-02-14Rollup merge of #58309 - wesleywiser:add_more_profiler_events, ↵Mazdak Farrokhzad-2/+15
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-13Rollup merge of #58386 - Zoxc:fix-54242, r=michaelwoeristerMazdak Farrokhzad-58/+56
Fix #54242 r? @michaelwoerister
2019-02-13Rollup merge of #58273 - taiki-e:rename-dependency, r=matthewjasperMazdak Farrokhzad-4/+4
Rename rustc_errors dependency in rust 2018 crates I think this is a better solution than `use rustc_errors as errors` in `lib.rs` and `use crate::errors` in modules. Related: rust-lang/cargo#5653 cc #58099 r? @Centril
2019-02-13Cleanup importsTaiki Endo-4/+4
2019-02-13Rename rustc_errors dependency in rust 2018 cratesTaiki Endo-4/+4
2019-02-12Set the query in the ImplicitCtxt before trying to mark it greenJohn Kåre Alsaker-58/+56
2019-02-11Capture time spent blocked waiting on queriesWesley Wiser-2/+13
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-0/+2
2019-02-10rustc: doc commentsAlexander Regueiro-18/+18
2019-02-10Auto merge of #58085 - wesleywiser:profiler_2, r=wesleywiserbors-9/+10
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-08Add a query type which is always marked as red if it runsJohn Kåre Alsaker-7/+24
2019-02-07Implement more detailed self profilingWesley Wiser-9/+10
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-05move librustc to 2018Mark Mansi-24/+24
2019-01-29Only store the result of mir_borrowck for closuresJohn Kåre Alsaker-2/+2
2019-01-29Make impl_wf_check incrementalJohn Kåre Alsaker-0/+1
2019-01-29Add an ensure() method to TyCtxt used to ensure queries are runJohn Kåre Alsaker-12/+21
2019-01-28Use multiple threads by default. Limits tests to one thread. Do some renaming.John Kåre Alsaker-4/+4
2019-01-24Implement optimize(size) and optimize(speed)Simonas Kazlauskas-0/+3
2019-01-19Auto merge of #57752 - Centril:rollup, r=Centrilbors-0/+2
Rollup of 10 pull requests Successful merges: - #57268 (Add a target option "merge-functions", and a corresponding -Z flag (works around #57356)) - #57476 (Move glob map use to query and get rid of CrateAnalysis) - #57501 (High priority resolutions for associated variants) - #57573 (Querify `entry_fn`) - #57610 (Fix nested `?` matchers) - #57634 (Remove an unused function argument) - #57653 (Make the contribution doc reference the guide more) - #57666 (Generalize `huge-enum.rs` test and expected stderr for more cross platform cases) - #57698 (Fix typo bug in DepGraph::try_mark_green().) - #57746 (Update README.md) Failed merges: r? @ghost
2019-01-19Rollup merge of #57573 - Xanewok:querify-entry-fn, r=ZoxcMazdak Farrokhzad-0/+1
Querify `entry_fn` Analogous to https://github.com/rust-lang/rust/pull/57570 but this will also require few fixups in Miri so I decided to separate that (and it seems [CI doesn't let us break tools anymore](https://github.com/rust-lang/rust/pull/57392#issuecomment-453801540)? Or was that because it was a rollup PR?) r? @nikomatsakis
2019-01-19Rollup merge of #57476 - Xanewok:bye-crate-analysis, r=ZoxcMazdak Farrokhzad-0/+1
Move glob map use to query and get rid of CrateAnalysis ~Also includes commits from ~https://github.com/rust-lang/rust/pull/57392~ and ~https://github.com/rust-lang/rust/pull/57436~.~ With glob map calculated unconditionally in https://github.com/rust-lang/rust/pull/57392, this PR moves the calculated glob map to `GlobalCtxt` and exposes a relevant query (as we do with other queries which copy precomputed data over from the `Resolver`). This allows us to get rid of the `CrateAnalysis` struct in an attempt to simplify the compiler interface. cc @Zoxc r? @nikomatsakis @Zoxc @petrochenkov
2019-01-19Auto merge of #57253 - Zoxc:incr-passes2, r=michaelwoeristerbors-0/+3
Make privacy checking, intrinsic checking and liveness checking incremental Blocked on https://github.com/rust-lang/rust/pull/51487 r? @michaelwoerister
2019-01-17Querify glob map usage (last use of CrateAnalysis)Igor Matuszewski-0/+1
2019-01-15Querify entry_fnIgor Matuszewski-0/+1
2019-01-15Optimize try_mark_green and eliminate the lock on dep node colorsJohn Kåre Alsaker-41/+8
2019-01-15Make privacy checking, intrinsic checking and liveness checking incrementalJohn Kåre Alsaker-0/+3
2019-01-14Rollup merge of #57480 - Zoxc:query-fix, r=michaelwoeristerMazdak Farrokhzad-20/+21
Clean up and fix a bug in query plumbing r? @michaelwoerister
2019-01-13Auto merge of #57580 - Centril:rollup, r=Centrilbors-30/+44
Rollup of 4 pull requests Successful merges: - #56874 (Simplify foreign type rendering.) - #57113 (Move diagnostics out from QueryJob and optimize for the case with no diagnostics) - #57366 (Point at match discriminant on type error in match arm pattern) - #57538 (librustc_mir: Fix ICE with slice patterns) Failed merges: - #57381 (Tweak output of type mismatch between "then" and `else` `if` arms) r? @ghost
2019-01-11Make more passes incrementalJohn Kåre Alsaker-0/+5
2019-01-09Clean up and fix a bug in query plumbingJohn Kåre Alsaker-20/+21
2019-01-08Move diagnostics out from QueryJob and optimize for the case with no diagnosticsJohn Kåre Alsaker-30/+44
2019-01-08Auto merge of #57114 - Zoxc:query-perf11, r=michaelwoeristerbors-1/+1
Clean up and optimize OpenTask / read_index r? @michaelwoerister