Package org.openjdk.jmh.profile
Class LinuxPerfAsmProfiler
- java.lang.Object
-
- org.openjdk.jmh.profile.AbstractPerfAsmProfiler
-
- org.openjdk.jmh.profile.LinuxPerfAsmProfiler
-
- All Implemented Interfaces:
ExternalProfiler
,Profiler
public class LinuxPerfAsmProfiler extends AbstractPerfAsmProfiler
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openjdk.jmh.profile.AbstractPerfAsmProfiler
AbstractPerfAsmProfiler.PerfEvents
-
-
Field Summary
-
Fields inherited from class org.openjdk.jmh.profile.AbstractPerfAsmProfiler
hsLog, perfBinData, perfParsedData, requestedEventNames, set
-
-
Constructor Summary
Constructors Constructor Description LinuxPerfAsmProfiler(String initLine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<String>
addJVMInvokeOptions(BenchmarkParams params)
Prepend JVM invocation with these commands.protected void
addMyOptions(joptsimple.OptionParser parser)
String
getDescription()
Human-readable one-line description of the profiler.protected void
parseEvents()
Parse profiler events from binary to text form.protected String
perfBinaryExtension()
Get perf binary data extension (optional).protected AbstractPerfAsmProfiler.PerfEvents
readEvents(double skipMs, double lenMs)
Read parsed events.protected List<String>
stripEventNames(List<String> events)
Some profilers strip modifiers from event names.-
Methods inherited from class org.openjdk.jmh.profile.AbstractPerfAsmProfiler
addJVMOptions, afterTrial, allowPrintErr, allowPrintOut, beforeTrial
-
-
-
-
Constructor Detail
-
LinuxPerfAsmProfiler
public LinuxPerfAsmProfiler(String initLine) throws ProfilerException
- Throws:
ProfilerException
-
-
Method Detail
-
addMyOptions
protected void addMyOptions(joptsimple.OptionParser parser)
- Specified by:
addMyOptions
in classAbstractPerfAsmProfiler
-
addJVMInvokeOptions
public Collection<String> addJVMInvokeOptions(BenchmarkParams params)
Description copied from interface:ExternalProfiler
Prepend JVM invocation with these commands.- Parameters:
params
- benchmark parameters used for current launch- Returns:
- commands to prepend for JVM launch
-
getDescription
public String getDescription()
Description copied from interface:Profiler
Human-readable one-line description of the profiler.- Returns:
- description
-
parseEvents
protected void parseEvents()
Description copied from class:AbstractPerfAsmProfiler
Parse profiler events from binary to text form.- Specified by:
parseEvents
in classAbstractPerfAsmProfiler
-
readEvents
protected AbstractPerfAsmProfiler.PerfEvents readEvents(double skipMs, double lenMs)
Description copied from class:AbstractPerfAsmProfiler
Read parsed events.- Specified by:
readEvents
in classAbstractPerfAsmProfiler
- Parameters:
skipMs
- Milliseconds to skip.lenMs
- Milliseconds to capture after skip- Returns:
- Events.
-
perfBinaryExtension
protected String perfBinaryExtension()
Description copied from class:AbstractPerfAsmProfiler
Get perf binary data extension (optional).- Specified by:
perfBinaryExtension
in classAbstractPerfAsmProfiler
- Returns:
- Extension.
-
stripEventNames
protected List<String> stripEventNames(List<String> events)
Description copied from class:AbstractPerfAsmProfiler
Some profilers strip modifiers from event names. To properly match the events in shared code, we need to know what those events were stripped to.- Overrides:
stripEventNames
in classAbstractPerfAsmProfiler
- Returns:
- stripped events
-
-