Add force jmethodID experimental feature support#11549
Add force jmethodID experimental feature support#11549gh-worker-dd-mergequeue-cf854d[bot] merged 20 commits into
Conversation
…dd-trace-java into zgu/experimental_reduce_jmethod
|
🎯 Code Coverage (details) 🔗 Commit SHA: b61ddef | Docs | Datadog PR Page | Give us feedback! |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
There was a problem hiding this comment.
Pull request overview
Adds an experimental profiling configuration flag to control ddprof’s “force jmethodID preloading” behavior, aiming to reduce native memory usage by allowing jmethodID preloading to be disabled for eligible classes while preserving current behavior by default.
Changes:
- Added a new profiling config key + default for
profiling.experimental.ddprof.force_jmethodID. - Wired the flag into ddprof start command generation (emit
fjmethodid=falsewhen disabled). - Exposed the flag in supported-config metadata and in the profiler flare configuration output.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| metadata/supported-configurations.json | Registers the new env var metadata entry for the experimental ddprof flag. |
| dd-trace-api/src/main/java/datadog/trace/api/config/ProfilingConfig.java | Introduces the public config constant and default value for the new flag. |
| dd-java-agent/agent-profiling/profiling-ddprof/src/main/java/com/datadog/profiling/ddprof/DatadogProfilerConfig.java | Adds a helper accessor to read the boolean config from ConfigProvider. |
| dd-java-agent/agent-profiling/profiling-ddprof/src/main/java/com/datadog/profiling/ddprof/DatadogProfiler.java | Appends the ddprof command option when the flag is set to disable forcing jmethodID preloading. |
| dd-java-agent/agent-profiling/profiling-controller/src/main/java/com/datadog/profiling/controller/ProfilerFlareReporter.java | Includes the new flag in flare-reported profiler configuration output. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
…dd-trace-java into zgu/experimental_reduce_jmethod
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94654d016e
ℹ️ 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".
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
f767846
into
master
Added force jmethodID experimental feature support Fix Merge branch 'zgu/experimental_reduce_jmethod' of github.com:DataDog/dd-trace-java into zgu/experimental_reduce_jmethod Add DD_PROFILING_EXPERIMENTAL_DDPROF_FORCE_JMETHODID to supported-configurations.json Fix Merge branch 'master' into zgu/experimental_reduce_jmethod Merge branch 'master' into zgu/experimental_reduce_jmethod Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <[email protected]> AI reviews Merge branch 'zgu/experimental_reduce_jmethod' of github.com:DataDog/dd-trace-java into zgu/experimental_reduce_jmethod Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <[email protected]> AI review comment Fix config-inversion-linter failure Fix checkConfigStrings Merge branch 'master' into zgu/experimental_reduce_jmethod Merge branch 'master' into zgu/experimental_reduce_jmethod Addressed review comments Create tmp file for recording Fix Replacing Path.of() due to language level Co-authored-by: jbachorik <[email protected]> Co-authored-by: devflow.devflow-routing-intake <[email protected]>
What Does This Do
This PR adds an experimental flag
profiling.experimental.ddprof.jmethodid_optim.enabledto enable ddprof feature that aims to reduce pre-loading jmethodIDs for system classes.The flag is off (false) by default to preserve current behavior.
Motivation
Preloading all jmethodIDs is proved to be a memory footprint issue. In an extreme case, it consumed 9GB native memory.
ddprof is experimenting a way to lessen dependency on jmethod IDs: none lambda and hidden classes that are loaded by system class loaders (bootstrap, platform and application class loaders), never unloaded. Instead of storing jmethod IDs for the methods of the classes, ddprof stores raw method pointers and resolves at dumping time. Therefore, ddprof does not preload jmethod IDs of none-lambda/hidden classes from those class loaders.
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issue/merge. You can also:/merge --commit-message "..."/merge -c/merge -f --reason "reason"; please use this judiciously, as some checks do not run at the PR-levelJira ticket: [PROJ-IDENT]