aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock54
-rw-r--r--crates/ra_prof/Cargo.toml4
-rw-r--r--crates/ra_prof/src/memory_usage.rs6
3 files changed, 49 insertions, 15 deletions
diff --git a/Cargo.lock b/Cargo.lock
index c29370fde..03f5be16b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -674,16 +674,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
674 674
675[[package]] 675[[package]]
676name = "jemalloc-ctl" 676name = "jemalloc-ctl"
677version = "0.2.0" 677version = "0.3.3"
678source = "registry+https://github.com/rust-lang/crates.io-index" 678source = "registry+https://github.com/rust-lang/crates.io-index"
679dependencies = [ 679dependencies = [
680 "jemalloc-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 680 "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
681 "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", 681 "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
682 "paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
682] 683]
683 684
684[[package]] 685[[package]]
685name = "jemalloc-sys" 686name = "jemalloc-sys"
686version = "0.1.8" 687version = "0.3.2"
687source = "registry+https://github.com/rust-lang/crates.io-index" 688source = "registry+https://github.com/rust-lang/crates.io-index"
688dependencies = [ 689dependencies = [
689 "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)", 690 "cc 1.0.37 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -693,10 +694,10 @@ dependencies = [
693 694
694[[package]] 695[[package]]
695name = "jemallocator" 696name = "jemallocator"
696version = "0.1.9" 697version = "0.3.2"
697source = "registry+https://github.com/rust-lang/crates.io-index" 698source = "registry+https://github.com/rust-lang/crates.io-index"
698dependencies = [ 699dependencies = [
699 "jemalloc-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)", 700 "jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
700 "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", 701 "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
701] 702]
702 703
@@ -989,6 +990,26 @@ dependencies = [
989] 990]
990 991
991[[package]] 992[[package]]
993name = "paste"
994version = "0.1.5"
995source = "registry+https://github.com/rust-lang/crates.io-index"
996dependencies = [
997 "paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
998 "proc-macro-hack 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
999]
1000
1001[[package]]
1002name = "paste-impl"
1003version = "0.1.5"
1004source = "registry+https://github.com/rust-lang/crates.io-index"
1005dependencies = [
1006 "proc-macro-hack 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)",
1007 "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
1008 "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
1009 "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
1010]
1011
1012[[package]]
992name = "percent-encoding" 1013name = "percent-encoding"
993version = "1.0.1" 1014version = "1.0.1"
994source = "registry+https://github.com/rust-lang/crates.io-index" 1015source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1047,6 +1068,16 @@ version = "0.2.5"
1047source = "registry+https://github.com/rust-lang/crates.io-index" 1068source = "registry+https://github.com/rust-lang/crates.io-index"
1048 1069
1049[[package]] 1070[[package]]
1071name = "proc-macro-hack"
1072version = "0.5.8"
1073source = "registry+https://github.com/rust-lang/crates.io-index"
1074dependencies = [
1075 "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)",
1076 "quote 0.6.13 (registry+https://github.com/rust-lang/crates.io-index)",
1077 "syn 0.15.39 (registry+https://github.com/rust-lang/crates.io-index)",
1078]
1079
1080[[package]]
1050name = "proc-macro2" 1081name = "proc-macro2"
1051version = "0.4.30" 1082version = "0.4.30"
1052source = "registry+https://github.com/rust-lang/crates.io-index" 1083source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1256,8 +1287,8 @@ dependencies = [
1256 "backtrace 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)", 1287 "backtrace 0.3.32 (registry+https://github.com/rust-lang/crates.io-index)",
1257 "cpuprofiler 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", 1288 "cpuprofiler 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
1258 "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", 1289 "itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
1259 "jemalloc-ctl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", 1290 "jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
1260 "jemallocator 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", 1291 "jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
1261 "once_cell 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", 1292 "once_cell 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
1262] 1293]
1263 1294
@@ -2168,9 +2199,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2168"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" 2199"checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08"
2169"checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" 2200"checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358"
2170"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" 2201"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f"
2171"checksum jemalloc-ctl 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4e93b0f37e7d735c6b610176d5b1bde8e1621ff3f6f7ac23cdfa4e7f7d0111b5" 2202"checksum jemalloc-ctl 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c502a5ff9dd2924f1ed32ba96e3b65735d837b4bfd978d3161b1702e66aca4b7"
2172"checksum jemalloc-sys 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "bfc62c8e50e381768ce8ee0428ee53741929f7ebd73e4d83f669bcf7693e00ae" 2203"checksum jemalloc-sys 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45"
2173"checksum jemallocator 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "9f0cd42ac65f758063fea55126b0148b1ce0a6354ff78e07a4d6806bc65c4ab3" 2204"checksum jemallocator 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69"
2174"checksum join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc7a5290e8c2606ce2be49f456d50f69173cb96d1541e4f66e34ac8b331a98f" 2205"checksum join_to_string 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "4dc7a5290e8c2606ce2be49f456d50f69173cb96d1541e4f66e34ac8b331a98f"
2175"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" 2206"checksum kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d"
2176"checksum lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cc4fd87be4a815fd373e02773983940f0d75fb26fde8c098e9e45f7af03154c0" 2207"checksum lalrpop-intern 0.15.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cc4fd87be4a815fd373e02773983940f0d75fb26fde8c098e9e45f7af03154c0"
@@ -2205,6 +2236,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2205"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" 2236"checksum parking_lot 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252"
2206"checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c" 2237"checksum parking_lot_core 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb88cb1cb3790baa6776844f968fea3be44956cf184fa1be5a03341f5491278c"
2207"checksum parking_lot_core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67812d70a819b886655846594086c00ac1f3e8b77c36ef494aa730c620b19d57" 2238"checksum parking_lot_core 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "67812d70a819b886655846594086c00ac1f3e8b77c36ef494aa730c620b19d57"
2239"checksum paste 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1f4a4a1c555c6505821f9d58b8779d0f630a6b7e4e1be24ba718610acf01fa79"
2240"checksum paste-impl 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "26e796e623b8b257215f27e6c80a5478856cae305f5b59810ff9acdaa34570e6"
2208"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" 2241"checksum percent-encoding 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831"
2209"checksum pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "933085deae3f32071f135d799d75667b63c8dc1f4537159756e3d4ceab41868c" 2242"checksum pest 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "933085deae3f32071f135d799d75667b63c8dc1f4537159756e3d4ceab41868c"
2210"checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" 2243"checksum pest_derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0"
@@ -2212,6 +2245,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
2212"checksum pest_meta 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f249ea6de7c7b7aba92b4ff4376a994c6dbd98fd2166c89d5c4947397ecb574d" 2245"checksum pest_meta 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f249ea6de7c7b7aba92b4ff4376a994c6dbd98fd2166c89d5c4947397ecb574d"
2213"checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f" 2246"checksum petgraph 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "9c3659d1ee90221741f65dd128d9998311b0e40c5d3c23a62445938214abce4f"
2214"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b" 2247"checksum ppv-lite86 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "e3cbf9f658cdb5000fcf6f362b8ea2ba154b9f146a61c7a20d647034c6b6561b"
2248"checksum proc-macro-hack 0.5.8 (registry+https://github.com/rust-lang/crates.io-index)" = "982a35d1194084ba319d65c4a68d24ca28f5fdb5b8bc20899e4eef8641ea5178"
2215"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" 2249"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
2216"checksum proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cf147e022eacf0c8a054ab864914a7602618adba841d800a9a9868a5237a529f" 2250"checksum proptest 0.9.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cf147e022eacf0c8a054ab864914a7602618adba841d800a9a9868a5237a529f"
2217"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" 2251"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0"
diff --git a/crates/ra_prof/Cargo.toml b/crates/ra_prof/Cargo.toml
index e986019ca..84dcc9813 100644
--- a/crates/ra_prof/Cargo.toml
+++ b/crates/ra_prof/Cargo.toml
@@ -10,8 +10,8 @@ once_cell = "0.2.0"
10itertools = "0.8.0" 10itertools = "0.8.0"
11backtrace = "0.3.28" 11backtrace = "0.3.28"
12cpuprofiler = { version = "0.0.3", optional = true } 12cpuprofiler = { version = "0.0.3", optional = true }
13jemallocator = { version = "0.1.9", optional = true } 13jemallocator = { version = "0.3.2", optional = true }
14jemalloc-ctl = { version = "0.2.0", optional = true } 14jemalloc-ctl = { version = "0.3.2", optional = true }
15 15
16 16
17[features] 17[features]
diff --git a/crates/ra_prof/src/memory_usage.rs b/crates/ra_prof/src/memory_usage.rs
index 7f857942d..8e8cb7299 100644
--- a/crates/ra_prof/src/memory_usage.rs
+++ b/crates/ra_prof/src/memory_usage.rs
@@ -8,10 +8,10 @@ pub struct MemoryUsage {
8impl MemoryUsage { 8impl MemoryUsage {
9 #[cfg(feature = "jemalloc")] 9 #[cfg(feature = "jemalloc")]
10 pub fn current() -> MemoryUsage { 10 pub fn current() -> MemoryUsage {
11 jemalloc_ctl::epoch().unwrap(); 11 jemalloc_ctl::epoch::advance().unwrap();
12 MemoryUsage { 12 MemoryUsage {
13 allocated: Bytes(jemalloc_ctl::stats::allocated().unwrap()), 13 allocated: Bytes(jemalloc_ctl::stats::allocated::read().unwrap()),
14 resident: Bytes(jemalloc_ctl::stats::resident().unwrap()), 14 resident: Bytes(jemalloc_ctl::stats::resident::read().unwrap()),
15 } 15 }
16 } 16 }
17 17