Skip to content

Conversation

@KowalskiThomas
Copy link
Contributor

Description

Testing

Risks

Additional Notes

@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2025

CODEOWNERS have been resolved as:

ddtrace/internal/datadog/profiling/dd_wrapper/include/ddup_interface.hpp  @DataDog/profiling-python
ddtrace/internal/datadog/profiling/dd_wrapper/include/libdatadog_helpers.hpp  @DataDog/profiling-python
ddtrace/internal/datadog/profiling/dd_wrapper/include/profile.hpp       @DataDog/profiling-python
ddtrace/internal/datadog/profiling/dd_wrapper/include/sample.hpp        @DataDog/profiling-python
ddtrace/internal/datadog/profiling/dd_wrapper/src/ddup_interface.cpp    @DataDog/profiling-python
ddtrace/internal/datadog/profiling/dd_wrapper/src/profile.cpp           @DataDog/profiling-python
ddtrace/internal/datadog/profiling/dd_wrapper/src/sample.cpp            @DataDog/profiling-python
ddtrace/internal/datadog/profiling/stack_v2/include/stack_renderer.hpp  @DataDog/profiling-python
ddtrace/internal/datadog/profiling/stack_v2/src/stack_renderer.cpp      @DataDog/profiling-python
src/native/.cargo/config.toml                                           @DataDog/apm-core-python
src/native/Cargo.lock                                                   @DataDog/apm-core-python
src/native/Cargo.toml                                                   @DataDog/apm-core-python
src/native/data_pipeline/mod.rs                                         @DataDog/apm-core-python
src/native/library_config.rs                                            @DataDog/apm-core-python

@KowalskiThomas KowalskiThomas force-pushed the kowalski/perf-profiling-intern-strings-into-libdatadog branch from f806eda to ff3a20e Compare October 28, 2025 11:51
@github-actions
Copy link
Contributor

github-actions bot commented Oct 28, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 238 ± 4 ms.

The average import time from base is: 239 ± 3 ms.

The import time difference between this PR and base is: -1.7 ± 0.2 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.955 ms (0.82%)
ddtrace.bootstrap.sitecustomize 1.282 ms (0.54%)
ddtrace.bootstrap.preload 1.282 ms (0.54%)
ddtrace.internal.remoteconfig.client 0.633 ms (0.27%)
ddtrace 0.673 ms (0.28%)
ddtrace.internal._unpatched 0.029 ms (0.01%)
json 0.029 ms (0.01%)
json.decoder 0.029 ms (0.01%)
re 0.029 ms (0.01%)
enum 0.029 ms (0.01%)
types 0.029 ms (0.01%)

@KowalskiThomas KowalskiThomas force-pushed the kowalski/perf-profiling-intern-strings-into-libdatadog branch from ff3a20e to f598d1c Compare October 28, 2025 13:21
@KowalskiThomas KowalskiThomas changed the title libdatadog: update perf(profiling): try to intern strings/functions Oct 28, 2025
const std::lock_guard<std::mutex> lock(profile_mtx);
auto res = ddog_prof_Profile_add(&cur_profile, sample, endtime_ns);

auto set_dictionary_res = ddog_prof_Profile_set_profiles_dictionary(&cur_profile, get_dictionary());
Copy link

@morrisonlevi morrisonlevi Oct 28, 2025

Choose a reason for hiding this comment

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

The ddog_prof_Profile_set_profiles_dictionary function is going to reset some internal tables every time this is called. This should be moved to wherever you create a new profile.

    /// Sets the profiles dictionary to enable `api2` operations.
    pub fn set_profiles_dictionary(
        &mut self,
        profiles_dictionary: crate::profiles::collections::Arc<ProfilesDictionary>,
    ) {
        self.profiles_dictionary_translator = Some(ProfilesDictionaryTranslator {
            profiles_dictionary,
            mappings: Default::default(),
            functions: Default::default(),
            strings: Default::default(),
        });
    }

@KowalskiThomas KowalskiThomas force-pushed the kowalski/perf-profiling-intern-strings-into-libdatadog branch from f598d1c to 5d18e55 Compare October 28, 2025 20:04
@KowalskiThomas KowalskiThomas force-pushed the kowalski/perf-profiling-intern-strings-into-libdatadog branch from 5d18e55 to 6a5faa0 Compare October 29, 2025 09:06
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.

3 participants