Skip to content

Commit

Permalink
Various fixes related to JFR argument parsing.
Browse files Browse the repository at this point in the history
  • Loading branch information
christianhaeubl committed Jan 30, 2024
1 parent cd7be3d commit dad3798
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 239 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ private int indexOf(UninterruptibleComparable o) {
}

@Uninterruptible(reason = CALLED_FROM_UNINTERRUPTIBLE_CODE, mayBeInlined = true)
@SuppressWarnings("all")
private static void siftUp(int k, UninterruptibleComparable x, UninterruptibleComparable[] es) {
while (k > 0) {
int parent = (k - 1) >>> 1;
Expand All @@ -148,6 +149,7 @@ private static void siftUp(int k, UninterruptibleComparable x, UninterruptibleCo
}

@Uninterruptible(reason = CALLED_FROM_UNINTERRUPTIBLE_CODE, mayBeInlined = true)
@SuppressWarnings("all")
private static void siftDown(int k, UninterruptibleComparable x, UninterruptibleComparable[] es, int n) {
// assert n > 0;
int half = n >>> 1; // loop while a non-leaf
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@ Usage: -XX:FlightRecorderOptions=[option[=value][,...]]

This option expects a comma separated list of key-value pairs. None of the options are mandatory. Possible option keys are as follows:

globalbuffercount=20 (Optional) Number of global JFR buffers. This is a legacy option.
globalbuffersize=512k (Optional) Size of each global JFR buffer.
This value cannot be changed once JFR has been initialized.
The default value is determined by the values for memorysize and globalbuffersize.

globalbuffersize=512k (Optional) Size of each global JFR buffer. This is a legacy option.
This value cannot be changed once JFR has been initialized.
The default value is determined by the values for memorysize and globalbuffercount.
The default value is determined by the value for memorysize.

maxchunksize=12m (Optional) Maximum size of each individual JFR data chunk.
This value cannot be changed once JFR has been initialized.
Expand All @@ -19,15 +15,15 @@ memorysize=10m (Optional) Total size of all global JFR buffers.
old-object-queue-size=256 (Optional) The maximum number of old objects to track when the JFR event
OldObjectSample is enabled.

repositorypath=... (Optional) Path to the location where JFR recordings are stored until they are
repository=... (Optional) Path to the location where JFR recordings are stored until they are
written to a permanent file.
The default location is the temporary directory for the operating system.

stackdepth=64 (Optional) Stack depth for stack traces.
Setting this value greater than the default may cause a performance degradation.
This value cannot be changed once JFR has been initialized.

thread_buffer_size=8k (Optional) Size of each thread-local JFR buffer.
threadbuffersize=8k (Optional) Size of each thread-local JFR buffer.
This value cannot be changed once JFR has been initialized.

preserve-repository=false (Optional) Preserve files stored in the disk repository after the process exits.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ public void afterRegistration(AfterRegistrationAccess access) {
@Override
public void beforeAnalysis(BeforeAnalysisAccess access) {
RuntimeSupport runtime = RuntimeSupport.getRuntimeSupport();
runtime.addInitializationHook(JfrManager.initializationHook());
runtime.addStartupHook(JfrManager.startupHook());
runtime.addShutdownHook(JfrManager.shutdownHook());
}
Expand Down
Loading

0 comments on commit dad3798

Please sign in to comment.