com.oracle.bedrock.Option, com.oracle.bedrock.runtime.Profilepublic class JprofilerProfile extends Object implements com.oracle.bedrock.runtime.Profile, com.oracle.bedrock.Option
Profile.
Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
| Modifier and Type | Class | Description |
|---|---|---|
static class |
JprofilerProfile.ListenAddress |
The listen address that the application will use to listen
for JProfiler connections.
|
| Constructor | Description |
|---|---|
JprofilerProfile(boolean enabled,
String agentLibraryFile,
JprofilerProfile.ListenAddress listenAddress,
boolean offline,
File configurationFile,
int sessionId,
boolean startSuspended,
boolean verbose,
boolean jniInterception,
Integer stack,
Integer samplingStack) |
Constructs a
JprofilerProfile. |
| Modifier and Type | Method | Description |
|---|---|---|
JprofilerProfile |
defaultSamplingStack() |
Use the default stack size for sampling.
|
JprofilerProfile |
defaultStack() |
Use the default stack size for dynamic instrumentation.
|
static JprofilerProfile |
disabled() |
Create a
JprofilerProfile that is disabled. |
static JprofilerProfile |
enabled(String agentLibraryFile) |
Create a
JprofilerProfile that is enabled and will use the
JProfiler agent at the specified location. |
static JprofilerProfile |
enabledNoWait(String agentLibraryFile) |
Create a
JprofilerProfile that is enabled and will use the
JProfiler agent at the specified location. |
boolean |
equals(Object o) |
|
int |
hashCode() |
|
boolean |
isEnabled() |
Obtain whether JProfiler is enabled.
|
JprofilerProfile |
jniInterception(boolean jniInterception) |
Enable the detection of object allocations via JNI calls.
|
JprofilerProfile |
listenMode() |
Start the application in listen mode listening on the default
address and port.
|
JprofilerProfile |
listenMode(JprofilerProfile.ListenAddress listenAddress) |
Start the application in listen mode listening on the specified
JprofilerProfile.ListenAddress. |
JprofilerProfile |
noWait() |
Do not wait for JProfiler to connect when the application JVM starts.
|
JprofilerProfile |
offlineMode(int sessionId) |
Run JProfiler in offline mode using the specified session ID from the file.
|
JprofilerProfile |
offlineMode(File configurationFile,
int sessionId) |
Run JProfiler in offline mode using the specified configuration XML file
and the specified session ID from the file.
|
void |
onClosing(com.oracle.bedrock.runtime.Platform platform,
com.oracle.bedrock.runtime.Application application,
com.oracle.bedrock.OptionsByType optionsByType) |
|
void |
onLaunched(com.oracle.bedrock.runtime.Platform platform,
com.oracle.bedrock.runtime.Application application,
com.oracle.bedrock.OptionsByType optionsByType) |
|
void |
onLaunching(com.oracle.bedrock.runtime.Platform platform,
com.oracle.bedrock.runtime.MetaClass metaClass,
com.oracle.bedrock.OptionsByType optionsByType) |
|
JprofilerProfile |
samplingStack(int samplingStack) |
Set the maximum stack size for sampling.
|
JprofilerProfile |
stack(int stack) |
Set the maximum stack size for dynamic instrumentation.
|
JprofilerProfile |
startSuspended() |
Start the application suspended and wait for JProfiler to connect.
|
String |
toString() |
|
JprofilerProfile |
verbose(boolean verbose) |
JProfiler will print the names of all instrumented classes to stderr.
|
public JprofilerProfile(boolean enabled,
String agentLibraryFile,
JprofilerProfile.ListenAddress listenAddress,
boolean offline,
File configurationFile,
int sessionId,
boolean startSuspended,
boolean verbose,
boolean jniInterception,
Integer stack,
Integer samplingStack)
JprofilerProfile.enabled - enablingagentLibraryFile - the agent library filelistenAddress - the JprofilerProfile.ListenAddressoffline - start offlineconfigurationFile - the configuration filesessionId - the session idstartSuspended - start suspendedverbose - verbose outputjniInterception - use JNI interceptionstack - the stacksamplingStack - the sampling stack sizepublic boolean isEnabled()
public JprofilerProfile offlineMode(int sessionId)
sessionId - the session id to use from the specified configuration fileJprofilerProfile for fluent method chainingIllegalStateException - if start suspended has been set to truepublic JprofilerProfile offlineMode(File configurationFile, int sessionId)
configurationFile - the configuration file to use for JProfilersessionId - the session id to use from the specified configuration fileJprofilerProfile for fluent method chainingIllegalStateException - if start suspended has been set to truepublic JprofilerProfile listenMode()
JprofilerProfile for fluent method chainingpublic JprofilerProfile listenMode(JprofilerProfile.ListenAddress listenAddress)
JprofilerProfile.ListenAddress.listenAddress - the JprofilerProfile.ListenAddressJprofilerProfile for fluent method chainingpublic JprofilerProfile noWait()
JprofilerProfile for fluent method chainingpublic JprofilerProfile startSuspended()
JprofilerProfile for fluent method chainingpublic JprofilerProfile verbose(boolean verbose)
verbose - true if JProfiler should run in verbose modeJprofilerProfile for fluent method chainingpublic JprofilerProfile jniInterception(boolean jniInterception)
jniInterception - flag indicating whether to enable JNI interceptionJprofilerProfile for fluent method chainingpublic JprofilerProfile stack(int stack)
stack - the maximum stack size for dynamic instrumentationJprofilerProfile for fluent method chainingpublic JprofilerProfile defaultStack()
JprofilerProfile for fluent method chainingpublic JprofilerProfile samplingStack(int samplingStack)
samplingStack - the samplign stack sizeJprofilerProfile for fluent method chainingpublic JprofilerProfile defaultSamplingStack()
JprofilerProfile for fluent method chainingpublic void onLaunching(com.oracle.bedrock.runtime.Platform platform,
com.oracle.bedrock.runtime.MetaClass metaClass,
com.oracle.bedrock.OptionsByType optionsByType)
onLaunching in interface com.oracle.bedrock.runtime.Profilepublic void onLaunched(com.oracle.bedrock.runtime.Platform platform,
com.oracle.bedrock.runtime.Application application,
com.oracle.bedrock.OptionsByType optionsByType)
onLaunched in interface com.oracle.bedrock.runtime.Profilepublic void onClosing(com.oracle.bedrock.runtime.Platform platform,
com.oracle.bedrock.runtime.Application application,
com.oracle.bedrock.OptionsByType optionsByType)
onClosing in interface com.oracle.bedrock.runtime.Profilepublic static JprofilerProfile enabled(String agentLibraryFile)
JprofilerProfile that is enabled and will use the
JProfiler agent at the specified location.agentLibraryFile - the location of the JProfiler agentJprofilerProfile@Default public static JprofilerProfile enabledNoWait(String agentLibraryFile)
JprofilerProfile that is enabled and will use the
JProfiler agent at the specified location. The JprofilerProfile
instance will also be configured with the "nowait" setting that means
the application will not wait for JProfiler to connect when the JVM starts.
This can be changed by calling startSuspended().agentLibraryFile - the location of the JProfiler agentJprofilerProfilepublic static JprofilerProfile disabled()
JprofilerProfile that is disabled.JprofilerProfile that is disabled.Copyright © 2018. All rights reserved.