Conversation
Contributor
Contributor
|
🔧 Report generated by pr-comment-scanbuild Scan-Build Report
Bug Summary
Reports
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4c23fa5 to
02f6919
Compare
ef505df to
b3ba0f9
Compare
MattAlp
suggested changes
Nov 6, 2024
Contributor
MattAlp
left a comment
There was a problem hiding this comment.
Need to verify a few things with this PR and its interaction with dd-trace-java, will follow-up & approve if no troubles emerge.
| /** | ||
| * Flags interface to access JVM flags. | ||
| * In general, the flags are read-only. However, some flags can be modified at runtime. | ||
| * Currently, only string and boolean flags can be modified. Allowing modification of numeric |
Contributor
There was a problem hiding this comment.
I would specify as-of details here
Collaborator
Author
There was a problem hiding this comment.
Sorry, I don't understand - what should I specify here?
ddprof-lib/src/main/java/com/datadoghq/profiler/LibraryLoader.java
Outdated
Show resolved
Hide resolved
b3ba0f9 to
16f5fcd
Compare
ddprof-test/src/test/java/com/datadoghq/profiler/JVMAccessTest.java
Outdated
Show resolved
Hide resolved
ddprof-test/src/test/java/com/datadoghq/profiler/JavaProfilerTest.java
Outdated
Show resolved
Hide resolved
16f5fcd to
bb4e9ea
Compare
….java Co-authored-by: datadog-datadog-prod-us1[bot] <88084959+datadog-datadog-prod-us1[bot]@users.noreply.github.com>
…est.java Co-authored-by: datadog-datadog-prod-us1[bot] <88084959+datadog-datadog-prod-us1[bot]@users.noreply.github.com>
Collaborator
Author
|
@MattAlp I have decoupled the library initialization from the profiler initialization. Now, when you don't use profiler only the most important parts will be initialized - basically just the JNI bindings, vmstructs and safeacees. Anything related to JVMTI, capabilities, hooks etc. is registered only when one asks for |
1921ba8 to
ae50b2a
Compare
MattAlp
approved these changes
Nov 12, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?:
It extracts the profiling-independent part of the 'libjavaProfiler' library Java API such that it might be used even if the profiler itself is not used.
It adds a new API for direct access to JVM flags.
Motivation:
The main reason is not be dependent on JMX to eg. read the value of
-XX:ErrorFileetc.Additional Notes:
How to test the change?:
Existing unit/integration tests are passing and added unit tests for the JVM flag access are passing as well.
For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!