You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(prof): improve time sample accuracy by gathering during allocation samples (#3559)
* perf(profiling): piggyback time samples onto allocation samples
When allocation profiler takes a sample and interrupt_count > 0,
collect both allocation and time samples in a single stack walk.
Benefits:
- Eliminates redundant stack walks when samples coincide.
- Improves time sample accuracy (closer to timer expiry).
* refactor orderings of collect_* and extract helpers
* refactor(test): allocation + CPU combined tests
* refactor: make jq for combined samples less brittle
* refactor: revert Ordering optimizations
Let's do this in a dedicated PR.
* style: use SAFETY instead of Safety
* test: hammer piggybacking
* refactor: simplify test and hook it up properly
* test: fix prof-correctness
* ci(profiling): run allocation_time_combined on PHP 8.4+
* test(profiling): fix allocation_time_combined float->int
* ci(profiling): update expected data
* ci(profiling): run allocation_time_combined with ALLOCATION_SAMPLING_DISTANCE=1
* ci(profiling): ignore main for wall-time for allocation_time_combined
* EXPERIMENTAL: check ZEND_OP_DATA too
* DEBUG: do we hit frameless icalls?
* DEBUG: more info in panic
* refactor: simplify Profiler::get_timeline_timestamp
* Revert "DEBUG: more info in panic"
This reverts commit a3e3e4e.
* Revert "DEBUG: do we hit frameless icalls?"
This reverts commit e16e1b1.
* undo experimental debugging
* test: fix expected log message
* test: use more replaces to exaggerate effect
* EXPERIMENT: show leaf frame
* do not fail fast, finish prof correctness
* upload artifacts
* Disable Xdebug for prof-correctness
* Revert "upload artifacts"
This reverts commit 44e2734.
* test: allow any non-zero wall-time for piggy-backed samples
* remove first_frame for performance
* Remove misleading strlen and comment
Co-authored-by: Florian Engelhardt <florian.engelhardt@datadoghq.com>
"Sent stack sample of {depth} frames, {n_labels} labels, {alloc_size} bytes allocated, and {alloc_samples} allocations to profiler."
991
+
"Sent stack sample of {depth} frames, {n_labels} labels, {alloc_size} bytes allocated, {alloc_samples} allocations, and {interrupt_count} time interrupts to profiler."
981
992
),
982
993
Err(err) => warn!(
983
994
"Failed to send stack sample of {depth} frames, {n_labels} labels, {alloc_size} bytes allocated, and {alloc_samples} allocations to profiler: {err}"
0 commit comments