Skip to content

Conversation

@morrisonlevi
Copy link
Collaborator

Description

In a future change, this may hold a refcount for another object, so we need to encapsulate it. The plan is for holding a ProfilesDictionary and sending data from it.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

In a future change, this may hold a refcount for another object, so
we need to encapsulate it.
@github-actions github-actions bot added profiling Relates to the Continuous Profiler tracing labels Jan 31, 2026
@datadog-datadog-prod-us1

This comment has been minimized.

@codecov-commenter
Copy link

codecov-commenter commented Jan 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.12%. Comparing base (e380043) to head (893a3b4).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3612      +/-   ##
==========================================
- Coverage   62.21%   62.12%   -0.09%     
==========================================
  Files         141      141              
  Lines       13387    13387              
  Branches     1753     1753              
==========================================
- Hits         8329     8317      -12     
- Misses       4260     4270      +10     
- Partials      798      800       +2     

see 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e380043...893a3b4. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter
Copy link

pr-commenter bot commented Jan 31, 2026

Benchmarks [ profiler ]

Benchmark execution time: 2026-02-02 08:50:49

Comparing candidate commit 893a3b4 in PR branch levi/backtrace with baseline commit e380043 in branch master.

Found 2 performance improvements and 0 performance regressions! Performance is the same for 27 metrics, 7 unstable metrics.

scenario:walk_stack/50

  • 🟩 wall_time [-913.819ns; -903.438ns] or [-5.589%; -5.525%]

scenario:walk_stack/99

  • 🟩 wall_time [-774.355ns; -769.748ns] or [-4.780%; -4.752%]

@morrisonlevi morrisonlevi marked this pull request as ready for review January 31, 2026 05:29
@morrisonlevi morrisonlevi requested a review from a team as a code owner January 31, 2026 05:29
@realFlowControl
Copy link
Member

The test_collect_stack_sample test was not executed, due to a wrong cfg attribute:

#[cfg(stack_walking_tests)]
// vs.
#[cfg(feature = "stack_walking_tests")]

I fixed that and also added a stub for the zend_flf_functions (with 893a3b4) which does not exist in the scope of cargo test --all-features as it gets executed in CI .

Copy link
Member

@realFlowControl realFlowControl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup, I fixed the test not being executed and my open comment is a nit pick, feel free to merge.

Comment on lines -553 to +565
assert_eq!(stack[0].function, "function name 003");
assert_eq!(stack[0].file, Some("filename-003.php".into()));
assert_eq!(stack[0].line, 0);
let frames = &stack;
assert_eq!(frames[0].function, "function name 003");
assert_eq!(frames[0].file, Some("filename-003.php".into()));
assert_eq!(frames[0].line, 0);

assert_eq!(stack[1].function, "function name 002");
assert_eq!(stack[1].file, Some("filename-002.php".into()));
assert_eq!(stack[1].line, 0);
assert_eq!(frames[1].function, "function name 002");
assert_eq!(frames[1].file, Some("filename-002.php".into()));
assert_eq!(frames[1].line, 0);

assert_eq!(stack[2].function, "function name 001");
assert_eq!(stack[2].file, Some("filename-001.php".into()));
assert_eq!(stack[2].line, 0);
assert_eq!(frames[2].function, "function name 001");
assert_eq!(frames[2].file, Some("filename-001.php".into()));
assert_eq!(frames[2].line, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that because of the Deref implementation for Backtrace we might not need these changes, but technically it is fine either way.

@morrisonlevi morrisonlevi enabled auto-merge (squash) February 2, 2026 15:30
@morrisonlevi morrisonlevi disabled auto-merge February 2, 2026 15:31
@morrisonlevi
Copy link
Collaborator Author

Force merging because Florian's git commit is unverified. I have reviewed the commit, and it's all good!

@morrisonlevi morrisonlevi merged commit 9de150f into master Feb 2, 2026
18 of 20 checks passed
@morrisonlevi morrisonlevi deleted the levi/backtrace branch February 2, 2026 15:32
@github-actions github-actions bot added this to the 1.17.0 milestone Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

profiling Relates to the Continuous Profiler tracing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants