about summary refs log tree commit diff
path: root/src/librustc/session/code_stats.rs
AgeCommit message (Collapse)AuthorLines
2019-12-03Move Session to librustc_sessionMark Rousskov-177/+0
2019-11-10Move lock into CodeStatsMark Rousskov-5/+7
Prevent accidental too-long borrows by ensuring only encapsulated locking.
2019-04-12In `-Zprint-type-size` output, sort enum variants by size.Nicholas Nethercote-1/+7
It's useful to see the biggest variants first.
2018-12-25Remove licensesMark Rousskov-10/+0
2018-11-22rustc_target: avoid using AbiAndPrefAlign where possible.Eduard-Mihai Burtescu-3/+3
2018-11-22rustc_target: separate out an individual Align from AbiAndPrefAlign.Eduard-Mihai Burtescu-1/+1
2018-11-22rustc_target: rename abi::Align to AbiAndPrefAlign.Eduard-Mihai Burtescu-2/+2
2018-10-19Prefer `Default::default` over `FxHash*::default` in struct constructorsOliver Scherer-3/+1
2018-10-19Deprecate the `FxHashMap()` and `FxHashSet()` constructor function hackOliver Scherer-1/+1
2018-08-09Remove dependency on rustc::ty from code_statsMark Rousskov-14/+1
2018-07-27Prefer to_string() to format!()ljedrz-2/+2
2018-04-11Implementation of `#[repr(packed(n))]` RFC 1399.Cameron Hart-16/+21
2017-12-26avoid ICE when fields are not laid out in orderNiko Matsakis-5/+13
2017-07-05use field init shorthand in src/librustcZack M. Davis-2/+2
The field init shorthand syntax was stabilized in 1.17.0 (aebd94f); we are now free to use it in the compiler.
2017-03-13some style fixesTshepang Lekhonkhobe-1/+4
2016-12-14Fix -Z print-type-sizes and tests.Austin Hicks-1/+6
This was done by sorting the fields by increasing offset; as a consequence, the order of -Z print-type-sizes matches memory order not source order.
2016-11-24Revisions from review comments, squashed.Felix S. Klock II-0/+173
Biggest change: Revised print-type-sizes output to include breakdown of layout. Includes info about field sizes (and alignment + padding when padding is injected; the injected padding is derived from the offsets computed by layout module). Output format is illustrated in commit that has the ui tests. Note: there exists (at least) one case of variant w/o name: empty enums. Namely, empty enums use anonymous univariant repr. So for such cases, print the number of the variant instead of the name. ---- Also, eddyb suggested of reading from `layout_cache` post-trans. (For casual readers: the compiler source often uses the word "cache" for tables that are in fact not periodically purged, and thus are useful as the basis for data like this.) Some types that were previously not printed are now included in the output. (See e.g. the tests `print_type_sizes/generics.rs` and `print_type_sizes/variants.rs`) ---- Other review feedback: switch to an exhaustive match when filtering in just structural types. switch to hashset for layout info and move sort into print method. ---- Driveby change: Factored session::code_stats into its own module ---- incorporate njn feedback re output formatting.