Skip to content

[WIP] add pre-signal state check for wallclock#502

Draft
kaahos wants to merge 14 commits intomainfrom
paul.fournillon/wallclock_precheck
Draft

[WIP] add pre-signal state check for wallclock#502
kaahos wants to merge 14 commits intomainfrom
paul.fournillon/wallclock_precheck

Conversation

@kaahos
Copy link
Copy Markdown
Contributor

@kaahos kaahos commented Apr 24, 2026

What does this PR do?:

Adds a pre-signal check to the wall-clock timer loop that reads the OS thread state before sending a signal. When a thread is in SLEEPING state, the signal is skipped.

Motivation:

The wall-clock profiler sends a signal to every tracked thread at ~1ms intervals. For threads blocked, this generates up to 1000 signals/second that all produce the same stack, and the profiler learns nothing new from repeated samples. At large scale, we observe undesirable effects like signal storms, cache thrashing or sample distortion. Skipping those signals reduces unnecessary overhead without losing meaningful profiling data.

Additional Notes:

How to test the change?:

For Datadog employees:

  • If this PR touches code that signs or publishes builds or packages, or handles
    credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.
  • This PR doesn't touch any of that.
  • JIRA: [JIRA-14354]

Unsure? Have a question? Request a review!

@dd-octo-sts
Copy link
Copy Markdown
Contributor

dd-octo-sts Bot commented Apr 24, 2026

CI Test Results

Run: #25169296748 | Commit: cdbf156 | Duration: 28m 39s (longest job)

All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
11 - - -
11-j9 - -
11-librca - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
21 - -
21-graal - -
21-librca - -
25 - -
25-graal - -
25-librca - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-04-30 14:40:16 UTC

@kaahos kaahos force-pushed the paul.fournillon/wallclock_precheck branch 6 times, most recently from da37425 to 06136e1 Compare April 27, 2026 08:55
@kaahos kaahos force-pushed the paul.fournillon/wallclock_precheck branch 3 times, most recently from 1e61333 to 4523b4a Compare April 28, 2026 15:45
@kaahos kaahos force-pushed the paul.fournillon/wallclock_precheck branch 3 times, most recently from 0ad95a4 to 3e231a0 Compare April 28, 2026 21:51
@kaahos kaahos force-pushed the paul.fournillon/wallclock_precheck branch from 3e231a0 to 28856f4 Compare April 29, 2026 09:19
@kaahos kaahos force-pushed the paul.fournillon/wallclock_precheck branch from d71b9e2 to 24fec34 Compare April 30, 2026 09:10
@kaahos kaahos self-assigned this Apr 30, 2026
@kaahos kaahos force-pushed the paul.fournillon/wallclock_precheck branch from 24fec34 to 81c7712 Compare April 30, 2026 09:54
@kaahos kaahos force-pushed the paul.fournillon/wallclock_precheck branch from 476e957 to aef1748 Compare April 30, 2026 13:34
@kaahos kaahos force-pushed the paul.fournillon/wallclock_precheck branch from aef1748 to c45d4d0 Compare April 30, 2026 13:52
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