Skip to content

Commit

Permalink
chore: make maxperf, enable GC profiling on MDBX debug (paradigmxyz…
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin authored Nov 17, 2023
1 parent 3553cd5 commit f33ef66
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,7 @@ update-book-cli: ## Update book cli documentation.
cargo build --bin reth --features "$(FEATURES)" --profile "$(PROFILE)"
@echo "Updating book cli doc..."
@./book/cli/update.sh $(BUILD_PATH)

.PHONY: maxperf
maxperf:
RUSTFLAGS="-C target-cpu=native" cargo build --profile maxperf --features jemalloc
5 changes: 4 additions & 1 deletion crates/storage/libmdbx-rs/mdbx-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ fn main() {

// Enable debugging on debug builds
#[cfg(debug_assertions)]
cc_builder.define("MDBX_DEBUG", "1");
{
cc_builder.define("MDBX_DEBUG", "1");
cc_builder.define("MDBX_ENABLE_PROFGC", "1");
}

// Disables debug logging on optimized builds
#[cfg(not(debug_assertions))]
Expand Down

0 comments on commit f33ef66

Please sign in to comment.