diff --git a/Cargo.toml b/Cargo.toml index 8141a50..eab3d20 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,7 +37,7 @@ libsodium-sys-stable = "1.19.22" log = { version = "0.4.17", features = ["std", "release_max_level_debug"] } mimalloc = { version = "0.1.29", default-features = false } socket2 = "0.4.4" -parking_lot = "0.12.1" +tracing-mutex = { version = "0.2.1", features = ["parkinglot"] } privdrop = "0.5.2" rand = "0.8.5" rustc-hash = "1.1.0" diff --git a/src/cache.rs b/src/cache.rs index 300062a..6988a16 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -2,7 +2,8 @@ use std::sync::Arc; use clockpro_cache::ClockProCache; use coarsetime::{Duration, Instant}; -use parking_lot::{Mutex, MutexGuard}; +use tracing_mutex::parkinglot::TracingMutex as Mutex; +use tracing_mutex::parkinglot::TracingMutexGuard as MutexGuard; use crate::dns; diff --git a/src/dnscrypt_certs.rs b/src/dnscrypt_certs.rs index 393331d..20c3013 100644 --- a/src/dnscrypt_certs.rs +++ b/src/dnscrypt_certs.rs @@ -5,9 +5,9 @@ use std::time::SystemTime; use byteorder::{BigEndian, ByteOrder}; use clockpro_cache::ClockProCache; -use parking_lot::Mutex; use rand::prelude::*; use serde_big_array::BigArray; +use tracing_mutex::parkinglot::TracingMutex as Mutex; use crate::anonymized_dns::*; use crate::config::*; diff --git a/src/globals.rs b/src/globals.rs index 68418ea..c928b6f 100644 --- a/src/globals.rs +++ b/src/globals.rs @@ -5,10 +5,11 @@ use std::sync::atomic::AtomicU32; use std::sync::Arc; use std::time::Duration; -use parking_lot::{Mutex, RwLock}; use siphasher::sip128::SipHasher13; use tokio::runtime::Handle; use tokio::sync::oneshot; +use tracing_mutex::parkinglot::TracingMutex as Mutex; +use tracing_mutex::parkinglot::TracingRwLock as RwLock; use crate::blacklist::*; use crate::cache::*; diff --git a/src/main.rs b/src/main.rs index 310d563..9ff6e3d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -61,8 +61,6 @@ use errors::*; use futures::join; use futures::prelude::*; use globals::*; -use parking_lot::Mutex; -use parking_lot::RwLock; use privdrop::PrivDrop; use rand::prelude::*; use siphasher::sip128::SipHasher13; @@ -70,6 +68,8 @@ use tokio::io::{AsyncReadExt, AsyncWriteExt}; use tokio::net::{TcpListener, TcpSocket, TcpStream, UdpSocket}; use tokio::runtime::Handle; use tokio::sync::oneshot; +use tracing_mutex::parkinglot::TracingMutex as Mutex; +use tracing_mutex::parkinglot::TracingRwLock as RwLock; #[cfg(feature = "metrics")] use varz::*;