From 55654a55460db55db0ef9a7592e1a0802c02bcf9 Mon Sep 17 00:00:00 2001 From: discord9 Date: Tue, 5 Nov 2024 15:22:24 +0800 Subject: [PATCH] fix: pprof --- Cargo.lock | 3 +-- Cargo.toml | 2 ++ src/servers/src/http/pprof.rs | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 91090f308750..99dc8ef31c09 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8396,8 +8396,7 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "pprof" version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef5c97c51bd34c7e742402e216abdeb44d415fbe6ae41d56b114723e953711cb" +source = "git+https://github.com/GreptimeTeam/pprof-rs?rev=1bd1e21#1bd1e210d8626da3d1e5aff976e6feee994f576d" dependencies = [ "backtrace", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index 9b6d1489d718..a23e77d2576a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -261,6 +261,8 @@ tokio-rustls = { git = "https://github.com/GreptimeTeam/tokio-rustls" } # This is commented, since we are not using aws-lc-sys, if we need to use it, we need to uncomment this line or use a release after this commit, or it wouldn't compile with gcc < 8.1 # see https://github.com/aws/aws-lc-rs/pull/526 # aws-lc-sys = { git ="https://github.com/aws/aws-lc-rs", rev = "556558441e3494af4b156ae95ebc07ebc2fd38aa" } +# Apply a fix for pprof for unaligned pointer access +pprof = { git = "https://github.com/GreptimeTeam/pprof-rs", rev = "1bd1e21" } [workspace.dependencies.meter-macros] git = "https://github.com/GreptimeTeam/greptime-meter.git" diff --git a/src/servers/src/http/pprof.rs b/src/servers/src/http/pprof.rs index c00d160aaf6a..7994c9ace3d8 100644 --- a/src/servers/src/http/pprof.rs +++ b/src/servers/src/http/pprof.rs @@ -75,6 +75,8 @@ pub mod handler { info!("finish pprof"); + info!("Dump data success, size: {}", body.len()); + Ok((StatusCode::OK, body)) } }