Skip to content

Comments

chore(profiling): more Profiler Stats#16597

Open
KowalskiThomas wants to merge 1 commit intomainfrom
kowalski/chore-profiling-more-profiler-stats
Open

chore(profiling): more Profiler Stats#16597
KowalskiThomas wants to merge 1 commit intomainfrom
kowalski/chore-profiling-more-profiler-stats

Conversation

@KowalskiThomas
Copy link
Contributor

@KowalskiThomas KowalskiThomas commented Feb 20, 2026

Description

https://datadoghq.atlassian.net/browse/PROF-13820

This PR adds new information in the Internal Metadata payload of profiles:

  • Whether the memcpy-based copy_memory implementation is enabed
  • The number of errors that it encountered.

This is meant to be used to check that there aren't any typically problematic cases in real-life workloads.

@cit-pr-commenter-54b7da
Copy link

cit-pr-commenter-54b7da bot commented Feb 20, 2026

Codeowners resolved as

ddtrace/internal/datadog/profiling/dd_wrapper/include/profiler_stats.hpp  @DataDog/profiling-python
ddtrace/internal/datadog/profiling/dd_wrapper/src/profiler_stats.cpp    @DataDog/profiling-python
ddtrace/internal/datadog/profiling/stack/echion/echion/vm.h             @DataDog/profiling-python
ddtrace/internal/datadog/profiling/stack/src/echion/vm.cc               @DataDog/profiling-python
ddtrace/internal/datadog/profiling/stack/src/sampler.cpp                @DataDog/profiling-python
tests/profiling/collector/test_copy_memory_stats.py                     @DataDog/profiling-python

@KowalskiThomas KowalskiThomas added changelog/no-changelog A changelog entry is not required for this PR. Profiling Continous Profling labels Feb 20, 2026
@datadog-official

This comment has been minimized.

@KowalskiThomas KowalskiThomas force-pushed the kowalski/chore-profiling-more-profiler-stats branch from 3b4fb27 to 162dfb1 Compare February 20, 2026 14:25
@KowalskiThomas KowalskiThomas force-pushed the kowalski/chore-profiling-more-profiler-stats branch from 699ea6b to 6ee3c9a Compare February 20, 2026 15:37
@KowalskiThomas KowalskiThomas marked this pull request as ready for review February 20, 2026 15:38
@KowalskiThomas KowalskiThomas requested a review from a team as a code owner February 20, 2026 15:38
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6ee3c9ae4b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// libraries (faulthandler, Django, FastAPI) can overwrite them afterwards.
// Re-installing here ensures our handler is active when the sampling thread runs.
// Only do this once to avoid overwriting g_old_segv with our own handler.
const bool fast_copy_enabled = use_alternative_copy_memory();

Choose a reason for hiding this comment

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

P2 Badge Report fast-copy status from active backend

fast_copy_enabled is derived from use_alternative_copy_memory() (the env var), but init_safe_copy() can still fall back to non-memcpy readers when init_segv_catcher() fails; in that scenario this field is emitted as true even though memcpy-based copying is not actually active. That makes the new metadata unreliable for diagnosing production behavior.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR. Profiling Continous Profling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant