-
Couldn't load subscription status.
- Fork 10
Potential memory leak and race with the JVMTI wallclock sampler #234
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
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
60d0fd4
Potential memory leak with the JVMTI wallclock sampler
zhengyu123 4900544
v1
zhengyu123 0315204
Don't sample terminated thread
zhengyu123 7b7e1cf
v2
zhengyu123 fd3461a
v3
zhengyu123 e903361
v4
zhengyu123 0eda2cc
Safe access
zhengyu123 194a62c
Fix thread state
zhengyu123 fb7572a
v5
zhengyu123 0643123
Cleanup
zhengyu123 a17691b
Cleanup
zhengyu123 8283f26
safeFetch impl
zhengyu123 79f57cf
jdk11 support
8e37863
v6
zhengyu123 57e6022
enhance and cleanup
zhengyu123 c4182d2
fix nullptr deference
zhengyu123 b018305
More cleanup
zhengyu123 ecf380f
Erwan's finding
zhengyu123 bafea6f
Fixed memory leak found by Erwan
zhengyu123 56dc6f6
[Automated] Bump dev version to 1.29.0
8f6b5e2
Update the sonatype repos (#235)
jbachorik 44531b0
Fix artifact download URL
jbachorik edcb336
Split debug (#233)
r1viollet c0d8e91
Add the micro-benchmark for thread filtering (#237)
jbachorik 6b7e662
Flaky test - j9 OSR (#239)
r1viollet cddfbf2
Fix flaky allocation test (#241)
r1viollet e9803d1
jbachorik's comments
zhengyu123 0071c00
More jbachorik's comments
zhengyu123 a1db674
Cleanup thread local references
zhengyu123 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /* | ||
| * Copyright 2025 Datadog, Inc | ||
| * | ||
| * Licensed under the Apache License, Version 2.0 (the "License"); | ||
| * you may not use this file except in compliance with the License. | ||
| * You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
|
|
||
| #include "safeAccess.h" | ||
|
|
||
| SafeAccess::SafeFetch32 SafeAccess::_safeFetch32Func = nullptr; | ||
|
|
||
| void SafeAccess::initSafeFetch(CodeCache* libjvm) { | ||
| // Hotspot JVM's safefetch implementation appears better, e.g. it actually returns errorValue, | ||
| // when the address is invalid. let's use it whenever possible. | ||
| // When the methods are not available, fallback to SafeAccess::load32() implementation. | ||
| _safeFetch32Func = (SafeFetch32)libjvm->findSymbol("SafeFetch32_impl"); | ||
| if (_safeFetch32Func == nullptr && !WX_MEMORY) { | ||
| // jdk11 stub implementation other than Macosx/aarch64 | ||
| void** entry = (void**)libjvm->findSymbol("_ZN12StubRoutines18_safefetch32_entryE"); | ||
| if (entry != nullptr && *entry != nullptr) { | ||
| _safeFetch32Func = (SafeFetch32)*entry; | ||
| } | ||
| } | ||
| // Fallback | ||
| if (_safeFetch32Func == nullptr) { | ||
| _safeFetch32Func = (SafeFetch32)load32; | ||
| } | ||
| } | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.