Skip to content

Commit a4d2585

Browse files
committed
Allow profiling jemalloc
This builds jemalloc with profiling enabled, and preserves debug symbols in the release binary (note: `debug = true` does not disable optimizations). This commit by itself doesn't actually perform any profiling, but it allows it to be controlled by an environment variable. At this point I cannot get any useful information about the memory issue we're seeing in production locally. We also can't reproduce it in a staging environment. There's *something* about our production traffic patterns that we're missing, so the next step is to start looking at dumps of production memory usage. My intention is to start enabling sampling based profiling in production, and copy some of the dumps off the server to examine locally.
1 parent 4bed129 commit a4d2585

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ edition = "2018"
1111

1212
[profile.release]
1313
opt-level = 2
14+
debug = true
1415

1516
[lib]
1617
name = "cargo_registry"
@@ -60,7 +61,7 @@ derive_deref = "1.0.0"
6061
reqwest = "0.9.1"
6162
tempdir = "0.3.7"
6263
parking_lot = "0.7.1"
63-
jemallocator = { version = "0.1.8", features = ['unprefixed_malloc_on_supported_platforms'] }
64+
jemallocator = { version = "0.1.8", features = ['unprefixed_malloc_on_supported_platforms', 'profiling'] }
6465
jemalloc-ctl = "0.2.0"
6566

6667
lettre = {git = "https://github.com/lettre/lettre", version = "0.9"}

0 commit comments

Comments
 (0)