Skip to content

Commit 9f4a6a5

Browse files
feat(profiling): keep string cache data alive longer (#2668)
We still have to re-establish the link in the run time cache, but the string set itself will keep the sets and data alive. --------- Co-authored-by: Florian Engelhardt <[email protected]>
1 parent f0b3801 commit 9f4a6a5

File tree

9 files changed

+459
-333
lines changed

9 files changed

+459
-333
lines changed

Cargo.lock

Lines changed: 3 additions & 62 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

profiling/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,11 @@ bench = false # disables cargo build in libtest bench
1515
# Avoid ahash 0.8.7 we run into https://github.com/tkaitchuck/aHash/issues/195.
1616
ahash = { version = "0.8.11" }
1717
anyhow = { version = "1.0" }
18-
# v3.15 bumps MSRV to Rust 1.73
19-
bumpalo = { version = "=3.14.0", features = ["collections"] }
2018
cfg-if = { version = "1.0" }
2119
cpu-time = { version = "1.0" }
2220
chrono = { version = "0.4" }
2321
crossbeam-channel = { version = "0.5", default-features = false, features = ["std"] }
22+
datadog-alloc = { git = "https://github.com/DataDog/libdatadog", tag = "v10.0.0" }
2423
datadog-profiling = { git = "https://github.com/DataDog/libdatadog", tag = "v10.0.0" }
2524
ddcommon = { git = "https://github.com/DataDog/libdatadog", tag = "v10.0.0" }
2625
env_logger = { version = "0.11", default-features = false }
@@ -30,10 +29,10 @@ libc = "0.2"
3029
# TRACE set to max to support runtime configuration.
3130
log = { version = "0.4", features = ["max_level_trace", "release_max_level_trace"]}
3231
once_cell = { version = "1.12" }
33-
ouroboros = { version = "0.18" }
3432
serde_json = {version = "1.0"}
3533
rand = { version = "0.8.5" }
3634
rand_distr = { version = "0.4.3" }
35+
rustc-hash = "1.1.0"
3736
uuid = { version = "1.0", features = ["v4"] }
3837

3938
[dev-dependencies]

profiling/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ mod logging;
66
mod pcntl;
77
pub mod profiling;
88
mod sapi;
9+
mod thin_str;
10+
mod wall_time;
911

1012
#[cfg(php_run_time_cache)]
11-
mod string_table;
13+
mod string_set;
1214

1315
#[cfg(feature = "allocation_profiling")]
1416
mod allocation;
@@ -19,8 +21,6 @@ mod exception;
1921
#[cfg(feature = "timeline")]
2022
mod timeline;
2123

22-
mod wall_time;
23-
2424
use crate::config::{SystemSettings, INITIAL_SYSTEM_SETTINGS};
2525
use bindings::{
2626
self as zend, ddog_php_prof_php_version, ddog_php_prof_php_version_id, ZendExtension,

profiling/src/profiling/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,9 @@ pub enum UploadMessage {
515515
Upload(Box<UploadRequest>),
516516
}
517517

518+
#[cfg(feature = "timeline")]
519+
const COW_EVAL: Cow<str> = Cow::Borrowed("[eval]");
520+
518521
impl Profiler {
519522
pub fn new(system_settings: &SystemSettings) -> Self {
520523
let fork_barrier = Arc::new(Barrier::new(3));

0 commit comments

Comments
 (0)