-
Notifications
You must be signed in to change notification settings - Fork 7
JVM Flags access API #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JVM Flags access API #149
Conversation
🔧 Report generated by pr-comment-scanbuild Scan-Build Report
Bug Summary
Reports
|
4c23fa5
to
02f6919
Compare
ef505df
to
b3ba0f9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would specify as-of details here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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>
@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
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:ErrorFile
etc.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!