aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/Cargo.toml
Commit message (Collapse)AuthorAgeFilesLines
* Bump perf-event and rustc_lexerLaurențiu Nicola2020-07-301-2/+2
|
* Replace rand with oorandomAleksey Kladov2020-07-291-1/+1
|
* Lighter weight tempdirAleksey Kladov2020-07-231-1/+0
|
* Use symbol tagskjeremy2020-07-221-1/+1
|
* Setup global allocator in the correct crateAleksey Kladov2020-07-221-3/+1
| | | | It worked before, but was roundabout
* Remove support for jemallocAleksey Kladov2020-07-221-1/+0
| | | | | We only used it for measuring memory usage, but now we can use glibc's allocator for that just fine
* Simplify exclusion logicAleksey Kladov2020-07-181-1/+0
|
* Update lsp-types for HoverOptionsJeremy Kolb2020-07-151-1/+1
|
* Merge #5354bors[bot]2020-07-151-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5354: Add opt-in mimalloc feature r=matklad a=ivan This adds a `mimalloc` feature to use [mimalloc](https://github.com/microsoft/mimalloc) via [mimalloc_rust](https://github.com/purpleprotocol/mimalloc_rust), and a corresponding `cargo xtask install --server --mimalloc`. In my tests on Linux, mimalloc seems to run consistently faster than jemalloc and uses only slightly more memory in `analysis-stats` on chalk. Also, builds with mimalloc produce a binary 3MB smaller than builds with jemalloc. A summary of `env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/` runs on NixOS master on an Intel 4790K in VMware Workstation: <table> <tr> <td></td><td>self-reported time</td><td>elapsed time</td><td>max RSS</td> </tr> <tr><td>glibc 2.30 run 1</td><td>225.1 sec</td><td>3:46.91</td><td>1075208</td></tr> <tr><td>glibc 2.30 run 2</td><td>228.4 sec</td><td>3:50.13</td><td>1074996</td></tr> <tr><td>jemalloc run 1</td><td>201.8 sec</td><td>3:23.03</td><td>1055960</td></tr> <tr><td>jemalloc run 2</td><td>199.2 sec</td><td>3:20.41</td><td>1065040</td></tr> <tr><td>mimalloc run 1</td><td>188.6 sec</td><td>3:09.77</td><td>1105584</td></tr> <tr><td>mimalloc run 2</td><td>185.0 sec</td><td>3:06.23</td><td>1108132</td></tr> <tr><td>mimalloc + lto run 1</td><td>160.7 sec</td><td>2:41.80</td><td>1106076</td></tr> <tr><td>mimalloc + lto run 2</td><td>162.2 sec</td><td>2:43.31</td><td>1104268</td></tr> </tr> </table> I included an `lto = true; codegen-units = 1` run out of curiosity, this PR doesn't enable it. <details> <summary>analysis-stats benchmark runs</summary> ## default ``` # env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/ Finished release [optimized] target(s) in 0.10s Running `target/release/rust-analyzer analysis-stats ../chalk/` [ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine [ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration [ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration Database loaded 333.880345ms Crates in this dir: 11 Total modules found: 159 Total declarations: 2631 Total functions: 1947 Item Collection: 10.176299461s, 0b allocated 0b resident Total expressions: 57094 Expressions of unknown type: 2938 (5%) Expressions of partially unknown type: 2427 (4%) Type mismatches: 232 Inference: 214.968806927s, 0b allocated 0b resident Total: 225.145114417s, 0b allocated 0b resident Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/" User time (seconds): 225.34 System time (seconds): 1.49 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 3:46.91 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 1075208 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 6 Minor (reclaiming a frame) page faults: 294711 Voluntary context switches: 365 Involuntary context switches: 3273 Swaps: 0 File system inputs: 2904 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 # env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/ Finished release [optimized] target(s) in 0.10s Running `target/release/rust-analyzer analysis-stats ../chalk/` [ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine [ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration [ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration Database loaded 332.711598ms Crates in this dir: 11 Total modules found: 159 Total declarations: 2631 Total functions: 1947 Item Collection: 9.895020518s, 0b allocated 0b resident Total expressions: 57094 Expressions of unknown type: 2938 (5%) Expressions of partially unknown type: 2427 (4%) Type mismatches: 232 Inference: 218.5001697s, 0b allocated 0b resident Total: 228.39519833s, 0b allocated 0b resident Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/" User time (seconds): 228.26 System time (seconds): 1.75 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 3:50.13 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 1074996 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 9 Minor (reclaiming a frame) page faults: 294748 Voluntary context switches: 330 Involuntary context switches: 1561 Swaps: 0 File system inputs: 12608 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 ``` ## jemalloc ``` # env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/ Finished release [optimized] target(s) in 0.11s Running `target/release/rust-analyzer analysis-stats ../chalk/` [ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine [ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration [ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration Database loaded 356.090374ms Crates in this dir: 11 Total modules found: 159 Total declarations: 2631 Total functions: 1947 Item Collection: 10.176550183s, 439mb allocated 465mb resident Total expressions: 57094 Expressions of unknown type: 2938 (5%) Expressions of partially unknown type: 2427 (4%) Type mismatches: 232 Inference: 191.607201827s, 993mb allocated 1036mb resident Total: 201.783937913s, 993mb allocated 1036mb resident Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/" User time (seconds): 201.07 System time (seconds): 1.89 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 3:23.03 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 1055960 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 357755 Voluntary context switches: 240 Involuntary context switches: 1889 Swaps: 0 File system inputs: 256 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 # env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/ Finished release [optimized] target(s) in 0.10s Running `target/release/rust-analyzer analysis-stats ../chalk/` [ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine [ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration [ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration Database loaded 317.917622ms Crates in this dir: 11 Total modules found: 159 Total declarations: 2631 Total functions: 1947 Item Collection: 9.902142185s, 439mb allocated 463mb resident Total expressions: 57094 Expressions of unknown type: 2938 (5%) Expressions of partially unknown type: 2427 (4%) Type mismatches: 232 Inference: 189.295317017s, 993mb allocated 1046mb resident Total: 199.197555943s, 993mb allocated 1046mb resident Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/" User time (seconds): 198.64 System time (seconds): 1.67 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 3:20.41 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 1065040 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 369013 Voluntary context switches: 243 Involuntary context switches: 2835 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 ``` ## mimalloc ``` # env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/ Finished release [optimized] target(s) in 0.12s Running `target/release/rust-analyzer analysis-stats ../chalk/` [ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine [ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration [ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration Database loaded 332.116806ms Crates in this dir: 11 Total modules found: 159 Total declarations: 2631 Total functions: 1947 Item Collection: 9.796643695s, 0b allocated 0b resident Total expressions: 57094 Expressions of unknown type: 2938 (5%) Expressions of partially unknown type: 2427 (4%) Type mismatches: 232 Inference: 178.82132362s, 0b allocated 0b resident Total: 188.617975605s, 0b allocated 0b resident Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/" User time (seconds): 187.70 System time (seconds): 1.97 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 3:09.77 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 1105584 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 296481 Voluntary context switches: 222 Involuntary context switches: 1868 Swaps: 0 File system inputs: 256 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 # env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/ Finished release [optimized] target(s) in 0.13s Running `target/release/rust-analyzer analysis-stats ../chalk/` [ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine [ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration [ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration Database loaded 320.046776ms Crates in this dir: 11 Total modules found: 159 Total declarations: 2631 Total functions: 1947 Item Collection: 9.287690124s, 0b allocated 0b resident Total expressions: 57094 Expressions of unknown type: 2938 (5%) Expressions of partially unknown type: 2427 (4%) Type mismatches: 232 Inference: 175.710939697s, 0b allocated 0b resident Total: 184.998640033s, 0b allocated 0b resident Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/" User time (seconds): 184.38 System time (seconds): 1.81 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 3:06.23 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 1108132 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 297055 Voluntary context switches: 374 Involuntary context switches: 2374 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 ``` ## mimalloc + lto ``` # env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/ Finished release [optimized] target(s) in 0.11s Running `target/release/rust-analyzer analysis-stats ../chalk/` [ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine [ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration [ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration Database loaded 369.600196ms Crates in this dir: 11 Total modules found: 159 Total declarations: 2631 Total functions: 1947 Item Collection: 7.572726834s, 0b allocated 0b resident Total expressions: 57094 Expressions of unknown type: 2938 (5%) Expressions of partially unknown type: 2427 (4%) Type mismatches: 232 Inference: 153.090899101s, 0b allocated 0b resident Total: 160.663635235s, 0b allocated 0b resident Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/" User time (seconds): 160.01 System time (seconds): 1.70 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 2:41.80 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 1106076 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 1 Minor (reclaiming a frame) page faults: 296610 Voluntary context switches: 209 Involuntary context switches: 2798 Swaps: 0 File system inputs: 8 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 # env time -v cargo run --release -p rust-analyzer -- analysis-stats ../chalk/ Finished release [optimized] target(s) in 0.10s Running `target/release/rust-analyzer analysis-stats ../chalk/` [ERROR ra_project_model] cyclic dependency chalk-integration -> chalk-engine [ERROR ra_project_model] cyclic dependency chalk-recursive -> chalk-integration [ERROR ra_project_model] cyclic dependency chalk-solve -> chalk-integration Database loaded 334.630658ms Crates in this dir: 11 Total modules found: 159 Total declarations: 2631 Total functions: 1947 Item Collection: 7.71699197s, 0b allocated 0b resident Total expressions: 57094 Expressions of unknown type: 2938 (5%) Expressions of partially unknown type: 2427 (4%) Type mismatches: 232 Inference: 154.50351318s, 0b allocated 0b resident Total: 162.220513775s, 0b allocated 0b resident Command being timed: "cargo run --release -p rust-analyzer -- analysis-stats ../chalk/" User time (seconds): 161.52 System time (seconds): 1.74 Percent of CPU this job got: 99% Elapsed (wall clock) time (h:mm:ss or m:ss): 2:43.31 Average shared text size (kbytes): 0 Average unshared data size (kbytes): 0 Average stack size (kbytes): 0 Average total size (kbytes): 0 Maximum resident set size (kbytes): 1104268 Average resident set size (kbytes): 0 Major (requiring I/O) page faults: 0 Minor (reclaiming a frame) page faults: 296183 Voluntary context switches: 200 Involuntary context switches: 1666 Swaps: 0 File system inputs: 0 File system outputs: 0 Socket messages sent: 0 Socket messages received: 0 Signals delivered: 0 Page size (bytes): 4096 Exit status: 0 ``` </details> Co-authored-by: Ivan Kozik <[email protected]>
| * Add opt-in mimalloc featureIvan Kozik2020-07-141-0/+1
| |
* | Add a license field to all the cratesYuki Okushi2020-07-141-0/+1
|/
* Update lsp-typesJeremy Kolb2020-07-121-1/+1
|
* Update lsp-types to account for new CodeActionKind structureJeremy Kolb2020-07-111-1/+1
|
* Move diagnostics tests to expectAleksey Kladov2020-07-091-1/+0
|
* Cleanup diagnostic conversion codeAleksey Kladov2020-07-091-0/+1
|
* analysis-stats: allow parallel type inferenceJonas Schievink2020-06-301-0/+1
|
* Moved new deps to CLI-only sectionDavid Lattimore2020-06-301-2/+2
|
* Add a simple SSR subcommand to the rust-analyzer command line binaryDavid Lattimore2020-06-291-0/+2
|
* Bump depsLaurențiu Nicola2020-06-271-1/+1
|
* Try to find rustfmt in more placesAleksey Kladov2020-06-271-0/+1
|
* Rename ra_flycheck -> flycheckAleksey Kladov2020-06-251-1/+1
|
* New VFSAleksey Kladov2020-06-231-1/+2
|
* Remove relative-path dependencyAleksey Kladov2020-06-231-1/+0
|
* Move ReqQueue to lsp-serverAleksey Kladov2020-06-201-1/+1
|
* Merge #4740bors[bot]2020-06-041-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4740: Remove unneeded "./" prefix affecting error messages r=kjeremy a=dtolnay I noticed this in the error in the commit message of https://github.com/rust-analyzer/rust-analyzer/pull/4739. Before: ```console error[E0599]: no method named `initialize_finish` found for struct `lsp_server::Connection` in the current scope --> crates/rust-analyzer/./src/bin/main.rs:99:16 | 99 | connection.initialize_finish(initialize_id, initialize_result)?; | ^^^^^^^^^^^^^^^^^ method not found in `lsp_server::Connection` ``` After: ```console error[E0599]: no method named `initialize_finish` found for struct `lsp_server::Connection` in the current scope --> crates/rust-analyzer/src/bin/main.rs:99:16 | 99 | connection.initialize_finish(initialize_id, initialize_result)?; | ^^^^^^^^^^^^^^^^^ method not found in `lsp_server::Connection` ``` ```diff - --> crates/rust-analyzer/./src/bin/main.rs:99:16 + --> crates/rust-analyzer/src/bin/main.rs:99:16 ``` Co-authored-by: David Tolnay <[email protected]>
| * Remove unneeded "./" prefix affecting error messagesDavid Tolnay2020-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before: error[E0599]: no method named `initialize_finish` found for struct `lsp_server::Connection` in the current scope --> crates/rust-analyzer/./src/bin/main.rs:99:16 | 99 | connection.initialize_finish(initialize_id, initialize_result)?; | ^^^^^^^^^^^^^^^^^ method not found in `lsp_server::Connection` After: error[E0599]: no method named `initialize_finish` found for struct `lsp_server::Connection` in the current scope --> crates/rust-analyzer/src/bin/main.rs:99:16 | 99 | connection.initialize_finish(initialize_id, initialize_result)?; | ^^^^^^^^^^^^^^^^^ method not found in `lsp_server::Connection`
* | Declare required lsp-server dependency of rust-analyzer crateDavid Tolnay2020-06-041-1/+1
|/ | | | | | | | | | | | | | | | | | | | My codebase already depended on lsp-server and introducing a dependency on rust-analyzer failed at first because it assumes some functions that were first present in lsp-server 0.3.2. Without this change: error[E0599]: no method named `initialize_start` found for struct `lsp_server::Connection` in the current scope --> crates/rust-analyzer/./src/bin/main.rs:83:57 | 83 | let (initialize_id, initialize_params) = connection.initialize_start()?; | ^^^^^^^^^^^^^^^^ method not found in `lsp_server::Connection` error[E0599]: no method named `initialize_finish` found for struct `lsp_server::Connection` in the current scope --> crates/rust-analyzer/./src/bin/main.rs:99:16 | 99 | connection.initialize_finish(initialize_id, initialize_result)?; | ^^^^^^^^^^^^^^^^^ method not found in `lsp_server::Connection`
* add support of feature flag for runnables #4464Benjamin Coenen2020-05-231-0/+3
| | | | Signed-off-by: Benjamin Coenen <[email protected]>
* Better structureAleksey Kladov2020-05-151-1/+0
|
* Move LSP bits from flycheck to rust-analyzerAleksey Kladov2020-05-151-0/+2
| | | | | There should be only one place that knows about LSP, and that place is right before we spit JSON on stdout.
* Bump depsLaurențiu Nicola2020-05-011-1/+1
|
* Add support for incremental text synchronizationLaurențiu Nicola2020-04-301-1/+1
|
* lsp-types 0.74kjeremy2020-04-261-1/+1
| | | | | * Fixes a bunch of param types to take partial progress into account. * Will allow us to support insert/replace text in completions
* Add proc-macro cli command for rust-analyzerEdwin Cheng2020-04-161-1/+1
|
* Rename cargo_watch -> flycheckAleksey Kladov2020-03-311-1/+1
|
* Nice string formattingAleksey Kladov2020-03-281-0/+2
|
* update itertools version to 0.9.0Josh Mcguigan2020-03-231-1/+1
|
* Fix SelectionRange return typekjeremy2020-03-091-1/+1
|
* lsp-types 0.72kjeremy2020-03-021-1/+1
|
* Remove unused dependenciesShotaro Yamada2020-02-271-1/+0
|
* Update lsp-typeskjeremy2020-02-261-1/+1
|
* Update versionsKirill Bulatov2020-02-181-15/+15
|
* Rename folderAleksey Kladov2020-02-181-0/+58