public abstract class AbstractPerfAsmProfiler extends Object implements ExternalProfiler
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractPerfAsmProfiler.PerfEvents |
Modifier and Type | Field and Description |
---|---|
protected TempFile |
hsLog |
protected TempFile |
perfBinData |
protected TempFile |
perfParsedData |
protected List<String> |
requestedEventNames |
protected joptsimple.OptionSet |
set |
Modifier | Constructor and Description |
---|---|
protected |
AbstractPerfAsmProfiler(String initLine,
String... events) |
Modifier and Type | Method and Description |
---|---|
Collection<String> |
addJVMOptions(BenchmarkParams params)
Add JVM these options to the run.
|
protected abstract void |
addMyOptions(joptsimple.OptionParser parser) |
Collection<? extends Result> |
afterTrial(BenchmarkResult br,
long pid,
File stdOut,
File stdErr)
Run this code after the trial is done.
|
boolean |
allowPrintErr()
If target VM communicates with profiler with standard error, this method
can be used to shun the output to console.
|
boolean |
allowPrintOut()
If target VM communicates with profiler with standard output, this method
can be used to shun the output to console.
|
void |
beforeTrial(BenchmarkParams params)
Run this code before starting the trial.
|
protected abstract void |
parseEvents()
Parse profiler events from binary to text form.
|
protected abstract String |
perfBinaryExtension()
Get perf binary data extension (optional).
|
protected abstract AbstractPerfAsmProfiler.PerfEvents |
readEvents(double skipMs,
double lenMs)
Read parsed events.
|
protected List<String> |
stripEventNames(List<String> src)
Some profilers strip modifiers from event names.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addJVMInvokeOptions
getDescription
protected final TempFile hsLog
protected final TempFile perfBinData
protected final TempFile perfParsedData
protected final joptsimple.OptionSet set
protected AbstractPerfAsmProfiler(String initLine, String... events) throws ProfilerException
ProfilerException
protected abstract void addMyOptions(joptsimple.OptionParser parser)
public Collection<String> addJVMOptions(BenchmarkParams params)
ExternalProfiler
addJVMOptions
in interface ExternalProfiler
params
- benchmark parameters used for current launchpublic void beforeTrial(BenchmarkParams params)
ExternalProfiler
beforeTrial
in interface ExternalProfiler
params
- benchmark parameters used for current launchpublic Collection<? extends Result> afterTrial(BenchmarkResult br, long pid, File stdOut, File stdErr)
ExternalProfiler
afterTrial
in interface ExternalProfiler
br
- benchmark result that was the result of the trialpid
- pid that the forked JVM hadstdOut
- file containing the standard output from the benchmark JVMstdErr
- file containing the standard error from the benchmark JVMpublic boolean allowPrintOut()
ExternalProfiler
allowPrintOut
in interface ExternalProfiler
public boolean allowPrintErr()
ExternalProfiler
allowPrintErr
in interface ExternalProfiler
protected abstract void parseEvents()
protected abstract AbstractPerfAsmProfiler.PerfEvents readEvents(double skipMs, double lenMs)
skipMs
- Milliseconds to skip.lenMs
- Milliseconds to capture after skipprotected List<String> stripEventNames(List<String> src)
protected abstract String perfBinaryExtension()
Copyright © 2012–2020 Oracle. All rights reserved.