Skip to content

Fix main loop#456

Merged
nsavoire merged 3 commits into
mainfrom
nsavoire/fix_main_loop
Oct 28, 2025
Merged

Fix main loop#456
nsavoire merged 3 commits into
mainfrom
nsavoire/fix_main_loop

Conversation

@nsavoire

@nsavoire nsavoire commented Oct 28, 2025

Copy link
Copy Markdown
Collaborator

What does this PR do?

  • When event reordering is disabled, skip poll() call if there were remaining
    events in the ring buffers but processing timeout was reached. This fixes
    lost events in alloc_live_heap mode:
    • producer does not notify profiler since consumer has not processed all available events
    • poll call waits until timeout is reached
  • When event reordering is enabled:
    • reduce timeout for poll() call to 10ms because profiler cannot consumer
      all available events because of reordering algorithm that allows for some
      latency between events.
    • Reduce max sample latency to 50us
  • Enable event reordering by default

@nsavoire
nsavoire requested a review from r1viollet as a code owner October 28, 2025 00:04
@pr-commenter

pr-commenter Bot commented Oct 28, 2025

Copy link
Copy Markdown

Benchmark results for collatz

Parameters

Baseline Candidate
config baseline candidate
profiler-version ddprof 0.21.0+2239fe4d.80474612 ddprof 0.21.0+3b534022.80474826

Summary

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

See unchanged results
scenario Δ mean execution_time
scenario:ddprof -S bench-collatz --preset cpu_only collatz_runner.sh same

@pr-commenter

pr-commenter Bot commented Oct 28, 2025

Copy link
Copy Markdown

Benchmark results for BadBoggleSolver_run

Parameters

Baseline Candidate
config baseline candidate
profiler-version ddprof 0.21.0+2239fe4d.80474612 ddprof 0.21.0+3b534022.80474826

Summary

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

See unchanged results
scenario Δ mean execution_time
scenario:ddprof -S bench-bad-boggle-solver BadBoggleSolver_run work 1000 same

* When event reordering is disabled, skip poll() call if there were remaining
  events in the ring buffers but processing timeout was reached. This fixes
  lost events in alloc_live_heap mode:
  * producer does not notify profiler since consumer has not processed all available events
  * poll call waits until timeout is reached
* When event reordering is enabled:
  * reduce timeout for poll() call to 10ms because profiler cannot consumer
    all available events because of reordering algorithm that allows for some
    latency between events.
  * Reduce max sample latency to 50us
@nsavoire
nsavoire force-pushed the nsavoire/fix_main_loop branch from 3a53910 to 09580a1 Compare October 28, 2025 11:46
@nsavoire
nsavoire merged commit d6a8451 into main Oct 28, 2025
2 checks passed
@nsavoire
nsavoire deleted the nsavoire/fix_main_loop branch October 28, 2025 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant