Showing preview only (4,456K chars total). Download the full file or copy to clipboard to get everything.
Repository: jbachorik/btrace
Branch: develop
Commit: c354f12be41a
Files: 1026
Total size: 4.0 MB
Directory structure:
gitextract_vcnq_xtn/
├── .github/
│ ├── FUNDING.yml
│ ├── copilot-instructions.md
│ └── workflows/
│ ├── README.md
│ ├── codeql-analysis.yml
│ ├── continuous.yml
│ ├── release.yml
│ ├── stale.yml
│ ├── update-jdk-versions.yml
│ └── v2-protocol-tests.yml
├── .gitignore
├── .muse/
│ └── advisor.md
├── AGENTS.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── benchmarks/
│ ├── agent-benchmark/
│ │ ├── build.gradle
│ │ └── src/
│ │ └── jmh/
│ │ ├── btrace/
│ │ │ └── TraceScript.java
│ │ └── java/
│ │ └── benchmark/
│ │ └── BTraceBench.java
│ └── runtime-benchmarks/
│ ├── build.gradle
│ └── src/
│ └── jmh/
│ ├── btrace/
│ │ └── TraceScript.java
│ └── java/
│ └── org/
│ └── openjdk/
│ └── btrace/
│ └── bench/
│ ├── ClassFilterBenchmark.java
│ ├── DispatchBenchmark.java
│ ├── OnMethodTemplateBenchmark.java
│ ├── ProbeLoadingBenchmark.java
│ ├── ProfilerBenchmark.java
│ ├── StatsdBenchmark.java
│ └── StringOpBenchmark.java
├── btrace-agent/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── agent/
│ │ │ ├── Client.java
│ │ │ ├── ClientContext.java
│ │ │ ├── FileClient.java
│ │ │ ├── Main.java
│ │ │ ├── PerfReaderImpl.java
│ │ │ ├── RemoteClient.java
│ │ │ └── TraceOutputWriter.java
│ │ └── resources/
│ │ └── META-INF/
│ │ └── MANIFEST.MF
│ └── test/
│ └── java/
│ └── org/
│ └── openjdk/
│ └── btrace/
│ └── agent/
│ └── MainTest.java
├── btrace-api/
│ └── build.gradle
├── btrace-boot/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── java/
│ └── org/
│ └── openjdk/
│ └── btrace/
│ └── boot/
│ ├── Loader.java
│ ├── MaskedClassLoader.java
│ └── MaskedJarUtils.java
├── btrace-bootstrap/
│ └── build.gradle
├── btrace-client/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── client/
│ │ ├── Client.java
│ │ ├── JpsUtils.java
│ │ ├── Main.java
│ │ └── ProbePrinter.java
│ └── test/
│ └── java/
│ └── org/
│ └── openjdk/
│ └── btrace/
│ └── client/
│ ├── ClientTest.java
│ └── MainTest.java
├── btrace-compiler/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── compiler/
│ │ ├── AnnotationSerializer.java
│ │ ├── ClassDataJavaFileObject.java
│ │ ├── Compiler.java
│ │ ├── CompilerClassWriter.java
│ │ ├── CompilerHelper.java
│ │ ├── ConcatenatingReader.java
│ │ ├── MaskedJavaFileManager.java
│ │ ├── MemoryJavaFileManager.java
│ │ ├── PCPP.java
│ │ ├── PackGenerator.java
│ │ ├── Postprocessor.java
│ │ ├── Printer.java
│ │ ├── Verifier.java
│ │ ├── VerifierVisitor.java
│ │ └── oneliner/
│ │ ├── OnelinerAST.java
│ │ ├── OnelinerCodeGenerator.java
│ │ ├── OnelinerException.java
│ │ ├── OnelinerLexer.java
│ │ ├── OnelinerParser.java
│ │ └── OnelinerValidator.java
│ └── test/
│ ├── java/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── compiler/
│ │ ├── JfrEventsTest.java
│ │ ├── TypeErasureTest.java
│ │ └── oneliner/
│ │ ├── OnelinerCodeGeneratorTest.java
│ │ ├── OnelinerIntegrationTest.java
│ │ └── OnelinerParserTest.java
│ └── resources/
│ ├── HistoProbe.java
│ ├── JfrEventsProbe.java
│ └── MetricsExtensionProbe.java
├── btrace-core/
│ ├── JMH_BENCHMARKS.md
│ ├── build.gradle
│ └── src/
│ ├── jmh/
│ │ └── java/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── core/
│ │ └── comm/
│ │ └── v2/
│ │ └── BinaryProtocolBenchmark.java
│ ├── main/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ ├── core/
│ │ │ │ ├── Args.java
│ │ │ │ ├── ArgsMap.java
│ │ │ │ ├── BTraceRuntime.java
│ │ │ │ ├── BTraceRuntimeBridge.java
│ │ │ │ ├── BTraceUtils.java
│ │ │ │ ├── CircularBuffer.java
│ │ │ │ ├── DebugSupport.java
│ │ │ │ ├── Function.java
│ │ │ │ ├── HandlerRepository.java
│ │ │ │ ├── Messages.java
│ │ │ │ ├── MethodID.java
│ │ │ │ ├── PrefixMap.java
│ │ │ │ ├── Profiler.java
│ │ │ │ ├── SharedSettings.java
│ │ │ │ ├── VerifierException.java
│ │ │ │ ├── annotations/
│ │ │ │ │ ├── BTrace.java
│ │ │ │ │ ├── DTrace.java
│ │ │ │ │ ├── DTraceRef.java
│ │ │ │ │ ├── Duration.java
│ │ │ │ │ ├── Event.java
│ │ │ │ │ ├── Export.java
│ │ │ │ │ ├── Injected.java
│ │ │ │ │ ├── InjectionMode.java
│ │ │ │ │ ├── Kind.java
│ │ │ │ │ ├── Level.java
│ │ │ │ │ ├── Location.java
│ │ │ │ │ ├── OnError.java
│ │ │ │ │ ├── OnEvent.java
│ │ │ │ │ ├── OnExit.java
│ │ │ │ │ ├── OnLowMemory.java
│ │ │ │ │ ├── OnMethod.java
│ │ │ │ │ ├── OnProbe.java
│ │ │ │ │ ├── OnTimer.java
│ │ │ │ │ ├── PeriodicEvent.java
│ │ │ │ │ ├── ProbeClassName.java
│ │ │ │ │ ├── ProbeMethodName.java
│ │ │ │ │ ├── Property.java
│ │ │ │ │ ├── Return.java
│ │ │ │ │ ├── Sampled.java
│ │ │ │ │ ├── Self.java
│ │ │ │ │ ├── TLS.java
│ │ │ │ │ ├── TargetInstance.java
│ │ │ │ │ ├── TargetMethodOrField.java
│ │ │ │ │ └── Where.java
│ │ │ │ ├── comm/
│ │ │ │ │ ├── BinaryWireProtocol.java
│ │ │ │ │ ├── Command.java
│ │ │ │ │ ├── CommandListener.java
│ │ │ │ │ ├── DataCommand.java
│ │ │ │ │ ├── DisconnectCommand.java
│ │ │ │ │ ├── ErrorCommand.java
│ │ │ │ │ ├── EventCommand.java
│ │ │ │ │ ├── ExitCommand.java
│ │ │ │ │ ├── GridDataCommand.java
│ │ │ │ │ ├── InstrumentCommand.java
│ │ │ │ │ ├── JavaSerializationProtocol.java
│ │ │ │ │ ├── ListFailedExtensionsCommand.java
│ │ │ │ │ ├── ListProbesCommand.java
│ │ │ │ │ ├── MessageCommand.java
│ │ │ │ │ ├── NumberDataCommand.java
│ │ │ │ │ ├── NumberMapDataCommand.java
│ │ │ │ │ ├── PrintableCommand.java
│ │ │ │ │ ├── ProtocolConfig.java
│ │ │ │ │ ├── ProtocolNegotiator.java
│ │ │ │ │ ├── ProtocolVersion.java
│ │ │ │ │ ├── ReconnectCommand.java
│ │ │ │ │ ├── RenameCommand.java
│ │ │ │ │ ├── RetransformClassNotification.java
│ │ │ │ │ ├── RetransformationStartNotification.java
│ │ │ │ │ ├── SetSettingsCommand.java
│ │ │ │ │ ├── StatusCommand.java
│ │ │ │ │ ├── StringMapDataCommand.java
│ │ │ │ │ ├── WireIO.java
│ │ │ │ │ ├── WireProtocol.java
│ │ │ │ │ └── v2/
│ │ │ │ │ ├── BinaryClient.java
│ │ │ │ │ ├── BinaryCommand.java
│ │ │ │ │ ├── BinaryDataCommand.java
│ │ │ │ │ ├── BinaryDisconnectCommand.java
│ │ │ │ │ ├── BinaryErrorCommand.java
│ │ │ │ │ ├── BinaryEventCommand.java
│ │ │ │ │ ├── BinaryExitCommand.java
│ │ │ │ │ ├── BinaryGridDataCommand.java
│ │ │ │ │ ├── BinaryInstrumentCommand.java
│ │ │ │ │ ├── BinaryListFailedExtensionsCommand.java
│ │ │ │ │ ├── BinaryListProbesCommand.java
│ │ │ │ │ ├── BinaryMessageCommand.java
│ │ │ │ │ ├── BinaryNumberDataCommand.java
│ │ │ │ │ ├── BinaryNumberMapDataCommand.java
│ │ │ │ │ ├── BinaryProtocol.java
│ │ │ │ │ ├── BinaryReconnectCommand.java
│ │ │ │ │ ├── BinaryRenameCommand.java
│ │ │ │ │ ├── BinaryRetransformClassNotification.java
│ │ │ │ │ ├── BinaryRetransformationStartNotification.java
│ │ │ │ │ ├── BinarySetSettingsCommand.java
│ │ │ │ │ ├── BinaryStatusCommand.java
│ │ │ │ │ ├── BinaryStringCommand.java
│ │ │ │ │ ├── BinaryStringMapDataCommand.java
│ │ │ │ │ ├── BinaryWireIO.java
│ │ │ │ │ ├── CommandAdapter.java
│ │ │ │ │ ├── CommandDeserializationException.java
│ │ │ │ │ ├── MalformedCommandException.java
│ │ │ │ │ ├── NumberEncoding.java
│ │ │ │ │ ├── ProtocolVersionMismatchException.java
│ │ │ │ │ ├── README.md
│ │ │ │ │ ├── RemoteException.java
│ │ │ │ │ └── ScalarEncoding.java
│ │ │ │ ├── extensions/
│ │ │ │ │ ├── Extension.java
│ │ │ │ │ ├── ExtensionContext.java
│ │ │ │ │ ├── ExtensionDescriptor.java
│ │ │ │ │ ├── ExtensionException.java
│ │ │ │ │ ├── ExtensionMeta.java
│ │ │ │ │ ├── Permission.java
│ │ │ │ │ ├── PermissionSet.java
│ │ │ │ │ └── ServiceDescriptor.java
│ │ │ │ ├── handlers/
│ │ │ │ │ ├── ErrorHandler.java
│ │ │ │ │ ├── EventHandler.java
│ │ │ │ │ ├── ExitHandler.java
│ │ │ │ │ ├── LowMemoryHandler.java
│ │ │ │ │ └── TimerHandler.java
│ │ │ │ ├── jfr/
│ │ │ │ │ └── JfrEvent.java
│ │ │ │ └── types/
│ │ │ │ ├── AnyType.java
│ │ │ │ ├── BTraceCollection.java
│ │ │ │ ├── BTraceDeque.java
│ │ │ │ └── BTraceMap.java
│ │ │ └── runtime/
│ │ │ ├── BTraceRuntimeAccess.java
│ │ │ └── LinkingFlag.java
│ │ └── resources/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── core/
│ │ ├── annotations/
│ │ │ └── jaxb.index
│ │ └── messages.properties
│ └── test/
│ └── java/
│ └── org/
│ └── openjdk/
│ └── btrace/
│ └── core/
│ ├── CircularBufferTest.java
│ ├── MethodIDTest.java
│ ├── PrefixMapTest.java
│ ├── ReflectiveFieldAccessTest.java
│ └── comm/
│ ├── InstrumentCommandTest.java
│ ├── JavaSerializationProtocolLeakTest.java
│ ├── ListProbesCommandConcurrencyTest.java
│ ├── NullSafetyTest.java
│ ├── ProtocolConfigTest.java
│ ├── ProtocolNegotiatorTest.java
│ ├── TypeSafetyTest.java
│ ├── WireProtocolSessionTest.java
│ ├── WireProtocolTest.java
│ └── v2/
│ ├── BinaryProtocolEdgeCasesTest.java
│ ├── BinaryProtocolPerformanceTest.java
│ └── BinaryProtocolTest.java
├── btrace-dist/
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── resources/
│ ├── COPYRIGHT
│ ├── LICENSE
│ ├── LICENSE-3RD-PARTY.txt
│ ├── THIRDPARTYLICENSEREADME.txt
│ ├── bin/
│ │ ├── btrace
│ │ ├── btrace.bat
│ │ ├── btracec
│ │ ├── btracec.bat
│ │ ├── btracep
│ │ ├── btracep.bat
│ │ ├── btracer
│ │ ├── btracer.bat
│ │ ├── btracex
│ │ └── btracex.bat
│ ├── conf/
│ │ └── extensions.conf
│ └── samples/
│ ├── AWTEventTracer.java
│ ├── AllCalls1.java
│ ├── AllCalls1Sampled.java
│ ├── AllCalls2.java
│ ├── AllCalls2Sampled.java
│ ├── AllCalls3.java
│ ├── AllCalls3Sampled.java
│ ├── AllLines.java
│ ├── AllMethods.java
│ ├── AllMethods1.java
│ ├── AllMethodsLevels.java
│ ├── AllMethodsSampled.java
│ ├── AllSync.java
│ ├── ArgArray.java
│ ├── Classload.java
│ ├── CommandArg.java
│ ├── DTraceInline.java
│ ├── DTraceRefDemo.java
│ ├── Deadlock.java
│ ├── FileTracker.java
│ ├── FileTrackerJfr.java
│ ├── FinalizeTracker.java
│ ├── HistoOnEvent.java
│ ├── Histogram.java
│ ├── HistogramBean.java
│ ├── JInfo.java
│ ├── JMap.java
│ ├── JStack.java
│ ├── LogTracer.java
│ ├── MemAlerter.java
│ ├── Memory.java
│ ├── MultiClass.java
│ ├── NewArray.java
│ ├── NewComponent.java
│ ├── OnThrow.java
│ ├── ProbeArgs.java
│ ├── ProbeExit.java
│ ├── Profiling.java
│ ├── Sizeof.java
│ ├── SocketTracker.java
│ ├── SocketTracker1.java
│ ├── SubtypeTracer.java
│ ├── SysProp.java
│ ├── Test.java
│ ├── ThreadBean.java
│ ├── ThreadCounter.java
│ ├── ThreadCounterBean.java
│ ├── ThreadStart.java
│ ├── Timers.java
│ ├── URLTracker.java
│ ├── WebServiceTracker.java
│ ├── btracedefs.h
│ ├── classload.d
│ ├── java.net.socket.xml
│ ├── jthread.d
│ ├── jurls.d
│ └── syscalls.d
├── btrace-dtrace/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── dtrace/
│ │ │ ├── DTrace.java
│ │ │ ├── DTraceCommand.java
│ │ │ ├── DTraceConsumerCommand.java
│ │ │ ├── DTraceDataCommand.java
│ │ │ ├── DTraceDropCommand.java
│ │ │ ├── DTraceErrorCommand.java
│ │ │ ├── DTraceExtension.java
│ │ │ ├── DTraceStartCommand.java
│ │ │ └── DTraceStopCommand.java
│ │ ├── native/
│ │ │ ├── btrace.c
│ │ │ └── btraced.d
│ │ └── resources/
│ │ └── META-INF/
│ │ └── services/
│ │ └── org.openjdk.btrace.core.extensions.Extension
│ └── mock/
│ └── java/
│ └── org/
│ └── opensolaris/
│ └── os/
│ └── dtrace/
│ ├── Aggregate.java
│ ├── Aggregation.java
│ ├── AggregationRecord.java
│ ├── AggregationValue.java
│ ├── Consumer.java
│ ├── ConsumerAdapter.java
│ ├── ConsumerEvent.java
│ ├── ConsumerException.java
│ ├── ConsumerListener.java
│ ├── DTraceException.java
│ ├── DataEvent.java
│ ├── Drop.java
│ ├── DropEvent.java
│ ├── ErrorEvent.java
│ ├── ExceptionHandler.java
│ ├── LocalConsumer.java
│ ├── Option.java
│ ├── Probe.java
│ ├── ProbeData.java
│ ├── ProbeDescription.java
│ ├── Program.java
│ ├── Record.java
│ └── Tuple.java
├── btrace-ext-cli/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── extcli/
│ │ ├── ExtensionInspector.java
│ │ ├── ExtensionLister.java
│ │ ├── ExtensionReport.java
│ │ ├── Installer.java
│ │ ├── Main.java
│ │ ├── PolicyFile.java
│ │ ├── RepoBrowser.java
│ │ ├── RepoScanner.java
│ │ └── tui/
│ │ ├── ExtRepoBrowser.java
│ │ ├── ExtensionInspectorLite.java
│ │ ├── PolicyFileLite.java
│ │ ├── RepoScannerLite.java
│ │ └── TuiState.java
│ └── test/
│ └── java/
│ └── org/
│ └── openjdk/
│ └── btrace/
│ └── extcli/
│ ├── ExtensionInspectorTest.java
│ ├── ExtensionListerTest.java
│ ├── InstallerTest.java
│ ├── MainTest.java
│ ├── PolicyFileTest.java
│ └── TestExtensionBuilder.java
├── btrace-extension/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── extension/
│ │ ├── ExtensionBridge.java
│ │ ├── ExtensionDescriptorDTO.java
│ │ ├── ExtensionLoader.java
│ │ ├── ExtensionRegistry.java
│ │ ├── ExtensionRepository.java
│ │ ├── PermissionPolicy.java
│ │ ├── ServiceDeclarationRegistry.java
│ │ └── impl/
│ │ ├── ExtensionBridgeImpl.java
│ │ ├── ExtensionClassLoader.java
│ │ ├── ExtensionConfig.java
│ │ ├── ExtensionLoaderImpl.java
│ │ ├── ExtensionMetadata.java
│ │ ├── FileSystemExtensionRepository.java
│ │ └── NestedJarExtensionClassLoader.java
│ └── test/
│ ├── java/
│ │ ├── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── extension/
│ │ │ ├── ExtensionBridgeImplPolicyTest.java
│ │ │ └── ExtensionLoaderImplConcurrencyTest.java
│ │ └── test/
│ │ ├── ext/
│ │ │ ├── Service.java
│ │ │ ├── ServiceImpl.java
│ │ │ └── SpiImpl.java
│ │ └── ext2/
│ │ ├── Service2.java
│ │ └── Service2Impl.java
│ └── resources/
│ └── META-INF/
│ └── services/
│ └── test.ext.Service
├── btrace-extensions/
│ ├── btrace-metrics/
│ │ ├── build.gradle
│ │ └── src/
│ │ ├── api/
│ │ │ └── java/
│ │ │ └── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── metrics/
│ │ │ ├── MetricsService.java
│ │ │ ├── histogram/
│ │ │ │ ├── HistogramConfig.java
│ │ │ │ ├── HistogramConfigBuilder.java
│ │ │ │ ├── HistogramMetric.java
│ │ │ │ └── HistogramSnapshot.java
│ │ │ ├── package-info.java
│ │ │ └── stats/
│ │ │ ├── StatsMetric.java
│ │ │ └── StatsSnapshot.java
│ │ ├── impl/
│ │ │ └── java/
│ │ │ └── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── metrics/
│ │ │ ├── Metric.java
│ │ │ ├── MetricsServiceImpl.java
│ │ │ ├── histogram/
│ │ │ │ ├── HistogramConfigBuilderImpl.java
│ │ │ │ ├── HistogramConfigImpl.java
│ │ │ │ ├── HistogramMetricImpl.java
│ │ │ │ └── HistogramSnapshotImpl.java
│ │ │ ├── registry/
│ │ │ │ └── MetricRegistry.java
│ │ │ └── stats/
│ │ │ ├── StatsMetricImpl.java
│ │ │ └── StatsSnapshotImpl.java
│ │ └── test/
│ │ └── java/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── metrics/
│ │ ├── HistogramMetricTest.java
│ │ └── StatsMetricTest.java
│ ├── btrace-statsd/
│ │ ├── build.gradle
│ │ └── src/
│ │ ├── api/
│ │ │ └── java/
│ │ │ └── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── statsd/
│ │ │ ├── Statsd.java
│ │ │ └── package-info.java
│ │ └── impl/
│ │ └── java/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── statsd/
│ │ └── StatsdImpl.java
│ ├── btrace-utils/
│ │ ├── build.gradle
│ │ └── src/
│ │ ├── api/
│ │ │ └── java/
│ │ │ └── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── utils/
│ │ │ ├── PrinterService.java
│ │ │ └── package-info.java
│ │ └── impl/
│ │ └── java/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── utils/
│ │ └── PrinterServiceImpl.java
│ └── build.gradle
├── btrace-gradle-plugin/
│ ├── README.md
│ ├── build.gradle
│ └── src/
│ └── main/
│ └── groovy/
│ └── org/
│ └── openjdk/
│ └── btrace/
│ └── gradle/
│ ├── BTraceExtensionPlugin.groovy
│ └── PermissionScanner.groovy
├── btrace-instr/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── instr/
│ │ │ ├── ArrayAccessInstrumentor.java
│ │ │ ├── ArrayAllocInstrumentor.java
│ │ │ ├── Assembler.java
│ │ │ ├── BTraceBCPClassLoader.java
│ │ │ ├── BTraceClassReader.java
│ │ │ ├── BTraceClassWriter.java
│ │ │ ├── BTraceMethodNode.java
│ │ │ ├── BTraceMethodVisitor.java
│ │ │ ├── BTraceProbe.java
│ │ │ ├── BTraceProbeFactory.java
│ │ │ ├── BTraceProbeNode.java
│ │ │ ├── BTraceProbePersisted.java
│ │ │ ├── BTraceProbeSupport.java
│ │ │ ├── BTraceTransformer.java
│ │ │ ├── BailoutException.java
│ │ │ ├── CallGraph.java
│ │ │ ├── CatchInstrumentor.java
│ │ │ ├── ClassCache.java
│ │ │ ├── ClassFilter.java
│ │ │ ├── ClassInfo.java
│ │ │ ├── Constants.java
│ │ │ ├── ErrorReturnInstrumentor.java
│ │ │ ├── FieldAccessInstrumentor.java
│ │ │ ├── HandlerRepositoryImpl.java
│ │ │ ├── InstrPackGenerator.java
│ │ │ ├── InstrumentUtils.java
│ │ │ ├── InstrumentationException.java
│ │ │ ├── InstrumentingMethodVisitor.java
│ │ │ ├── Instrumentor.java
│ │ │ ├── Level.java
│ │ │ ├── LineNumberInstrumentor.java
│ │ │ ├── LinkerInstrumentor.java
│ │ │ ├── Location.java
│ │ │ ├── MethodCallInstrumentor.java
│ │ │ ├── MethodEntryExitInstrumentor.java
│ │ │ ├── MethodEntryInstrumentor.java
│ │ │ ├── MethodInstrumentor.java
│ │ │ ├── MethodInstrumentorHelper.java
│ │ │ ├── MethodReturnInstrumentor.java
│ │ │ ├── MethodTracker.java
│ │ │ ├── MethodTrackingContext.java
│ │ │ ├── MethodVerifier.java
│ │ │ ├── ObjectAllocInstrumentor.java
│ │ │ ├── OnMethod.java
│ │ │ ├── OnProbe.java
│ │ │ ├── Preprocessor.java
│ │ │ ├── ProbeDescriptor.java
│ │ │ ├── ProbeDescriptorLoader.java
│ │ │ ├── ProbeDump.java
│ │ │ ├── ProbeRenameVisitor.java
│ │ │ ├── ProbeUpgradeVisitor_1_2.java
│ │ │ ├── RandomIntProvider.java
│ │ │ ├── SpecialParameterHolder.java
│ │ │ ├── StackTrackingMethodVisitor.java
│ │ │ ├── SynchronizedInstrumentor.java
│ │ │ ├── ThrowInstrumentor.java
│ │ │ ├── TypeCheckInstrumentor.java
│ │ │ ├── TypeUtils.java
│ │ │ ├── VariableMapper.java
│ │ │ ├── Verifier.java
│ │ │ └── random/
│ │ │ ├── SharedRandomIntProvider.java
│ │ │ └── ThreadLocalRandomIntProvider.java
│ │ └── resources/
│ │ ├── META-INF/
│ │ │ └── services/
│ │ │ └── org.openjdk.btrace.compiler.PackGenerator
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── instr/
│ │ └── jaxb.index
│ └── test/
│ ├── btrace/
│ │ ├── ExportTest.java
│ │ ├── InterestingVarsTest.java
│ │ ├── OnProbeTest.java
│ │ ├── OnTimerTest.java
│ │ ├── TLSTest.java
│ │ ├── TraceAllTest.java
│ │ ├── issues/
│ │ │ ├── BTRACE106.java
│ │ │ ├── BTRACE189.java
│ │ │ ├── BTRACE22.java
│ │ │ ├── BTRACE256.java
│ │ │ ├── BTRACE28.java
│ │ │ ├── BTRACE53.java
│ │ │ ├── BTRACE69.java
│ │ │ ├── BTRACE87.java
│ │ │ ├── BTRACE_333.java
│ │ │ └── TezSplitter.java
│ │ ├── onmethod/
│ │ │ ├── AllLines.java
│ │ │ ├── AnytypeArgs.java
│ │ │ ├── AnytypeArgsNoSelf.java
│ │ │ ├── Args.java
│ │ │ ├── Args2Sampled.java
│ │ │ ├── ArgsDuration.java
│ │ │ ├── ArgsDuration2.java
│ │ │ ├── ArgsDuration2Err.java
│ │ │ ├── ArgsDuration2Sampled.java
│ │ │ ├── ArgsDurationBoxed.java
│ │ │ ├── ArgsDurationBoxedErr.java
│ │ │ ├── ArgsDurationConstructor.java
│ │ │ ├── ArgsDurationConstructorErr.java
│ │ │ ├── ArgsDurationErr.java
│ │ │ ├── ArgsDurationMultiReturn.java
│ │ │ ├── ArgsDurationSampled.java
│ │ │ ├── ArgsNoSelf.java
│ │ │ ├── ArgsReturn.java
│ │ │ ├── ArgsReturnAugmented.java
│ │ │ ├── ArgsReturnAugmented1.java
│ │ │ ├── ArgsReturnBoxed.java
│ │ │ ├── ArgsReturnSampled.java
│ │ │ ├── ArgsReturnTypeMatch.java
│ │ │ ├── ArgsReturnTypeNoMatch.java
│ │ │ ├── ArgsReturnVoid.java
│ │ │ ├── ArgsSampled.java
│ │ │ ├── ArgsSampledAdaptive.java
│ │ │ ├── ArgsSampledNoSampling.java
│ │ │ ├── ArgsShared.java
│ │ │ ├── ArgsSigMatch.java
│ │ │ ├── ArgsUnsafe.java
│ │ │ ├── ArrayGetAfter.java
│ │ │ ├── ArrayGetAfterAny.java
│ │ │ ├── ArrayGetBefore.java
│ │ │ ├── ArrayGetBeforeAny.java
│ │ │ ├── ArraySetAfter.java
│ │ │ ├── ArraySetAfterAny.java
│ │ │ ├── ArraySetBefore.java
│ │ │ ├── ArraySetBeforeAny.java
│ │ │ ├── Catch.java
│ │ │ ├── CheckcastAfter.java
│ │ │ ├── CheckcastBefore.java
│ │ │ ├── ConstructorArgs.java
│ │ │ ├── Error.java
│ │ │ ├── ErrorCaught.java
│ │ │ ├── ErrorDuration.java
│ │ │ ├── FieldGetAfter.java
│ │ │ ├── FieldGetAfterStatic.java
│ │ │ ├── FieldGetBefore.java
│ │ │ ├── FieldGetBeforeStatic.java
│ │ │ ├── FieldSetAfter.java
│ │ │ ├── FieldSetAfterStatic.java
│ │ │ ├── FieldSetBefore.java
│ │ │ ├── FieldSetBeforeStatic.java
│ │ │ ├── InstanceofAfter.java
│ │ │ ├── InstanceofBefore.java
│ │ │ ├── Line.java
│ │ │ ├── MatchAnnotated.java
│ │ │ ├── MatchAnnotatedRegex.java
│ │ │ ├── MatchDerived.java
│ │ │ ├── MethodCall.java
│ │ │ ├── MethodCallDuration.java
│ │ │ ├── MethodCallDuration2.java
│ │ │ ├── MethodCallDurationSampled.java
│ │ │ ├── MethodCallDurationSampledMulti.java
│ │ │ ├── MethodCallNoArgs.java
│ │ │ ├── MethodCallReturn.java
│ │ │ ├── MethodCallReturnAugmented.java
│ │ │ ├── MethodCallReturnAugmented1.java
│ │ │ ├── MethodCallSampled.java
│ │ │ ├── MethodCallSampledAdaptive.java
│ │ │ ├── MethodCallStatic.java
│ │ │ ├── NativeWithReturn.java
│ │ │ ├── NativeWithoutReturn.java
│ │ │ ├── NewAfter.java
│ │ │ ├── NewArrayIntAfter.java
│ │ │ ├── NewArrayIntBefore.java
│ │ │ ├── NewArrayStringAfter.java
│ │ │ ├── NewArrayStringBefore.java
│ │ │ ├── NewBefore.java
│ │ │ ├── NoArgs.java
│ │ │ ├── NoArgsEntryReturn.java
│ │ │ ├── NoArgsEntryReturnNoCapture.java
│ │ │ ├── ServicesTest.java
│ │ │ ├── StaticArgs.java
│ │ │ ├── StaticArgsReturn.java
│ │ │ ├── StaticArgsSelf.java
│ │ │ ├── StaticMethodCall.java
│ │ │ ├── StaticMethodCallStatic.java
│ │ │ ├── StaticNoArgs.java
│ │ │ ├── StaticNoArgsSelf.java
│ │ │ ├── SyncEntry.java
│ │ │ ├── SyncExit.java
│ │ │ ├── SyncMEntry.java
│ │ │ ├── SyncMExit.java
│ │ │ ├── Throw.java
│ │ │ └── leveled/
│ │ │ ├── AnytypeArgs.java
│ │ │ ├── AnytypeArgsNoSelf.java
│ │ │ ├── Args.java
│ │ │ ├── Args2Sampled.java
│ │ │ ├── ArgsDuration.java
│ │ │ ├── ArgsDuration2.java
│ │ │ ├── ArgsDuration2Err.java
│ │ │ ├── ArgsDuration2Sampled.java
│ │ │ ├── ArgsDurationBoxed.java
│ │ │ ├── ArgsDurationBoxedErr.java
│ │ │ ├── ArgsDurationConstructor.java
│ │ │ ├── ArgsDurationConstructorErr.java
│ │ │ ├── ArgsDurationErr.java
│ │ │ ├── ArgsDurationMultiReturn.java
│ │ │ ├── ArgsDurationSampled.java
│ │ │ ├── ArgsNoSelf.java
│ │ │ ├── ArgsReturn.java
│ │ │ ├── ArgsReturnAugmented.java
│ │ │ ├── ArgsReturnAugmented1.java
│ │ │ ├── ArgsReturnSampled.java
│ │ │ ├── ArgsSampled.java
│ │ │ ├── ArgsSampledAdaptive.java
│ │ │ ├── ArgsSampledNoSampling.java
│ │ │ ├── ArgsShared.java
│ │ │ ├── ArgsUnsafe.java
│ │ │ ├── ArrayGetAfter.java
│ │ │ ├── ArrayGetAfterAny.java
│ │ │ ├── ArrayGetBefore.java
│ │ │ ├── ArrayGetBeforeAny.java
│ │ │ ├── ArraySetAfter.java
│ │ │ ├── ArraySetAfterAny.java
│ │ │ ├── ArraySetBefore.java
│ │ │ ├── ArraySetBeforeAny.java
│ │ │ ├── Catch.java
│ │ │ ├── CheckcastAfter.java
│ │ │ ├── CheckcastBefore.java
│ │ │ ├── ConstructorArgs.java
│ │ │ ├── Error.java
│ │ │ ├── ErrorCaught.java
│ │ │ ├── ErrorDuration.java
│ │ │ ├── FieldGetAfter.java
│ │ │ ├── FieldGetAfterStatic.java
│ │ │ ├── FieldGetBefore.java
│ │ │ ├── FieldGetBeforeStatic.java
│ │ │ ├── FieldSetAfter.java
│ │ │ ├── FieldSetAfterStatic.java
│ │ │ ├── FieldSetBefore.java
│ │ │ ├── FieldSetBeforeStatic.java
│ │ │ ├── InstanceofAfter.java
│ │ │ ├── InstanceofBefore.java
│ │ │ ├── Line.java
│ │ │ ├── MatchDerived.java
│ │ │ ├── MethodCall.java
│ │ │ ├── MethodCallDuration.java
│ │ │ ├── MethodCallDuration2.java
│ │ │ ├── MethodCallDurationSampled.java
│ │ │ ├── MethodCallDurationSampledMulti.java
│ │ │ ├── MethodCallNoArgs.java
│ │ │ ├── MethodCallReturn.java
│ │ │ ├── MethodCallReturnAugmented.java
│ │ │ ├── MethodCallReturnAugmented1.java
│ │ │ ├── MethodCallSampled.java
│ │ │ ├── MethodCallSampledAdaptive.java
│ │ │ ├── MethodCallStatic.java
│ │ │ ├── NativeWithReturn.java
│ │ │ ├── NativeWithoutReturn.java
│ │ │ ├── NewAfter.java
│ │ │ ├── NewArrayIntAfter.java
│ │ │ ├── NewArrayIntBefore.java
│ │ │ ├── NewArrayStringAfter.java
│ │ │ ├── NewArrayStringBefore.java
│ │ │ ├── NewBefore.java
│ │ │ ├── NoArgs.java
│ │ │ ├── NoArgsEntryReturn.java
│ │ │ ├── StaticArgs.java
│ │ │ ├── StaticArgsReturn.java
│ │ │ ├── StaticArgsSelf.java
│ │ │ ├── StaticMethodCall.java
│ │ │ ├── StaticMethodCallStatic.java
│ │ │ ├── StaticNoArgs.java
│ │ │ ├── StaticNoArgsSelf.java
│ │ │ ├── SyncEntry.java
│ │ │ ├── SyncExit.java
│ │ │ ├── SyncMEntry.java
│ │ │ ├── SyncMExit.java
│ │ │ └── Throw.java
│ │ ├── org.openjdk.btrace.xml
│ │ └── verifier/
│ │ └── VerifierScript.java
│ ├── java/
│ │ ├── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ ├── ArgsMapTest.java
│ │ │ └── instr/
│ │ │ ├── BTraceProbeFactoryTest.java
│ │ │ ├── BTraceTransformerEarlyExitTest.java
│ │ │ ├── CallGraphTest.java
│ │ │ ├── ClassCacheTest.java
│ │ │ ├── ClassFilterSensitiveTest.java
│ │ │ ├── ClassInfoTest.java
│ │ │ ├── ExtensionBootstrapTest.java
│ │ │ ├── HandlerRepositoryImplTest.java
│ │ │ ├── InstrStackTest.java
│ │ │ ├── InstrumentUtilsTest.java
│ │ │ ├── InstrumentingMethodVisitorTest.java
│ │ │ ├── InstrumentorTestBase.java
│ │ │ ├── MethodCounterTest.java
│ │ │ ├── OnMethodInstrumenterTest.java
│ │ │ ├── OnMethodTest.java
│ │ │ ├── ProbeClassUnloadingTest.java
│ │ │ ├── ProbeLoaderNewTest.java
│ │ │ ├── ProbeLoaderOldTest.java
│ │ │ ├── ProbeLoaderUpgradeTest.java
│ │ │ ├── StackTrackingMethodVisitorTest.java
│ │ │ └── VariableMapperTest.java
│ │ └── resources/
│ │ ├── AbstractClass.java
│ │ ├── DerivedClass.java
│ │ ├── InterestingVarsClass.java
│ │ ├── Main.java
│ │ ├── OnMethodTest.java
│ │ ├── StackTrackerTest.java
│ │ ├── TestApp.java
│ │ ├── TestPrinter.java
│ │ └── issues/
│ │ ├── BTRACE106.java
│ │ ├── BTRACE22.java
│ │ ├── BTRACE256.java
│ │ ├── BTRACE28.java
│ │ └── BTRACE87.java
│ └── resources/
│ ├── instrumentorTestData/
│ │ └── dynamic/
│ │ ├── ExportTest
│ │ ├── OnProbeTest
│ │ ├── OnTimerTest
│ │ ├── ServicesTest
│ │ ├── TLSTest
│ │ ├── TraceAllTest
│ │ ├── issues/
│ │ │ ├── BTRACE106
│ │ │ ├── BTRACE189
│ │ │ ├── BTRACE22
│ │ │ ├── BTRACE256
│ │ │ ├── BTRACE28
│ │ │ ├── BTRACE53
│ │ │ ├── BTRACE69
│ │ │ ├── BTRACE87
│ │ │ ├── BTRACE_333
│ │ │ ├── InterestingVarsTest
│ │ │ └── TezSplitter
│ │ └── onmethod/
│ │ ├── AllLines
│ │ ├── AnytypeArgs
│ │ ├── AnytypeArgsNoSelf
│ │ ├── Args
│ │ ├── Args2Sampled
│ │ ├── ArgsDuration
│ │ ├── ArgsDuration2
│ │ ├── ArgsDuration2Err
│ │ ├── ArgsDuration2Sampled
│ │ ├── ArgsDurationBoxed
│ │ ├── ArgsDurationBoxedErr
│ │ ├── ArgsDurationConstructor
│ │ ├── ArgsDurationConstructorErr
│ │ ├── ArgsDurationErr
│ │ ├── ArgsDurationMultiReturn
│ │ ├── ArgsDurationSampled
│ │ ├── ArgsNoSelf
│ │ ├── ArgsReturn
│ │ ├── ArgsReturnAugmented
│ │ ├── ArgsReturnAugmented1
│ │ ├── ArgsReturnBoxed
│ │ ├── ArgsReturnSampled
│ │ ├── ArgsReturnTypeMatch
│ │ ├── ArgsReturnTypeNoMatch
│ │ ├── ArgsReturnVoid
│ │ ├── ArgsSampled
│ │ ├── ArgsSampledAdaptive
│ │ ├── ArgsSampledNoSampling
│ │ ├── ArgsShared
│ │ ├── ArgsSigMatch
│ │ ├── ArgsUnsafe
│ │ ├── ArrayGetAfter
│ │ ├── ArrayGetAfterAny
│ │ ├── ArrayGetBefore
│ │ ├── ArrayGetBeforeAny
│ │ ├── ArraySetAfter
│ │ ├── ArraySetAfterAny
│ │ ├── ArraySetBefore
│ │ ├── ArraySetBeforeAny
│ │ ├── Catch
│ │ ├── CheckcastAfter
│ │ ├── CheckcastBefore
│ │ ├── ConstructorArgs
│ │ ├── Error
│ │ ├── ErrorCaught
│ │ ├── ErrorDuration
│ │ ├── FieldGetAfter
│ │ ├── FieldGetAfterStatic
│ │ ├── FieldGetBefore
│ │ ├── FieldGetBeforeStatic
│ │ ├── FieldSetAfter
│ │ ├── FieldSetAfterStatic
│ │ ├── FieldSetBefore
│ │ ├── FieldSetBeforeStatic
│ │ ├── InstanceofAfter
│ │ ├── InstanceofBefore
│ │ ├── Line
│ │ ├── MatchAnnotated
│ │ ├── MatchAnnotatedRegex
│ │ ├── MatchDerived
│ │ ├── MethodCall
│ │ ├── MethodCallDuration
│ │ ├── MethodCallDuration2
│ │ ├── MethodCallDurationSampled
│ │ ├── MethodCallDurationSampledMulti
│ │ ├── MethodCallNoArgs
│ │ ├── MethodCallReturn
│ │ ├── MethodCallReturnAugmented
│ │ ├── MethodCallReturnAugmented1
│ │ ├── MethodCallSampled
│ │ ├── MethodCallSampledAdaptive
│ │ ├── MethodCallStatic
│ │ ├── NativeWithReturn
│ │ ├── NativeWithoutReturn
│ │ ├── NewAfter
│ │ ├── NewArrayIntAfter
│ │ ├── NewArrayIntBefore
│ │ ├── NewArrayStringAfter
│ │ ├── NewArrayStringBefore
│ │ ├── NewBefore
│ │ ├── NoArgs
│ │ ├── NoArgsEntryReturn
│ │ ├── NoArgsEntryReturnNoCapture
│ │ ├── StaticArgs
│ │ ├── StaticArgsReturn
│ │ ├── StaticArgsSelf
│ │ ├── StaticMethodCall
│ │ ├── StaticMethodCallStatic
│ │ ├── StaticNoArgs
│ │ ├── StaticNoArgsSelf
│ │ ├── SyncEntry
│ │ ├── SyncExit
│ │ ├── SyncMEntry
│ │ ├── SyncMExit
│ │ ├── Throw
│ │ └── leveled/
│ │ ├── AnytypeArgs
│ │ ├── AnytypeArgsNoSelf
│ │ ├── Args
│ │ ├── Args2Sampled
│ │ ├── ArgsDuration
│ │ ├── ArgsDuration2
│ │ ├── ArgsDuration2Err
│ │ ├── ArgsDuration2Sampled
│ │ ├── ArgsDurationBoxed
│ │ ├── ArgsDurationBoxedErr
│ │ ├── ArgsDurationConstructor
│ │ ├── ArgsDurationConstructorErr
│ │ ├── ArgsDurationErr
│ │ ├── ArgsDurationMultiReturn
│ │ ├── ArgsDurationSampled
│ │ ├── ArgsNoSelf
│ │ ├── ArgsReturn
│ │ ├── ArgsReturnAugmented
│ │ ├── ArgsReturnAugmented1
│ │ ├── ArgsReturnSampled
│ │ ├── ArgsSampled
│ │ ├── ArgsSampledAdaptive
│ │ ├── ArgsSampledNoSampling
│ │ ├── ArgsShared
│ │ ├── ArgsUnsafe
│ │ ├── ArrayGetAfter
│ │ ├── ArrayGetAfterAny
│ │ ├── ArrayGetBefore
│ │ ├── ArrayGetBeforeAny
│ │ ├── ArraySetAfter
│ │ ├── ArraySetAfterAny
│ │ ├── ArraySetBefore
│ │ ├── ArraySetBeforeAny
│ │ ├── Catch
│ │ ├── CheckcastAfter
│ │ ├── CheckcastBefore
│ │ ├── ConstructorArgs
│ │ ├── Error
│ │ ├── ErrorCaught
│ │ ├── ErrorDuration
│ │ ├── FieldGetAfter
│ │ ├── FieldGetAfterStatic
│ │ ├── FieldGetBefore
│ │ ├── FieldGetBeforeStatic
│ │ ├── FieldSetAfter
│ │ ├── FieldSetAfterStatic
│ │ ├── FieldSetBefore
│ │ ├── FieldSetBeforeStatic
│ │ ├── InstanceofAfter
│ │ ├── InstanceofBefore
│ │ ├── Line
│ │ ├── MatchDerived
│ │ ├── MethodCall
│ │ ├── MethodCallDuration
│ │ ├── MethodCallDuration2
│ │ ├── MethodCallDurationSampled
│ │ ├── MethodCallDurationSampledMulti
│ │ ├── MethodCallNoArgs
│ │ ├── MethodCallReturn
│ │ ├── MethodCallReturnAugmented
│ │ ├── MethodCallReturnAugmented1
│ │ ├── MethodCallSampled
│ │ ├── MethodCallSampledAdaptive
│ │ ├── MethodCallStatic
│ │ ├── NativeWithReturn
│ │ ├── NativeWithoutReturn
│ │ ├── NewAfter
│ │ ├── NewArrayIntAfter
│ │ ├── NewArrayIntBefore
│ │ ├── NewArrayStringAfter
│ │ ├── NewArrayStringBefore
│ │ ├── NewBefore
│ │ ├── NoArgs
│ │ ├── NoArgsEntryReturn
│ │ ├── StaticArgs
│ │ ├── StaticArgsReturn
│ │ ├── StaticArgsSelf
│ │ ├── StaticMethodCall
│ │ ├── StaticMethodCallStatic
│ │ ├── StaticNoArgs
│ │ ├── StaticNoArgsSelf
│ │ ├── SyncEntry
│ │ ├── SyncExit
│ │ ├── SyncMEntry
│ │ ├── SyncMExit
│ │ └── Throw
│ ├── packed/
│ │ └── test-pack.jar
│ ├── plain.txt
│ └── resources/
│ └── classdata/
│ ├── AllStuff.btrc
│ ├── BackpackExtensionTest.clazz
│ ├── OnMethodTest.btrc
│ ├── PackVersion1.btrc
│ ├── ProbeScript.btrc
│ ├── TezSplitter.clazz
│ └── TraceScript.clazz
├── btrace-runtime/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── runtime/
│ │ │ ├── BTraceMBean.java
│ │ │ ├── BTraceRuntimeAccessImpl.java
│ │ │ ├── BTraceRuntimeImplBase.java
│ │ │ ├── BTraceRuntimeImplFactory.java
│ │ │ ├── BTraceRuntimeImpl_8.java
│ │ │ ├── BTraceRuntimes.java
│ │ │ ├── CommandQueue.java
│ │ │ ├── DOTWriter.java
│ │ │ ├── DotWriterFormatter.java
│ │ │ ├── ExitException.java
│ │ │ ├── ExtensionContextImpl.java
│ │ │ ├── ExtensionIndy.java
│ │ │ ├── IndyDispatcher.java
│ │ │ ├── Interval.java
│ │ │ ├── JfrEventFactoryImpl.java
│ │ │ ├── JfrEventImpl.java
│ │ │ ├── NullPerfReaderImpl.java
│ │ │ ├── PerfReader.java
│ │ │ ├── ProbeAnchor.java
│ │ │ ├── XMLSerializer.java
│ │ │ ├── auxiliary/
│ │ │ │ └── Auxiliary.java
│ │ │ └── profiling/
│ │ │ ├── MethodInvocationProfiler.java
│ │ │ └── MethodInvocationRecorder.java
│ │ ├── java11/
│ │ │ └── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── runtime/
│ │ │ └── BTraceRuntimeImpl_11.java
│ │ └── java9/
│ │ └── org/
│ │ └── openjdk/
│ │ └── btrace/
│ │ └── runtime/
│ │ └── BTraceRuntimeImpl_9.java
│ └── test/
│ ├── java/
│ │ ├── org/
│ │ │ └── openjdk/
│ │ │ └── btrace/
│ │ │ └── runtime/
│ │ │ ├── ExtensionIndyShimIndexTest.java
│ │ │ └── HiddenClassDefineRegressionTest.java
│ │ └── test/
│ │ └── shim/
│ │ ├── ShimService.java
│ │ ├── ShimServiceNoop.java
│ │ └── ShimServiceThrow.java
│ └── resources/
│ └── META-INF/
│ └── btrace/
│ └── shims.index
├── btrace-ui/
│ └── build.gradle
├── build.gradle
├── buildSrc/
│ ├── build.gradle
│ └── shared.gradle
├── common.gradle
├── doc/
│ └── specs/
│ └── 2026-04-11-btraceiobtrace802-phase-3-invokedynamic-handler-isolation.md
├── docker/
│ ├── .dockerignore
│ ├── Dockerfile
│ ├── Dockerfile.alpine
│ ├── Dockerfile.distroless
│ ├── README.md
│ └── docker-entrypoint.sh
├── docs/
│ ├── BTraceExtensionDevelopmentGuide.md
│ ├── BTraceTutorial.md
│ ├── ExtensionInterfaceRules.md
│ ├── FAQ.md
│ ├── GettingStarted.md
│ ├── OnelinerGuide.md
│ ├── PermissionPolicy.md
│ ├── QuickReference.md
│ ├── README.md
│ ├── Troubleshooting.md
│ ├── architecture/
│ │ ├── BTraceInstrAnalysis.md
│ │ ├── ExtensionConfiguration.md
│ │ ├── ExtensionInvokeDynamicBridge.md
│ │ ├── ExtensionManifestFormat.md
│ │ ├── ExtensionStorageDesign.md
│ │ ├── MaskedJarArchitecture.md
│ │ └── Version2ProtocolArchitecture.md
│ ├── plans/
│ │ ├── 2026-04-20-NEXT-SESSION-PLAN.md
│ │ ├── 2026-04-20-probe-class-unloading-RESUME.md
│ │ ├── 2026-04-20-probe-class-unloading.md
│ │ ├── DistributionRestructuring.md
│ │ └── TestCoverageImprovementPlan.md
│ ├── releasing.md
│ └── samples/
│ └── permissions.properties
├── gradle/
│ └── spotless.gradle
├── gradlew
├── gradlew.bat
├── integration-tests/
│ ├── build.gradle
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── dummy/
│ │ ├── SimpleEvent.java
│ │ └── SimplePeriodicEvent.java
│ └── test/
│ ├── btrace/
│ │ ├── ExtensionLifecycleErrorTest.java
│ │ ├── ExtensionLifecycleFullTest.java
│ │ ├── ExtensionLifecycleMultipleTest.java
│ │ ├── ExtensionLifecycleTest.java
│ │ ├── JfrTest.java
│ │ ├── MetricsTest.java
│ │ ├── OSMBeanTest.java
│ │ ├── OnExitTest.java
│ │ ├── OnMethodLevelTest.java
│ │ ├── OnMethodReturnTest.java
│ │ ├── OnMethodSubclassTest.java
│ │ ├── OnMethodTest.java
│ │ ├── OnProbeTest.java
│ │ ├── OnTimerArgTest.java
│ │ ├── OnTimerTest.java
│ │ ├── PerfCounterTest.java
│ │ ├── ProbeArgsTest.java
│ │ ├── ThreadStart.java
│ │ ├── TraceAllTest.java
│ │ ├── issues/
│ │ │ └── BTRACE400.java
│ │ └── org.openjdk.btrace.xml
│ ├── java/
│ │ ├── resources/
│ │ │ ├── Main.java
│ │ │ ├── TestApp.java
│ │ │ ├── TestPrinter.java
│ │ │ └── ThreadSpawner.java
│ │ └── tests/
│ │ ├── BTraceFunctionalTests.java
│ │ ├── ExtensionLifecycleIntegrationTest.java
│ │ ├── JBangAttachDockerTest.java
│ │ └── RuntimeTest.java
│ └── resources/
│ └── META-INF/
│ └── btrace/
│ └── permissions.properties
├── renovate.json
├── run_tests.sh
├── scripts/
│ ├── release.sh
│ └── update-jdk-versions.sh
└── settings.gradle
================================================
FILE CONTENTS
================================================
================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: jbachorik
issuehunt: jbachorik
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
================================================
FILE: .github/copilot-instructions.md
================================================
# GitHub Copilot Instructions for BTrace
## About BTrace
BTrace is a safe, dynamic tracing tool for the Java platform. It dynamically instruments running Java applications to inject tracing code at runtime using bytecode instrumentation.
## Project Structure
- **Gradle multi-module project** with modules named `btrace-*`
- **Core modules**: `btrace-core`, `btrace-agent`, `btrace-runtime`, `btrace-client`, `btrace-instr`
- **Build artifacts**: `btrace-dist` for distributions
- **Tests**: `integration-tests/` for integration tests, `src/test/java` in modules for unit tests
- **Documentation**: `docs/` directory
## Architecture Overview
- **btrace-agent**: Attachable Java agent with class transformer, manages script lifecycle
- **btrace-compiler**: Verifies and compiles BTrace scripts to bytecode
- **btrace-instr**: ASM-based instrumentation and weaving utilities
- **btrace-runtime**: APIs for scripts (printing, timers, data collection)
- **btrace-client**: CLI/attach tooling for sending scripts to target JVM
- **services**: SPI for pluggable exporters (e.g., statsd)
## Development Guidelines
### Language & Versions
- **Language**: Java
- **Source/Target**: Java 8
- **Build toolchain**: JDK 11
- **Test framework**: JUnit Jupiter (JUnit 5)
### Code Style
- **Format**: Google Java Format enforced via Spotless
- **Packages**: All under `org.openjdk.btrace.*`
- **Naming**: Module names follow `btrace-<component>` pattern
- **Imports**: Order enforced; remove unused imports
- **Comments**: Only add if they match existing style or explain complex logic
### Building & Testing
```bash
# Full build with unit tests
./gradlew build
# Build distribution only
./gradlew :btrace-dist:build
# Run unit tests
./gradlew test
# Run integration tests (requires dist build first)
./gradlew -Pintegration test
# Format code
./gradlew spotlessApply
# Check formatting
./gradlew spotlessCheck
```
### Important Environment Variables
- `JAVA_HOME`: Required for builds
- `TEST_JAVA_HOME`: Required for integration tests (typically JDK 11)
- `BTRACE_TEST_DEBUG=true`: Enable verbose integration test output
- `BTRACE_HOME`: Optional, points to exploded dist
### Testing Best Practices
- Unit tests: `src/test/java` with `*Test` suffix
- Integration tests: `integration-tests/src/test/java`
- BTrace scripts: `integration-tests/src/test/btrace`
- Always run relevant tests after making changes
- Update golden files when changing instrumentor: `./gradlew test -PupdateTestData`
### Commit & PR Guidelines
- **Commit style**: Conventional Commits (e.g., `feat(core): add probe`, `fix(instr): handle null arg`)
- **Clear descriptions**: Link related issues
- **Tests required**: Update/add tests; ensure CI passes
- **Formatting**: Must pass `spotlessCheck`
- **No unrelated changes**: Keep changes focused and minimal
## Troubleshooting
### Build Issues
- **Attach disabled**: Remove `-XX:+DisableAttachMechanism` from target JVM
- **Permission errors**: Attach requires same OS user as target JVM
- **Toolchain issues**: Verify `JAVA_HOME` and `TEST_JAVA_HOME` point to valid JDKs
### Restricted Environments
```bash
# Use workspace-local Gradle cache
GRADLE_USER_HOME=$(pwd)/.gradle-user
# Force IPv4 to avoid network interface issues
JAVA_TOOL_OPTIONS="-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false"
```
## Code Generation Tips
- **Prefer simplicity**: Simple, performant solutions over complex designs
- **Use existing patterns**: Follow patterns from similar code in the repository
- **Minimal changes**: Make the smallest possible changes to achieve the goal
- **Reuse libraries**: Use ASM for bytecode, JCTools for concurrency, existing BTrace APIs
- **No temporary files in repo**: Use `/tmp` for scratch work
- **Security**: Never commit secrets; avoid introducing vulnerabilities
## Example BTrace Script Pattern
```java
package example;
import static org.openjdk.btrace.core.BTraceUtils.*;
import org.openjdk.btrace.core.annotations.*;
@BTrace
public class ExampleTrace {
@OnMethod(clazz="com.example.Target", method="methodName")
public static void onMethod(@ProbeMethodName String method) {
println("Called: " + method);
}
}
```
## Key Dependencies
- **ASM**: Bytecode manipulation
- **JCTools**: High-performance concurrent data structures
- **hppcrt**: Optimized collections
- **JUnit Jupiter**: Testing framework
## Additional Resources
- Full guidelines: See `AGENTS.md` in repository root
- Tutorial: `docs/BTraceTutorial.md`
- Binary releases: https://github.com/btraceio/btrace/releases
================================================
FILE: .github/workflows/README.md
================================================
# BTrace GitHub Actions Workflows
## Overview
This directory contains GitHub Actions workflows for continuous integration and testing of the BTrace project, with special focus on the new Binary Protocol v2 implementation.
## Workflows
### 1. `continuous.yml` - Main CI/CD Pipeline
**Purpose:** Main continuous integration pipeline for all BTrace components.
**Triggers:**
- Push to `develop` branch
- Pull requests to `develop`
- Manual workflow dispatch
**Jobs:**
- **build:** Compiles the project and runs all tests
- Java 11 with Temurin distribution
- Parallel build with caching
- **V2 Protocol Tests:** Runs dedicated v2 protocol test suite
- Uploads dist build artifacts
- **test:** Runs integration tests on multiple Java versions
- Matrix: Java 8, 11, 17, 21, 25 (EA)
- Uses SDKMAN for multiple JDK management
- Downloads build artifacts from previous job
- Runs integration tests with `-Pintegration` flag
- **publish:** Publishes artifacts to Maven Central
- Only on `develop` branch
- Requires GPG signing credentials
- **cleanup:** Removes temporary artifacts
**Enhancements for V2 Protocol:**
- Added explicit V2 protocol test execution in build job
- Tests all v2 packages: `v2.*`, `Protocol*`, `WireProtocol*`
### 2. `v2-protocol-tests.yml` - V2 Protocol Test Suite
**Purpose:** Comprehensive testing suite specifically for Binary Protocol v2.
**Triggers:**
- Push to `develop`, `master`, or `jb/comm_v2` branches
- Pull requests to `develop`
- Changes to protocol-related files
- Manual workflow dispatch
- Commit messages containing `[benchmark]`
**Jobs:**
#### **unit-tests**
- Runs all v2 protocol unit tests on Java 11, 17, 21
- Tests binary serialization/deserialization
- Validates all 17 command types
- Upload test reports as artifacts
#### **protocol-negotiation-tests**
- Tests protocol version detection
- Validates V1/V2 negotiation
- Tests configuration management
- Verifies magic byte detection
#### **edge-case-tests**
- Runs 35 edge case scenarios
- Tests boundary conditions
- Validates large message handling
- Tests compression functionality
- Unicode and special character handling
#### **jmh-benchmarks** (Manual/Opt-in)
- Runs JMH performance benchmarks
- Triggered by workflow dispatch or `[benchmark]` in commit message
- Quick benchmarks: warmup=1, iterations=2, fork=1
- Focuses on serialization performance
- Uploads JMH results for 30 days
#### **protocol-compatibility**
- Tests all 4 compatibility scenarios:
- V2 client ↔ V2 agent (optimal)
- V1 client ↔ V1 agent (legacy)
- V2 client ↔ V1 agent (fallback)
- V1 client ↔ V2 agent (detection)
- Matrix strategy for comprehensive coverage
- Validates backward compatibility
#### **test-summary**
- Aggregates test results from all jobs
- Generates GitHub Step Summary
- Reports total/passed/failed counts
- Fails if any tests failed
#### **code-coverage**
- Generates JaCoCo coverage reports
- Focuses on `org.openjdk.btrace.core.comm` package
- Uploads coverage artifacts for 30 days
- Creates coverage summary in step output
### 3. `codeql-analysis.yml` - Security Analysis
**Purpose:** CodeQL security scanning for vulnerability detection.
**Triggers:** Push/PR to default branch
### 4. `stale.yml` - Issue Management
**Purpose:** Automatically marks stale issues and PRs.
**Schedule:** Daily at midnight
### 5. `release.yml` - Release Management
**Purpose:** Handles the complete release process with a manual checkpoint for Maven Central.
**Trigger:** Manual via `scripts/release.sh` or workflow_dispatch
**Key Features:**
- Stages artifacts to Maven Central (does NOT auto-release)
- Waits up to 30 minutes for manual release via Central Portal
- Creates GitHub release only after Maven artifacts are available
- Updates SDKMan and manages milestones
**Manual Checkpoint:** After staging, you must release via [Central Portal](https://central.sonatype.com/publishing/deployments). This allows reviewing artifacts before they become permanent.
## V2 Protocol Test Coverage
The workflows ensure comprehensive testing of the v2 protocol implementation:
### Unit Tests (113 total)
- ✅ Binary protocol serialization (26 tests)
- ✅ Edge cases and boundaries (35 tests)
- ✅ Performance comparison (2 tests)
- ✅ Protocol negotiation (16 tests)
- ✅ Configuration management (18 tests)
- ✅ WireProtocol abstraction (16 tests)
### Test Categories
1. **Command Serialization**
- All 17 BTrace command types
- Round-trip serialization/deserialization
- Compression testing
2. **Protocol Negotiation**
- V1/V2 auto-detection
- Magic byte validation
- Configuration-based selection
- Stream handling (pushback & mark/reset)
3. **Edge Cases**
- Null/empty values
- Large messages (10MB)
- Unicode and emojis
- Malformed data
- Numeric boundaries
4. **Performance**
- JMH benchmarks (180 configurations)
- V1 vs V2 comparison
- Compression effectiveness
5. **Compatibility**
- V1 ↔ V1 (legacy)
- V2 ↔ V2 (optimal)
- V1 ↔ V2 (cross-version)
- V2 ↔ V1 (fallback)
## Artifacts
### Retained Artifacts (7 days)
- Test reports (per Java version)
- Negotiation test results
- Edge case test results
- Compatibility test matrices
### Long-term Artifacts (30 days)
- JMH benchmark results
- Code coverage reports
### Build Artifacts (1 day)
- Distribution builds
- Test trace data
## Configuration
### Environment Variables
**Build Job:**
- Standard Gradle environment
- Parallel execution enabled
- Build cache enabled
**Test Job:**
- `TEST_JAVA_HOME`: Set per matrix Java version
- SDKMAN for multiple JDK management
**Publish Job:**
- `GPG_SIGNING_KEY`: GPG key for artifact signing
- `GPG_SIGNING_PWD`: GPG key password
- `BTRACE_SONATYPE_USER`: Sonatype credentials
- `BTRACE_SONATYPE_PWD`: Sonatype credentials
### Gradle Properties for V2 Testing
```bash
# Run only v2 tests
./gradlew :btrace-core:test --tests "org.openjdk.btrace.core.comm.v2.*"
# Run protocol negotiation tests
./gradlew :btrace-core:test --tests "*Protocol*"
# Run specific JMH benchmarks
./gradlew :btrace-core:jmh -PjmhInclude=".*MessageCommand.*"
# Generate coverage report
./gradlew :btrace-core:test jacocoTestReport
```
## JMH Benchmark Workflow
### Trigger Benchmark Run
**Option 1: Workflow Dispatch**
```bash
# Via GitHub UI: Actions → V2 Protocol Tests → Run workflow
```
**Option 2: Commit Message**
```bash
git commit -m "Optimize binary protocol [benchmark]"
```
### Benchmark Configuration
**Quick Benchmarks (CI):**
- Warmup: 1 iteration
- Measurement: 2 iterations
- Forks: 1
- Focus: Serialization methods only
**Full Benchmarks (Local):**
- Warmup: 3 iterations
- Measurement: 5 iterations
- Forks: 2
- Coverage: All 180 configurations
## Test Failure Handling
### Automatic Retry
- Tests use `--rerun-tasks` to ensure fresh execution
- No test result caching to catch flaky tests
### Artifact Upload
- All test reports uploaded on failure (`if: always()`)
- Artifacts retained for 7 days for analysis
### Summary Generation
- Test summary job aggregates all results
- Reports failures clearly in GitHub UI
- Step summary provides quick overview
## Code Coverage
### JaCoCo Configuration
**Focus Area:**
- Package: `org.openjdk.btrace.core.comm.**`
- Includes v2 protocol, negotiation, and abstraction
**Reports Generated:**
- XML (for CI tools)
- HTML (for human review)
- Available in artifacts for 30 days
**Coverage Goals:**
- Unit test coverage: >90%
- Edge case coverage: >80%
- Integration coverage: >70%
## Performance Monitoring
### JMH Results
- Benchmark results uploaded as artifacts
- Compare across runs to detect regressions
- Focus on serialization/deserialization speed
- Monitor wire size changes
### Expected Metrics
- Serialization: 3-6x faster than V1
- Wire size: 2-5x smaller than V1
- Compression: 10-100x size reduction (large messages)
## Maintenance
### Cache Management
- Gradle cache keyed by build files hash
- Automatic cache eviction after 7 days
- Cache size monitored in test job
### Artifact Cleanup
- Temporary artifacts cleaned after publish
- Test reports retained for 7 days
- Performance results retained for 30 days
## Future Enhancements
### Planned Additions
1. **Integration Tests:**
- Full client-agent communication tests
- Mixed protocol version scenarios
- Reconnection testing
2. **Stress Tests:**
- High concurrency scenarios
- Large message throughput
- Memory leak detection
3. **Performance Regression Detection:**
- Automated benchmark comparison
- Alert on >10% performance degradation
- Historical trend analysis
4. **Security Scanning:**
- Dependency vulnerability checks
- OWASP security analysis
- Protocol fuzzing tests
## References
- [BTrace v2 Protocol Architecture](../../docs/architecture/Version2ProtocolArchitecture.md)
- [Phase 3 Integration Guide](../../docs/architecture/phase3-integration-guide.md)
- [V2 Implementation Summary](../../docs/architecture/v2-implementation-summary.md)
- [JMH Benchmarks Guide](../../btrace-core/JMH_BENCHMARKS.md)
## Support
For workflow issues or questions:
1. Check GitHub Actions logs
2. Review artifact contents
3. Check Gradle build logs
4. Open issue with workflow run link
================================================
FILE: .github/workflows/codeql-analysis.yml
================================================
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ develop, master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ develop ]
schedule:
- cron: '23 5 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'java' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- name: Checkout repository
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Build BTrace
run: |
./gradlew -x test build
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
================================================
FILE: .github/workflows/continuous.yml
================================================
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: BTrace CI/CD
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up Java
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Checkout
uses: actions/checkout@v6
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Generate cache key
id: cache-key
run: |
key="${{ runner.os }}-gradle-1-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}"
echo "key=${key}" >> $GITHUB_ENV
echo "cache-key=${key}" >> $GITHUB_OUTPUT
- name: Cache Gradle
uses: actions/cache@v5
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: ${{ env.key }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew --no-daemon --parallel --build-cache build
- name: Run V2 Protocol Tests
run: |
./gradlew :btrace-core:test --tests "org.openjdk.btrace.core.comm.v2.*" \
--tests "org.openjdk.btrace.core.comm.Protocol*" \
--tests "org.openjdk.btrace.core.comm.WireProtocol*"
- name: Upload dist build data
if: always()
uses: actions/upload-artifact@v7
with:
name: dist-build
retention-days: 1
path: |
btrace-dist/build
btrace-instr/build/classes/traces
- name: Upload test trace data
if: always()
uses: actions/upload-artifact@v7
with:
name: test-trace
retention-days: 1
path: |
btrace-instr/build/classes/traces
- name: Archive test reports
if: always()
uses: actions/upload-artifact@v7
with:
name: test-reports
path: |
**/reports/**/*
outputs:
cache-key: ${{ steps.cache-key.outputs.cache-key }}
test:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
java: [ 8.0.482-tem, 11.0.30-tem, 17.0.18-tem, 21.0.10-tem, 25.0.2-tem, 26.ea.35-open ]
env:
TEST_JAVA_HOME: "/home/runner/.sdkman/candidates/java/${{ matrix.java }}"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Prepare OS
run: |
sudo apt-get update
sudo apt-get install -y curl zip unzip
- name: Prepare JDK ${{ matrix.java_version }}
run: |
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
echo 'n' | sdk install java ${{ matrix.java }}
which java
echo 'y' | sdk install java 11.0.30-tem
- name: Cache Gradle
uses: actions/cache@v5
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: ${{ needs.build.outputs.cache-key }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Download build data
uses: actions/download-artifact@v8
with:
name: dist-build
path: btrace-dist/build
- name: Download test trace data
uses: actions/download-artifact@v8
with:
name: test-trace
path: btrace-instr/build/classes/traces
- name: Build btrace-instr jar
run: |
./gradlew --no-daemon --parallel --build-cache :btrace-instr:jar
- name: Run tests
run: |
set +x
./gradlew --no-daemon --parallel --build-cache -Pintegration -PCI :integration-tests:test
- name: Check Gradle cache size
run: du -sh ~/.gradle/caches
- name: Integration test reports
if: always()
uses: actions/upload-artifact@v7
with:
name: integration-test-reports-${{ matrix.java }}
path: |
integration-tests/build/reports/**/*
- name: Archive binary artifacts
if: success() && matrix.java == '11'
uses: actions/upload-artifact@v7
with:
name: btrace-dist
path: |
btrace-dist/build/distributions/**/btrace-*-bin*.tar.gz
publish:
if: github.ref == 'refs/heads/develop'
needs:
- test
- build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up Java
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Cache Gradle
uses: actions/cache@v5
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: ${{ needs.build.outputs.cache-key }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Download build data
uses: actions/download-artifact@v8
with:
name: dist-build
- name: Deploy Maven
run: ./gradlew -x test :btrace-dist:publish
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_PWD: ${{ secrets.GPG_SIGNING_PWD }}
SONATYPE_USER: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
cleanup:
runs-on: ubuntu-latest
needs: publish
steps:
- name: Cleanup temporary artifacts
uses: geekyeggo/delete-artifact@v6
with:
name: dist-build
================================================
FILE: .github/workflows/release.yml
================================================
# BTrace Release Workflow
#
# This workflow handles the complete release process:
# 1. Validates inputs and prerequisites
# 2. Runs full test suite (unit + integration tests)
# 3. Creates release branch and tag
# 4. Stages artifacts to Maven Central (requires manual release)
# 5. Waits for Maven Central availability (up to 30 minutes)
# 6. Creates GitHub release with artifacts
# 7. Updates SDKMan
# 8. Updates version numbers for next development cycle
# 9. Manages milestones
#
# IMPORTANT: Maven artifacts are STAGED, not released automatically.
# After staging, go to https://central.sonatype.com/publishing/deployments
# to review and release. The workflow will wait up to 30 minutes.
#
# Triggered by scripts/release.sh or manually via workflow_dispatch
name: Release
on:
workflow_dispatch:
inputs:
release_type:
description: 'Release type'
required: true
type: choice
options:
- major
- minor
- patch
release_version:
description: 'Release version (e.g., 2.3.0)'
required: true
type: string
commit_sha:
description: 'Source commit SHA'
required: true
type: string
release_branch:
description: 'Release branch (e.g., release/2.3._)'
required: true
type: string
next_snapshot:
description: 'Next snapshot version (e.g., 2.4.0-SNAPSHOT)'
required: true
type: string
dry_run:
description: 'Dry run (skip publishing and tagging)'
required: false
type: boolean
default: false
defaults:
run:
shell: bash
env:
RELEASE_VERSION: ${{ inputs.release_version }}
RELEASE_TAG: v${{ inputs.release_version }}
RC_TAG: v${{ inputs.release_version }}_RC
jobs:
# ============================================================
# Job 1: Validate inputs and prerequisites
# ============================================================
validate:
name: Validate Release
runs-on: ubuntu-latest
outputs:
branch_exists: ${{ steps.check-branch.outputs.exists }}
create_branch: ${{ steps.check-branch.outputs.create }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ inputs.commit_sha }}
fetch-depth: 0
- name: Validate inputs
run: |
echo "Validating release inputs..."
echo " Release Type: ${{ inputs.release_type }}"
echo " Release Version: ${{ inputs.release_version }}"
echo " Commit SHA: ${{ inputs.commit_sha }}"
echo " Release Branch: ${{ inputs.release_branch }}"
echo " Next Snapshot: ${{ inputs.next_snapshot }}"
echo " Dry Run: ${{ inputs.dry_run }}"
# Validate version format (X.Y.Z)
if [[ ! "${{ inputs.release_version }}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "::error::Invalid version format. Expected X.Y.Z"
exit 1
fi
# Validate release type
if [[ ! "${{ inputs.release_type }}" =~ ^(major|minor|patch)$ ]]; then
echo "::error::Invalid release type. Expected major, minor, or patch"
exit 1
fi
# Validate commit exists
if ! git cat-file -e "${{ inputs.commit_sha }}^{commit}" 2>/dev/null; then
echo "::error::Commit ${{ inputs.commit_sha }} does not exist"
exit 1
fi
echo "All inputs validated successfully"
- name: Check if tag exists
run: |
if git rev-parse "v${{ inputs.release_version }}" >/dev/null 2>&1; then
echo "::error::Tag v${{ inputs.release_version }} already exists"
exit 1
fi
if git ls-remote --tags origin "refs/tags/v${{ inputs.release_version }}" | grep -q .; then
echo "::error::Tag v${{ inputs.release_version }} already exists on remote"
exit 1
fi
# Check for leftover RC tag
if git rev-parse "${RC_TAG}" >/dev/null 2>&1; then
echo "::error::RC tag ${RC_TAG} already exists locally. Clean up with: git tag -d ${RC_TAG}"
exit 1
fi
if git ls-remote --tags origin "refs/tags/${RC_TAG}" | grep -q .; then
echo "::error::RC tag ${RC_TAG} already exists on remote. Clean up with: git push origin :refs/tags/${RC_TAG}"
exit 1
fi
echo "Tag does not exist - OK"
- name: Check if release branch exists
id: check-branch
run: |
BRANCH="${{ inputs.release_branch }}"
if git show-ref --verify --quiet "refs/remotes/origin/${BRANCH}"; then
echo "Release branch ${BRANCH} already exists"
echo "exists=true" >> $GITHUB_OUTPUT
echo "create=false" >> $GITHUB_OUTPUT
else
echo "Release branch ${BRANCH} will be created"
echo "exists=false" >> $GITHUB_OUTPUT
echo "create=true" >> $GITHUB_OUTPUT
fi
# ============================================================
# Job 2: Build and run unit tests
# ============================================================
build-and-test:
name: Build and Test
needs: validate
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-key.outputs.key }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ inputs.commit_sha }}
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up Java
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Generate cache key
id: cache-key
run: |
key="${{ runner.os }}-gradle-release-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}"
echo "key=${key}" >> $GITHUB_OUTPUT
- name: Cache Gradle
uses: actions/cache@v5
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: ${{ steps.cache-key.outputs.key }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew --no-daemon --parallel --build-cache build
- name: Upload dist build data
uses: actions/upload-artifact@v7
with:
name: dist-build
retention-days: 1
path: |
btrace-dist/build
btrace-instr/build/classes/traces
- name: Upload test trace data
uses: actions/upload-artifact@v7
with:
name: test-trace
retention-days: 1
path: |
btrace-instr/build/classes/traces
- name: Archive test reports
if: always()
uses: actions/upload-artifact@v7
with:
name: unit-test-reports
path: |
**/reports/**/*
# ============================================================
# Job 3: Integration tests on multiple JDK versions
# ============================================================
integration-tests:
name: Integration Tests (JDK ${{ matrix.java }})
needs: build-and-test
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
java: [8.0.482-tem, 11.0.30-tem, 17.0.18-tem, 21.0.10-tem]
env:
TEST_JAVA_HOME: "/home/runner/.sdkman/candidates/java/${{ matrix.java }}"
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ inputs.commit_sha }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Prepare OS
run: |
sudo apt-get update
sudo apt-get install -y curl zip unzip
- name: Prepare JDK ${{ matrix.java }}
run: |
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
echo 'n' | sdk install java ${{ matrix.java }}
which java
echo 'y' | sdk install java 11.0.30-tem
- name: Cache Gradle
uses: actions/cache@v5
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: ${{ needs.build-and-test.outputs.cache-key }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Download build data
uses: actions/download-artifact@v8
with:
name: dist-build
path: btrace-dist/build
- name: Download test trace data
uses: actions/download-artifact@v8
with:
name: test-trace
path: btrace-instr/build/classes/traces
- name: Build btrace-instr jar
run: |
./gradlew --no-daemon --parallel --build-cache :btrace-instr:jar
- name: Run integration tests
run: |
./gradlew --no-daemon --parallel --build-cache -Pintegration :integration-tests:test
- name: Integration test reports
if: always()
uses: actions/upload-artifact@v7
with:
name: integration-test-reports-${{ matrix.java }}
path: |
integration-tests/build/reports/**/*
# ============================================================
# Job 4: Prepare release (create branch, update version, tag)
# ============================================================
prepare-release:
name: Prepare Release
needs: [validate, integration-tests]
runs-on: ubuntu-latest
outputs:
release_sha: ${{ steps.commit.outputs.sha }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ inputs.commit_sha }}
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Create or checkout release branch
run: |
BRANCH="${{ inputs.release_branch }}"
if git show-ref --verify --quiet "refs/remotes/origin/${BRANCH}"; then
echo "Checking out existing branch ${BRANCH}"
git checkout -b "${BRANCH}" "origin/${BRANCH}"
else
echo "Creating new branch ${BRANCH}"
git checkout -b "${BRANCH}"
fi
- name: Update version in build.gradle
run: |
VERSION="${{ inputs.release_version }}"
sed -i "s/version = '.*'/version = '${VERSION}'/" build.gradle
echo "Updated version to ${VERSION}"
grep "version = " build.gradle
- name: Commit version change
id: commit
run: |
git add build.gradle
git commit -m "Release ${RELEASE_TAG}"
SHA=$(git rev-parse HEAD)
echo "sha=${SHA}" >> $GITHUB_OUTPUT
echo "Release commit: ${SHA}"
- name: Create RC tag
if: ${{ inputs.dry_run != true }}
run: |
git tag -a "${RC_TAG}" -m "Release candidate ${RELEASE_TAG}"
echo "Created RC tag ${RC_TAG}"
- name: Push branch and RC tag
if: ${{ inputs.dry_run != true }}
run: |
git push origin "${{ inputs.release_branch }}"
git push origin "${RC_TAG}"
echo "Pushed branch and RC tag"
- name: Dry run summary
if: ${{ inputs.dry_run == true }}
run: |
echo "::warning::DRY RUN - Branch and tag NOT pushed"
echo "Would have pushed:"
echo " - Branch: ${{ inputs.release_branch }}"
echo " - RC Tag: ${RC_TAG}"
# ============================================================
# Job 5: Stage to Maven Central (does NOT release)
# ============================================================
stage-maven:
name: Stage to Maven Central
needs: [prepare-release, build-and-test]
runs-on: ubuntu-latest
if: ${{ inputs.dry_run != true }}
steps:
- name: Checkout RC tag
uses: actions/checkout@v6
with:
ref: ${{ env.RC_TAG }}
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up Java
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Cache Gradle
uses: actions/cache@v5
with:
path: |
~/.gradle/caches/modules-2
~/.gradle/wrapper
key: ${{ needs.build-and-test.outputs.cache-key }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Stage to Maven Central
env:
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
GPG_SIGNING_PWD: ${{ secrets.GPG_SIGNING_PWD }}
SONATYPE_USER: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: |
echo "Staging artifacts to Central Portal..."
echo "After this job completes, go to https://central.sonatype.com/publishing/deployments"
echo "to review and release the staged artifacts."
./gradlew :btrace-dist:publishAllPublicationsToSonatypeRepository --no-daemon
- name: Staging complete
run: |
echo "=============================================="
echo "ARTIFACTS STAGED - MANUAL RELEASE REQUIRED"
echo "=============================================="
echo ""
echo "Staged artifacts:"
echo " - io.btrace:btrace-agent:${{ inputs.release_version }}"
echo " - io.btrace:btrace-client:${{ inputs.release_version }}"
echo " - io.btrace:btrace-boot:${{ inputs.release_version }}"
echo ""
echo "Next steps:"
echo " 1. Go to https://central.sonatype.com/publishing/deployments"
echo " 2. Review the staged repository"
echo " 3. Click 'Publish' to release to Maven Central"
echo ""
echo "The workflow will wait up to 30 minutes for artifacts to appear."
echo "If you don't want to proceed, let the workflow timeout or cancel it."
# ============================================================
# Job 5b: Wait for Maven Central availability
# ============================================================
wait-for-maven:
name: Wait for Maven Central
needs: stage-maven
runs-on: ubuntu-latest
timeout-minutes: 35
steps:
- name: Wait for artifacts on Maven Central
run: |
VERSION="${{ inputs.release_version }}"
ARTIFACT_URL="https://repo1.maven.org/maven2/io/btrace/btrace-client/${VERSION}/btrace-client-${VERSION}.pom"
echo "Waiting for Maven Central to have: ${ARTIFACT_URL}"
echo "This requires manual release from Central Portal."
echo ""
echo "Go to: https://central.sonatype.com/publishing/deployments"
echo ""
MAX_ATTEMPTS=60 # 30 minutes with 30s intervals
ATTEMPT=0
while [ $ATTEMPT -lt $MAX_ATTEMPTS ]; do
ATTEMPT=$((ATTEMPT + 1))
echo "Attempt ${ATTEMPT}/${MAX_ATTEMPTS}: Checking Maven Central..."
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" "${ARTIFACT_URL}")
if [ "$HTTP_STATUS" = "200" ]; then
echo ""
echo "SUCCESS: Artifacts are available on Maven Central!"
echo "Proceeding with GitHub release and SDKMan announcement..."
exit 0
fi
echo " Status: ${HTTP_STATUS} - Not available yet. Waiting 30s..."
sleep 30
done
echo ""
echo "TIMEOUT: Artifacts did not appear on Maven Central within 30 minutes."
echo "The release was NOT finalized."
echo ""
echo "To complete the release manually:"
echo " 1. Release artifacts via Central Portal"
echo " 2. Create GitHub release manually"
echo " 3. Run: ./gradlew :btrace-dist:sdkMinorRelease"
exit 1
# ============================================================
# Job 5c: Update JBang catalog
# ============================================================
update-jbang-catalog:
name: Update JBang Catalog
needs: [prepare-release, wait-for-maven]
runs-on: ubuntu-latest
if: ${{ inputs.dry_run != true }}
steps:
- name: Checkout jbang-catalog
continue-on-error: true
uses: actions/checkout@v6
with:
repository: btraceio/jbang-catalog
token: ${{ secrets.JBANG_CATALOG_PAT || secrets.GITHUB_TOKEN }}
path: catalog
- name: Update catalog files
continue-on-error: true
run: |
VERSION="${{ inputs.release_version }}"
if [ ! -d catalog ]; then
echo "⚠️ Catalog checkout failed - skipping update"
echo "Add JBANG_CATALOG_PAT secret to enable automatic catalog updates"
exit 0
fi
cd catalog
# Update btrace.java dependency
sed -i.bak "s|//DEPS io.btrace:btrace-client:.*|//DEPS io.btrace:btrace-client:${VERSION}|g" btrace.java
# Update btrace-latest.java dependency
sed -i.bak "s|//DEPS io.btrace:btrace-client:.*|//DEPS io.btrace:btrace-client:${VERSION}|g" btrace-latest.java
# Clean up backup files
rm -f *.bak
# Show changes
git diff
- name: Commit and push catalog updates
continue-on-error: true
run: |
VERSION="${{ inputs.release_version }}"
if [ ! -d catalog ]; then
echo "⚠️ Catalog checkout failed - skipping update"
echo "Add JBANG_CATALOG_PAT secret to enable automatic catalog updates"
exit 0
fi
cd catalog
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add btrace.java btrace-latest.java
if git commit -m "Update btrace to version ${VERSION}"; then
git push || echo "⚠️ Push failed - update catalog manually at https://github.com/btraceio/jbang-catalog"
fi
# ============================================================
# Job 5d: Finalize release tag (RC -> final)
# ============================================================
finalize-tag:
name: Finalize Release Tag
needs: [prepare-release, wait-for-maven]
runs-on: ubuntu-latest
if: ${{ inputs.dry_run != true }}
steps:
- name: Checkout at release SHA
uses: actions/checkout@v6
with:
ref: ${{ needs.prepare-release.outputs.release_sha }}
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch tags
run: git fetch origin --tags
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Create final tag
run: |
git tag -a "${RELEASE_TAG}" -m "Release ${RELEASE_TAG}"
echo "Created final tag ${RELEASE_TAG}"
- name: Push final tag
run: |
git push origin "${RELEASE_TAG}"
echo "Pushed final tag ${RELEASE_TAG}"
- name: Delete RC tag
run: |
git tag -d "${RC_TAG}" || true
git push origin ":refs/tags/${RC_TAG}" || true
echo "Deleted RC tag ${RC_TAG}"
# ============================================================
# Job 6: Build distribution packages
# ============================================================
build-distributions:
name: Build Distributions
needs: prepare-release
runs-on: ubuntu-latest
steps:
- name: Checkout release commit
uses: actions/checkout@v6
with:
ref: ${{ inputs.dry_run == true && inputs.commit_sha || env.RC_TAG }}
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up Java
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Update version for dry run
if: ${{ inputs.dry_run == true }}
run: |
VERSION="${{ inputs.release_version }}"
sed -i "s/project.version = '.*'/project.version = '${VERSION}'/" common.gradle
- name: Build distribution packages
run: |
./gradlew :btrace-dist:build --no-daemon
- name: List artifacts
run: |
echo "Distribution artifacts:"
ls -la btrace-dist/build/distributions/
- name: Upload distribution artifacts
uses: actions/upload-artifact@v7
with:
name: release-distributions
retention-days: 7
path: |
btrace-dist/build/distributions/btrace-v${{ inputs.release_version }}-bin.tar.gz
btrace-dist/build/distributions/btrace-v${{ inputs.release_version }}-bin.zip
btrace-dist/build/distributions/btrace-v${{ inputs.release_version }}-sdkman-bin.zip
btrace-dist/build/distributions/*.deb
btrace-dist/build/distributions/*.rpm
# ============================================================
# Job 7: Create GitHub Release
# ============================================================
create-github-release:
name: Create GitHub Release
needs: [build-distributions, finalize-tag]
runs-on: ubuntu-latest
if: ${{ inputs.dry_run != true }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ env.RELEASE_TAG }}
fetch-depth: 0
- name: Download distribution artifacts
uses: actions/download-artifact@v8
with:
name: release-distributions
path: distributions
- name: Download Maven artifact
continue-on-error: true
run: |
VERSION="${{ inputs.release_version }}"
BASE_URL="https://repo1.maven.org/maven2/io/btrace/btrace/${VERSION}"
mkdir -p maven-artifacts
MAX_ATTEMPTS=40
for i in $(seq 1 $MAX_ATTEMPTS); do
if curl -fSL "${BASE_URL}/btrace-${VERSION}.jar" \
-o maven-artifacts/btrace-${VERSION}.jar; then
echo "Downloaded btrace-${VERSION}.jar"
ls -la maven-artifacts/
exit 0
fi
echo "Attempt ${i}/${MAX_ATTEMPTS} failed, retrying in 30s..."
sleep 30
done
echo "::warning::Failed to download Maven JAR after ${MAX_ATTEMPTS} attempts (~20 minutes). GitHub release will proceed without it."
- name: Check for no-release-notes label
id: check-label
run: |
# Check if this release should skip auto-generated notes
SKIP_NOTES="false"
# This would check PRs merged since last release for the label
# For now, always generate release notes
echo "skip_notes=${SKIP_NOTES}" >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
name: BTrace ${{ inputs.release_version }}
draft: false
prerelease: false
generate_release_notes: true
files: |
distributions/btrace-v${{ inputs.release_version }}-bin.tar.gz
distributions/btrace-v${{ inputs.release_version }}-bin.zip
distributions/btrace-v${{ inputs.release_version }}-sdkman-bin.zip
distributions/*.deb
distributions/*.rpm
maven-artifacts/*
# ============================================================
# Job 8: Update SDKMan
# ============================================================
update-sdkman:
name: Update SDKMan
needs: create-github-release
runs-on: ubuntu-latest
if: ${{ inputs.dry_run != true }}
steps:
- name: Checkout release tag
uses: actions/checkout@v6
with:
ref: ${{ env.RELEASE_TAG }}
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up Java
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Announce to SDKMan
env:
SDKMAN_API_KEY: ${{ secrets.SDKMAN_KEY }}
SDKMAN_API_TOKEN: ${{ secrets.SDKMAN_TOKEN }}
run: |
# Use sdkMajorRelease for major releases, sdkMinorRelease otherwise
if [[ "${{ inputs.release_type }}" == "major" ]]; then
./gradlew :btrace-dist:sdkMajorRelease --no-daemon
else
./gradlew :btrace-dist:sdkMinorRelease --no-daemon
fi
# ============================================================
# Job 9: Update develop branch (major/minor only)
# ============================================================
update-develop:
name: Update Develop Branch
needs: prepare-release
runs-on: ubuntu-latest
if: ${{ inputs.release_type != 'patch' && inputs.dry_run != true }}
steps:
- name: Checkout develop
uses: actions/checkout@v6
with:
ref: develop
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Update version in develop
run: |
NEXT_VERSION="${{ inputs.next_snapshot }}"
sed -i "s/project.version = '.*'/project.version = '${NEXT_VERSION}'/" common.gradle
echo "Updated develop to ${NEXT_VERSION}"
grep "project.version" common.gradle
- name: Commit and push
run: |
git add common.gradle
git commit -m "Bump version to ${{ inputs.next_snapshot }} after ${RELEASE_TAG} release"
git push origin develop
# ============================================================
# Job 10: Update release branch to next patch snapshot
# ============================================================
update-release-branch:
name: Update Release Branch
needs: [prepare-release, create-github-release]
runs-on: ubuntu-latest
if: ${{ inputs.dry_run != true }}
steps:
- name: Checkout release branch
uses: actions/checkout@v6
with:
ref: ${{ inputs.release_branch }}
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Configure Git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Calculate next patch snapshot
id: next-version
run: |
CURRENT="${{ inputs.release_version }}"
MAJOR=$(echo $CURRENT | cut -d. -f1)
MINOR=$(echo $CURRENT | cut -d. -f2)
PATCH=$(echo $CURRENT | cut -d. -f3)
NEXT_PATCH=$((PATCH + 1))
NEXT_VERSION="${MAJOR}.${MINOR}.${NEXT_PATCH}-SNAPSHOT"
echo "version=${NEXT_VERSION}" >> $GITHUB_OUTPUT
echo "Next patch version: ${NEXT_VERSION}"
- name: Update version in release branch
run: |
NEXT_VERSION="${{ steps.next-version.outputs.version }}"
sed -i "s/project.version = '.*'/project.version = '${NEXT_VERSION}'/" common.gradle
echo "Updated release branch to ${NEXT_VERSION}"
grep "project.version" common.gradle
- name: Commit and push
run: |
git add common.gradle
git commit -m "Bump version to ${{ steps.next-version.outputs.version }} for next patch release"
git push origin ${{ inputs.release_branch }}
# ============================================================
# Job 11: Manage milestones
# ============================================================
update-milestones:
name: Update Milestones
needs: create-github-release
runs-on: ubuntu-latest
if: ${{ inputs.dry_run != true }}
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Create and close milestone
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
MILESTONE_TITLE="${{ inputs.release_version }}"
# Check if milestone exists
MILESTONE=$(gh api repos/${{ github.repository }}/milestones --jq ".[] | select(.title == \"${MILESTONE_TITLE}\")")
if [[ -z "${MILESTONE}" ]]; then
echo "Creating milestone ${MILESTONE_TITLE}..."
gh api repos/${{ github.repository }}/milestones \
-X POST \
-f title="${MILESTONE_TITLE}" \
-f state="closed" \
-f description="Released as ${RELEASE_TAG}"
else
MILESTONE_NUMBER=$(echo "${MILESTONE}" | jq -r '.number')
echo "Closing existing milestone ${MILESTONE_TITLE} (#${MILESTONE_NUMBER})..."
gh api repos/${{ github.repository }}/milestones/${MILESTONE_NUMBER} \
-X PATCH \
-f state="closed"
fi
- name: Associate merged PRs with milestone
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Get the milestone number
MILESTONE_TITLE="${{ inputs.release_version }}"
MILESTONE_NUMBER=$(gh api repos/${{ github.repository }}/milestones --jq ".[] | select(.title == \"${MILESTONE_TITLE}\") | .number")
if [[ -z "${MILESTONE_NUMBER}" ]]; then
echo "Warning: Could not find milestone ${MILESTONE_TITLE}"
exit 0
fi
# Find the previous release tag
PREV_TAG=$(git describe --tags --abbrev=0 "${RELEASE_TAG}^" 2>/dev/null || echo "")
if [[ -z "${PREV_TAG}" ]]; then
echo "No previous tag found, skipping PR association"
exit 0
fi
echo "Finding PRs merged between ${PREV_TAG} and ${RELEASE_TAG}..."
# Get commits between tags
COMMITS=$(git log "${PREV_TAG}..${RELEASE_TAG}" --pretty=format:"%H" 2>/dev/null || echo "")
for COMMIT in ${COMMITS}; do
# Find PR associated with this commit
PR_NUMBER=$(gh api repos/${{ github.repository }}/commits/${COMMIT}/pulls --jq '.[0].number' 2>/dev/null || echo "")
if [[ -n "${PR_NUMBER}" && "${PR_NUMBER}" != "null" ]]; then
echo "Associating PR #${PR_NUMBER} with milestone ${MILESTONE_TITLE}..."
gh api repos/${{ github.repository }}/issues/${PR_NUMBER} \
-X PATCH \
-f milestone="${MILESTONE_NUMBER}" 2>/dev/null || true
fi
done
# ============================================================
# Job 12: Release summary
# ============================================================
summary:
name: Release Summary
needs: [create-github-release, update-sdkman, update-milestones, update-jbang-catalog, finalize-tag]
runs-on: ubuntu-latest
if: always()
steps:
- name: Generate summary
run: |
echo "# Release Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Release Details" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Property | Value |" >> $GITHUB_STEP_SUMMARY
echo "|----------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| Version | ${{ inputs.release_version }} |" >> $GITHUB_STEP_SUMMARY
echo "| Tag | ${RELEASE_TAG} |" >> $GITHUB_STEP_SUMMARY
echo "| Release Type | ${{ inputs.release_type }} |" >> $GITHUB_STEP_SUMMARY
echo "| Source Commit | ${{ inputs.commit_sha }} |" >> $GITHUB_STEP_SUMMARY
echo "| Release Branch | ${{ inputs.release_branch }} |" >> $GITHUB_STEP_SUMMARY
echo "| Dry Run | ${{ inputs.dry_run }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [[ "${{ inputs.dry_run }}" != "true" ]]; then
echo "## Links" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- [GitHub Release](https://github.com/${{ github.repository }}/releases/tag/${RELEASE_TAG})" >> $GITHUB_STEP_SUMMARY
echo "- [Maven Central](https://central.sonatype.com/search?q=io.btrace&version=${{ inputs.release_version }})" >> $GITHUB_STEP_SUMMARY
echo "- [SDKMan](https://sdkman.io/sdks#btrace)" >> $GITHUB_STEP_SUMMARY
echo "- JBang: \`jbang btrace@${{ inputs.release_version }}\` (uses Maven Central)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Maven Coordinates" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo '```xml' >> $GITHUB_STEP_SUMMARY
echo '<dependency>' >> $GITHUB_STEP_SUMMARY
echo ' <groupId>io.btrace</groupId>' >> $GITHUB_STEP_SUMMARY
echo ' <artifactId>btrace-client</artifactId>' >> $GITHUB_STEP_SUMMARY
echo " <version>${{ inputs.release_version }}</version>" >> $GITHUB_STEP_SUMMARY
echo '</dependency>' >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
else
echo "## Dry Run Mode" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "> **Note:** This was a dry run. No artifacts were published or tags created." >> $GITHUB_STEP_SUMMARY
fi
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Job Status" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "| Job | Status |" >> $GITHUB_STEP_SUMMARY
echo "|-----|--------|" >> $GITHUB_STEP_SUMMARY
echo "| Validate | ${{ needs.validate.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Build & Test | ${{ needs.build-and-test.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Integration Tests | ${{ needs.integration-tests.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Prepare Release | ${{ needs.prepare-release.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Stage Maven | ${{ needs.stage-maven.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Wait for Maven | ${{ needs.wait-for-maven.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Finalize Tag | ${{ needs.finalize-tag.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
echo "| GitHub Release | ${{ needs.create-github-release.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
echo "| SDKMan | ${{ needs.update-sdkman.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
echo "| JBang Catalog | ${{ needs.update-jbang-catalog.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
echo "| Milestones | ${{ needs.update-milestones.result || 'skipped' }} |" >> $GITHUB_STEP_SUMMARY
# ============================================================
# Job 13: Cleanup
# ============================================================
cleanup:
name: Cleanup Artifacts
needs: [summary]
runs-on: ubuntu-latest
if: always()
steps:
- name: Cleanup temporary artifacts
uses: geekyeggo/delete-artifact@v6
with:
name: |
dist-build
test-trace
================================================
FILE: .github/workflows/stale.yml
================================================
name: Mark stale issues and pull requests
on:
schedule:
- cron: "0 0 * * *"
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v10
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
================================================
FILE: .github/workflows/update-jdk-versions.yml
================================================
name: Update JDK Test Versions
on:
schedule:
- cron: '0 6 * * 1'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-versions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
ref: develop
token: ${{ secrets.PAT_WORKFLOW }}
- name: Check for version updates
id: update
run: |
chmod +x scripts/update-jdk-versions.sh
if changes=$(scripts/update-jdk-versions.sh); then
echo "changed=true" >> "$GITHUB_OUTPUT"
{
echo "body<<EOF"
echo "$changes"
echo "EOF"
} >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
- name: Create Pull Request
if: steps.update.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.PAT_WORKFLOW }}
branch: automation/update-jdk-versions
base: develop
title: 'chore: update JDK test versions'
draft: true
labels: automation
commit-message: 'chore: update JDK test versions'
body: |
Automated JDK version update detected by SDKMan API.
### Changes
${{ steps.update.outputs.body }}
================================================
FILE: .github/workflows/v2-protocol-tests.yml
================================================
# Workflow for testing BTrace Binary Protocol v2
# This workflow runs comprehensive tests for the v2 protocol implementation
# including unit tests, JMH benchmarks, and protocol negotiation tests
name: V2 Protocol Tests
on:
# Run on PRs when labeled with 'test:v2-protocol'
pull_request:
types: [ labeled ]
# Run weekly on Sunday at 2 AM UTC
schedule:
- cron: '0 2 * * 0'
# Allow manual trigger
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
unit-tests:
name: V2 Protocol Unit Tests
runs-on: ubuntu-latest
# Only run if triggered by schedule, manual dispatch, or PR with 'test:v2-protocol' label
if: |
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test:v2-protocol'))
strategy:
matrix:
java: [ 11, 17, 21 ]
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-${{ matrix.java }}
- name: Set up JDK ${{ matrix.java }}
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: ${{ matrix.java }}
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Cache Gradle packages
uses: actions/cache@v5
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Run V2 Protocol Tests
run: |
./gradlew :btrace-core:test --tests "org.openjdk.btrace.core.comm.v2.*" \
--tests "org.openjdk.btrace.core.comm.Protocol*" \
--tests "org.openjdk.btrace.core.comm.WireProtocol*" \
--rerun-tasks
- name: Upload Test Reports
if: always()
uses: actions/upload-artifact@v7
with:
name: test-reports-java-${{ matrix.java }}
retention-days: 7
path: |
btrace-core/build/reports/tests/**
btrace-core/build/test-results/**
protocol-negotiation-tests:
name: Protocol Negotiation Tests
runs-on: ubuntu-latest
if: |
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test:v2-protocol'))
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up JDK 11
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Run Protocol Negotiation Tests
run: |
./gradlew :btrace-core:test --tests "org.openjdk.btrace.core.comm.ProtocolNegotiatorTest" \
--tests "org.openjdk.btrace.core.comm.ProtocolConfigTest" \
--tests "org.openjdk.btrace.core.comm.WireProtocolTest" \
--rerun-tasks
- name: Verify Protocol Version Detection
run: |
echo "Testing V1 protocol detection..."
./gradlew :btrace-core:test --tests "*ProtocolNegotiatorTest.testNegotiateV1*"
echo "Testing V2 protocol detection..."
./gradlew :btrace-core:test --tests "*ProtocolNegotiatorTest.testNegotiateV2*"
- name: Upload Negotiation Test Reports
if: always()
uses: actions/upload-artifact@v7
with:
name: negotiation-test-reports
retention-days: 7
path: |
btrace-core/build/reports/tests/**
btrace-core/build/test-results/**
edge-case-tests:
name: Edge Case and Boundary Tests
runs-on: ubuntu-latest
if: |
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test:v2-protocol'))
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up JDK 11
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Run Edge Case Tests
run: |
./gradlew :btrace-core:test --tests "org.openjdk.btrace.core.comm.v2.BinaryProtocolEdgeCasesTest" \
--rerun-tasks
- name: Test Large Messages
run: |
./gradlew :btrace-core:test --tests "*testVeryLargeMessage" \
--tests "*testLargeBytecodeArray" \
--tests "*testMapWith1000Entries"
- name: Test Compression
run: |
./gradlew :btrace-core:test --tests "*testCompressionThreshold" \
--tests "*testHighlyCompressibleMessage" \
--tests "*testCompressionJustAboveThreshold"
- name: Upload Edge Case Reports
if: always()
uses: actions/upload-artifact@v7
with:
name: edge-case-reports
retention-days: 7
path: |
btrace-core/build/reports/tests/**
jmh-benchmarks:
name: JMH Performance Benchmarks
runs-on: ubuntu-latest
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[benchmark]')
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up JDK 11
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Run Quick JMH Benchmarks (warmup=1, iterations=2, fork=1)
run: |
./gradlew :btrace-core:jmh \
-PjmhInclude=".*Serialize.*" \
-Pjmh.warmupIterations=1 \
-Pjmh.iterations=2 \
-Pjmh.fork=1
- name: Upload JMH Results
if: always()
uses: actions/upload-artifact@v7
with:
name: jmh-results
retention-days: 30
path: |
btrace-core/build/reports/jmh/**
btrace-core/build/jmh-results/**
protocol-compatibility:
name: Protocol Compatibility Matrix
runs-on: ubuntu-latest
if: |
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test:v2-protocol'))
strategy:
matrix:
scenario:
- name: "V2-to-V2"
client: "v2"
agent: "v2"
- name: "V1-to-V1"
client: "v1"
agent: "v1"
- name: "V2-to-V1"
client: "v2"
agent: "v1"
- name: "V1-to-V2"
client: "v1"
agent: "v2"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up JDK 11
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Test ${{ matrix.scenario.name }} Compatibility
run: |
echo "Testing compatibility: Client=${{ matrix.scenario.client }} Agent=${{ matrix.scenario.agent }}"
./gradlew :btrace-core:test --tests "org.openjdk.btrace.core.comm.WireProtocolTest" \
--rerun-tasks \
-Dbtrace.comm.protocol=${{ matrix.scenario.client }}
- name: Upload Compatibility Reports
if: always()
uses: actions/upload-artifact@v7
with:
name: compatibility-${{ matrix.scenario.name }}
retention-days: 7
path: |
btrace-core/build/reports/tests/**
test-summary:
name: Test Summary
runs-on: ubuntu-latest
needs: [unit-tests, protocol-negotiation-tests, edge-case-tests, protocol-compatibility]
if: always()
steps:
- name: Download All Test Reports
uses: actions/download-artifact@v8
with:
path: test-reports
- name: Generate Test Summary
run: |
echo "# V2 Protocol Test Summary" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "## Test Results" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
# Count test results
total_tests=0
passed_tests=0
failed_tests=0
for report in test-reports/*/test-results/test/*.xml; do
if [ -f "$report" ]; then
tests=$(grep -oP 'tests="\K[0-9]+' "$report" || echo "0")
failures=$(grep -oP 'failures="\K[0-9]+' "$report" || echo "0")
total_tests=$((total_tests + tests))
failed_tests=$((failed_tests + failures))
fi
done
passed_tests=$((total_tests - failed_tests))
echo "- **Total Tests:** $total_tests" >> $GITHUB_STEP_SUMMARY
echo "- **Passed:** ✅ $passed_tests" >> $GITHUB_STEP_SUMMARY
echo "- **Failed:** ❌ $failed_tests" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
if [ $failed_tests -eq 0 ]; then
echo "✅ All V2 protocol tests passed!" >> $GITHUB_STEP_SUMMARY
exit 0
else
echo "❌ Some tests failed. Please review the reports." >> $GITHUB_STEP_SUMMARY
exit 1
fi
code-coverage:
name: Code Coverage
runs-on: ubuntu-latest
if: |
github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test:v2-protocol'))
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cache Java binaries
id: cache-java
uses: actions/cache@v5
with:
path: ${{ runner.tool_cache }}/Java_*
key: java-${{ runner.os }}-temurin-11
- name: Set up JDK 11
if: steps.cache-java.outputs.cache-hit != 'true'
uses: actions/setup-java@v5
with:
java-version: 11
distribution: temurin
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
- name: Run Tests with Coverage
run: |
./gradlew :btrace-core:test jacocoTestReport
- name: Upload Coverage Reports
uses: actions/upload-artifact@v7
with:
name: coverage-reports
retention-days: 30
path: |
btrace-core/build/reports/jacoco/**
btrace-core/build/jacoco/**
- name: Generate Coverage Summary
run: |
if [ -f "btrace-core/build/reports/jacoco/test/html/index.html" ]; then
echo "## Code Coverage" >> $GITHUB_STEP_SUMMARY
echo "Coverage report generated successfully" >> $GITHUB_STEP_SUMMARY
echo "See artifacts for detailed coverage data" >> $GITHUB_STEP_SUMMARY
fi
================================================
FILE: .gitignore
================================================
*.class
# Mobile Tools for Java (J2ME)
.mtj.tmp/
# Package Files #
*.jar
*.war
*.ear
# Un-ignore specific files
!btrace-instr/src/test/resources/packed/test-pack.jar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
build
dist
make/netbeans/nbproject/private
TEST-*
make/junit*
make/private.properties
btrace-benchmark/target
btrace-benchmark/build
benchmark/*.iml
junit*
/btrace-statsd/target/
*.iml
.gradle
.gradle-user
.idea
!/lib/btrace-asm-*.jar
!/lib/btrace-jctools-core-*.jar
!/lib/btrace-hppcrt-*.jar
!/test-lib/*.jar
CHANGELOG.md
gradle.properties
/.nb-gradle/
/.nb-gradle-properties
.github_changelog_generator
**/out/*
gradle-wrapper.properties
/.java.versions
================================================
FILE: .muse/advisor.md
================================================
# BTrace Project Advisor
## Repository: btraceio/btrace
### Branch model
- **`develop`** is the sole integration branch — ALL pull requests must target `develop`, never `master`.
- `master` does not exist on the remote.
- Release tags are cut from `develop` after a stabilization window.
### Build commands
```bash
# Full build with dist packages
./gradlew :btrace-dist:build
# Module-specific build (faster)
./gradlew :<module>:build -x test
# All tests
./gradlew test
# Instrumentation tests only (fastest for instr changes)
./gradlew :btrace-instr:test
# Regenerate golden files after intentional bytecode changes
./gradlew :btrace-instr:test -PupdateTestData
# Integration tests (requires Docker + full dist build first)
./gradlew :btrace-dist:build
./gradlew :integration-tests:test -Pintegration
# Format check / auto-format (Google Java Format via Spotless)
./gradlew spotlessCheck
./gradlew spotlessApply
```
### Module layout
| Module | Purpose |
|---|---|
| `btrace-core` | Annotations, wire protocol, shared types — must stay Java 8 compatible |
| `btrace-compiler` | Script compilation + safety verification (`Verifier.java`) |
| `btrace-instr` | ASM-based bytecode instrumentation; probe factory; `HandlerRepositoryImpl` |
| `btrace-runtime` | Multi-version runtime impls (base/java9/java11/java15); `IndyDispatcher` |
| `btrace-agent` | Java agent entry point; `RemoteClient`, `FileClient` |
| `btrace-client` | CLI client tool |
| `btrace-dist` | Distribution packaging |
| `integration-tests` | End-to-end Docker-based tests |
| `benchmarks` | JMH benchmarks |
### Key architectural constraints
- `btrace-core` and `btrace-runtime` (src/main/java/) must compile at Java 8 source/target level.
- Multi-version runtime jars: `src/main/java9/`, `src/main/java11/`, `src/main/java15/` — each compiled at its respective release level.
- `btrace-boot.jar` is on the bootstrap classpath; classes in `btrace-runtime` that are referenced from INVOKEDYNAMIC bootstrap methods must be bootstrap-loadable.
- All probe script classes are defined in the bootstrap CL (via `Unsafe.defineClass` with `mustBeBootstrap=true` when `isTransforming()`).
- BTrace verifier enforces that probe handler methods are `public static void` — `publicLookup().findStatic()` is therefore sufficient.
- Golden files for instrumentation tests live in `btrace-instr/src/test/resources/instrumentorTestData/dynamic/`. Run with `-PupdateTestData` to regenerate after intentional bytecode changes.
### PR checklist
Before opening a PR, verify:
1. Branch targets **`develop`** (never `master`)
2. `./gradlew spotlessApply` applied
3. `./gradlew :btrace-instr:test` passes
4. Golden files regenerated if instrumented bytecode changed (`-PupdateTestData`)
5. If touching runtime multi-version code: test on JDK 11 and JDK 17+
================================================
FILE: AGENTS.md
================================================
# Repository Guidelines
## Project Structure & Modules
- Root uses Gradle with multiple modules named `btrace-*`.
- Core code lives in module directories (for example, `btrace-core`, `btrace-agent`, `btrace-runtime`, `btrace-client`, `btrace-instr`).
- Distributions are built from `btrace-dist`.
- Integration tests live in `integration-tests`; benchmarks in `benchmarks/*`; docs in `docs/`.
## Architecture Overview
- btrace-agent: Attachable Java agent that installs a class transformer and manages script lifecycle (load/unload), output routing, and optional JFR hooks.
- btrace-compiler: Verifies and compiles BTrace scripts to bytecode.
- btrace-instr: ASM-based instrumentation and weaving utilities used by the agent/compiler.
- btrace-runtime: APIs exposed to scripts; provides safe helpers for printing, timers, and data collection.
- btrace-client: CLI/attach tooling that sends compiled scripts to the target JVM and streams results.
- extensions: API + implementations packaged as BTrace extensions (for example, statsd and metrics under `btrace-extensions/*`).
- Flow: client attaches → compiles/sends script → agent loads and instruments target classes → runtime emits events → client displays/exports.
### High-Level Flow
```
+--------------+ attach/send +-------------+ transform +------------------+
| btrace-client| -----------------> | btrace-agent| --------------> | instrumented JVM |
+--------------+ +-------------+ +------------------+
^ | ^ |
| events/logs/stdout | | load/unload scripts |
| <------------------------------------+ +-------------------------------+
|
+--------- optional exporters via services (eg. statsd) -------------------->
```
### Modules (at a glance)
```
btrace-client -> btrace-agent -> btrace-instr
| |
v v
btrace-runtime extensions (e.g., statsd, utils, metrics)
btrace-compiler (validates/compiles scripts)
btrace-dist (packages binaries)
```
## Distribution Architecture: Masked JAR
BTrace uses a **single masked JAR** (`btrace.jar`) as its distribution artifact. This JAR contains:
### Structure
```
btrace.jar
├── META-INF/
│ ├── MANIFEST.MF (Main-Class, Premain-Class, Agent-Class → org.openjdk.btrace.boot.Loader)
│ ├── btrace/
│ │ ├── agent/*.classdata (agent classes - loaded in agent mode)
│ │ ├── client/*.classdata (client classes - loaded in client mode)
│ │ └── shared/*.classdata (shared classes - loaded in both modes)
├── org/openjdk/btrace/boot/ (bootstrap classes - visible to JVM)
└── org/openjdk/btrace/core/ (core/runtime classes from bootstrap module)
```
### Class Loading Strategy
1. **Bootstrap Classes** (`.class` files in root):
- Loaded by bootstrap classloader
- Visible to JVM and all code
- Includes: Loader, MaskedClassLoader, MaskedJarUtils
- These classes initialize the masked jar system
2. **Agent Classes** (`.classdata` in `META-INF/btrace/agent/`):
- Loaded via MaskedClassLoader in agent mode
- Isolated from application classes
- Includes: btrace-agent, btrace-instr, btrace-runtime, relocated jctools
3. **Client Classes** (`.classdata` in `META-INF/btrace/client/`):
- Loaded via MaskedClassLoader in client mode
- Includes: btrace-client, btrace-compiler, lanterna UI
4. **Shared Classes** (`.classdata` in `META-INF/btrace/shared/`):
- Loaded in both agent and client modes
- Includes: communication protocol, annotations, ASM core
- Critical for agent-client communication
### Why Masked JAR?
- **Single Source of Truth**: One JAR for all use cases (agent, client, standalone)
- **Bootstrap Isolation**: Agent/client classes hidden from JVM, preventing conflicts
- **No Embedded JARs**: Eliminates nested JAR extraction overhead
- **Simplified Build**: Removed redundant uber jar - masked jar handles everything
### Build Process
The masked JAR is built in `btrace-dist/build.gradle`:
1. `allClassesShadow` - Creates intermediate shadow jar with all dependencies and relocations
2. `prepareAgentClassdata` - Extracts agent classes, renames `.class` → `.classdata`
3. `prepareClientClassdata` - Extracts client classes, renames `.class` → `.classdata`
4. `prepareSharedClassdata` - Extracts shared classes, renames `.class` → `.classdata`
5. `btraceJar` - Combines bootstrap classes (as `.class`) + masked classes (as `.classdata`)
### Debugging Tips
- **ClassNotFoundException in agent mode**: Check if class is in `META-INF/btrace/agent/` (or shared if needed)
- **ClassNotFoundException in client mode**: Check if class is in `META-INF/btrace/client/` (or shared if needed)
- **NoClassDefFoundError between modes**: Class may need to be in shared section
- **Inspect masked JAR**: `unzip -l btrace.jar | grep -E "(\.class|\.classdata)"`
- **Check manifest**: `unzip -p btrace.jar META-INF/MANIFEST.MF`
## Launch Modes
```
Launch-time (agent mode):
java -javaagent:$BTRACE_HOME/libs/btrace.jar=script=MyTrace.java -jar app.jar
|-> Loader.premain() -> loads agent classes from .classdata -> installs transformer
Attach-time (client mode):
btrace <PID> MyTrace.java
|-> Loader as Main-Class -> loads client classes from .classdata -> attaches to target JVM
|-> Target JVM: Loader.agentmain() -> loads agent classes from .classdata -> instruments
Standalone (client mode):
java -jar btrace.jar <args>
|-> Same as attach-time, Loader delegates to client
```
## Troubleshooting
- Attach disabled: if JVM was started with `-XX:+DisableAttachMechanism`, remove it or relaunch without it.
- Permission errors: attach requires same OS user as target JVM; on Linux/macOS avoid sudo mixing; check container/JDK permissions.
- Toolchains: ensure `JAVA_HOME` and optional `TEST_JAVA_HOME` point to valid JDKs; for integration tests, build `btrace-dist` first so client/libs exist.
### Masked JAR Troubleshooting
- **ClassNotFoundException with .classdata**: MaskedClassLoader can't find class in masked sections. Check:
1. Is the class in the correct section? (agent/client/shared)
2. Was the class relocated? Check package name matches relocated path
3. Did the build complete successfully? Rebuild with `./gradlew clean :btrace-dist:btraceJar`
- **Shared classes**: If a class is used by BOTH agent and client (e.g., comm protocol, annotations), it MUST be in the shared section
- **Bootstrap vs Masked**: Bootstrap classes (.class) are visible everywhere; masked classes (.classdata) are isolated per-mode
- **Build order matters**: `allClassesShadow` must complete before prepare*Classdata tasks run
## Example Script
```java
package helloworld;
import static org.openjdk.btrace.core.BTraceUtils.*;
import org.openjdk.btrace.core.annotations.*;
import org.openjdk.btrace.core.types.AnyType;
@BTrace
public class MyTrace {
@OnMethod(clazz="extra.HelloWorld", method="/.*/")
public static void onAny(@ProbeMethodName String pmn) {
println("entered: " + pmn);
}
}
```
Run with: `btrace <PID> MyTrace.java` (see docs/BTraceTutorial.md for steps).
```java
// Args capture
package helloworld;
import static org.openjdk.btrace.core.BTraceUtils.*;
import org.openjdk.btrace.core.annotations.*;
import org.openjdk.btrace.core.types.AnyType;
@BTrace
public class ArgsTrace {
@OnMethod(clazz="extra.HelloWorld", method="/call.*/")
public static void onCall(@ProbeMethodName String pmn, AnyType[] args) {
println("args for " + pmn);
printArray(args);
}
}
```
```java
// Return value and duration
package helloworld;
import static org.openjdk.btrace.core.BTraceUtils.*;
import org.openjdk.btrace.core.annotations.*;
import org.openjdk.btrace.core.types.AnyType;
@BTrace
public class ReturnTrace {
@OnMethod(clazz="extra.HelloWorld", method="callC", location=@Location(Kind.RETURN))
public static void onReturn(@Duration long dur, @Return AnyType ret) {
println("callC ret=" + str(ret) + ", dur(ns)=" + dur);
}
}
```
## Build, Test, and Development
! Do not consume the gradle task logs directly. !
! Write the output to a file, running through grep to include only relevant information and then read the log file. !
- Full build: `./gradlew build` — compiles all modules and runs unit tests.
- Distribution: `./gradlew :btrace-dist:build` — creates ZIP/TGZ/RPM/DEB and an exploded layout under `btrace-dist/build/resources/main`.
- Unit tests: `./gradlew test` — JUnit 5, runs per-module tests.
- Integration tests: first build dist, then `./gradlew -Pintegration test`.
- Requires `JAVA_HOME` and typically `TEST_JAVA_HOME` (e.g., JDK 11). Example: `TEST_JAVA_HOME=$JAVA_11_HOME ./gradlew -Pintegration test`.
- Formatting: `./gradlew spotlessApply` (check with `spotlessCheck`).
- Coverage: `./gradlew jacocoTestReport` (CI publishes to Codecov).
## Coding Style & Naming
- Language: Java. Source/target set to 8; toolchains compile with JDK 11.
- Format: Google Java Format via Spotless. Import order enforced; unused imports removed.
- Packages under `org.openjdk.btrace.*`.
- Module names follow `btrace-<component>` (e.g., `btrace-extensions:btrace-utils`).
## Testing Guidelines
- Framework: JUnit Jupiter (JUnit 5).
- Unit tests reside under `src/test/java`; name classes with `*Test`.
- Integration tests in `integration-tests/src/test/java`; BTrace scripts under `integration-tests/src/test/btrace`.
- For integration runs, ensure `btrace-dist/build/resources/main/v<version>/libs/btrace.jar` exists (created by the dist build).
- The masked JAR is used for all integration tests - both agent and client modes use the same artifact.
## Commit & Pull Request Guidelines
- Commit style: Conventional Commits (e.g., `feat(core): add probe`, `fix(instr): handle null arg`).
- PRs must be from signers of the Oracle Contributor Agreement (OCA) — see README.
- PR checklist:
- Clear description and rationale; link related issues.
- Tests updated/added; CI green across unit and integration suites.
- Formatting passes (`spotlessCheck`); no unrelated changes.
- For behavior changes, include before/after notes or relevant logs.
## Tips & Environment
- Useful env vars: `JAVA_HOME`, `TEST_JAVA_HOME`, `BTRACE_TEST_DEBUG=true` (verbose integration tests), optional `BTRACE_HOME` when using the exploded dist.
- Example exploded dist path: `btrace-dist/build/resources/main/v2.2.6/`.
### Restricted/CI Environments
- Prefer a workspace-local Gradle cache to avoid permission issues: set `GRADLE_USER_HOME=$(pwd)/.gradle-user`.
- If network interfaces are restricted, force IPv4 to avoid wildcard IP detection errors: set `JAVA_TOOL_OPTIONS="-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false"`.
- Example: `GRADLE_USER_HOME=$(pwd)/.gradle-user JAVA_TOOL_OPTIONS="-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false" ./gradlew :btrace-dist:buildZip -x test`
## Common Patterns & Lessons Learned
### Adding New Classes
1. **Determine the section**: Is the class used by agent, client, or both?
- Agent only → prepareAgentClassdata include pattern
- Client only → prepareClientClassdata include pattern
- Both → prepareSharedClassdata include pattern
2. **Update build.gradle**: Add include pattern in the appropriate task
3. **Rebuild and test**: `./gradlew clean :btrace-dist:btraceJar && ./gradlew -Pintegration test`
### Dependency Relocation
- All third-party dependencies are relocated to `org.openjdk.btrace.libs.*`
- Relocations happen in `allClassesShadow` task using Shadow plugin
- Common relocations: ASM, SLF4J, JCTools
- After relocation, classes are extracted and masked in prepare*Classdata tasks
### Build Simplification Wins
- **Before**: Separate agent.jar, client.jar, boot.jar, uber.jar (4 artifacts)
- **After**: Single btrace.jar with masked sections (1 artifact)
- **Result**: Simpler build, smaller distribution, easier maintenance
### ClassLoader Isolation
- Bootstrap classes can see everything (including masked sections via MaskedClassLoader)
- Application classes cannot see masked sections (isolation prevents conflicts)
- Masked classes in agent mode cannot see masked classes in client mode (intentional isolation)
- Shared section solves cross-mode visibility when needed (e.g., command serialization)
## Hard rules
- Never commit changes unless they are fully tested or you are explicitly asked to commit
- Do not use FQNs directly! Always import types and use simple type names in the code!
- When adding classes to masked jar, always consider: agent-only, client-only, or shared?
- Rebuild the distribution after any changes to masked jar structure: `./gradlew clean :btrace-dist:btraceJar`
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to BTrace
Thanks for your interest in contributing! This guide covers local development, running tests, Gradle tips, and common troubleshooting.
Note: Pull requests can only be accepted from signers of the Oracle Contributor Agreement (OCA). See the project README for details.
## Local Development
- JDK: Use a reasonably recent JDK (11+ recommended). The project targets a broad range but tests run comfortably on 11/17.
- Wrapper: Use the bundled `./gradlew` wrapper. It will download the pinned Gradle version if needed.
- Local Gradle cache (optional but recommended):
- macOS/Linux: `export GRADLE_USER_HOME="$PWD/.gradle-home"`
- Windows (PowerShell): `$env:GRADLE_USER_HOME = "$PWD/.gradle-home"`
## Running Tests
- All unit tests (skip integration tests):
```sh
./gradlew --no-daemon test -x integration-tests:test
```
- Per-module tests:
- Runtime: `./gradlew :btrace-runtime:test`
- Extension: `./gradlew :btrace-extension:test`
- Compiler: `./gradlew :btrace-compiler:test`
- Instr: `./gradlew :btrace-instr:test`
- Update instrumentor goldens when bytecode output changes:
```sh
./gradlew test -PupdateTestData
```
- Integration tests (spawn JVMs, exercise agent and extensions):
```sh
./gradlew --no-daemon integration-tests:test
```
- If tests fail due to denied privileged extensions, pass a policy file to the tested JVMs:
- Create `permissions.properties`:
```properties
allowPrivileged=true
allowExtensions=btrace-metrics,btrace-utils
```
- Export path: `export BTRACE_PERMS=$PWD/permissions.properties`
- Run Gradle with: `-Dbtrace.permissions=$BTRACE_PERMS`
## Gradle Tips
- Prefer IPv4 if your environment has unusual local IP settings (helps Gradle select a wildcard address):
```sh
export GRADLE_OPTS="-Djava.net.preferIPv4Stack=true -Djava.net.preferIPv6Addresses=false"
```
- Enable Gradle debug output for flakiness: add `--info` or `--debug`.
- Run a single test class/method:
```sh
./gradlew :btrace-extension:test --tests org.openjdk.btrace.extension.ExtensionBridgeImplPolicyTest
./gradlew :btrace-runtime:test --tests "*ExtensionIndyShimIndexTest.resolvesNoopShimFromIndex"
```
## Troubleshooting
- Gradle wrapper needs to download Gradle: ensure network is allowed once; subsequent runs use the local cache under `.gradle-home`.
- Error: `Could not determine a usable wildcard IP for this machine`:
- Set the IPv4 flags shown above or ensure local networking is available.
- Permission errors when Gradle writes outside the workspace:
- Use a local Gradle cache via `GRADLE_USER_HOME` as shown above.
- Integration tests failing with permissions denied:
- Provide a policy file and pass it via `-Dbtrace.permissions=/path/to/permissions.properties`.
## Code Style & Scope
- Keep changes focused and minimal; align with existing code style.
- Update docs when changing user-visible behavior.
- Prefer clear separation of concerns and small helpers over inlined, complex logic.
- Avoid introducing new dependencies without discussion.
## Submitting a PR
1. Fork the repo and branch from `develop` (unless otherwise agreed).
2. Make your changes and run tests locally.
3. If instrumentor behavior changed, update goldens (`-PupdateTestData`) and include them in your commit.
4. Submit a PR with a concise description of the change, rationale, and any follow-ups.
Happy tracing!
================================================
FILE: LICENSE
================================================
The GNU General Public License (GPL)
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies of this license
document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your freedom to share
and change it. By contrast, the GNU General Public License is intended to
guarantee your freedom to share and change free software--to make sure the
software is free for all its users. This General Public License applies to
most of the Free Software Foundation's software and to any other program whose
authors commit to using it. (Some other Free Software Foundation software is
covered by the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom to
distribute copies of free software (and charge for this service if you wish),
that you receive source code or can get it if you want it, that you can change
the software or use pieces of it in new free programs; and that you know you
can do these things.
To protect your rights, we need to make restrictions that forbid anyone to deny
you these rights or to ask you to surrender the rights. These restrictions
translate to certain responsibilities for you if you distribute copies of the
software, or if you modify it.
For example, if you distribute copies of such a program, whether gratis or for
a fee, you must give the recipients all the rights that you have. You must
make sure that they, too, receive or can get the source code. And you must
show them these terms so they know their rights.
We protect your rights with two steps: (1) copyright the software, and (2)
offer you this license which gives you legal permission to copy, distribute
and/or modify the software.
Also, for each author's protection and ours, we want to make certain that
everyone understands that there is no warranty for this free software. If the
software is modified by someone else and passed on, we want its recipients to
know that what they have is not the original, so that any problems introduced
by others will not reflect on the original authors' reputations.
Finally, any free program is threatened constantly by software patents. We
wish to avoid the danger that redistributors of a free program will
individually obtain patent licenses, in effect making the program proprietary.
To prevent this, we have made it clear that any patent must be licensed for
everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and modification
follow.
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms of
this General Public License. The "Program", below, refers to any such program
or work, and a "work based on the Program" means either the Program or any
derivative work under copyright law: that is to say, a work containing the
Program or a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is included
without limitation in the term "modification".) Each licensee is addressed as
"you".
Activities other than copying, distribution and modification are not covered by
this License; they are outside its scope. The act of running the Program is
not restricted, and the output from the Program is covered only if its contents
constitute a work based on the Program (independent of having been made by
running the Program). Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's source code as
you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this License
and to the absence of any warranty; and give any other recipients of the
Program a copy of this License along with the Program.
You may charge a fee for the physical act of transferring a copy, and you may
at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion of it, thus
forming a work based on the Program, and copy and distribute such modifications
or work under the terms of Section 1 above, provided that you also meet all of
these conditions:
a) You must cause the modified files to carry prominent notices stating
that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in whole or
in part contains or is derived from the Program or any part thereof, to be
licensed as a whole at no charge to all third parties under the terms of
this License.
c) If the modified program normally reads commands interactively when run,
you must cause it, when started running for such interactive use in the
most ordinary way, to print or display an announcement including an
appropriate copyright notice and a notice that there is no warranty (or
else, saying that you provide a warranty) and that users may redistribute
the program under these conditions, and telling the user how to view a copy
of this License. (Exception: if the Program itself is interactive but does
not normally print such an announcement, your work based on the Program is
not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be reasonably
considered independent and separate works in themselves, then this License, and
its terms, do not apply to those sections when you distribute them as separate
works. But when you distribute the same sections as part of a whole which is a
work based on the Program, the distribution of the whole must be on the terms
of this License, whose permissions for other licensees extend to the entire
whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise the
right to control the distribution of derivative or collective works based on
the Program.
In addition, mere aggregation of another work not based on the Program with the
Program (or with a work based on the Program) on a volume of a storage or
distribution medium does not bring the other work under the scope of this
License.
3. You may copy and distribute the Program (or a work based on it, under
Section 2) in object code or executable form under the terms of Sections 1 and
2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable source
code, which must be distributed under the terms of Sections 1 and 2 above
on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three years, to
give any third party, for a charge no more than your cost of physically
performing source distribution, a complete machine-readable copy of the
corresponding source code, to be distributed under the terms of Sections 1
and 2 above on a medium customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer to
distribute corresponding source code. (This alternative is allowed only
for noncommercial distribution and only if you received the program in
object code or executable form with such an offer, in accord with
Subsection b above.)
The source code for a work means the preferred form of the work for making
modifications to it. For an executable work, complete source code means all
the source code for all modules it contains, plus any associated interface
definition files, plus the scripts used to control compilation and installation
of the executable. However, as a special exception, the source code
distributed need not include anything that is normally distributed (in either
source or binary form) with the major components (compiler, kernel, and so on)
of the operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering access to copy
from a designated place, then offering equivalent access to copy the source
code from the same place counts as distribution of the source code, even though
third parties are not compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program except as
expressly provided under this License. Any attempt otherwise to copy, modify,
sublicense or distribute the Program is void, and will automatically terminate
your rights under this License. However, parties who have received copies, or
rights, from you under this License will not have their licenses terminated so
long as such parties remain in full compliance.
5. You are not required to accept this License, since you have not signed it.
However, nothing else grants you permission to modify or distribute the Program
or its derivative works. These actions are prohibited by law if you do not
accept this License. Therefore, by modifying or distributing the Program (or
any work based on the Program), you indicate your acceptance of this License to
do so, and all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the Program),
the recipient automatically receives a license from the original licensor to
copy, distribute or modify the Program subject to these terms and conditions.
You may not impose any further restrictions on the recipients' exercise of the
rights granted herein. You are not responsible for enforcing compliance by
third parties to this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues), conditions
are imposed on you (whether by court order, agreement or otherwise) that
contradict the conditions of this License, they do not excuse you from the
conditions of this License. If you cannot distribute so as to satisfy
simultaneously your obligations under this License and any other pertinent
obligations, then as a consequence you may not distribute the Program at all.
For example, if a patent license would not permit royalty-free redistribution
of the Program by all those who receive copies directly or indirectly through
you, then the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under any
particular circumstance, the balance of the section is intended to apply and
the section as a whole is intended to apply in other circumstances.
It is not the purpose of this section to induce you to infringe any patents or
other property right claims or to contest validity of any such claims; this
section has the sole purpose of protecting the integrity of the free software
distribution system, which is implemented by public license practices. Many
people have made generous contributions to the wide range of software
distributed through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing to
distribute software through any other system and a licensee cannot impose that
choice.
This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in certain
countries either by patents or by copyrighted interfaces, the original
copyright holder who places the Program under this License may add an explicit
geographical distribution limitation excluding those countries, so that
distribution is permitted only in or among countries not thus excluded. In
such case, this License incorporates the limitation as if written in the body
of this License.
9. The Free Software Foundation may publish revised and/or new versions of the
General Public License from time to time. Such new versions will be similar in
spirit to the present version, but may differ in detail to address new problems
or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any later
version", you have the option of following the terms and conditions either of
that version or of any later version published by the Free Software Foundation.
If the Program does not specify a version number of this License, you may
choose any version ever published by the Free Software Foundation.
10. If you wish to incorporate parts of the Program into other free programs
whose distribution conditions are different, write to the author to ask for
permission. For software which is copyrighted by the Free Software Foundation,
write to the Free Software Foundation; we sometimes make exceptions for this.
Our decision will be guided by the two goals of preserving the free status of
all derivatives of our free software and of promoting the sharing and reuse of
software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR
INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA
BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER
OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible
use to the public, the best way to achieve this is to make it free software
which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest to attach
them to the start of each source file to most effectively convey the exclusion
of warranty; and each file should have at least the "copyright" line and a
pointer to where the full notice is found.
One line to give the program's name and a brief idea of what it does.
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc., 59
Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this when it
starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author Gnomovision comes
with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free
software, and you are welcome to redistribute it under certain conditions;
type 'show c' for details.
The hypothetical commands 'show w' and 'show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may be
called something other than 'show w' and 'show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your school,
if any, to sign a "copyright disclaimer" for the program, if necessary. Here
is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
'Gnomovision' (which makes passes at compilers) written by James Hacker.
signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General Public
License instead of this License.
"CLASSPATH" EXCEPTION TO THE GPL
Certain source files distributed by Oracle America and/or its affiliates are
subject to the following clarification and special exception to the GPL, but
only where Oracle has expressly included in the particular source file's header
the words "Oracle designates this particular file as subject to the "Classpath"
exception as provided by Oracle in the LICENSE file that accompanied this code."
Linking this library statically or dynamically with other modules is making
a combined work based on this library. Thus, the terms and conditions of
the GNU General Public License cover the whole combination.
As a special exception, the copyright holders of this library give you
permission to link this library with independent modules to produce an
executable, regardless of the license terms of these independent modules,
and to copy and distribute the resulting executable under terms of your
choice, provided that you also meet, for each linked independent module,
the terms and conditions of the license of that module. An independent
module is a module which is not derived from or based on this library. If
you modify this library, you may extend this exception to your version of
the library, but you are not obligated to do so. If you do not wish to do
so, delete this exception statement from your version.
[All 3rd party libraries licenses are listed in LICENSE-3RD-PARTY.txt file]
================================================
FILE: README.md
================================================
# BTrace
**Safe, dynamic tracing for Java applications**
[](https://github.com/btraceio/btrace/actions)
[](https://github.com/btraceio/btrace/releases/latest)
[](https://codecov.io/github/btraceio/btrace?branch=develop)
BTrace dynamically instruments running Java applications to inject tracing code at runtime. No restarts. No recompilation. Production-safe.
> **Quick links:** [Quick Reference](docs/QuickReference.md) · [Step-by-Step Tutorial](docs/GettingStarted.md)
---
## Why BTrace?
- **Zero downtime** - Attach to running JVMs without restart
- **Production safe** - Verified scripts can't crash your application
- **Flexible probes** - Method entry/exit, timings, field access, allocations
- **Low overhead** - Bytecode injection with minimal performance impact
---
## Get Started in 30 Seconds
```sh
# Install via JBang (easiest)
curl -Ls https://sh.jbang.dev | bash -s - app setup
# Add the BTrace JBang catalog (one time)
jbang catalog add --name btraceio https://raw.githubusercontent.com/btraceio/jbang-catalog/main/jbang-catalog.json
# Trace slow methods in your running app
jbang btrace@btraceio -n 'com.myapp.*::* @return if duration>100ms { print method, duration }' $(pgrep -f myapp)
```
---
## Trace Anything
**Method timing:**
```sh
btrace -n 'java.sql.Statement::execute* @return { print method, duration }' <PID>
```
**Exception tracking:**
```sh
btrace -n 'java.lang.Exception::<init> @return { print self, stack(5) }' <PID>
```
**Custom probes:**
```java
@BTrace public class Trace {
@OnMethod(clazz = "com.example.OrderService", method = "checkout")
public static void onCheckout(@Self Object self, @Duration long ns) {
println(strcat("checkout: ", str(ns/1_000_000) + "ms"));
}
}
```
See the [Oneliner Guide](docs/OnelinerGuide.md) for complete syntax.
---
## Install
```sh
# JBang (recommended - zero installation)
jbang catalog add --name btraceio https://raw.githubusercontent.com/btraceio/jbang-catalog/main/jbang-catalog.json
jbang btrace@btraceio <PID> script.java
# SDKMan
sdk install btrace
# Manual download
curl -LO https://github.com/btraceio/btrace/releases/latest/download/btrace-bin.tar.gz
```
See [Installation Guide](docs/GettingStarted.md#installation) for Docker, package managers, and more options.
---
## Documentation
| Resource | Description |
|----------|-------------|
| [Quick Reference](docs/QuickReference.md) | Cheat sheet for experienced users |
| [Getting Started](docs/GettingStarted.md) | Step-by-step first trace tutorial |
| [Full Tutorial](docs/BTraceTutorial.md) | Complete walkthrough of all features |
| [Oneliners](docs/OnelinerGuide.md) | DTrace-style quick probes |
| [Extensions](docs/BTraceExtensionDevelopmentGuide.md) | StatsD, custom integrations |
| [Documentation Hub](docs/README.md) | All docs and guides |
---
## Building from Source
```sh
git clone https://github.com/btraceio/btrace.git
cd btrace
./gradlew :btrace-dist:build
```
See [CLAUDE.md](CLAUDE.md) for development setup and architecture.
---
## Community & Contributing
**Get help:** [Slack](http://btrace.slack.com/) · [Gitter](https://gitter.im/btraceio/btrace) · [GitHub Issues](https://github.com/btraceio/btrace/issues)
**Contribute:** Pull requests require signing the [Oracle Contributor Agreement](https://oca.opensource.oracle.com/).
---
## License
GPLv2 with Classpath Exception. See [LICENSE](LICENSE).
---
**Credits:** Built with [ASM](http://asm.ow2.org/), [JCTools](https://github.com/JCTools/JCTools), [hppcrt](https://github.com/vsonnier/hppcrt). Optimized with [JProfiler](http://www.ej-technologies.com/products/jprofiler/overview.html).
================================================
FILE: benchmarks/agent-benchmark/build.gradle
================================================
plugins {
id 'java'
alias(libs.plugins.jmh)
}
description 'A JMH benchmark to assert the overhead imposed by various types of BTrace instrumentation.'
def env = System.getenv()
def javaHome = env['JAVA_HOME']
dependencies {
implementation project(path: ":btrace-dist", configuration: "shadow")
implementation project(":btrace-compiler")
jmh tasks.getByPath(':btrace-dist:btraceJar').outputs.getFiles()
jmh libs.jmh
jmh libs.jmh.annprocess
}
task btracec(type: JavaExec) {
group 'Build'
inputs.files 'src/main/resources/scripts'
outputs.dir buildDir.toPath().resolve("classes/java/main")
environment('BTRACE_HOME', "$projectDir")
classpath configurations.runtimeClasspath
mainClass = 'org.openjdk.btrace.compiler.Compiler'
args '-d'
args "${buildDir}/classes/java/main/"
args '-packext'
args 'btclass'
args fileTree(dir: "src/jmh/btrace", include: 'TraceScript.java')
}
compileJmhJava.dependsOn btracec
jmhClasses.dependsOn btracec
jmhJar {
include 'META-INF/BenchmarkList'
include 'META-INF/CompilerHints'
include 'org/openjdk/jmh/**'
include 'org/openjdk/btrace/bench/**/*.class'
include 'org/openjdk/btrace/generated/**/*'
include "joptsimple/**"
include "org/apache/**"
include 'jmh*'
include 'benchmark/**'
include '*.btclass'
}
jmh {
warmupIterations = 5
iterations = 10
fork = 2
jvm = "${env['JAVA_HOME']}/bin/java"
duplicateClassesStrategy = DuplicatesStrategy.WARN
def agentJarPath = tasks.getByPath(':btrace-dist:btraceJar').outputs.getFiles().getSingleFile()
def scriptPath = buildDir.toPath().resolve('classes/java/main/TraceScript.btclass')
def agent = "-javaagent:${agentJarPath}=stdout=false,noServer=true,debug=false,script=${scriptPath}"
jvmArgsAppend = ["-Djmh.basedir=${buildDir.getParentFile()}", "-Dproject.version=${project.version}", "-Xmx128m", "-agentpath:/tmp/libasyncProfiler.dylib=start,event=cpu,jfr=7,file=/tmp/btrace.jfr", "${agent}"]
includes = ['.*BTraceBench.*']
profilers = ['stack']
}
================================================
FILE: benchmarks/agent-benchmark/src/jmh/btrace/TraceScript.java
================================================
import static org.openjdk.btrace.core.BTraceUtils.*;
import org.openjdk.btrace.core.annotations.BTrace;
import org.openjdk.btrace.core.annotations.Duration;
import org.openjdk.btrace.core.annotations.Kind;
import org.openjdk.btrace.core.annotations.Level;
import org.openjdk.btrace.core.annotations.Location;
import org.openjdk.btrace.core.annotations.OnMethod;
import org.openjdk.btrace.core.annotations.ProbeClassName;
import org.openjdk.btrace.core.annotations.ProbeMethodName;
import org.openjdk.btrace.core.annotations.Sampled;
@BTrace
public class TraceScript {
@OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedMethod")
public static void onMethodEntryEmpty(@ProbeClassName String pcn, @ProbeMethodName String pmn) {}
@OnMethod(
clazz = "benchmark.BTraceBench",
method = "testInstrumentedMethodLevelNoMatch",
enableAt = @Level("100"))
public static void onMethodEntryEmptyLevelNoMatch(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {}
@OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedMethodSampled")
@Sampled(kind = Sampled.Sampler.Const)
public static void onMethodEntryEmptySampled(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {}
@OnMethod(
clazz = "benchmark.BTraceBench",
method = "testInstrDuration",
location = @Location(Kind.RETURN))
public static void onMethodRetDuration(
@ProbeClassName String pcn, @ProbeMethodName String pmn, @Duration long dur) {}
@OnMethod(
clazz = "benchmark.BTraceBench",
method = "testInstrDurationSampled",
location = @Location(Kind.RETURN))
@Sampled(kind = Sampled.Sampler.Const)
public static void onMethodRetDurationSampled(
@ProbeClassName String pcn, @ProbeMethodName String pmn, @Duration long dur) {}
@OnMethod(
clazz = "benchmark.BTraceBench",
method = "testInstrDurationSampledAdaptive",
location = @Location(Kind.RETURN))
@Sampled
public static void onMethodRetDurationSampledAdaptive(
@ProbeClassName String pcn, @ProbeMethodName String pmn, @Duration long dur) {}
@OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedMethodPrintln1")
public static void onMethodEntryPrintln1(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {
println(pcn);
}
@OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedMethodPrintln1Sampled")
@Sampled
public static void onMethodEntryPrintln1Sampled(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {
println(pcn);
}
@OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedMethodPrintln2")
public static void onMethodEntryPrintln2(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {
println(pcn);
println(pmn);
}
@OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedMethodPrintln3")
public static void onMethodEntryPrintln3(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {
println(pcn);
println(pmn);
println(pmn);
}
@OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedMethodPrintln24")
public static void onMethodEntryPrintln24(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
}
}
================================================
FILE: benchmarks/agent-benchmark/src/jmh/java/benchmark/BTraceBench.java
================================================
/*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package benchmark;
import java.io.IOException;
import java.io.PrintWriter;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.FileVisitResult;
import java.nio.file.FileVisitor;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.Random;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import org.openjdk.btrace.core.comm.CommandListener;
import org.openjdk.btrace.instr.MethodTracker;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Fork(1)
@BenchmarkMode(Mode.AverageTime)
public class BTraceBench {
private static class BTraceConfig {
private final String agentJar;
private final String scriptPath;
private final Path tmpRoot;
private static final FileVisitor<Path> DEL_TREE =
new FileVisitor<Path>() {
@Override
public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs)
throws IOException {
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs)
throws IOException {
Files.delete(file);
return FileVisitResult.CONTINUE;
}
@Override
public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {
return FileVisitResult.TERMINATE;
}
@Override
public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {
Files.delete(dir);
return FileVisitResult.CONTINUE;
}
};
public BTraceConfig(Path tmpRoot, String agentJar, String scriptPath) {
this.agentJar = agentJar;
this.scriptPath = scriptPath;
this.tmpRoot = tmpRoot;
}
public void cleanup() throws IOException {
Files.walkFileTree(tmpRoot, DEL_TREE);
}
}
long counter;
long sampleCounter;
long durCounter;
@Setup
public void setup() {
MethodTracker.registerCounter(1, 10);
MethodTracker.registerCounter(2, 50);
MethodTracker.registerCounter(3, 100);
Random r = new Random(System.currentTimeMillis());
sampleCounter = 0;
durCounter = 0;
counter = r.nextInt();
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrumentedMethod() {
counter++;
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrumentedMethodLevelNoMatch() {
counter++;
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrumentedMethodSampled() {
counter++;
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrumentedMethodPrintln1() {
counter++;
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrumentedMethodPrintln1Sampled() {
counter++;
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrumentedMethodPrintln2() {
counter++;
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrumentedMethodPrintln3() {
counter++;
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrumentedMethodPrintln24() {
counter++;
}
@Warmup(iterations = 5, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testMethod() {
counter++;
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrDuration() {
durCounter++;
}
public boolean x = true;
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrDurationSampled() {
sampleCounter++;
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testInstrDurationSampledAdaptive() {
sampleCounter++;
}
// @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
// @Measurement(iterations = 5, time = 2000, timeUnit = TimeUnit.MILLISECONDS)
// @Benchmark
// public void testSendCommand() {
// br.send(new OkayCommand());
// }
//
// @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
// @Measurement(iterations = 5, time = 2000, timeUnit = TimeUnit.MILLISECONDS)
// @Threads(2)
// @Benchmark
// public void testSendCommandMulti2() {
// br.send(new OkayCommand());
// }
//
// @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
// @Measurement(iterations = 5, time = 2000, timeUnit = TimeUnit.MILLISECONDS)
// @Threads(4)
// @Benchmark
// public void testSendCommandMulti4() {
// br.send(new OkayCommand());
// }
//
// @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
// @Measurement(iterations = 5, time = 2000, timeUnit = TimeUnit.MILLISECONDS)
// @Threads(8)
// @Benchmark
// public void testSendCommandMulti8() {
// br.send(new OkayCommand());
// }
//
// @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
// @Measurement(iterations = 5, time = 2000, timeUnit = TimeUnit.MILLISECONDS)
// @Threads(16)
// @Benchmark
// public void testSendCommandMulti16() {
// br.send(new OkayCommand());
// }
long sampleHit10Checks = 0;
long sampleHit10Sampled = 0;
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 20, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
@Threads(2)
public void testSampleHit10() {
sampleHit10Checks++;
if (MethodTracker.hit(1)) {
sampleHit10Sampled++;
}
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 20, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
@Threads(2)
public void testSampleHit50() {
sampleHit10Checks++;
if (MethodTracker.hit(2)) {
sampleHit10Sampled++;
}
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 20, time = 100, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
@Threads(2)
public void testSampleHit100() {
sampleHit10Checks++;
if (MethodTracker.hit(3)) {
sampleHit10Sampled++;
}
}
@org.openjdk.jmh.annotations.TearDown
public void teardown() {
if (sampleHit10Checks > 0) {
System.err.println("=== testSampleHit10");
System.err.println("#samples ~ " + sampleHit10Sampled);
if (sampleHit10Sampled > 0) {
System.err.println("#sampling rate ~ " + (sampleHit10Checks / sampleHit10Sampled));
}
}
}
public static void main(String[] args) throws Exception {
BTraceConfig bc = getConfig();
try {
Options opt =
new OptionsBuilder()
.addProfiler("stack")
// .jvmArgsPrepend(
// "-javaagent:"
// + bc.agentJar
// + "=stdout=false,noServer=true,"
// + "script="
// + bc.scriptPath)
.include(".*" + BTraceBench.class.getSimpleName() + ".*test.*")
.build();
new Runner(opt).run();
} finally {
bc.cleanup();
}
}
private static BTraceConfig getConfig() throws IOException {
FileSystem fs = FileSystems.getDefault();
Path distLibs = null;
String basedir = System.getProperty("jmh.basedir");
String version = System.getProperty("project.version");
String scriptPath = System.getProperty("script.path");
Path root = null;
if (basedir == null) {
root = fs.getPath(".").toAbsolutePath();
} else {
root = Paths.get(basedir).getParent();
}
distLibs = root.resolve("btrace-dist/build/resources/main/" + version + "/libs");
Path agentPath = distLibs.resolve("btrace-agent.jar");
Path bootPath = distLibs.resolve("btrace-boot.jar");
Path tmpDir = Files.createTempDirectory("btrace-bench-");
Path targetPath =
Files.copy(
agentPath, tmpDir.resolve("btrace-agent.jar"), StandardCopyOption.REPLACE_EXISTING);
Files.copy(bootPath, tmpDir.resolve("btrace-boot.jar"), StandardCopyOption.REPLACE_EXISTING);
return new BTraceConfig(tmpDir, targetPath.toString(), scriptPath + "/TraceScript.btclass");
}
}
================================================
FILE: benchmarks/runtime-benchmarks/build.gradle
================================================
plugins {
id 'java'
alias(libs.plugins.jmh)
}
description 'A JMH benchmark to assert the overhead imposed by various types of BTrace instrumentation.'
def env = System.getenv()
def javaHome = env['JAVA_HOME']
configurations {
compilerDeps
}
dependencies {
implementation project(path: ":btrace-dist", configuration: "shadow")
implementation project(":btrace-compiler")
jmh project(":btrace-instr")
jmh project(":btrace-runtime")
jmh project(":btrace-extensions:btrace-statsd")
jmh libs.jmh
jmh libs.jmh.annprocess
compilerDeps project(path: ":btrace-dist", configuration: "shadow")
compilerDeps project(":btrace-compiler")
}
task btracec(type: JavaExec) {
group 'Build'
inputs.files 'src/main/resources/scripts'
outputs.dir "${buildDir}/classes/java/main"
environment('BTRACE_HOME', "$projectDir")
classpath configurations.compilerDeps
mainClass = 'org.openjdk.btrace.compiler.Compiler'
args '-d'
args "${buildDir}/classes/java/main/"
args '-packext'
args 'btclass'
args fileTree(dir: "src/jmh/btrace", include: 'TraceScript.java')
}
compileJmhJava.dependsOn btracec
jmhClasses.dependsOn btracec
jmhJar {
include 'META-INF/BenchmarkList'
include 'META-INF/CompilerHints'
include 'org/jctools/**/*'
include 'org/objectweb/asm/**'
include 'org/openjdk/jmh/**'
include 'org/openjdk/btrace/bench/**/*.class'
include "org/openjdk/btrace/core/**"
include "org/openjdk/btrace/instr/**"
include 'org/openjdk/btrace/generated/**/*'
include 'org/openjdk/btrace/runtime/**'
// no legacy services classes to package
include "joptsimple/**"
include "org/apache/**"
include '*.btclass'
include 'jmh*'
}
jmh {
duplicateClassesStrategy = DuplicatesStrategy.WARN
jvmArgsAppend = ["-Djmh.basedir=${project.buildDir.getParent()}", "-Dproject.version=${project.version}"]
// jmhVersion = '1.27'
includes = ['org.openjdk.btrace.bench.ClassFilterBenchmark']
verbosity = 'EXTRA'
}
================================================
FILE: benchmarks/runtime-benchmarks/src/jmh/btrace/TraceScript.java
================================================
import static org.openjdk.btrace.core.BTraceUtils.*;
import org.openjdk.btrace.core.annotations.BTrace;
import org.openjdk.btrace.core.annotations.Duration;
import org.openjdk.btrace.core.annotations.Kind;
import org.openjdk.btrace.core.annotations.Level;
import org.openjdk.btrace.core.annotations.Location;
import org.openjdk.btrace.core.annotations.OnMethod;
import org.openjdk.btrace.core.annotations.ProbeClassName;
import org.openjdk.btrace.core.annotations.ProbeMethodName;
import org.openjdk.btrace.core.annotations.Sampled;
@BTrace
public class TraceScript {
@OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInstrumentedMethod")
public static void onMethodEntryEmpty(@ProbeClassName String pcn, @ProbeMethodName String pmn) {}
@OnMethod(
clazz = "org.openjdk.btrace.BTraceBench",
method = "testInstrumentedMethodLevelNoMatch",
enableAt = @Level("100"))
public static void onMethodEntryEmptyLevelNoMatch(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {}
@OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInstrumentedMethodSampled")
@Sampled(kind = Sampled.Sampler.Const)
public static void onMethodEntryEmptySampled(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {}
@OnMethod(
clazz = "org.openjdk.btrace.BTraceBench",
method = "testInstrDuration",
location = @Location(Kind.RETURN))
public static void onMethodRetDuration(
@ProbeClassName String pcn, @ProbeMethodName String pmn, @Duration long dur) {}
@OnMethod(
clazz = "org.openjdk.btrace.BTraceBench",
method = "testInstrDurationSampled",
location = @Location(Kind.RETURN))
@Sampled(kind = Sampled.Sampler.Const)
public static void onMethodRetDurationSampled(
@ProbeClassName String pcn, @ProbeMethodName String pmn, @Duration long dur) {}
@OnMethod(
clazz = "org.openjdk.btrace.BTraceBench",
method = "testInstrDurationSampledAdaptive",
location = @Location(Kind.RETURN))
@Sampled
public static void onMethodRetDurationSampledAdaptive(
@ProbeClassName String pcn, @ProbeMethodName String pmn, @Duration long dur) {}
@OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInstrumentedMethodPrintln1")
public static void onMethodEntryPrintln1(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {
println(pcn);
}
@OnMethod(
clazz = "org.openjdk.btrace.BTraceBench",
method = "testInstrumentedMethodPrintln1Sampled")
@Sampled
public static void onMethodEntryPrintln1Sampled(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {
println(pcn);
}
@OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInstrumentedMethodPrintln2")
public static void onMethodEntryPrintln2(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {
println(pcn);
println(pmn);
}
@OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInstrumentedMethodPrintln3")
public static void onMethodEntryPrintln3(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {
println(pcn);
println(pmn);
println(pmn);
}
@OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInstrumentedMethodPrintln24")
public static void onMethodEntryPrintln24(
@ProbeClassName String pcn, @ProbeMethodName String pmn) {
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
println(pcn);
println(pmn);
println(pmn);
}
}
================================================
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/ClassFilterBenchmark.java
================================================
/*
* Copyright (c) 2018, Jaroslav Bachorik <j.bachorik@btrace.io>.
* All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Copyright owner designates
* this particular file as subject to the "Classpath" exception as provided
* by the owner in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package org.openjdk.btrace.bench;
import java.util.ArrayList;
import java.util.Collections;
import java.util.concurrent.TimeUnit;
import org.openjdk.btrace.instr.ClassFilter;
import org.openjdk.btrace.instr.OnMethod;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Fork(1)
@BenchmarkMode(Mode.AverageTime)
public class ClassFilterBenchmark {
private static final String CLASS_A_PKG = "org.openjdk.btrace.benchmark";
private static final String CLASS_A_NAME = "ClassA";
private static final String CLASS_A = CLASS_A_PKG + "." + CLASS_A_NAME;
private ClassFilter cfSimple;
private ClassFilter cfRegexName;
private ClassFilter cfSubtype;
@Setup
public void setup() {
OnMethod simpleClassFilter = new OnMethod();
simpleClassFilter.setClazz(CLASS_A);
OnMethod regexNameFilter = new OnMethod();
regexNameFilter.setClazz("/.*\\." + CLASS_A_NAME + "/");
OnMethod subtypeFilter = new OnMethod();
subtypeFilter.setClazz("+java.util.List");
cfSimple = new ClassFilter(Collections.singleton(simpleClassFilter));
cfRegexName = new ClassFilter(Collections.singleton(regexNameFilter));
cfSubtype = new ClassFilter(Collections.singleton(subtypeFilter));
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1200, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testSimpleClassNameMatch(Blackhole bh) {
bh.consume(cfSimple.isNameMatching(CLASS_A));
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1200, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testRegexNameMatch(Blackhole bh) {
bh.consume(cfRegexName.isNameMatching(CLASS_A));
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1200, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testSubtypeMatch(Blackhole bh) {
bh.consume(cfSubtype.isCandidate(ArrayList.class));
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1200, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testSubtypeNoMatch(Blackhole bh) {
bh.consume(cfSubtype.isCandidate(String.class));
}
public static void main(String[] args) throws Exception {
Options opt =
new OptionsBuilder()
.addProfiler("stack")
.include(".*" + ClassFilterBenchmark.class.getSimpleName() + ".*test.*")
.build();
new Runner(opt).run();
}
}
================================================
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/DispatchBenchmark.java
================================================
/*
* Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.btrace.bench;
import java.lang.invoke.CallSite;
import java.lang.invoke.ConstantCallSite;
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
import java.lang.invoke.MutableCallSite;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.infra.Blackhole;
/**
* JMH benchmark measuring INVOKEDYNAMIC dispatch overhead as simulated by
* {@link ConstantCallSite} — the mechanism used by {@code IndyDispatcher}.
*
* <p>Compares a plain static method call ({@link #baseline}) against dispatch
* through a {@link ConstantCallSite} ({@link #instrumented}).
*/
@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.NANOSECONDS)
@Fork(1)
@BenchmarkMode(Mode.AverageTime)
public class DispatchBenchmark {
private MethodHandle constantTarget;
private MethodHandle mutableTarget;
@Setup(Level.Trial)
public void setup() throws Exception {
// Build a ConstantCallSite targeting the static handler method, simulating what
// IndyDispatcher.bootstrap() produces.
MethodHandle mh =
MethodHandles.lookup()
.findStatic(
DispatchBenchmark.class,
"probeHandler",
MethodType.methodType(void.class, int.class));
CallSite cs = new ConstantCallSite(mh);
constantTarget = cs.dynamicInvoker();
MutableCallSite mcs = new MutableCallSite(mh.type());
mcs.setTarget(mh);
mutableTarget = mcs.dynamicInvoker();
}
/** Direct static call — baseline with zero dispatch overhead. */
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS)
@Benchmark
public void baseline(Blackhole bh) {
probeHandler(42);
}
/** Dispatch through a ConstantCallSite — simulates IndyDispatcher-resolved call site. */
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS)
@Benchmark
public void instrumented(Blackhole bh) throws Throwable {
constantTarget.invokeExact(42);
}
/**
* Dispatch through a MutableCallSite whose target is stable (set once, never re-linked).
* Simulates the IndyDispatcher-post-detach-safety variant. HotSpot should treat the target
* as @Stable and inline through it comparably to ConstantCallSite.
*/
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS)
@Benchmark
public void instrumentedMutable(Blackhole bh) throws Throwable {
mutableTarget.invokeExact(42);
}
/** Simulated probe handler method. */
public static void probeHandler(int value) {
// intentionally empty — we measure dispatch cost, not handler body cost
}
}
================================================
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/OnMethodTemplateBenchmark.java
================================================
/*
* Copyright (c) 2018, Jaroslav Bachorik <j.bachorik@btrace.io>.
* All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Copyright owner designates
* this particular file as subject to the "Classpath" exception as provided
* by the owner in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
package org.openjdk.btrace.bench;
import java.util.concurrent.TimeUnit;
import org.openjdk.btrace.core.ArgsMap;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Fork(1)
@BenchmarkMode(Mode.AverageTime)
public class OnMethodTemplateBenchmark {
private ArgsMap argsMap;
@Setup
public void setup() {
argsMap = new ArgsMap(new String[] {"arg1=val1"});
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1200, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testEmptyTemplate(Blackhole bh) {
bh.consume(argsMap.template(""));
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1200, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testMatchTemplate(Blackhole bh) {
bh.consume(argsMap.template("this-is-${arg1}"));
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1200, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testNoMatchTemplate(Blackhole bh) {
bh.consume(argsMap.template("this-is-${arg2}"));
}
public static void main(String[] args) throws Exception {
Options opt =
new OptionsBuilder()
.addProfiler("stack")
.include(".*" + OnMethodTemplateBenchmark.class.getSimpleName() + ".*test.*")
.build();
new Runner(opt).run();
}
}
================================================
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/ProbeLoadingBenchmark.java
================================================
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.btrace.bench;
import java.io.*;
import java.util.concurrent.TimeUnit;
import org.openjdk.btrace.core.SharedSettings;
import org.openjdk.btrace.instr.BTraceProbe;
import org.openjdk.btrace.instr.BTraceProbeFactory;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@Fork(1)
@BenchmarkMode(Mode.AverageTime)
public class ProbeLoadingBenchmark {
private InputStream classStream;
private BTraceProbeFactory bpf;
@Setup(Level.Trial)
public void setup() throws Exception {
bpf = new BTraceProbeFactory(SharedSettings.GLOBAL);
}
@Setup(Level.Invocation)
public void setupRun() throws Exception {
classStream = ProbeLoadingBenchmark.class.getResourceAsStream("/TraceScript.btclass");
}
@TearDown(Level.Invocation)
public void tearDownRun() throws Exception {
classStream.close();
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 2, timeUnit = TimeUnit.SECONDS)
@Benchmark
public void testBTraceProbeNew(Blackhole bh) throws Exception {
BTraceProbe bp = bpf.createProbe(classStream);
if (bp == null) {
throw new NullPointerException();
}
bh.consume(bp);
}
public static void main(String[] args) throws Exception {
Options opt =
new OptionsBuilder()
.addProfiler("stack")
.include(".*" + ProbeLoadingBenchmark.class.getSimpleName() + ".*test.*")
.build();
new Runner(opt).run();
}
}
================================================
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/ProfilerBenchmark.java
================================================
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.btrace.bench;
import java.util.concurrent.TimeUnit;
import org.openjdk.btrace.runtime.profiling.MethodInvocationProfiler;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
import org.openjdk.jmh.runner.options.VerboseMode;
/**
* Basic benchmark for the performance of {@linkplain MethodInvocationProfiler}
*
* @author Jaroslav Bachorik
*/
@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Fork(1)
@BenchmarkMode(Mode.AverageTime)
public class ProfilerBenchmark {
private MethodInvocationProfiler mip1;
private MethodInvocationProfiler mip2;
@Setup
public void setup() {
mip1 = new MethodInvocationProfiler(1);
mip2 = new MethodInvocationProfiler(500);
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
@Threads(1)
public void testOneMethodSingleThread() {
mip1.recordEntry("a");
mip1.recordExit("a", 1);
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
@Threads(1)
public void testTwoMethods01Thread() {
mip2.recordEntry("a");
mip2.recordEntry("b");
mip2.recordExit("b", 10);
mip2.recordExit("a", 1);
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
@Threads(2)
public void testTwoMethods02Threads() {
mip2.recordEntry("a");
mip2.recordEntry("b");
mip2.recordExit("b", 10);
mip2.recordExit("a", 1);
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
@Threads(4)
public void testTwoMethods04Threads() {
mip2.recordEntry("a");
mip2.recordEntry("b");
mip2.recordExit("b", 10);
mip2.recordExit("a", 1);
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
@Threads(8)
public void testTwoMethods08Threads() {
mip2.recordEntry("a");
mip2.recordEntry("b");
mip2.recordExit("b", 10);
mip2.recordExit("a", 1);
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
@Threads(16)
public void testTwoMethods16Threads() {
mip2.recordEntry("a");
mip2.recordEntry("b");
mip2.recordExit("b", 10);
mip2.recordExit("a", 1);
}
public static void main(String[] args) throws Exception {
Options opt =
new OptionsBuilder()
.addProfiler("stack")
.verbosity(VerboseMode.NORMAL)
.include(".*" + ProfilerBenchmark.class.getSimpleName() + ".*test.*")
.build();
new Runner(opt).run();
}
}
================================================
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/StatsdBenchmark.java
================================================
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.btrace.bench;
import java.util.concurrent.TimeUnit;
import org.openjdk.btrace.statsd.Statsd;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
/**
* Basic benchmark for the performance of {@linkplain Statsd}
*
* @author Jaroslav Bachorik
*/
@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Fork(1)
@BenchmarkMode(Mode.AverageTime)
public class StatsdBenchmark {
private Statsd c;
@Setup
public void setup() {
// Inline no-op impl — the benchmark measures dispatch through the extension API,
// not the network-layer Statsd implementation.
c = new Statsd() {
@Override public void increment(String name) {}
@Override public void increment(String name, String tags) {}
};
}
@Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
@Threads(1)
public void testIncrement_1() {
c.increment("g1");
}
public static void main(String[] args) throws Exception {
Options opt =
new OptionsBuilder()
.addProfiler("stack")
.include(".*" + StatsdBenchmark.class.getSimpleName() + ".*test.*")
.build();
new Runner(opt).run();
}
}
================================================
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/StringOpBenchmark.java
================================================
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.btrace.bench;
import java.util.concurrent.TimeUnit;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.BenchmarkMode;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Mode;
import org.openjdk.jmh.annotations.OutputTimeUnit;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Warmup;
import org.openjdk.jmh.runner.Runner;
import org.openjdk.jmh.runner.options.Options;
import org.openjdk.jmh.runner.options.OptionsBuilder;
@State(Scope.Thread)
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@Fork(1)
@BenchmarkMode(Mode.AverageTime)
public class StringOpBenchmark {
private static final String STRING_PART = "h";
StringBuilder sb;
String st;
String res;
@Setup
public void setup() {
st = "";
}
@Setup(Level.Invocation)
public void setupEach() {
sb = new StringBuilder();
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1200, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testStringBuilder() {
sb.append(STRING_PART).append(STRING_PART);
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1200, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testStringPlus() {
res = st + STRING_PART + STRING_PART;
}
@Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
@Measurement(iterations = 5, time = 1200, timeUnit = TimeUnit.MILLISECONDS)
@Benchmark
public void testStrCat() {
res = st.concat(STRING_PART).concat(STRING_PART);
}
public static void main(String[] args) throws Exception {
Options opt =
new OptionsBuilder()
.addProfiler("gc")
.include(".*" + StringOpBenchmark.class.getSimpleName() + ".*test.*")
.build();
new Runner(opt).run();
}
}
================================================
FILE: btrace-agent/build.gradle
================================================
compileJava {
// Keep Java 8 compatibility while accessing JDK internal APIs
options.fork = true
options.forkOptions.jvmArgs += [
'--add-exports', 'jdk.internal.jvmstat/sun.jvmstat.monitor=ALL-UNNAMED'
]
}
javadoc {
// Javadoc also needs access to internal APIs - but Java 8 javadoc doesn't support --add-exports
// So we exclude the file that uses internal APIs from javadoc generation
exclude '**/PerfReaderImpl.java'
}
dependencies {
implementation libs.slf4j
implementation libs.asm
def toolsJar = getToolsJar();
if (toolsJar.getAsFile().exists()) {
runtimeOnly files("${toolsJar}")
}
implementation project(':btrace-core')
implementation project(':btrace-runtime')
implementation project(':btrace-instr')
implementation project(':btrace-extension')
}
// Exclude sources that rely on JDK-internal modules from Javadoc to avoid missing-package errors
tasks.named('javadoc').configure {
exclude 'org/openjdk/btrace/agent/PerfReaderImpl.java'
}
================================================
FILE: btrace-agent/src/main/java/org/openjdk/btrace/agent/Client.java
================================================
/*
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.btrace.agent;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassWriter;
import org.openjdk.btrace.core.ArgsMap;
import org.openjdk.btrace.core.BTraceRuntimeBridge;
import org.openjdk.btrace.core.BTraceRuntime;
import org.openjdk.btrace.core.SharedSettings;
import org.openjdk.btrace.core.comm.Command;
import org.openjdk.btrace.core.comm.CommandListener;
import org.openjdk.btrace.core.comm.ErrorCommand;
import org.openjdk.btrace.core.comm.ExitCommand;
import org.openjdk.btrace.core.comm.InstrumentCommand;
import org.openjdk.btrace.core.comm.MessageCommand;
import org.openjdk.btrace.core.comm.RenameCommand;
import org.openjdk.btrace.core.comm.RetransformationStartNotification;
import org.openjdk.btrace.core.comm.StatusCommand;
import org.openjdk.btrace.core.extensions.Permission;
import org.openjdk.btrace.core.extensions.PermissionSet;
import org.openjdk.btrace.extension.ExtensionDescriptorDTO;
import org.openjdk.btrace.extension.ExtensionLoader;
import org.openjdk.btrace.extension.ExtensionRegistry;
import org.openjdk.btrace.instr.BTraceProbe;
import org.openjdk.btrace.instr.BTraceProbeFactory;
import org.openjdk.btrace.instr.BTraceProbePersisted;
import org.openjdk.btrace.instr.BTraceTransformer;
import org.openjdk.btrace.instr.ClassCache;
import org.openjdk.btrace.instr.ClassFilter;
import org.openjdk.btrace.instr.ClassInfo;
import org.openjdk.btrace.instr.InstrumentUtils;
import org.openjdk.btrace.instr.Instrumentor;
import org.openjdk.btrace.instr.MethodTrackingContext;
import org.openjdk.btrace.runtime.BTraceRuntimeAccess;
import org.openjdk.btrace.runtime.BTraceRuntimes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
import java.lang.annotation.Annotation;
import java.lang.instrument.Instrumentation;
import java.lang.instrument.UnmodifiableClassException;
import java.lang.management.ManagementFactory;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
/**
* Abstract class that represents a BTrace client at the BTrace agent.
*
* @author A. Sundararajan
* @author J. Bachorik (j.bachorik@btrace.io)
*/
abstract class Client implements CommandListener {
private static final Logger log = LoggerFactory.getLogger(Client.class);
private static final Map<UUID, Client> CLIENTS = new ConcurrentHashMap<>();
private static final Map<String, PrintWriter> WRITER_MAP = new HashMap<>();
private static final Pattern SYSPROP_PTN = Pattern.compile("\\$\\{(.+?)}");
static {
ClassFilter.class.getClassLoader();
InstrumentUtils.class.getClassLoader();
Instrumentor.class.getClassLoader();
ClassReader.class.getClassLoader();
ClassWriter.class.getClassLoader();
Annotation.class.getClassLoader();
MethodTrackingContext.class.getClassLoader();
ClassCache.class.getClassLoader();
ClassInfo.class.getClassLoader();
}
private final Instrumentation inst;
final SharedSettings settings;
final ArgsMap argsMap;
private final BTraceTransformer transformer;
volatile PrintWriter out;
private volatile BTraceRuntime.Impl runtime;
private volatile String outputName;
private BTraceProbe probe;
private Timer flusher;
private volatile boolean initialized = false;
private volatile boolean shuttingDown = false;
final UUID id = UUID.randomUUID();
Client(ClientContext ctx) {
this(ctx.getInstr(), ctx.getArguments(), ctx.getSettings(), ctx.getTransformer());
}
private Client(Instrumentation inst, ArgsMap argsMap, SharedSettings s, BTraceTransformer t) {
this.inst = inst;
this.argsMap = argsMap;
settings = s != null ? s : SharedSettings.GLOBAL;
transformer = t;
setupWriter();
CLIENTS.put(id, this);
}
private static String pid() {
String pName = ManagementFactory.getRuntimeMXBean().getName();
if (pName != null && pName.length() > 0) {
String[] parts = pName.split("@");
if (parts.length == 2) {
return parts[0];
}
}
return "-1";
}
protected final void initialize() {
initialized = true;
}
@SuppressWarnings("DefaultCharset")
private final void setupWriter() {
String outputFile = settings.getOutputFile();
if (outputFile == null || outputFile.equals("::null") || outputFile.equals("/dev/null")) return;
if (!outputFile.equals("::stdout")) {
String outputDir = settings.getScriptDir();
String output = (outputDir != null ? outputDir + File.separator : "") + outputFile;
outputFile = templateOutputFileName(output);
log.info("Redirecting output to {}", outputFile);
}
out = WRITER_MAP.get(outputFile);
if (out == null) {
if (outputFile.equals("::stdout")) {
out = new PrintWriter(System.out);
} else {
if (settings.getFileRollMilliseconds() > 0) {
out =
new PrintWriter(
new BufferedWriter(
TraceOutputWriter.rollingFileWriter(new File(outputFile), settings)));
} else {
out =
new PrintWriter(
new BufferedWriter(TraceOutputWriter.fileWriter(new File(outputFile))));
}
}
WRITER_MAP.put(outputFile, out);
out.append("### BTrace Log: ")
.append(DateFormat.getInstance().format(new Date()))
.append("\n\n");
startFlusher();
}
outputName = outputFile;
}
private void startFlusher() {
int flushInterval;
String flushIntervalStr = System.getProperty("org.openjdk.btrace.FileClient.flush");
if (flushIntervalStr == null) {
flushIntervalStr = System.getProperty("com.sun.btrace.FileClient.flush", "5");
}
try {
flushInterval = Integer.parseInt(flushIntervalStr);
} catch (NumberFormatException e) {
flushInterval = 5; // default
}
int flushSec = flushInterval;
if (flushSec > -1) {
flusher = new Timer("BTrace FileClient Flusher", true);
flusher.scheduleAtFixedRate(
new TimerTask() {
@Override
public void run() {
try {
if (out != null) {
boolean entered = BTraceRuntime.enter();
try {
out.flush();
} finally {
if (entered) {
BTraceRuntime.leave();
}
}
}
} catch (Throwable t) {
log.error("Error during periodic flush", t);
}
}
},
flushSec,
flushSec);
} else {
flusher = null;
}
}
private String templateOutputFileName(String fName) {
if (fName != null) {
boolean dflt = fName.contains("[default]");
String agentName = System.getProperty("btrace.agent", "default");
String clientName = settings.getClientName();
fName =
fName
.replace("${client}", clientName != null ? clientName : "")
.replace("${ts}", String.valueOf(System.currentTimeMillis()))
.replace("${pid}", pid())
.replace("${agent}", agentName != null ? "." + agentName : "")
.replace("[default]", "");
fName = replaceSysProps(fName);
if (dflt && log.isDebugEnabled()) {
log.debug("scriptOutputFile not specified. defaulting to {}", fName);
}
}
return fName;
}
private String replaceSysProps(String str) {
int replaced = 0;
do {
StringBuffer sb = new StringBuffer();
replaced = replaceSysProps(str, sb);
str = sb.toString();
} while (replaced > 0);
return str;
}
private int replaceSysProps(String str, StringBuffer sb) {
int cnt = 0;
Matcher m = SYSPROP_PTN.matcher(str);
while (m.find()) {
String key = m.group(1);
String val = System.getProperty(key);
if (val != null) {
cnt++;
m.appendReplacement(sb, val);
} else {
m.appendReplacement(sb, m.group(0));
}
}
m.appendTail(sb);
return cnt;
}
static Collection<String> listProbes() {
List<String> probes = new ArrayList<>(CLIENTS.size());
for (Client client : CLIENTS.values()) {
if (client instanceof RemoteClient) {
if (((RemoteClient) client).isDisconnected()) {
probes.add(client.id + " [" + client.getClassName() + "]");
}
}
}
return probes;
}
synchronized void onExit(int exitCode) {
if (!shuttingDown) {
shuttingDown = true;
if (out != null) {
out.flush();
}
BTraceRuntime.leave();
try {
log.debug("onExit:");
log.debug("cleaning up transformers");
cleanupTransformers();
log.debug("removing instrumentation");
retransformLoaded();
log.debug("closing all I/O");
// Send EXIT command to notify remote client before closing
sendCommand(new ExitCommand(exitCode));
Thread.sleep(300);
try {
closeAll();
} catch (IOException e) {
// ignore IOException when closing
}
log.debug("done");
} catch (Throwable th) {
// ExitException is expected here
if (!th.getClass().getName().equals("ExitException")) {
log.debug("Failed to gracefully exit BTrace probe", th);
BTraceRuntime.handleException(th);
}
} finally {
runtime.shutdownCmdLine();
CLIENTS.remove(id);
}
}
}
final synchronized Class<?> loadClass(InstrumentCommand instr) throws IOException {
ArgsMap args = instr.getArguments();
byte[] btraceCode = instr.getCode();
try {
probe = load(btraceCode, ArgsMap.merge(argsMap, args));
if (probe == null) {
log.debug("Failed to load BTrace probe code");
return null;
}
if (!settings.isTrusted()) {
probe.checkVerified();
}
// Check probe's required permissions against effective permissions
Set<Permission> required = probe.getRequiredPermissions();
if (!required.isEmpty()) {
PermissionSet effective = settings.getEffectivePermissions();
Set<Permission> missing =
required.stream().filter(p -> !effective.has(p)).collect(Collectors.toSet());
if (!missing.isEmpty()) {
throw new SecurityException(formatPermissionError(missing));
}
}
// Validate that all injected service types are declared by available extensions
validateDeclaredServices(probe);
} catch (Throwable th) {
log.debug("Failed to load BTrace probe code", th);
errorExit(th);
return null;
}
if (log.isDebugEnabled()) {
log.debug("creating BTraceRuntime instance for {}", probe.getClassName());
}
runtime = BTraceRuntimes.getRuntime(probe.getClassName(), args, this, inst);
Runtime.getRuntime()
.addShutdownHook(
new Thread(
() -> {
if (runtime != null) {
runtime.handleExit(0);
}
}));
if (probe.isClassRenamed()) {
if (log.isDebugEnabled()) {
log.debug("class renamed to {}", probe.getClassName());
}
sendCommand(new RenameCommand(probe.getClassName()));
}
if (log.isDebugEnabled()) {
log.debug("created BTraceRuntime instance for {}", probe.getClassName());
log.debug("sending Okay command");
}
sendCommand(new StatusCommand());
// Warn about failed extensions
Map<String, String> failed = ExtensionRegistry.getFailedExtensions();
if (!failed.isEmpty()) {
StringBuilder warning = new StringBuilder();
warning.append("[BTRACE WARN] ").append(failed.size())
.append(" extension(s) failed to load:\n");
for (Map.Entry<String, String> entry : failed.entrySet()) {
String simpleName = entry.getKey().substring(entry.getKey().lastIndexOf('.') + 1);
warning.append(" - ").append(simpleName)
.append(": ").append(entry.getValue()).append("\n");
}
warning.append("Use 'btrace -le <PID>' for details.\n");
sendCommand(new MessageCommand(warning.toString()));
}
// Expose extension-declared permissions for integration visibility
// Print extension permissions only when explicitly requested (debug or system property)
if (settings.isDebug() || Boolean.getBoolean("btrace.list.extension.permissions")) {
try {
ExtensionLoader loader = Main.getExtensionLoader();
if (loader != null) {
StringBuilder info = new StringBuilder();
info.append("[BTRACE INFO] Extensions and declared permissions:\n");
for (ExtensionDescriptorDTO ext : loader.getAvailableExtensions()) {
PermissionSet perms = ext.getRequiredPermissions();
String pStr = perms != null && !perms.isEmpty() ? perms.toString() : "[]";
info.append(" - ").append(ext.getId()).append(": ").append(pStr).append("\n");
}
sendCommand(new MessageCommand(info.toString()));
}
} catch (Throwable t) {
// ignore, informational only
}
}
boolean entered = false;
try {
entered = BTraceRuntimeAccess.enter((BTraceRuntimeBridge) runtime);
return probe.register(runtime, transformer);
} catch (Throwable th) {
log.debug("Failed to load BTrace probe", th);
errorExit(th);
return null;
} finally {
if (entered) {
BTraceRuntime.leave();
}
}
}
/**
* Validates that all {@code @Injected} service field types used by the given probe are
* declared by some available extension. This runs in the agent's runtime where the actual
* classloader and JPMS module layer apply.
*
* Why reflection here (vs. pure ASM):
* - Classloader identity: Ensures types are checked against the agent's classes loaded by the
* correct loader. Name-only checks in ASM cannot detect split-brain issues (same FQN, different
* loader/JAR) that would later cause ClassCastException.
* - JPMS access rules: Surfaces missing exports/opens and other module access constraints that
* cannot be proven by static bytecode analysis.
* - Linkage/loadability: Fails fast if a referenced type is not actually resolvable on the
* agent's runtime path (NoClassDefFoundError/missing transitive dependencies).
* - Assignability truth: Verifies that the service type corresponds to something an extension
* actually declares in its manifest, avoiding false positives from shaded or version-skewed
* classes.
*
* Implementation notes:
* - We use reflection only to access the probe's internal service field map (to avoid a direct
* compile-time dependency on the probe's delegate type) and to keep the agent/probe boundary
* clean. We do not instantiate user classes or trigger class initializers.
* - This check complements compile-time and bytecode-time validation (ASM-based) which enforce
* structural rules without loading classes. Reflection here provides the necessary runtime
* assurance in the actual environment where the agent will operate.
*/
private void validateDeclaredServices(BTraceProbe probe) throws IOException {
if (!(probe instanceof BTraceProbePersisted)) {
return;
}
ExtensionLoader loader = Main.getExtensionLoader();
if (loader == null) {
return;
}
// Reflectively access serviceFields() from the delegate to get injected service types
try {
java.lang.reflect.Field delF = BTraceProbePersisted.class.getDeclaredField("delegate");
delF.setAccessible(true);
Object delegate = delF.get(probe);
java.lang.reflect.Method svcM = delegate.getClass().getDeclaredMethod("serviceFields");
svcM.setAccessible(true);
@SuppressWarnings("unchecked")
Map<String, String> svcMap = (Map<String, String>) svcM.invoke(delegate);
if (svcMap != null) {
for (String internalName : svcMap.values()) {
String fqcn = internalName.replace('/', '.');
if (loader.findExtensionForService(fqcn) == null) {
throw new IOException(
"Injected service type not declared by any extension: " + fqcn);
}
}
}
} catch (ReflectiveOperationException e) {
log.debug("Unable to inspect injected services for validation", e);
}
}
protected void closeAll() throws IOException {
if (flusher != null) {
flusher.cancel();
}
if (out != null) {
out.close();
}
WRITER_MAP.remove(outputName);
}
private void errorExit(Throwable th) throws IOException {
log.debug("sending error command");
sendCommand(new ErrorCommand(th));
log.debug("sending exit command");
sendCommand(new ExitCommand(1));
closeAll();
}
private void cleanupTransformers() {
if (probe != null) {
String probeName = probe.getClassName();
probe.unregister();
// Drop the registry's strong reference to the BTraceRuntime.Impl created in
// initialize() via BTraceRuntimes.getRuntime(probe.getClassName(), ...). Without
// this, the registry keeps the Impl (and, transitively, the probe Class<?> and
// its per-probe ClassLoader) reachable forever, defeating probe class unloading.
// Must use the same key that was used to register — here, the dotted class name.
BTraceRuntimes.removeRuntime(probeName);
}
}
// package privates below this point
final boolean isInitialized() {
return initialized;
}
final BTraceRuntime.Impl getRuntime() {
return runtime;
}
final String getClassName() {
return probe != null ? probe.getClassName() : "<unknown>";
}
private final boolean isCandidate(Class<?> c) {
String cname = c.getName().replace('.', '/');
if (c.isInterface() || c.isPrimitive() || c.isArray()) {
return false;
}
if (ClassFilter.isSensitiveClass(cname)) {
return false;
} else {
return probe.willInstrument(c);
}
}
private final void startRetransformClasses(int numClasses) {
sendCommand(new RetransformationStartNotification(numClasses));
if (log.isDebugEnabled()) {
log.debug("calling retransformClasses ({} classes to be retransformed)", numClasses);
}
}
final void endRetransformClasses() {
sendCommand(new StatusCommand());
log.debug("finished retransformClasses");
}
// Internals only below this point
private BTraceProbe load(byte[] buf, ArgsMap args) {
BTraceProbeFactory f = new BTraceProbeFactory(settings);
log.debug("loading BTrace class");
BTraceProbe cn = f.createProbe(buf, args);
if (cn != null) {
if (cn.isVerified()) {
if (log.isDebugEnabled()) {
log.debug("loaded '{}' successfully", cn.getClassName());
}
} else {
if (log.isDebugEnabled()) {
log.debug("{} failed verification", cn.getClassName());
}
return null;
}
}
return BTraceProbePersisted.from(cn);
}
boolean retransformLoaded() throws UnmodifiableClassException {
if (runtime == null) {
return false;
}
if (probe.isTransforming() && settings.isRetransformStartup()) {
ArrayList<Class<?>> list = new ArrayList<>();
log.debug("retransforming loaded classes");
log.debug("filtering loaded classes");
ClassCache cc = ClassCache.getInstance();
for (Class<?> c : inst.getAllLoadedClasses()) {
if (c != null) {
if (inst.isModifiableClass(c) && isCandidate(c)) {
if (log.isDebugEnabled()) {
log.debug("candidate {} added", c);
}
list.add(c);
}
}
}
list.trimToSize();
int size = list.size();
if (size > 0) {
Class<?>[] classes = new Class[size];
list.toArray(classes);
startRetransformClasses(size);
if (log.isDebugEnabled()) {
for (Class<?> c : classes) {
try {
log.debug("Attempting to retransform class: {}", c.getName());
inst.retransformClasses(c);
} catch (ClassFormatError | VerifyError e) {
// Avoid printing full stack traces in debug to keep target stderr clean
log.debug("Class '{}' verification failed: {}", c.getName(), e.toString());
sendCommand(
new MessageCommand(
"[BTRACE WARN] Class verification failed: "
+ c.getName()
+ " ("
+ e.getMessage()
+ ")"));
}
}
} else {
try {
inst.retransformClasses(classes);
} catch (ClassFormatError | VerifyError e) {
/*
* If the en-block retransformation fails because of verification retry classes one-by-one.
* Otherwise all classes are rolled back to the original state and no instrumentation
* is applied.
*/
for (Class<?> c : classes) {
try {
inst.retransformClasses(c);
} catch (ClassFormatError | VerifyError e1) {
// Avoid printing full stack traces in debug to keep target stderr clean
log.debug("Class '{}' verification failed: {}", c.getName(), e1.toString());
sendCommand(
new MessageCommand(
"[BTRACE WARN] Class verification failed: "
+ c.getName()
+ " ("
+ e1.getMessage()
+ ")"));
}
}
}
}
}
}
return true;
}
protected void sendCommand(Command command) {
if (runtime == null) {
log.warn("Cannot send command {}, runtime not initialized", command.getClass().getSimpleName());
return;
}
runtime.sendCommand(command);
}
static Client findClient(String uuid) {
try {
UUID id = UUID.fromString(uuid);
return CLIENTS.get(id);
} catch (IllegalArgumentException e) {
return null;
}
}
@Override
public String toString() {
return "BTrace Client: " + id + "[" + probe.getClassName() + "]";
}
private static String formatPermissionError(Set<Permission> missing) {
StringBuilder sb = new StringBuilder();
sb.append("Probe requires permissions that are not granted:\n\n");
for (Permission p : missing) {
sb.append(" - ").append(p.name()).append("\n");
sb.append(" ").append(p.getRiskDescription()).append("\n");
}
sb.append("\nTo allow these permissions, use:\n");
sb.append(" --grant=")
.append(missing.stream().map(Permission::name).collect(Collectors.joining(",")))
.append("\n");
sb.append("\nOr use --grantAll=true to allow all permissions (not recommended).\n");
return sb.toString();
}
}
================================================
FILE: btrace-agent/src/main/java/org/openjdk/btrace/agent/ClientContext.java
================================================
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.btrace.agent;
import java.lang.instrument.Instrumentation;
import org.openjdk.btrace.core.ArgsMap;
import org.openjdk.btrace.core.SharedSettings;
import org.openjdk.btrace.instr.BTraceTransformer;
/**
* Client-context data class
*
* @author Jaroslav Bachorik
*/
class ClientContext {
private final Instrumentation instr;
private final BTraceTransformer transformer;
private final ArgsMap args;
private final SharedSettings settings;
ClientContext(
Instrumentation instr, BTraceTransformer transformer, ArgsMap args, SharedSettings settings) {
this.instr = instr;
this.transformer = transformer;
this.args = args;
this.settings = settings;
}
Instrumentation getInstr() {
return instr;
}
BTraceTransformer getTransformer() {
return transformer;
}
SharedSettings getSettings() {
return settings;
}
ArgsMap getArguments() {
return args;
}
}
================================================
FILE: btrace-agent/src/main/java/org/openjdk/btrace/agent/FileClient.java
================================================
/*
* Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the Classpath exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package org.openjdk.btrace.agent;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.net.URLDecoder;
import java.security.CodeSigner;
import java.util.
gitextract_vcnq_xtn/ ├── .github/ │ ├── FUNDING.yml │ ├── copilot-instructions.md │ └── workflows/ │ ├── README.md │ ├── codeql-analysis.yml │ ├── continuous.yml │ ├── release.yml │ ├── stale.yml │ ├── update-jdk-versions.yml │ └── v2-protocol-tests.yml ├── .gitignore ├── .muse/ │ └── advisor.md ├── AGENTS.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── benchmarks/ │ ├── agent-benchmark/ │ │ ├── build.gradle │ │ └── src/ │ │ └── jmh/ │ │ ├── btrace/ │ │ │ └── TraceScript.java │ │ └── java/ │ │ └── benchmark/ │ │ └── BTraceBench.java │ └── runtime-benchmarks/ │ ├── build.gradle │ └── src/ │ └── jmh/ │ ├── btrace/ │ │ └── TraceScript.java │ └── java/ │ └── org/ │ └── openjdk/ │ └── btrace/ │ └── bench/ │ ├── ClassFilterBenchmark.java │ ├── DispatchBenchmark.java │ ├── OnMethodTemplateBenchmark.java │ ├── ProbeLoadingBenchmark.java │ ├── ProfilerBenchmark.java │ ├── StatsdBenchmark.java │ └── StringOpBenchmark.java ├── btrace-agent/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── agent/ │ │ │ ├── Client.java │ │ │ ├── ClientContext.java │ │ │ ├── FileClient.java │ │ │ ├── Main.java │ │ │ ├── PerfReaderImpl.java │ │ │ ├── RemoteClient.java │ │ │ └── TraceOutputWriter.java │ │ └── resources/ │ │ └── META-INF/ │ │ └── MANIFEST.MF │ └── test/ │ └── java/ │ └── org/ │ └── openjdk/ │ └── btrace/ │ └── agent/ │ └── MainTest.java ├── btrace-api/ │ └── build.gradle ├── btrace-boot/ │ ├── build.gradle │ └── src/ │ └── main/ │ └── java/ │ └── org/ │ └── openjdk/ │ └── btrace/ │ └── boot/ │ ├── Loader.java │ ├── MaskedClassLoader.java │ └── MaskedJarUtils.java ├── btrace-bootstrap/ │ └── build.gradle ├── btrace-client/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── client/ │ │ ├── Client.java │ │ ├── JpsUtils.java │ │ ├── Main.java │ │ └── ProbePrinter.java │ └── test/ │ └── java/ │ └── org/ │ └── openjdk/ │ └── btrace/ │ └── client/ │ ├── ClientTest.java │ └── MainTest.java ├── btrace-compiler/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── compiler/ │ │ ├── AnnotationSerializer.java │ │ ├── ClassDataJavaFileObject.java │ │ ├── Compiler.java │ │ ├── CompilerClassWriter.java │ │ ├── CompilerHelper.java │ │ ├── ConcatenatingReader.java │ │ ├── MaskedJavaFileManager.java │ │ ├── MemoryJavaFileManager.java │ │ ├── PCPP.java │ │ ├── PackGenerator.java │ │ ├── Postprocessor.java │ │ ├── Printer.java │ │ ├── Verifier.java │ │ ├── VerifierVisitor.java │ │ └── oneliner/ │ │ ├── OnelinerAST.java │ │ ├── OnelinerCodeGenerator.java │ │ ├── OnelinerException.java │ │ ├── OnelinerLexer.java │ │ ├── OnelinerParser.java │ │ └── OnelinerValidator.java │ └── test/ │ ├── java/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── compiler/ │ │ ├── JfrEventsTest.java │ │ ├── TypeErasureTest.java │ │ └── oneliner/ │ │ ├── OnelinerCodeGeneratorTest.java │ │ ├── OnelinerIntegrationTest.java │ │ └── OnelinerParserTest.java │ └── resources/ │ ├── HistoProbe.java │ ├── JfrEventsProbe.java │ └── MetricsExtensionProbe.java ├── btrace-core/ │ ├── JMH_BENCHMARKS.md │ ├── build.gradle │ └── src/ │ ├── jmh/ │ │ └── java/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── core/ │ │ └── comm/ │ │ └── v2/ │ │ └── BinaryProtocolBenchmark.java │ ├── main/ │ │ ├── java/ │ │ │ └── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ ├── core/ │ │ │ │ ├── Args.java │ │ │ │ ├── ArgsMap.java │ │ │ │ ├── BTraceRuntime.java │ │ │ │ ├── BTraceRuntimeBridge.java │ │ │ │ ├── BTraceUtils.java │ │ │ │ ├── CircularBuffer.java │ │ │ │ ├── DebugSupport.java │ │ │ │ ├── Function.java │ │ │ │ ├── HandlerRepository.java │ │ │ │ ├── Messages.java │ │ │ │ ├── MethodID.java │ │ │ │ ├── PrefixMap.java │ │ │ │ ├── Profiler.java │ │ │ │ ├── SharedSettings.java │ │ │ │ ├── VerifierException.java │ │ │ │ ├── annotations/ │ │ │ │ │ ├── BTrace.java │ │ │ │ │ ├── DTrace.java │ │ │ │ │ ├── DTraceRef.java │ │ │ │ │ ├── Duration.java │ │ │ │ │ ├── Event.java │ │ │ │ │ ├── Export.java │ │ │ │ │ ├── Injected.java │ │ │ │ │ ├── InjectionMode.java │ │ │ │ │ ├── Kind.java │ │ │ │ │ ├── Level.java │ │ │ │ │ ├── Location.java │ │ │ │ │ ├── OnError.java │ │ │ │ │ ├── OnEvent.java │ │ │ │ │ ├── OnExit.java │ │ │ │ │ ├── OnLowMemory.java │ │ │ │ │ ├── OnMethod.java │ │ │ │ │ ├── OnProbe.java │ │ │ │ │ ├── OnTimer.java │ │ │ │ │ ├── PeriodicEvent.java │ │ │ │ │ ├── ProbeClassName.java │ │ │ │ │ ├── ProbeMethodName.java │ │ │ │ │ ├── Property.java │ │ │ │ │ ├── Return.java │ │ │ │ │ ├── Sampled.java │ │ │ │ │ ├── Self.java │ │ │ │ │ ├── TLS.java │ │ │ │ │ ├── TargetInstance.java │ │ │ │ │ ├── TargetMethodOrField.java │ │ │ │ │ └── Where.java │ │ │ │ ├── comm/ │ │ │ │ │ ├── BinaryWireProtocol.java │ │ │ │ │ ├── Command.java │ │ │ │ │ ├── CommandListener.java │ │ │ │ │ ├── DataCommand.java │ │ │ │ │ ├── DisconnectCommand.java │ │ │ │ │ ├── ErrorCommand.java │ │ │ │ │ ├── EventCommand.java │ │ │ │ │ ├── ExitCommand.java │ │ │ │ │ ├── GridDataCommand.java │ │ │ │ │ ├── InstrumentCommand.java │ │ │ │ │ ├── JavaSerializationProtocol.java │ │ │ │ │ ├── ListFailedExtensionsCommand.java │ │ │ │ │ ├── ListProbesCommand.java │ │ │ │ │ ├── MessageCommand.java │ │ │ │ │ ├── NumberDataCommand.java │ │ │ │ │ ├── NumberMapDataCommand.java │ │ │ │ │ ├── PrintableCommand.java │ │ │ │ │ ├── ProtocolConfig.java │ │ │ │ │ ├── ProtocolNegotiator.java │ │ │ │ │ ├── ProtocolVersion.java │ │ │ │ │ ├── ReconnectCommand.java │ │ │ │ │ ├── RenameCommand.java │ │ │ │ │ ├── RetransformClassNotification.java │ │ │ │ │ ├── RetransformationStartNotification.java │ │ │ │ │ ├── SetSettingsCommand.java │ │ │ │ │ ├── StatusCommand.java │ │ │ │ │ ├── StringMapDataCommand.java │ │ │ │ │ ├── WireIO.java │ │ │ │ │ ├── WireProtocol.java │ │ │ │ │ └── v2/ │ │ │ │ │ ├── BinaryClient.java │ │ │ │ │ ├── BinaryCommand.java │ │ │ │ │ ├── BinaryDataCommand.java │ │ │ │ │ ├── BinaryDisconnectCommand.java │ │ │ │ │ ├── BinaryErrorCommand.java │ │ │ │ │ ├── BinaryEventCommand.java │ │ │ │ │ ├── BinaryExitCommand.java │ │ │ │ │ ├── BinaryGridDataCommand.java │ │ │ │ │ ├── BinaryInstrumentCommand.java │ │ │ │ │ ├── BinaryListFailedExtensionsCommand.java │ │ │ │ │ ├── BinaryListProbesCommand.java │ │ │ │ │ ├── BinaryMessageCommand.java │ │ │ │ │ ├── BinaryNumberDataCommand.java │ │ │ │ │ ├── BinaryNumberMapDataCommand.java │ │ │ │ │ ├── BinaryProtocol.java │ │ │ │ │ ├── BinaryReconnectCommand.java │ │ │ │ │ ├── BinaryRenameCommand.java │ │ │ │ │ ├── BinaryRetransformClassNotification.java │ │ │ │ │ ├── BinaryRetransformationStartNotification.java │ │ │ │ │ ├── BinarySetSettingsCommand.java │ │ │ │ │ ├── BinaryStatusCommand.java │ │ │ │ │ ├── BinaryStringCommand.java │ │ │ │ │ ├── BinaryStringMapDataCommand.java │ │ │ │ │ ├── BinaryWireIO.java │ │ │ │ │ ├── CommandAdapter.java │ │ │ │ │ ├── CommandDeserializationException.java │ │ │ │ │ ├── MalformedCommandException.java │ │ │ │ │ ├── NumberEncoding.java │ │ │ │ │ ├── ProtocolVersionMismatchException.java │ │ │ │ │ ├── README.md │ │ │ │ │ ├── RemoteException.java │ │ │ │ │ └── ScalarEncoding.java │ │ │ │ ├── extensions/ │ │ │ │ │ ├── Extension.java │ │ │ │ │ ├── ExtensionContext.java │ │ │ │ │ ├── ExtensionDescriptor.java │ │ │ │ │ ├── ExtensionException.java │ │ │ │ │ ├── ExtensionMeta.java │ │ │ │ │ ├── Permission.java │ │ │ │ │ ├── PermissionSet.java │ │ │ │ │ └── ServiceDescriptor.java │ │ │ │ ├── handlers/ │ │ │ │ │ ├── ErrorHandler.java │ │ │ │ │ ├── EventHandler.java │ │ │ │ │ ├── ExitHandler.java │ │ │ │ │ ├── LowMemoryHandler.java │ │ │ │ │ └── TimerHandler.java │ │ │ │ ├── jfr/ │ │ │ │ │ └── JfrEvent.java │ │ │ │ └── types/ │ │ │ │ ├── AnyType.java │ │ │ │ ├── BTraceCollection.java │ │ │ │ ├── BTraceDeque.java │ │ │ │ └── BTraceMap.java │ │ │ └── runtime/ │ │ │ ├── BTraceRuntimeAccess.java │ │ │ └── LinkingFlag.java │ │ └── resources/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── core/ │ │ ├── annotations/ │ │ │ └── jaxb.index │ │ └── messages.properties │ └── test/ │ └── java/ │ └── org/ │ └── openjdk/ │ └── btrace/ │ └── core/ │ ├── CircularBufferTest.java │ ├── MethodIDTest.java │ ├── PrefixMapTest.java │ ├── ReflectiveFieldAccessTest.java │ └── comm/ │ ├── InstrumentCommandTest.java │ ├── JavaSerializationProtocolLeakTest.java │ ├── ListProbesCommandConcurrencyTest.java │ ├── NullSafetyTest.java │ ├── ProtocolConfigTest.java │ ├── ProtocolNegotiatorTest.java │ ├── TypeSafetyTest.java │ ├── WireProtocolSessionTest.java │ ├── WireProtocolTest.java │ └── v2/ │ ├── BinaryProtocolEdgeCasesTest.java │ ├── BinaryProtocolPerformanceTest.java │ └── BinaryProtocolTest.java ├── btrace-dist/ │ ├── build.gradle │ └── src/ │ └── main/ │ └── resources/ │ ├── COPYRIGHT │ ├── LICENSE │ ├── LICENSE-3RD-PARTY.txt │ ├── THIRDPARTYLICENSEREADME.txt │ ├── bin/ │ │ ├── btrace │ │ ├── btrace.bat │ │ ├── btracec │ │ ├── btracec.bat │ │ ├── btracep │ │ ├── btracep.bat │ │ ├── btracer │ │ ├── btracer.bat │ │ ├── btracex │ │ └── btracex.bat │ ├── conf/ │ │ └── extensions.conf │ └── samples/ │ ├── AWTEventTracer.java │ ├── AllCalls1.java │ ├── AllCalls1Sampled.java │ ├── AllCalls2.java │ ├── AllCalls2Sampled.java │ ├── AllCalls3.java │ ├── AllCalls3Sampled.java │ ├── AllLines.java │ ├── AllMethods.java │ ├── AllMethods1.java │ ├── AllMethodsLevels.java │ ├── AllMethodsSampled.java │ ├── AllSync.java │ ├── ArgArray.java │ ├── Classload.java │ ├── CommandArg.java │ ├── DTraceInline.java │ ├── DTraceRefDemo.java │ ├── Deadlock.java │ ├── FileTracker.java │ ├── FileTrackerJfr.java │ ├── FinalizeTracker.java │ ├── HistoOnEvent.java │ ├── Histogram.java │ ├── HistogramBean.java │ ├── JInfo.java │ ├── JMap.java │ ├── JStack.java │ ├── LogTracer.java │ ├── MemAlerter.java │ ├── Memory.java │ ├── MultiClass.java │ ├── NewArray.java │ ├── NewComponent.java │ ├── OnThrow.java │ ├── ProbeArgs.java │ ├── ProbeExit.java │ ├── Profiling.java │ ├── Sizeof.java │ ├── SocketTracker.java │ ├── SocketTracker1.java │ ├── SubtypeTracer.java │ ├── SysProp.java │ ├── Test.java │ ├── ThreadBean.java │ ├── ThreadCounter.java │ ├── ThreadCounterBean.java │ ├── ThreadStart.java │ ├── Timers.java │ ├── URLTracker.java │ ├── WebServiceTracker.java │ ├── btracedefs.h │ ├── classload.d │ ├── java.net.socket.xml │ ├── jthread.d │ ├── jurls.d │ └── syscalls.d ├── btrace-dtrace/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── dtrace/ │ │ │ ├── DTrace.java │ │ │ ├── DTraceCommand.java │ │ │ ├── DTraceConsumerCommand.java │ │ │ ├── DTraceDataCommand.java │ │ │ ├── DTraceDropCommand.java │ │ │ ├── DTraceErrorCommand.java │ │ │ ├── DTraceExtension.java │ │ │ ├── DTraceStartCommand.java │ │ │ └── DTraceStopCommand.java │ │ ├── native/ │ │ │ ├── btrace.c │ │ │ └── btraced.d │ │ └── resources/ │ │ └── META-INF/ │ │ └── services/ │ │ └── org.openjdk.btrace.core.extensions.Extension │ └── mock/ │ └── java/ │ └── org/ │ └── opensolaris/ │ └── os/ │ └── dtrace/ │ ├── Aggregate.java │ ├── Aggregation.java │ ├── AggregationRecord.java │ ├── AggregationValue.java │ ├── Consumer.java │ ├── ConsumerAdapter.java │ ├── ConsumerEvent.java │ ├── ConsumerException.java │ ├── ConsumerListener.java │ ├── DTraceException.java │ ├── DataEvent.java │ ├── Drop.java │ ├── DropEvent.java │ ├── ErrorEvent.java │ ├── ExceptionHandler.java │ ├── LocalConsumer.java │ ├── Option.java │ ├── Probe.java │ ├── ProbeData.java │ ├── ProbeDescription.java │ ├── Program.java │ ├── Record.java │ └── Tuple.java ├── btrace-ext-cli/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── extcli/ │ │ ├── ExtensionInspector.java │ │ ├── ExtensionLister.java │ │ ├── ExtensionReport.java │ │ ├── Installer.java │ │ ├── Main.java │ │ ├── PolicyFile.java │ │ ├── RepoBrowser.java │ │ ├── RepoScanner.java │ │ └── tui/ │ │ ├── ExtRepoBrowser.java │ │ ├── ExtensionInspectorLite.java │ │ ├── PolicyFileLite.java │ │ ├── RepoScannerLite.java │ │ └── TuiState.java │ └── test/ │ └── java/ │ └── org/ │ └── openjdk/ │ └── btrace/ │ └── extcli/ │ ├── ExtensionInspectorTest.java │ ├── ExtensionListerTest.java │ ├── InstallerTest.java │ ├── MainTest.java │ ├── PolicyFileTest.java │ └── TestExtensionBuilder.java ├── btrace-extension/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── extension/ │ │ ├── ExtensionBridge.java │ │ ├── ExtensionDescriptorDTO.java │ │ ├── ExtensionLoader.java │ │ ├── ExtensionRegistry.java │ │ ├── ExtensionRepository.java │ │ ├── PermissionPolicy.java │ │ ├── ServiceDeclarationRegistry.java │ │ └── impl/ │ │ ├── ExtensionBridgeImpl.java │ │ ├── ExtensionClassLoader.java │ │ ├── ExtensionConfig.java │ │ ├── ExtensionLoaderImpl.java │ │ ├── ExtensionMetadata.java │ │ ├── FileSystemExtensionRepository.java │ │ └── NestedJarExtensionClassLoader.java │ └── test/ │ ├── java/ │ │ ├── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── extension/ │ │ │ ├── ExtensionBridgeImplPolicyTest.java │ │ │ └── ExtensionLoaderImplConcurrencyTest.java │ │ └── test/ │ │ ├── ext/ │ │ │ ├── Service.java │ │ │ ├── ServiceImpl.java │ │ │ └── SpiImpl.java │ │ └── ext2/ │ │ ├── Service2.java │ │ └── Service2Impl.java │ └── resources/ │ └── META-INF/ │ └── services/ │ └── test.ext.Service ├── btrace-extensions/ │ ├── btrace-metrics/ │ │ ├── build.gradle │ │ └── src/ │ │ ├── api/ │ │ │ └── java/ │ │ │ └── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── metrics/ │ │ │ ├── MetricsService.java │ │ │ ├── histogram/ │ │ │ │ ├── HistogramConfig.java │ │ │ │ ├── HistogramConfigBuilder.java │ │ │ │ ├── HistogramMetric.java │ │ │ │ └── HistogramSnapshot.java │ │ │ ├── package-info.java │ │ │ └── stats/ │ │ │ ├── StatsMetric.java │ │ │ └── StatsSnapshot.java │ │ ├── impl/ │ │ │ └── java/ │ │ │ └── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── metrics/ │ │ │ ├── Metric.java │ │ │ ├── MetricsServiceImpl.java │ │ │ ├── histogram/ │ │ │ │ ├── HistogramConfigBuilderImpl.java │ │ │ │ ├── HistogramConfigImpl.java │ │ │ │ ├── HistogramMetricImpl.java │ │ │ │ └── HistogramSnapshotImpl.java │ │ │ ├── registry/ │ │ │ │ └── MetricRegistry.java │ │ │ └── stats/ │ │ │ ├── StatsMetricImpl.java │ │ │ └── StatsSnapshotImpl.java │ │ └── test/ │ │ └── java/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── metrics/ │ │ ├── HistogramMetricTest.java │ │ └── StatsMetricTest.java │ ├── btrace-statsd/ │ │ ├── build.gradle │ │ └── src/ │ │ ├── api/ │ │ │ └── java/ │ │ │ └── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── statsd/ │ │ │ ├── Statsd.java │ │ │ └── package-info.java │ │ └── impl/ │ │ └── java/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── statsd/ │ │ └── StatsdImpl.java │ ├── btrace-utils/ │ │ ├── build.gradle │ │ └── src/ │ │ ├── api/ │ │ │ └── java/ │ │ │ └── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── utils/ │ │ │ ├── PrinterService.java │ │ │ └── package-info.java │ │ └── impl/ │ │ └── java/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── utils/ │ │ └── PrinterServiceImpl.java │ └── build.gradle ├── btrace-gradle-plugin/ │ ├── README.md │ ├── build.gradle │ └── src/ │ └── main/ │ └── groovy/ │ └── org/ │ └── openjdk/ │ └── btrace/ │ └── gradle/ │ ├── BTraceExtensionPlugin.groovy │ └── PermissionScanner.groovy ├── btrace-instr/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── instr/ │ │ │ ├── ArrayAccessInstrumentor.java │ │ │ ├── ArrayAllocInstrumentor.java │ │ │ ├── Assembler.java │ │ │ ├── BTraceBCPClassLoader.java │ │ │ ├── BTraceClassReader.java │ │ │ ├── BTraceClassWriter.java │ │ │ ├── BTraceMethodNode.java │ │ │ ├── BTraceMethodVisitor.java │ │ │ ├── BTraceProbe.java │ │ │ ├── BTraceProbeFactory.java │ │ │ ├── BTraceProbeNode.java │ │ │ ├── BTraceProbePersisted.java │ │ │ ├── BTraceProbeSupport.java │ │ │ ├── BTraceTransformer.java │ │ │ ├── BailoutException.java │ │ │ ├── CallGraph.java │ │ │ ├── CatchInstrumentor.java │ │ │ ├── ClassCache.java │ │ │ ├── ClassFilter.java │ │ │ ├── ClassInfo.java │ │ │ ├── Constants.java │ │ │ ├── ErrorReturnInstrumentor.java │ │ │ ├── FieldAccessInstrumentor.java │ │ │ ├── HandlerRepositoryImpl.java │ │ │ ├── InstrPackGenerator.java │ │ │ ├── InstrumentUtils.java │ │ │ ├── InstrumentationException.java │ │ │ ├── InstrumentingMethodVisitor.java │ │ │ ├── Instrumentor.java │ │ │ ├── Level.java │ │ │ ├── LineNumberInstrumentor.java │ │ │ ├── LinkerInstrumentor.java │ │ │ ├── Location.java │ │ │ ├── MethodCallInstrumentor.java │ │ │ ├── MethodEntryExitInstrumentor.java │ │ │ ├── MethodEntryInstrumentor.java │ │ │ ├── MethodInstrumentor.java │ │ │ ├── MethodInstrumentorHelper.java │ │ │ ├── MethodReturnInstrumentor.java │ │ │ ├── MethodTracker.java │ │ │ ├── MethodTrackingContext.java │ │ │ ├── MethodVerifier.java │ │ │ ├── ObjectAllocInstrumentor.java │ │ │ ├── OnMethod.java │ │ │ ├── OnProbe.java │ │ │ ├── Preprocessor.java │ │ │ ├── ProbeDescriptor.java │ │ │ ├── ProbeDescriptorLoader.java │ │ │ ├── ProbeDump.java │ │ │ ├── ProbeRenameVisitor.java │ │ │ ├── ProbeUpgradeVisitor_1_2.java │ │ │ ├── RandomIntProvider.java │ │ │ ├── SpecialParameterHolder.java │ │ │ ├── StackTrackingMethodVisitor.java │ │ │ ├── SynchronizedInstrumentor.java │ │ │ ├── ThrowInstrumentor.java │ │ │ ├── TypeCheckInstrumentor.java │ │ │ ├── TypeUtils.java │ │ │ ├── VariableMapper.java │ │ │ ├── Verifier.java │ │ │ └── random/ │ │ │ ├── SharedRandomIntProvider.java │ │ │ └── ThreadLocalRandomIntProvider.java │ │ └── resources/ │ │ ├── META-INF/ │ │ │ └── services/ │ │ │ └── org.openjdk.btrace.compiler.PackGenerator │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── instr/ │ │ └── jaxb.index │ └── test/ │ ├── btrace/ │ │ ├── ExportTest.java │ │ ├── InterestingVarsTest.java │ │ ├── OnProbeTest.java │ │ ├── OnTimerTest.java │ │ ├── TLSTest.java │ │ ├── TraceAllTest.java │ │ ├── issues/ │ │ │ ├── BTRACE106.java │ │ │ ├── BTRACE189.java │ │ │ ├── BTRACE22.java │ │ │ ├── BTRACE256.java │ │ │ ├── BTRACE28.java │ │ │ ├── BTRACE53.java │ │ │ ├── BTRACE69.java │ │ │ ├── BTRACE87.java │ │ │ ├── BTRACE_333.java │ │ │ └── TezSplitter.java │ │ ├── onmethod/ │ │ │ ├── AllLines.java │ │ │ ├── AnytypeArgs.java │ │ │ ├── AnytypeArgsNoSelf.java │ │ │ ├── Args.java │ │ │ ├── Args2Sampled.java │ │ │ ├── ArgsDuration.java │ │ │ ├── ArgsDuration2.java │ │ │ ├── ArgsDuration2Err.java │ │ │ ├── ArgsDuration2Sampled.java │ │ │ ├── ArgsDurationBoxed.java │ │ │ ├── ArgsDurationBoxedErr.java │ │ │ ├── ArgsDurationConstructor.java │ │ │ ├── ArgsDurationConstructorErr.java │ │ │ ├── ArgsDurationErr.java │ │ │ ├── ArgsDurationMultiReturn.java │ │ │ ├── ArgsDurationSampled.java │ │ │ ├── ArgsNoSelf.java │ │ │ ├── ArgsReturn.java │ │ │ ├── ArgsReturnAugmented.java │ │ │ ├── ArgsReturnAugmented1.java │ │ │ ├── ArgsReturnBoxed.java │ │ │ ├── ArgsReturnSampled.java │ │ │ ├── ArgsReturnTypeMatch.java │ │ │ ├── ArgsReturnTypeNoMatch.java │ │ │ ├── ArgsReturnVoid.java │ │ │ ├── ArgsSampled.java │ │ │ ├── ArgsSampledAdaptive.java │ │ │ ├── ArgsSampledNoSampling.java │ │ │ ├── ArgsShared.java │ │ │ ├── ArgsSigMatch.java │ │ │ ├── ArgsUnsafe.java │ │ │ ├── ArrayGetAfter.java │ │ │ ├── ArrayGetAfterAny.java │ │ │ ├── ArrayGetBefore.java │ │ │ ├── ArrayGetBeforeAny.java │ │ │ ├── ArraySetAfter.java │ │ │ ├── ArraySetAfterAny.java │ │ │ ├── ArraySetBefore.java │ │ │ ├── ArraySetBeforeAny.java │ │ │ ├── Catch.java │ │ │ ├── CheckcastAfter.java │ │ │ ├── CheckcastBefore.java │ │ │ ├── ConstructorArgs.java │ │ │ ├── Error.java │ │ │ ├── ErrorCaught.java │ │ │ ├── ErrorDuration.java │ │ │ ├── FieldGetAfter.java │ │ │ ├── FieldGetAfterStatic.java │ │ │ ├── FieldGetBefore.java │ │ │ ├── FieldGetBeforeStatic.java │ │ │ ├── FieldSetAfter.java │ │ │ ├── FieldSetAfterStatic.java │ │ │ ├── FieldSetBefore.java │ │ │ ├── FieldSetBeforeStatic.java │ │ │ ├── InstanceofAfter.java │ │ │ ├── InstanceofBefore.java │ │ │ ├── Line.java │ │ │ ├── MatchAnnotated.java │ │ │ ├── MatchAnnotatedRegex.java │ │ │ ├── MatchDerived.java │ │ │ ├── MethodCall.java │ │ │ ├── MethodCallDuration.java │ │ │ ├── MethodCallDuration2.java │ │ │ ├── MethodCallDurationSampled.java │ │ │ ├── MethodCallDurationSampledMulti.java │ │ │ ├── MethodCallNoArgs.java │ │ │ ├── MethodCallReturn.java │ │ │ ├── MethodCallReturnAugmented.java │ │ │ ├── MethodCallReturnAugmented1.java │ │ │ ├── MethodCallSampled.java │ │ │ ├── MethodCallSampledAdaptive.java │ │ │ ├── MethodCallStatic.java │ │ │ ├── NativeWithReturn.java │ │ │ ├── NativeWithoutReturn.java │ │ │ ├── NewAfter.java │ │ │ ├── NewArrayIntAfter.java │ │ │ ├── NewArrayIntBefore.java │ │ │ ├── NewArrayStringAfter.java │ │ │ ├── NewArrayStringBefore.java │ │ │ ├── NewBefore.java │ │ │ ├── NoArgs.java │ │ │ ├── NoArgsEntryReturn.java │ │ │ ├── NoArgsEntryReturnNoCapture.java │ │ │ ├── ServicesTest.java │ │ │ ├── StaticArgs.java │ │ │ ├── StaticArgsReturn.java │ │ │ ├── StaticArgsSelf.java │ │ │ ├── StaticMethodCall.java │ │ │ ├── StaticMethodCallStatic.java │ │ │ ├── StaticNoArgs.java │ │ │ ├── StaticNoArgsSelf.java │ │ │ ├── SyncEntry.java │ │ │ ├── SyncExit.java │ │ │ ├── SyncMEntry.java │ │ │ ├── SyncMExit.java │ │ │ ├── Throw.java │ │ │ └── leveled/ │ │ │ ├── AnytypeArgs.java │ │ │ ├── AnytypeArgsNoSelf.java │ │ │ ├── Args.java │ │ │ ├── Args2Sampled.java │ │ │ ├── ArgsDuration.java │ │ │ ├── ArgsDuration2.java │ │ │ ├── ArgsDuration2Err.java │ │ │ ├── ArgsDuration2Sampled.java │ │ │ ├── ArgsDurationBoxed.java │ │ │ ├── ArgsDurationBoxedErr.java │ │ │ ├── ArgsDurationConstructor.java │ │ │ ├── ArgsDurationConstructorErr.java │ │ │ ├── ArgsDurationErr.java │ │ │ ├── ArgsDurationMultiReturn.java │ │ │ ├── ArgsDurationSampled.java │ │ │ ├── ArgsNoSelf.java │ │ │ ├── ArgsReturn.java │ │ │ ├── ArgsReturnAugmented.java │ │ │ ├── ArgsReturnAugmented1.java │ │ │ ├── ArgsReturnSampled.java │ │ │ ├── ArgsSampled.java │ │ │ ├── ArgsSampledAdaptive.java │ │ │ ├── ArgsSampledNoSampling.java │ │ │ ├── ArgsShared.java │ │ │ ├── ArgsUnsafe.java │ │ │ ├── ArrayGetAfter.java │ │ │ ├── ArrayGetAfterAny.java │ │ │ ├── ArrayGetBefore.java │ │ │ ├── ArrayGetBeforeAny.java │ │ │ ├── ArraySetAfter.java │ │ │ ├── ArraySetAfterAny.java │ │ │ ├── ArraySetBefore.java │ │ │ ├── ArraySetBeforeAny.java │ │ │ ├── Catch.java │ │ │ ├── CheckcastAfter.java │ │ │ ├── CheckcastBefore.java │ │ │ ├── ConstructorArgs.java │ │ │ ├── Error.java │ │ │ ├── ErrorCaught.java │ │ │ ├── ErrorDuration.java │ │ │ ├── FieldGetAfter.java │ │ │ ├── FieldGetAfterStatic.java │ │ │ ├── FieldGetBefore.java │ │ │ ├── FieldGetBeforeStatic.java │ │ │ ├── FieldSetAfter.java │ │ │ ├── FieldSetAfterStatic.java │ │ │ ├── FieldSetBefore.java │ │ │ ├── FieldSetBeforeStatic.java │ │ │ ├── InstanceofAfter.java │ │ │ ├── InstanceofBefore.java │ │ │ ├── Line.java │ │ │ ├── MatchDerived.java │ │ │ ├── MethodCall.java │ │ │ ├── MethodCallDuration.java │ │ │ ├── MethodCallDuration2.java │ │ │ ├── MethodCallDurationSampled.java │ │ │ ├── MethodCallDurationSampledMulti.java │ │ │ ├── MethodCallNoArgs.java │ │ │ ├── MethodCallReturn.java │ │ │ ├── MethodCallReturnAugmented.java │ │ │ ├── MethodCallReturnAugmented1.java │ │ │ ├── MethodCallSampled.java │ │ │ ├── MethodCallSampledAdaptive.java │ │ │ ├── MethodCallStatic.java │ │ │ ├── NativeWithReturn.java │ │ │ ├── NativeWithoutReturn.java │ │ │ ├── NewAfter.java │ │ │ ├── NewArrayIntAfter.java │ │ │ ├── NewArrayIntBefore.java │ │ │ ├── NewArrayStringAfter.java │ │ │ ├── NewArrayStringBefore.java │ │ │ ├── NewBefore.java │ │ │ ├── NoArgs.java │ │ │ ├── NoArgsEntryReturn.java │ │ │ ├── StaticArgs.java │ │ │ ├── StaticArgsReturn.java │ │ │ ├── StaticArgsSelf.java │ │ │ ├── StaticMethodCall.java │ │ │ ├── StaticMethodCallStatic.java │ │ │ ├── StaticNoArgs.java │ │ │ ├── StaticNoArgsSelf.java │ │ │ ├── SyncEntry.java │ │ │ ├── SyncExit.java │ │ │ ├── SyncMEntry.java │ │ │ ├── SyncMExit.java │ │ │ └── Throw.java │ │ ├── org.openjdk.btrace.xml │ │ └── verifier/ │ │ └── VerifierScript.java │ ├── java/ │ │ ├── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ ├── ArgsMapTest.java │ │ │ └── instr/ │ │ │ ├── BTraceProbeFactoryTest.java │ │ │ ├── BTraceTransformerEarlyExitTest.java │ │ │ ├── CallGraphTest.java │ │ │ ├── ClassCacheTest.java │ │ │ ├── ClassFilterSensitiveTest.java │ │ │ ├── ClassInfoTest.java │ │ │ ├── ExtensionBootstrapTest.java │ │ │ ├── HandlerRepositoryImplTest.java │ │ │ ├── InstrStackTest.java │ │ │ ├── InstrumentUtilsTest.java │ │ │ ├── InstrumentingMethodVisitorTest.java │ │ │ ├── InstrumentorTestBase.java │ │ │ ├── MethodCounterTest.java │ │ │ ├── OnMethodInstrumenterTest.java │ │ │ ├── OnMethodTest.java │ │ │ ├── ProbeClassUnloadingTest.java │ │ │ ├── ProbeLoaderNewTest.java │ │ │ ├── ProbeLoaderOldTest.java │ │ │ ├── ProbeLoaderUpgradeTest.java │ │ │ ├── StackTrackingMethodVisitorTest.java │ │ │ └── VariableMapperTest.java │ │ └── resources/ │ │ ├── AbstractClass.java │ │ ├── DerivedClass.java │ │ ├── InterestingVarsClass.java │ │ ├── Main.java │ │ ├── OnMethodTest.java │ │ ├── StackTrackerTest.java │ │ ├── TestApp.java │ │ ├── TestPrinter.java │ │ └── issues/ │ │ ├── BTRACE106.java │ │ ├── BTRACE22.java │ │ ├── BTRACE256.java │ │ ├── BTRACE28.java │ │ └── BTRACE87.java │ └── resources/ │ ├── instrumentorTestData/ │ │ └── dynamic/ │ │ ├── ExportTest │ │ ├── OnProbeTest │ │ ├── OnTimerTest │ │ ├── ServicesTest │ │ ├── TLSTest │ │ ├── TraceAllTest │ │ ├── issues/ │ │ │ ├── BTRACE106 │ │ │ ├── BTRACE189 │ │ │ ├── BTRACE22 │ │ │ ├── BTRACE256 │ │ │ ├── BTRACE28 │ │ │ ├── BTRACE53 │ │ │ ├── BTRACE69 │ │ │ ├── BTRACE87 │ │ │ ├── BTRACE_333 │ │ │ ├── InterestingVarsTest │ │ │ └── TezSplitter │ │ └── onmethod/ │ │ ├── AllLines │ │ ├── AnytypeArgs │ │ ├── AnytypeArgsNoSelf │ │ ├── Args │ │ ├── Args2Sampled │ │ ├── ArgsDuration │ │ ├── ArgsDuration2 │ │ ├── ArgsDuration2Err │ │ ├── ArgsDuration2Sampled │ │ ├── ArgsDurationBoxed │ │ ├── ArgsDurationBoxedErr │ │ ├── ArgsDurationConstructor │ │ ├── ArgsDurationConstructorErr │ │ ├── ArgsDurationErr │ │ ├── ArgsDurationMultiReturn │ │ ├── ArgsDurationSampled │ │ ├── ArgsNoSelf │ │ ├── ArgsReturn │ │ ├── ArgsReturnAugmented │ │ ├── ArgsReturnAugmented1 │ │ ├── ArgsReturnBoxed │ │ ├── ArgsReturnSampled │ │ ├── ArgsReturnTypeMatch │ │ ├── ArgsReturnTypeNoMatch │ │ ├── ArgsReturnVoid │ │ ├── ArgsSampled │ │ ├── ArgsSampledAdaptive │ │ ├── ArgsSampledNoSampling │ │ ├── ArgsShared │ │ ├── ArgsSigMatch │ │ ├── ArgsUnsafe │ │ ├── ArrayGetAfter │ │ ├── ArrayGetAfterAny │ │ ├── ArrayGetBefore │ │ ├── ArrayGetBeforeAny │ │ ├── ArraySetAfter │ │ ├── ArraySetAfterAny │ │ ├── ArraySetBefore │ │ ├── ArraySetBeforeAny │ │ ├── Catch │ │ ├── CheckcastAfter │ │ ├── CheckcastBefore │ │ ├── ConstructorArgs │ │ ├── Error │ │ ├── ErrorCaught │ │ ├── ErrorDuration │ │ ├── FieldGetAfter │ │ ├── FieldGetAfterStatic │ │ ├── FieldGetBefore │ │ ├── FieldGetBeforeStatic │ │ ├── FieldSetAfter │ │ ├── FieldSetAfterStatic │ │ ├── FieldSetBefore │ │ ├── FieldSetBeforeStatic │ │ ├── InstanceofAfter │ │ ├── InstanceofBefore │ │ ├── Line │ │ ├── MatchAnnotated │ │ ├── MatchAnnotatedRegex │ │ ├── MatchDerived │ │ ├── MethodCall │ │ ├── MethodCallDuration │ │ ├── MethodCallDuration2 │ │ ├── MethodCallDurationSampled │ │ ├── MethodCallDurationSampledMulti │ │ ├── MethodCallNoArgs │ │ ├── MethodCallReturn │ │ ├── MethodCallReturnAugmented │ │ ├── MethodCallReturnAugmented1 │ │ ├── MethodCallSampled │ │ ├── MethodCallSampledAdaptive │ │ ├── MethodCallStatic │ │ ├── NativeWithReturn │ │ ├── NativeWithoutReturn │ │ ├── NewAfter │ │ ├── NewArrayIntAfter │ │ ├── NewArrayIntBefore │ │ ├── NewArrayStringAfter │ │ ├── NewArrayStringBefore │ │ ├── NewBefore │ │ ├── NoArgs │ │ ├── NoArgsEntryReturn │ │ ├── NoArgsEntryReturnNoCapture │ │ ├── StaticArgs │ │ ├── StaticArgsReturn │ │ ├── StaticArgsSelf │ │ ├── StaticMethodCall │ │ ├── StaticMethodCallStatic │ │ ├── StaticNoArgs │ │ ├── StaticNoArgsSelf │ │ ├── SyncEntry │ │ ├── SyncExit │ │ ├── SyncMEntry │ │ ├── SyncMExit │ │ ├── Throw │ │ └── leveled/ │ │ ├── AnytypeArgs │ │ ├── AnytypeArgsNoSelf │ │ ├── Args │ │ ├── Args2Sampled │ │ ├── ArgsDuration │ │ ├── ArgsDuration2 │ │ ├── ArgsDuration2Err │ │ ├── ArgsDuration2Sampled │ │ ├── ArgsDurationBoxed │ │ ├── ArgsDurationBoxedErr │ │ ├── ArgsDurationConstructor │ │ ├── ArgsDurationConstructorErr │ │ ├── ArgsDurationErr │ │ ├── ArgsDurationMultiReturn │ │ ├── ArgsDurationSampled │ │ ├── ArgsNoSelf │ │ ├── ArgsReturn │ │ ├── ArgsReturnAugmented │ │ ├── ArgsReturnAugmented1 │ │ ├── ArgsReturnSampled │ │ ├── ArgsSampled │ │ ├── ArgsSampledAdaptive │ │ ├── ArgsSampledNoSampling │ │ ├── ArgsShared │ │ ├── ArgsUnsafe │ │ ├── ArrayGetAfter │ │ ├── ArrayGetAfterAny │ │ ├── ArrayGetBefore │ │ ├── ArrayGetBeforeAny │ │ ├── ArraySetAfter │ │ ├── ArraySetAfterAny │ │ ├── ArraySetBefore │ │ ├── ArraySetBeforeAny │ │ ├── Catch │ │ ├── CheckcastAfter │ │ ├── CheckcastBefore │ │ ├── ConstructorArgs │ │ ├── Error │ │ ├── ErrorCaught │ │ ├── ErrorDuration │ │ ├── FieldGetAfter │ │ ├── FieldGetAfterStatic │ │ ├── FieldGetBefore │ │ ├── FieldGetBeforeStatic │ │ ├── FieldSetAfter │ │ ├── FieldSetAfterStatic │ │ ├── FieldSetBefore │ │ ├── FieldSetBeforeStatic │ │ ├── InstanceofAfter │ │ ├── InstanceofBefore │ │ ├── Line │ │ ├── MatchDerived │ │ ├── MethodCall │ │ ├── MethodCallDuration │ │ ├── MethodCallDuration2 │ │ ├── MethodCallDurationSampled │ │ ├── MethodCallDurationSampledMulti │ │ ├── MethodCallNoArgs │ │ ├── MethodCallReturn │ │ ├── MethodCallReturnAugmented │ │ ├── MethodCallReturnAugmented1 │ │ ├── MethodCallSampled │ │ ├── MethodCallSampledAdaptive │ │ ├── MethodCallStatic │ │ ├── NativeWithReturn │ │ ├── NativeWithoutReturn │ │ ├── NewAfter │ │ ├── NewArrayIntAfter │ │ ├── NewArrayIntBefore │ │ ├── NewArrayStringAfter │ │ ├── NewArrayStringBefore │ │ ├── NewBefore │ │ ├── NoArgs │ │ ├── NoArgsEntryReturn │ │ ├── StaticArgs │ │ ├── StaticArgsReturn │ │ ├── StaticArgsSelf │ │ ├── StaticMethodCall │ │ ├── StaticMethodCallStatic │ │ ├── StaticNoArgs │ │ ├── StaticNoArgsSelf │ │ ├── SyncEntry │ │ ├── SyncExit │ │ ├── SyncMEntry │ │ ├── SyncMExit │ │ └── Throw │ ├── packed/ │ │ └── test-pack.jar │ ├── plain.txt │ └── resources/ │ └── classdata/ │ ├── AllStuff.btrc │ ├── BackpackExtensionTest.clazz │ ├── OnMethodTest.btrc │ ├── PackVersion1.btrc │ ├── ProbeScript.btrc │ ├── TezSplitter.clazz │ └── TraceScript.clazz ├── btrace-runtime/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ ├── java/ │ │ │ └── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── runtime/ │ │ │ ├── BTraceMBean.java │ │ │ ├── BTraceRuntimeAccessImpl.java │ │ │ ├── BTraceRuntimeImplBase.java │ │ │ ├── BTraceRuntimeImplFactory.java │ │ │ ├── BTraceRuntimeImpl_8.java │ │ │ ├── BTraceRuntimes.java │ │ │ ├── CommandQueue.java │ │ │ ├── DOTWriter.java │ │ │ ├── DotWriterFormatter.java │ │ │ ├── ExitException.java │ │ │ ├── ExtensionContextImpl.java │ │ │ ├── ExtensionIndy.java │ │ │ ├── IndyDispatcher.java │ │ │ ├── Interval.java │ │ │ ├── JfrEventFactoryImpl.java │ │ │ ├── JfrEventImpl.java │ │ │ ├── NullPerfReaderImpl.java │ │ │ ├── PerfReader.java │ │ │ ├── ProbeAnchor.java │ │ │ ├── XMLSerializer.java │ │ │ ├── auxiliary/ │ │ │ │ └── Auxiliary.java │ │ │ └── profiling/ │ │ │ ├── MethodInvocationProfiler.java │ │ │ └── MethodInvocationRecorder.java │ │ ├── java11/ │ │ │ └── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── runtime/ │ │ │ └── BTraceRuntimeImpl_11.java │ │ └── java9/ │ │ └── org/ │ │ └── openjdk/ │ │ └── btrace/ │ │ └── runtime/ │ │ └── BTraceRuntimeImpl_9.java │ └── test/ │ ├── java/ │ │ ├── org/ │ │ │ └── openjdk/ │ │ │ └── btrace/ │ │ │ └── runtime/ │ │ │ ├── ExtensionIndyShimIndexTest.java │ │ │ └── HiddenClassDefineRegressionTest.java │ │ └── test/ │ │ └── shim/ │ │ ├── ShimService.java │ │ ├── ShimServiceNoop.java │ │ └── ShimServiceThrow.java │ └── resources/ │ └── META-INF/ │ └── btrace/ │ └── shims.index ├── btrace-ui/ │ └── build.gradle ├── build.gradle ├── buildSrc/ │ ├── build.gradle │ └── shared.gradle ├── common.gradle ├── doc/ │ └── specs/ │ └── 2026-04-11-btraceiobtrace802-phase-3-invokedynamic-handler-isolation.md ├── docker/ │ ├── .dockerignore │ ├── Dockerfile │ ├── Dockerfile.alpine │ ├── Dockerfile.distroless │ ├── README.md │ └── docker-entrypoint.sh ├── docs/ │ ├── BTraceExtensionDevelopmentGuide.md │ ├── BTraceTutorial.md │ ├── ExtensionInterfaceRules.md │ ├── FAQ.md │ ├── GettingStarted.md │ ├── OnelinerGuide.md │ ├── PermissionPolicy.md │ ├── QuickReference.md │ ├── README.md │ ├── Troubleshooting.md │ ├── architecture/ │ │ ├── BTraceInstrAnalysis.md │ │ ├── ExtensionConfiguration.md │ │ ├── ExtensionInvokeDynamicBridge.md │ │ ├── ExtensionManifestFormat.md │ │ ├── ExtensionStorageDesign.md │ │ ├── MaskedJarArchitecture.md │ │ └── Version2ProtocolArchitecture.md │ ├── plans/ │ │ ├── 2026-04-20-NEXT-SESSION-PLAN.md │ │ ├── 2026-04-20-probe-class-unloading-RESUME.md │ │ ├── 2026-04-20-probe-class-unloading.md │ │ ├── DistributionRestructuring.md │ │ └── TestCoverageImprovementPlan.md │ ├── releasing.md │ └── samples/ │ └── permissions.properties ├── gradle/ │ └── spotless.gradle ├── gradlew ├── gradlew.bat ├── integration-tests/ │ ├── build.gradle │ └── src/ │ ├── main/ │ │ └── java/ │ │ └── dummy/ │ │ ├── SimpleEvent.java │ │ └── SimplePeriodicEvent.java │ └── test/ │ ├── btrace/ │ │ ├── ExtensionLifecycleErrorTest.java │ │ ├── ExtensionLifecycleFullTest.java │ │ ├── ExtensionLifecycleMultipleTest.java │ │ ├── ExtensionLifecycleTest.java │ │ ├── JfrTest.java │ │ ├── MetricsTest.java │ │ ├── OSMBeanTest.java │ │ ├── OnExitTest.java │ │ ├── OnMethodLevelTest.java │ │ ├── OnMethodReturnTest.java │ │ ├── OnMethodSubclassTest.java │ │ ├── OnMethodTest.java │ │ ├── OnProbeTest.java │ │ ├── OnTimerArgTest.java │ │ ├── OnTimerTest.java │ │ ├── PerfCounterTest.java │ │ ├── ProbeArgsTest.java │ │ ├── ThreadStart.java │ │ ├── TraceAllTest.java │ │ ├── issues/ │ │ │ └── BTRACE400.java │ │ └── org.openjdk.btrace.xml │ ├── java/ │ │ ├── resources/ │ │ │ ├── Main.java │ │ │ ├── TestApp.java │ │ │ ├── TestPrinter.java │ │ │ └── ThreadSpawner.java │ │ └── tests/ │ │ ├── BTraceFunctionalTests.java │ │ ├── ExtensionLifecycleIntegrationTest.java │ │ ├── JBangAttachDockerTest.java │ │ └── RuntimeTest.java │ └── resources/ │ └── META-INF/ │ └── btrace/ │ └── permissions.properties ├── renovate.json ├── run_tests.sh ├── scripts/ │ ├── release.sh │ └── update-jdk-versions.sh └── settings.gradle
Showing preview only (467K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (5822 symbols across 671 files)
FILE: benchmarks/agent-benchmark/src/jmh/btrace/TraceScript.java
class TraceScript (line 13) | @BTrace
method onMethodEntryEmpty (line 15) | @OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedM...
method onMethodEntryEmptyLevelNoMatch (line 18) | @OnMethod(
method onMethodEntryEmptySampled (line 25) | @OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedM...
method onMethodRetDuration (line 30) | @OnMethod(
method onMethodRetDurationSampled (line 37) | @OnMethod(
method onMethodRetDurationSampledAdaptive (line 45) | @OnMethod(
method onMethodEntryPrintln1 (line 53) | @OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedM...
method onMethodEntryPrintln1Sampled (line 59) | @OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedM...
method onMethodEntryPrintln2 (line 66) | @OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedM...
method onMethodEntryPrintln3 (line 73) | @OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedM...
method onMethodEntryPrintln24 (line 81) | @OnMethod(clazz = "benchmark.BTraceBench", method = "testInstrumentedM...
FILE: benchmarks/agent-benchmark/src/jmh/java/benchmark/BTraceBench.java
class BTraceBench (line 58) | @State(Scope.Thread)
class BTraceConfig (line 64) | private static class BTraceConfig {
method preVisitDirectory (line 72) | @Override
method visitFile (line 78) | @Override
method visitFileFailed (line 85) | @Override
method postVisitDirectory (line 90) | @Override
method BTraceConfig (line 97) | public BTraceConfig(Path tmpRoot, String agentJar, String scriptPath) {
method cleanup (line 103) | public void cleanup() throws IOException {
method setup (line 112) | @Setup
method testInstrumentedMethod (line 124) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testInstrumentedMethodLevelNoMatch (line 131) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testInstrumentedMethodSampled (line 138) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testInstrumentedMethodPrintln1 (line 145) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testInstrumentedMethodPrintln1Sampled (line 152) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testInstrumentedMethodPrintln2 (line 159) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testInstrumentedMethodPrintln3 (line 166) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testInstrumentedMethodPrintln24 (line 173) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testMethod (line 180) | @Warmup(iterations = 5, time = 100, timeUnit = TimeUnit.MILLISECONDS)
method testInstrDuration (line 187) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testInstrDurationSampled (line 196) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testInstrDurationSampledAdaptive (line 203) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testSampleHit10 (line 252) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method testSampleHit50 (line 263) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method testSampleHit100 (line 274) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method teardown (line 285) | @org.openjdk.jmh.annotations.TearDown
method main (line 296) | public static void main(String[] args) throws Exception {
method getConfig (line 317) | private static BTraceConfig getConfig() throws IOException {
FILE: benchmarks/runtime-benchmarks/src/jmh/btrace/TraceScript.java
class TraceScript (line 13) | @BTrace
method onMethodEntryEmpty (line 15) | @OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInst...
method onMethodEntryEmptyLevelNoMatch (line 18) | @OnMethod(
method onMethodEntryEmptySampled (line 25) | @OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInst...
method onMethodRetDuration (line 30) | @OnMethod(
method onMethodRetDurationSampled (line 37) | @OnMethod(
method onMethodRetDurationSampledAdaptive (line 45) | @OnMethod(
method onMethodEntryPrintln1 (line 53) | @OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInst...
method onMethodEntryPrintln1Sampled (line 59) | @OnMethod(
method onMethodEntryPrintln2 (line 68) | @OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInst...
method onMethodEntryPrintln3 (line 75) | @OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInst...
method onMethodEntryPrintln24 (line 83) | @OnMethod(clazz = "org.openjdk.btrace.BTraceBench", method = "testInst...
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/ClassFilterBenchmark.java
class ClassFilterBenchmark (line 35) | @State(Scope.Thread)
method setup (line 48) | @Setup
method testSimpleClassNameMatch (line 64) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method testRegexNameMatch (line 71) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method testSubtypeMatch (line 78) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method testSubtypeNoMatch (line 85) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method main (line 92) | public static void main(String[] args) throws Exception {
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/DispatchBenchmark.java
class DispatchBenchmark (line 54) | @State(Scope.Thread)
method setup (line 63) | @Setup(Level.Trial)
method baseline (line 81) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method instrumented (line 89) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method instrumentedMutable (line 101) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method probeHandler (line 109) | public static void probeHandler(int value) {
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/OnMethodTemplateBenchmark.java
class OnMethodTemplateBenchmark (line 32) | @State(Scope.Thread)
method setup (line 39) | @Setup
method testEmptyTemplate (line 44) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method testMatchTemplate (line 51) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method testNoMatchTemplate (line 58) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method main (line 65) | public static void main(String[] args) throws Exception {
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/ProbeLoadingBenchmark.java
class ProbeLoadingBenchmark (line 38) | @State(Scope.Thread)
method setup (line 46) | @Setup(Level.Trial)
method setupRun (line 51) | @Setup(Level.Invocation)
method tearDownRun (line 56) | @TearDown(Level.Invocation)
method testBTraceProbeNew (line 61) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method main (line 72) | public static void main(String[] args) throws Exception {
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/ProfilerBenchmark.java
class ProfilerBenchmark (line 50) | @State(Scope.Thread)
method setup (line 58) | @Setup
method testOneMethodSingleThread (line 64) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testTwoMethods01Thread (line 73) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testTwoMethods02Threads (line 84) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testTwoMethods04Threads (line 95) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testTwoMethods08Threads (line 106) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method testTwoMethods16Threads (line 117) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method main (line 128) | public static void main(String[] args) throws Exception {
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/StatsdBenchmark.java
class StatsdBenchmark (line 49) | @State(Scope.Thread)
method setup (line 56) | @Setup
method testIncrement_1 (line 66) | @Warmup(iterations = 5, time = 500, timeUnit = TimeUnit.MILLISECONDS)
method main (line 74) | public static void main(String[] args) throws Exception {
FILE: benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/StringOpBenchmark.java
class StringOpBenchmark (line 43) | @State(Scope.Thread)
method setup (line 54) | @Setup
method setupEach (line 59) | @Setup(Level.Invocation)
method testStringBuilder (line 64) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method testStringPlus (line 71) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method testStrCat (line 78) | @Warmup(iterations = 5, time = 200, timeUnit = TimeUnit.MILLISECONDS)
method main (line 85) | public static void main(String[] args) throws Exception {
FILE: btrace-agent/src/main/java/org/openjdk/btrace/agent/Client.java
class Client (line 93) | abstract class Client implements CommandListener {
method Client (line 125) | Client(ClientContext ctx) {
method Client (line 129) | private Client(Instrumentation inst, ArgsMap argsMap, SharedSettings s...
method pid (line 139) | private static String pid() {
method initialize (line 151) | protected final void initialize() {
method setupWriter (line 155) | @SuppressWarnings("DefaultCharset")
method startFlusher (line 191) | private void startFlusher() {
method templateOutputFileName (line 233) | private String templateOutputFileName(String fName) {
method replaceSysProps (line 254) | private String replaceSysProps(String str) {
method replaceSysProps (line 264) | private int replaceSysProps(String str, StringBuffer sb) {
method listProbes (line 281) | static Collection<String> listProbes() {
method onExit (line 293) | synchronized void onExit(int exitCode) {
method loadClass (line 330) | final synchronized Class<?> loadClass(InstrumentCommand instr) throws ...
method validateDeclaredServices (line 462) | private void validateDeclaredServices(BTraceProbe probe) throws IOExce...
method closeAll (line 493) | protected void closeAll() throws IOException {
method errorExit (line 503) | private void errorExit(Throwable th) throws IOException {
method cleanupTransformers (line 511) | private void cleanupTransformers() {
method isInitialized (line 525) | final boolean isInitialized() {
method getRuntime (line 529) | final BTraceRuntime.Impl getRuntime() {
method getClassName (line 533) | final String getClassName() {
method isCandidate (line 537) | private final boolean isCandidate(Class<?> c) {
method startRetransformClasses (line 549) | private final void startRetransformClasses(int numClasses) {
method endRetransformClasses (line 556) | final void endRetransformClasses() {
method load (line 562) | private BTraceProbe load(byte[] buf, ArgsMap args) {
method retransformLoaded (line 582) | boolean retransformLoaded() throws UnmodifiableClassException {
method sendCommand (line 655) | protected void sendCommand(Command command) {
method findClient (line 663) | static Client findClient(String uuid) {
method toString (line 672) | @Override
method formatPermissionError (line 677) | private static String formatPermissionError(Set<Permission> missing) {
FILE: btrace-agent/src/main/java/org/openjdk/btrace/agent/ClientContext.java
class ClientContext (line 37) | class ClientContext {
method ClientContext (line 43) | ClientContext(
method getInstr (line 51) | Instrumentation getInstr() {
method getTransformer (line 55) | BTraceTransformer getTransformer() {
method getSettings (line 59) | SharedSettings getSettings() {
method getArguments (line 63) | ArgsMap getArguments() {
FILE: btrace-agent/src/main/java/org/openjdk/btrace/agent/FileClient.java
class FileClient (line 54) | class FileClient extends Client {
method FileClient (line 61) | FileClient(ClientContext ctx, File scriptFile) throws IOException {
method readAll (line 68) | private static byte[] readAll(InputStream is, long size) throws IOExce...
method init (line 85) | private boolean init(byte[] code) throws IOException {
method onCommand (line 94) | @SuppressWarnings("RedundantThrows")
method readScript (line 119) | private byte[] readScript(File file) throws IOException {
method loadQuick (line 131) | private byte[] loadQuick(String path) throws IOException {
method loadWithSecurity (line 137) | private byte[] loadWithSecurity(String path) throws IOException {
FILE: btrace-agent/src/main/java/org/openjdk/btrace/agent/Main.java
class Main (line 109) | @SuppressWarnings("RedundantThrows")
method premain (line 136) | public static void premain(String args, Instrumentation inst) {
method agentmain (line 140) | public static void agentmain(String args, Instrumentation inst) {
method main (line 144) | private static synchronized void main(String args, Instrumentation ins...
method hasScripts (line 250) | private static boolean hasScripts() {
class LogValue (line 254) | private static final class LogValue {
method LogValue (line 258) | public LogValue(String logLine, Throwable throwable) {
method loadDefaultArguments (line 264) | private static void loadDefaultArguments(String config) {
method initExtensions (line 358) | private static void initExtensions() {
method getBTraceHome (line 390) | private static String getBTraceHome() {
method getExtensionLoader (line 428) | public static ExtensionLoader getExtensionLoader() {
method startScripts (line 432) | private static int startScripts() {
method locateScripts (line 450) | static List<String> locateScripts(ArgsMap argsMap) {
method usage (line 483) | private static void usage() {
method loadArgs (line 488) | private static void loadArgs(String args) {
method parseArgs (line 509) | private static void parseArgs() {
method processClasspaths (line 721) | private static void processClasspaths(String libs) {
method asJarFile (line 813) | @SuppressWarnings("JavaReflectionMemberAccess")
method addPreconfLibs (line 836) | private static void addPreconfLibs(String libs) {
method appendToBootClassPath (line 862) | private static void appendToBootClassPath(Path libFolder) {
method appendToSysClassPath (line 905) | private static void appendToSysClassPath(Path libFolder) {
method loadBTraceScript (line 948) | private static boolean loadBTraceScript(String filePath, boolean trace...
method startServer (line 1007) | @SuppressWarnings("InfiniteLoopStatement")
method handleNewClient (line 1072) | private static Future<?> handleNewClient(Client client) {
method error (line 1099) | private static void error(String msg) {
method isDebug (line 1103) | private static boolean isDebug() {
FILE: btrace-agent/src/main/java/org/openjdk/btrace/agent/PerfReaderImpl.java
class PerfReaderImpl (line 39) | final class PerfReaderImpl implements PerfReader {
method getThisVm (line 42) | private synchronized MonitoredVm getThisVm() {
method findByName (line 55) | private Monitor findByName(String name) {
method perfInt (line 63) | @Override
method perfLong (line 78) | @Override
method perfString (line 91) | @Override
FILE: btrace-agent/src/main/java/org/openjdk/btrace/agent/RemoteClient.java
class RemoteClient (line 65) | @SuppressWarnings({"SynchronizeOnNonFinalField", "SynchronizationOnLocal...
class DelayedCommandExecutor (line 69) | private final class DelayedCommandExecutor implements Function<Command...
method DelayedCommandExecutor (line 72) | public DelayedCommandExecutor(boolean isConnected) {
method apply (line 76) | @Override
method getClient (line 92) | static Client getClient(ClientContext ctx, Socket sock, Function<Clien...
method RemoteClient (line 184) | private RemoteClient(
method initClient (line 202) | private void initClient() {
method onCommand (line 283) | @SuppressWarnings("RedundantThrows")
method dispatchCommand (line 314) | private boolean dispatchCommand(Command cmd, boolean isConnected) {
method isDisconnected (line 386) | public boolean isDisconnected() {
method sendCommand (line 390) | @Override
method closeAll (line 413) | @Override
method reconnect (line 430) | void reconnect(WireProtocol protocol, Socket socket) throws IOException {
FILE: btrace-agent/src/main/java/org/openjdk/btrace/agent/TraceOutputWriter.java
class TraceOutputWriter (line 43) | abstract class TraceOutputWriter extends Writer {
method TraceOutputWriter (line 46) | protected TraceOutputWriter() {}
method fileWriter (line 54) | public static TraceOutputWriter fileWriter(File output) {
method rollingFileWriter (line 71) | public static TraceOutputWriter rollingFileWriter(File output, SharedS...
method ensurePathExists (line 81) | private static void ensurePathExists(File f) {
class SimpleFileWriter (line 96) | private static class SimpleFileWriter extends TraceOutputWriter {
method SimpleFileWriter (line 101) | @SuppressWarnings("DefaultCharset")
method close (line 115) | @Override
method flush (line 120) | @Override
method write (line 125) | @Override
class RollingFileWriter (line 131) | @SuppressWarnings("DefaultCharset")
method RollingFileWriter (line 141) | public RollingFileWriter(File output, SharedSettings settings) throw...
method close (line 154) | @Override
method flush (line 164) | @Override
method write (line 178) | @Override
method nextWriter (line 188) | private void nextWriter() {
method getNextWriter (line 199) | private FileWriter getNextWriter() throws IOException {
method needsRoll (line 216) | protected abstract boolean needsRoll();
class TimeBasedRollingFileWriter (line 219) | private static class TimeBasedRollingFileWriter extends RollingFileWri...
method TimeBasedRollingFileWriter (line 223) | public TimeBasedRollingFileWriter(File output, SharedSettings settin...
method needsRoll (line 227) | @Override
FILE: btrace-agent/src/test/java/org/openjdk/btrace/agent/MainTest.java
class MainTest (line 12) | class MainTest {
method locateScriptsEmpty (line 13) | @Test
method locateScriptsSingle (line 21) | @Test
method locateScriptsMulti (line 29) | @Test
method locateScriptsDir (line 37) | @Test
FILE: btrace-boot/src/main/java/org/openjdk/btrace/boot/Loader.java
class Loader (line 61) | public final class Loader {
method Loader (line 71) | private Loader() {
method premain (line 81) | public static void premain(String args, Instrumentation inst) {
method agentmain (line 92) | public static void agentmain(String args, Instrumentation inst) {
method main (line 102) | public static void main(String[] args) {
method startAgent (line 107) | private static void startAgent(String args, Instrumentation inst, Stri...
method startClient (line 155) | private static void startClient(String[] args) {
method getManifestAttribute (line 187) | private static String getManifestAttribute(File jarFile, String name, ...
method getJarFile (line 203) | private static File getJarFile() {
method debug (line 244) | private static void debug(String msg) {
FILE: btrace-boot/src/main/java/org/openjdk/btrace/boot/MaskedClassLoader.java
class MaskedClassLoader (line 60) | public final class MaskedClassLoader extends URLClassLoader {
method MaskedClassLoader (line 74) | public MaskedClassLoader(File jarPath, String section, ClassLoader par...
method getJarFile (line 89) | public JarFile getJarFile() {
method getJarPath (line 98) | public File getJarPath() {
method findClass (line 102) | @Override
method findResource (line 142) | @Override
method findResources (line 170) | @Override
method getResourceAsStream (line 194) | @Override
method readEntry (line 222) | private byte[] readEntry(JarEntry entry) throws IOException {
method createJarEntryURL (line 234) | private URL createJarEntryURL(String entryPath) throws MalformedURLExc...
method close (line 239) | @Override
method debug (line 245) | private void debug(String msg) {
FILE: btrace-boot/src/main/java/org/openjdk/btrace/boot/MaskedJarUtils.java
class MaskedJarUtils (line 36) | public final class MaskedJarUtils {
method MaskedJarUtils (line 37) | private MaskedJarUtils() {
method findMaskedJarInClasspath (line 48) | public static File findMaskedJarInClasspath(String classPath) {
method findMaskedJarInClasspath (line 69) | public static File findMaskedJarInClasspath(String[] cpEntries) {
method isMaskedJar (line 90) | public static boolean isMaskedJar(File file) {
FILE: btrace-client/src/main/java/org/openjdk/btrace/client/Client.java
class Client (line 95) | public class Client {
method Client (line 157) | public Client(int port) {
method Client (line 161) | public Client(int port, String probeDescPath) {
method Client (line 165) | public Client(
method Client (line 189) | public Client(
method isPortAvailable (line 214) | private static boolean isPortAvailable(int port) {
method isAgentAvailableAfterLoadFailure (line 232) | private boolean isAgentAvailableAfterLoadFailure(VirtualMachine vm) {
method compile (line 245) | @SuppressWarnings("DefaultCharset")
method compile (line 251) | @SuppressWarnings("DefaultCharset")
method compile (line 256) | public byte[] compile(String fileName, String classPath, PrintWriter e...
method getExtensionApiClasspath (line 267) | private String getExtensionApiClasspath() {
method scanExtensionsDir (line 305) | private static String scanExtensionsDir(File extensionsDir) {
method createProtocol (line 327) | private WireProtocol createProtocol(Socket socket, String host, boolea...
method createV1Protocol (line 353) | private WireProtocol createV1Protocol(Socket socket) throws IOException {
method createV2Protocol (line 359) | private WireProtocol createV2Protocol(Socket socket) throws IOException {
method closeSocketQuietly (line 377) | private void closeSocketQuietly(Socket socket) {
method compile (line 391) | public byte[] compile(String fileName, String classPath, PrintWriter e...
method compileSource (line 495) | public byte[] compileSource(String fileName, String source, String cla...
method compileSource (line 499) | public byte[] compileSource(
type CompilerInvoker (line 509) | @FunctionalInterface
method compile (line 511) | Map<String, byte[]> compile(Compiler compiler, String classPath) thr...
method compileInternal (line 514) | private byte[] compileInternal(
method attach (line 588) | public void attach(String pid, String sysCp, String bootCp) throws IOE...
method attach (line 643) | public void attach(String pid, String agentPath, String sysCp, String ...
method connectAndListProbes (line 761) | void connectAndListProbes(String host, CommandListener listener) throw...
method connectAndListFailedExtensions (line 803) | void connectAndListFailedExtensions(String host, CommandListener liste...
method reconnect (line 845) | void reconnect(String host, String resumeProbe, CommandListener listen...
method submit (line 940) | public void submit(String fileName, byte[] code, String[] args, Comman...
method submit (line 949) | public void submit(
method submit (line 1030) | public void submit(byte[] code, String[] args, CommandListener listene...
method sendExit (line 1035) | public void sendExit() throws IOException {
method sendExit (line 1040) | public void sendExit(int code) throws IOException {
method sendDisconnect (line 1044) | public void sendDisconnect() throws IOException {
method sendEvent (line 1052) | public void sendEvent() throws IOException {
method sendEvent (line 1057) | public void sendEvent(String name) throws IOException {
method close (line 1062) | public synchronized void close() throws IOException {
method isDisconnected (line 1074) | boolean isDisconnected() {
method disconnect (line 1078) | void disconnect() throws IOException {
method listProbes (line 1086) | void listProbes() throws IOException {
method listFailedExtensions (line 1090) | void listFailedExtensions() throws IOException {
method reset (line 1095) | private void reset() {
method findMaskedAgentJar (line 1105) | private String findMaskedAgentJar() {
method isMaskedJar (line 1146) | private boolean isMaskedJar(File jarFile) {
method getToolsJarPath (line 1174) | private String getToolsJarPath(String javaClassPath, String javaHome) {
method send (line 1198) | private void send(Command cmd) throws IOException {
method commandLoop (line 1205) | private void commandLoop(CommandListener listener) throws IOException {
method warn (line 1232) | private void warn(CommandListener listener, String msg) {
method submitDTrace (line 1243) | private void submitDTrace(String fileName, byte[] code, String[] args,...
method getDTraceSource (line 1270) | private Object getDTraceSource(String fileName, byte[] code) {
method isPersistedProbe (line 1324) | private static boolean isPersistedProbe(byte[] code) {
FILE: btrace-client/src/main/java/org/openjdk/btrace/client/JpsUtils.java
class JpsUtils (line 14) | final class JpsUtils {
method findVmByName (line 17) | static Integer findVmByName(String name) {
method listVms (line 40) | static Collection<String> listVms() {
method hasBTraceServer (line 68) | static boolean hasBTraceServer(int pid) {
FILE: btrace-client/src/main/java/org/openjdk/btrace/client/Main.java
class Main (line 65) | @SuppressWarnings("RedundantThrows")
method getJavaVersion (line 113) | private static String getJavaVersion() {
method getOutWriter (line 123) | @SuppressWarnings("DefaultCharset")
method main (line 128) | public static void main(String[] args) throws Exception {
method createCommandListener (line 426) | private static CommandListener createCommandListener(Client client) {
method registerExitHook (line 444) | private static void registerExitHook(Client client) {
method registerSignalHandler (line 467) | private static void registerSignalHandler(Client client) {
method usage (line 519) | private static void usage() {
method isDebug (line 524) | private static boolean isDebug() {
method errorExit (line 528) | private static void errorExit(String msg, int code) {
method handleExtractAgent (line 537) | private static void handleExtractAgent() {
method extractJar (line 586) | private static void extractJar(JarFile source, String entryPath, File ...
FILE: btrace-client/src/main/java/org/openjdk/btrace/client/ProbePrinter.java
class ProbePrinter (line 19) | public final class ProbePrinter {
method main (line 20) | public static void main(String[] args) throws Exception {
FILE: btrace-client/src/test/java/org/openjdk/btrace/client/ClientTest.java
class ClientTest (line 19) | class ClientTest {
method createUberJar (line 23) | private File createUberJar() throws IOException {
method testConstructorWithOverrides (line 49) | @Test
method testConstructorWithNullOverrides (line 82) | @Test
method testExtractEmbeddedAgentJarNotFound (line 101) | @Test
method testUberJarCreation (line 117) | @Test
method testAgentJarOverrideTakesPrecedence (line 129) | @Test
method testBootJarOverridePrependsToBootCp (line 146) | @Test
method testBackwardCompatibility (line 163) | @Test
FILE: btrace-client/src/test/java/org/openjdk/btrace/client/MainTest.java
class MainTest (line 18) | class MainTest {
method createTestUberJar (line 25) | private File createTestUberJar() throws IOException {
method testExtractJar (line 45) | @Test
method testExtractJarMissingEntry (line 69) | @Test
method testExtractJarToDirectory (line 96) | @Test
method testExtractAgentCreatesDirectory (line 122) | @Test
method testCLIFlagsParsing (line 134) | @Test
method testExtractJarWithLargeContent (line 152) | @Test
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/AnnotationSerializer.java
class AnnotationSerializer (line 5) | public class AnnotationSerializer {
method serialize (line 6) | public static void serialize(AnnotationNode an, StringBuilder sb) {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/ClassDataJavaFileObject.java
class ClassDataJavaFileObject (line 48) | class ClassDataJavaFileObject implements JavaFileObject {
method ClassDataJavaFileObject (line 62) | ClassDataJavaFileObject(String className, JarFile jarFile, JarEntry en...
method getKind (line 74) | @Override
method isNameCompatible (line 79) | @Override
method getNestingKind (line 88) | @Override
method getAccessLevel (line 93) | @Override
method toUri (line 98) | @Override
method getName (line 103) | @Override
method openInputStream (line 112) | @Override
method openOutputStream (line 117) | @Override
method openReader (line 122) | @Override
method getCharContent (line 127) | @Override
method openWriter (line 132) | @Override
method getLastModified (line 137) | @Override
method delete (line 142) | @Override
method getClassBytes (line 153) | byte[] getClassBytes() throws IOException {
method inferBinaryName (line 170) | String inferBinaryName() {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/Compiler.java
class Compiler (line 54) | public class Compiler {
method Compiler (line 63) | public Compiler(String includePath, boolean generatePack) {
method Compiler (line 74) | public Compiler(String includePath) {
method Compiler (line 78) | public Compiler(boolean generatePack) {
method Compiler (line 82) | public Compiler() {
method usage (line 86) | private static void usage(String msg) {
method usage (line 91) | private static void usage() {
method main (line 96) | @SuppressWarnings({"DefaultCharset", "RedundantThrows"})
method compile (line 211) | public Map<String, byte[]> compile(
method compile (line 222) | public Map<String, byte[]> compile(File file, Writer err, String sourc...
method compile (line 228) | public Map<String, byte[]> compile(
method compile (line 242) | public Map<String, byte[]> compile(
method compile (line 252) | private Map<String, byte[]> compile(
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/CompilerClassWriter.java
class CompilerClassWriter (line 39) | class CompilerClassWriter extends ClassWriter {
method CompilerClassWriter (line 42) | public CompilerClassWriter(String classPath, PrintWriter perr) {
method CompilerClassWriter (line 46) | public CompilerClassWriter(String classPath, PrintWriter perr, ClassLo...
method getCommonSuperClass (line 68) | @Override
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/CompilerHelper.java
class CompilerHelper (line 36) | class CompilerHelper {
method CompilerHelper (line 43) | CompilerHelper(JavaCompiler compiler, boolean generatePack) {
method extendClassPathWithExtensions (line 55) | private String extendClassPathWithExtensions(String classPath) {
method getBTraceHome (line 106) | private String getBTraceHome() {
method addExtensionJars (line 141) | private void addExtensionJars(Path directory, List<String> jars) {
method compile (line 155) | Map<String, byte[]> compile(
method dump (line 287) | private void dump(String name, byte[] code) {
method printDiagnostic (line 309) | private void printDiagnostic(Diagnostic diagnostic, PrintWriter perr) {
method containsErrors (line 317) | private boolean containsErrors(DiagnosticCollector<?> diagnostics) {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/ConcatenatingReader.java
class ConcatenatingReader (line 56) | public class ConcatenatingReader extends FilterReader {
method ConcatenatingReader (line 67) | public ConcatenatingReader(BufferedReader in) {
method read (line 72) | @Override
method markSupported (line 83) | @Override
method mark (line 88) | @Override
method reset (line 93) | @Override
method ready (line 98) | @Override
method read (line 103) | @Override
method skip (line 129) | @Override
method nextLine (line 146) | private void nextLine() throws IOException {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/MaskedJavaFileManager.java
class MaskedJavaFileManager (line 57) | class MaskedJavaFileManager extends ForwardingJavaFileManager<JavaFileMa...
method MaskedJavaFileManager (line 71) | MaskedJavaFileManager(JavaFileManager fileManager, File maskedJar) thr...
method getJavaFileForInput (line 78) | @Override
method list (line 99) | @Override
method inferBinaryName (line 152) | @Override
method close (line 166) | @Override
method debug (line 175) | private void debug(String msg) {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/MemoryJavaFileManager.java
class MemoryJavaFileManager (line 61) | @SuppressWarnings("RedundantThrows")
method MemoryJavaFileManager (line 67) | public MemoryJavaFileManager(JavaFileManager fileManager, List<String>...
method preprocessedFileObject (line 73) | static JavaFileObject preprocessedFileObject(JavaFileObject fo, List<S...
method makeStringSource (line 87) | static JavaFileObject makeStringSource(String name, String code, List<...
method toURI (line 102) | static URI toURI(String name) {
method getClassBytes (line 115) | public Map<String, byte[]> getClassBytes() {
method close (line 119) | @Override
method flush (line 124) | @Override
method getJavaFileForOutput (line 127) | @Override
method getJavaFileForInput (line 138) | @Override
class StringInputBuffer (line 150) | private static class StringInputBuffer extends SimpleJavaFileObject {
method StringInputBuffer (line 154) | StringInputBuffer(String name, String code) {
method getCharContent (line 159) | @Override
method openReader (line 164) | public Reader openReader() {
class ClassOutputBuffer (line 170) | private class ClassOutputBuffer extends SimpleJavaFileObject {
method ClassOutputBuffer (line 174) | ClassOutputBuffer(String name) {
method openOutputStream (line 179) | @Override
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/PCPP.java
class PCPP (line 56) | public class PCPP {
method PCPP (line 74) | public PCPP(List<String> includePaths) {
method PCPP (line 79) | public PCPP(List<String> includePaths, Writer out) {
method main (line 84) | @SuppressWarnings("DefaultCharset")
method usage (line 129) | private static void usage() {
method run (line 137) | public void run(Reader reader, String filename) throws IOException {
method findFile (line 170) | public String findFile(String filename) {
method pushBackToken (line 183) | private void pushBackToken() {
method nextToken (line 188) | private int nextToken() throws IOException {
method nextToken (line 192) | private int nextToken(boolean returnEOLs) throws IOException {
method nextRequiredToken (line 222) | private void nextRequiredToken(int requiredToken) throws IOException {
method curToken (line 242) | private int curToken() {
method curTokenAsString (line 246) | private String curTokenAsString() {
method nextWord (line 261) | private String nextWord() throws IOException {
method curWord (line 269) | private String curWord() {
method startOfLine (line 273) | private boolean startOfLine() {
method filename (line 277) | private String filename() {
method lineNumber (line 281) | private int lineNumber() {
method parse (line 288) | private void parse() throws IOException {
method preprocessorDirective (line 314) | private void preprocessorDirective() throws IOException {
method handleUndefine (line 361) | private void handleUndefine() throws IOException {
method handleDefine (line 403) | private void handleDefine() throws IOException {
method isConstant (line 506) | private boolean isConstant(String s) {
method checkHex (line 514) | private boolean checkHex(String s) {
method checkDecimal (line 524) | private boolean checkDecimal(String s) {
method resolveDefine (line 534) | private String resolveDefine(String word, boolean returnNullIfNotFound) {
method handleIfdef (line 555) | private void handleIfdef(boolean isIfdef) throws IOException {
method handleElse (line 569) | private void handleElse() {
method handleEndif (line 576) | private void handleEndif() {
method handleIf (line 588) | private void handleIf(boolean isIf) throws IOException {
method handleIfRecursive (line 612) | private boolean handleIfRecursive(boolean greedy) throws IOException {
method handleInclude (line 754) | @SuppressWarnings("DefaultCharset")
method debugPrint (line 794) | private void debugPrint(boolean onlyPrintIfEnabled, String msg) {
method printToken (line 807) | private void printToken() {
method lineDirective (line 811) | private void lineDirective() {
class ParseState (line 821) | static class ParseState {
method ParseState (line 830) | ParseState(StreamTokenizer tok, String filename) {
method tok (line 839) | StreamTokenizer tok() {
method filename (line 843) | String filename() {
method lineNumber (line 847) | int lineNumber() {
method startOfLine (line 851) | boolean startOfLine() {
method setStartOfLine (line 855) | void setStartOfLine(boolean val) {
method startOfFile (line 859) | boolean startOfFile() {
method setStartOfFile (line 863) | void setStartOfFile(boolean val) {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/PackGenerator.java
type PackGenerator (line 5) | public interface PackGenerator {
method generateProbePack (line 6) | byte[] generateProbePack(byte[] data) throws IOException;
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/Postprocessor.java
class Postprocessor (line 48) | public class Postprocessor extends ClassVisitor {
method Postprocessor (line 53) | public Postprocessor(ClassVisitor cv) {
method visit (line 57) | @Override
method visitMethod (line 78) | @Override
method createDefaultConstructor (line 107) | private void createDefaultConstructor() {
method visitField (line 118) | @Override
method visitEnd (line 156) | @Override
method addFields (line 163) | private void addFields() {
class AnnotationDef (line 192) | private static final class AnnotationDef {
method AnnotationDef (line 196) | public AnnotationDef(String type) {
method addValue (line 200) | public void addValue(String name, Object val) {
method getType (line 204) | public String getType() {
method getValues (line 208) | public Map<String, Object> getValues() {
class FieldDescriptor (line 213) | private static class FieldDescriptor {
method FieldDescriptor (line 222) | FieldDescriptor(
class MethodConvertor (line 240) | private class MethodConvertor extends MethodVisitor {
method MethodConvertor (line 246) | public MethodConvertor(int localVarOffset, boolean isConstructor, Me...
method visitLocalVariable (line 253) | @Override
method visitVarInsn (line 262) | @Override
method visitInsn (line 302) | @Override
method visitIntInsn (line 580) | @Override
method visitJumpInsn (line 595) | @Override
method visitTableSwitchInsn (line 627) | @Override
method visitLookupSwitchInsn (line 635) | @Override
method visitLdcInsn (line 643) | @Override
method visitMaxs (line 654) | @Override
method visitIincInsn (line 659) | @Override
method visitFieldInsn (line 666) | @Override
method visitMethodInsn (line 700) | @Override
method visitAnnotation (line 729) | @Override
method visitAnnotationDefault (line 736) | @Override
method visitAttribute (line 741) | @Override
method visitMultiANewArrayInsn (line 748) | @Override
method visitParameterAnnotation (line 759) | @Override
method visitTypeInsn (line 766) | @Override
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/Printer.java
class Printer (line 7) | class Printer {
method Printer (line 15) | Printer() {
method Printer (line 19) | Printer(Writer out) {
method getDebugPrintIndentLevel (line 23) | public static int getDebugPrintIndentLevel() {
method println (line 27) | void println() {
method enabled (line 33) | boolean enabled() {
method pushEnableBit (line 37) | void pushEnableBit(boolean enabled) {
method print (line 43) | void print(String s) {
method flush (line 50) | void flush() {
method popEnableBit (line 57) | void popEnableBit() {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/Verifier.java
class Verifier (line 67) | @SupportedAnnotationTypes("*")
method init (line 76) | @Override
method process (line 84) | @Override
method started (line 89) | @Override
method finished (line 99) | @Override
method getClassNames (line 120) | List<String> getClassNames() {
method getCompilationUnit (line 124) | CompilationUnitTree getCompilationUnit() {
method getTreeUtils (line 135) | Trees getTreeUtils() {
method getSourcePositions (line 139) | SourcePositions getSourcePositions() {
method getProcessingEnvironment (line 143) | ProcessingEnvironment getProcessingEnvironment() {
method getMessager (line 147) | Messager getMessager() {
method getElementUtils (line 151) | Elements getElementUtils() {
method getTypeUtils (line 155) | Types getTypeUtils() {
method getLocale (line 159) | Locale getLocale() {
method annotationName (line 163) | String annotationName(AnnotationTree at) {
method verify (line 173) | private void verify(ClassTree ct, Element topElement) {
method hasTrustedAnnotation (line 189) | private boolean hasTrustedAnnotation(ClassTree ct, Element topElement) {
class AttributionTaskListener (line 221) | private final class AttributionTaskListener implements TaskListener {
method finished (line 223) | @Override
method started (line 241) | @Override
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/VerifierVisitor.java
class VerifierVisitor (line 92) | public class VerifierVisitor extends TreeScanner<Void, Void> {
method visitAnnotation (line 119) | @Override
method VerifierVisitor (line 135) | public VerifierVisitor(Verifier verifier, Element clzElement) {
method visitMethodInvocation (line 145) | @Override
method isServiceDerivedType (line 197) | private boolean isServiceDerivedType(String typeName) {
method isSameClass (line 208) | private boolean isSameClass(String typeName) {
method isBTraceClass (line 212) | private boolean isBTraceClass(String typeName) {
method visitAssert (line 217) | @Override
method visitAssignment (line 223) | @Override
method visitCompoundAssignment (line 229) | @Override
method visitCatch (line 235) | @Override
method visitClass (line 241) | @Override
method visitDoWhileLoop (line 324) | @Override
method visitEnhancedForLoop (line 330) | @Override
method visitForLoop (line 336) | @Override
method visitMethod (line 342) | @Override
method addEventFieldNames (line 419) | private void addEventFieldNames(AnnotationTree at) {
method addEventFieldName (line 425) | private void addEventFieldName(AssignmentTree assignmentTree) {
method visitNewArray (line 432) | @Override
method visitNewClass (line 440) | @Override
method visitReturn (line 448) | @Override
method visitMemberSelect (line 467) | @Override
method visitAnnotation (line 482) | @Override
method visitSynchronized (line 492) | @Override
method visitThrow (line 498) | @Override
method visitTry (line 504) | @Override
method visitVariable (line 510) | @Override
method isDeclaredExtensionService (line 558) | private boolean isDeclaredExtensionService(String serviceClassName) {
method declaresServiceInJar (line 598) | private boolean declaresServiceInJar(String jarPath, String serviceCla...
method processEventFields (line 632) | private void processEventFields(AssignmentTree t) {
method visitWhileLoop (line 644) | @Override
method visitOther (line 650) | @Override
method isStatic (line 656) | private boolean isStatic(Set<Modifier> modifiers) {
method isSynchronized (line 665) | private boolean isSynchronized(Set<Modifier> modifiers) {
method isPublic (line 674) | private boolean isPublic(Set<Modifier> modifiers) {
method isErrorHandler (line 683) | private boolean isErrorHandler(MethodTree node) {
method isExitHandler (line 695) | private boolean isExitHandler(MethodTree node) {
method isAnnotated (line 707) | private boolean isAnnotated(MethodTree node) {
method checkSampling (line 719) | private void checkSampling(MethodTree node) {
method checkLValue (line 744) | private void checkLValue(Tree variable) {
method reportError (line 763) | private void reportError(String msg, Tree node) {
method getElement (line 778) | private Element getElement(Tree t) {
method getType (line 798) | private TypeMirror getType(Tree t) {
method collectExtensionPermissions (line 807) | private void collectExtensionPermissions(TypeMirror extensionType) {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerAST.java
class OnelinerAST (line 11) | public class OnelinerAST {
class OnelinerNode (line 14) | public static class OnelinerNode {
method OnelinerNode (line 17) | public OnelinerNode(ProbeClause probe) {
class ProbeClause (line 23) | public static class ProbeClause {
method ProbeClause (line 28) | public ProbeClause(ProbeSpec probeSpec, Filter filter, ActionBlock a...
class ProbeSpec (line 36) | public static class ProbeSpec {
method ProbeSpec (line 41) | public ProbeSpec(String classPattern, String methodPattern, Location...
type Location (line 49) | public enum Location {
class Filter (line 56) | public static class Filter {
method Filter (line 61) | public Filter(FilterType type, Comparator comparator, Object value) {
type FilterType (line 69) | public enum FilterType {
type Comparator (line 75) | public enum Comparator {
class ActionBlock (line 85) | public static class ActionBlock {
method ActionBlock (line 88) | public ActionBlock(List<Action> actions) {
type Action (line 97) | public interface Action {}
class PrintAction (line 100) | public static class PrintAction implements Action {
method PrintAction (line 103) | public PrintAction(List<String> args) {
class CountAction (line 109) | public static class CountAction implements Action {
method CountAction (line 110) | public CountAction() {}
class TimeAction (line 114) | public static class TimeAction implements Action {
method TimeAction (line 115) | public TimeAction() {}
class StackAction (line 119) | public static class StackAction implements Action {
method StackAction (line 122) | public StackAction(Integer depth) {
class ArgFilter (line 131) | public static class ArgFilter extends Filter {
method ArgFilter (line 134) | public ArgFilter(int argIndex, Comparator comparator, Object value) {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerCodeGenerator.java
class OnelinerCodeGenerator (line 10) | public class OnelinerCodeGenerator {
method generate (line 21) | public static String generate(OnelinerNode node) {
method generate (line 32) | public static String generate(OnelinerNode node, String className) {
method generateProbeMethod (line 77) | private static void generateProbeMethod(StringBuilder sb, ProbeClause ...
method collectParameters (line 114) | private static List<String> collectParameters(ProbeClause probe) {
method addFilterParameters (line 135) | private static void addFilterParameters(
method addPrintParameters (line 144) | private static void addPrintParameters(
method addParameter (line 170) | private static void addParameter(List<String> params, Set<String> seen...
method generateMethodBody (line 177) | private static void generateMethodBody(StringBuilder sb, ProbeClause p...
method generateFilterCondition (line 207) | private static void generateFilterCondition(StringBuilder sb, Filter f...
method comparatorToJava (line 247) | private static String comparatorToJava(Comparator comp) {
method generatePrintAction (line 266) | private static void generatePrintAction(StringBuilder sb, String inden...
method generateTimeAction (line 304) | private static void generateTimeAction(StringBuilder sb, String indent) {
method generateStackAction (line 309) | private static void generateStackAction(StringBuilder sb, String inden...
method hasCountAction (line 317) | private static boolean hasCountAction(ActionBlock actionBlock) {
method escapeJavaString (line 326) | private static String escapeJavaString(String str) {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerException.java
class OnelinerException (line 7) | public class OnelinerException extends RuntimeException {
method OnelinerException (line 11) | public OnelinerException(String message, String input, int position) {
method OnelinerException (line 17) | public OnelinerException(String message, String input, int position, T...
method getPosition (line 23) | public int getPosition() {
method getInput (line 27) | public String getInput() {
method formatMessage (line 31) | private static String formatMessage(String message, String input, int ...
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerLexer.java
class OnelinerLexer (line 9) | public class OnelinerLexer {
type TokenType (line 12) | public enum TokenType {
class Token (line 58) | public static class Token {
method Token (line 63) | public Token(TokenType type, String value, int position) {
method toString (line 69) | @Override
method OnelinerLexer (line 98) | public OnelinerLexer(String input) {
method tokenize (line 103) | public List<Token> tokenize() {
method nextToken (line 114) | public Token nextToken() {
method scanRegex (line 204) | private Token scanRegex(int startPos) {
method scanString (line 224) | private Token scanString(int startPos) {
method scanNumber (line 268) | private Token scanNumber(int startPos) {
method scanIdentifierOrKeyword (line 277) | private Token scanIdentifierOrKeyword(int startPos) {
method skipWhitespace (line 288) | private void skipWhitespace() {
method isEOF (line 294) | private boolean isEOF() {
method peek (line 298) | private char peek() {
method peek (line 302) | private char peek(int offset) {
method isIdentifierStart (line 307) | private boolean isIdentifierStart(char ch) {
method isIdentifierPart (line 311) | private boolean isIdentifierPart(char ch) {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerParser.java
class OnelinerParser (line 10) | public class OnelinerParser {
method OnelinerParser (line 16) | private OnelinerParser(String input, List<Token> tokens) {
method parse (line 22) | public static OnelinerNode parse(String input) {
method parseOneliner (line 30) | private OnelinerNode parseOneliner() {
method parseProbeSpec (line 47) | private ProbeSpec parseProbeSpec() {
method parsePattern (line 66) | private String parsePattern(String patternName) {
method parseLocation (line 91) | private Location parseLocation() {
method parseFilter (line 105) | private Filter parseFilter() {
method parsePredicate (line 114) | private Filter parsePredicate() {
method parseDurationPredicate (line 126) | private Filter parseDurationPredicate() {
method parseArgPredicate (line 147) | private Filter parseArgPredicate() {
method parseComparator (line 184) | private Comparator parseComparator() {
method parseActionBlock (line 204) | private ActionBlock parseActionBlock() {
method parseAction (line 224) | private Action parseAction() {
method parsePrintAction (line 240) | private PrintAction parsePrintAction() {
method isPrintIdentifier (line 266) | private boolean isPrintIdentifier(TokenType type) {
method parsePrintIdentifier (line 275) | private String parsePrintIdentifier() {
method parseCountAction (line 295) | private CountAction parseCountAction() {
method parseTimeAction (line 303) | private TimeAction parseTimeAction() {
method parseStackAction (line 311) | private StackAction parseStackAction() {
method match (line 333) | private boolean match(TokenType... types) {
method check (line 343) | private boolean check(TokenType type) {
method advance (line 350) | private Token advance() {
method isAtEnd (line 357) | private boolean isAtEnd() {
method peek (line 361) | private Token peek() {
method previous (line 365) | private Token previous() {
method error (line 369) | private void error(String message) {
FILE: btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerValidator.java
class OnelinerValidator (line 10) | public class OnelinerValidator {
method validate (line 17) | public static void validate(OnelinerNode node, String input) {
method validateProbeSpec (line 32) | private static void validateProbeSpec(ProbeSpec spec, String input) {
method validateRegexPattern (line 48) | private static void validateRegexPattern(String pattern, String patter...
method validateFilter (line 60) | private static void validateFilter(Filter filter, Location location, S...
method validateActions (line 87) | private static void validateActions(ActionBlock actionBlock, Location ...
method validatePrintAction (line 124) | private static void validatePrintAction(PrintAction action, Location l...
FILE: btrace-compiler/src/test/java/org/openjdk/btrace/compiler/JfrEventsTest.java
class JfrEventsTest (line 17) | public class JfrEventsTest {
method testCompile (line 18) | @Test
method verifyCode (line 37) | private void verifyCode(byte[] code) {
FILE: btrace-compiler/src/test/java/org/openjdk/btrace/compiler/TypeErasureTest.java
class TypeErasureTest (line 18) | public class TypeErasureTest {
method testTypeErasure (line 19) | @Test
method verifyCode (line 38) | private void verifyCode(byte[] code) {
FILE: btrace-compiler/src/test/java/org/openjdk/btrace/compiler/oneliner/OnelinerCodeGeneratorTest.java
class OnelinerCodeGeneratorTest (line 8) | class OnelinerCodeGeneratorTest {
method testGenerateSimpleEntry (line 10) | @Test
method testGenerateReturn (line 22) | @Test
method testGenerateError (line 31) | @Test
method testGeneratePrintMultipleArgs (line 42) | @Test
method testGeneratePrintAllIdentifiers (line 53) | @Test
method testGenerateCount (line 67) | @Test
method testGenerateTime (line 79) | @Test
method testGenerateStackWithoutDepth (line 89) | @Test
method testGenerateStackWithDepth (line 98) | @Test
method testGenerateDurationFilterGreaterThan (line 107) | @Test
method testGenerateDurationFilterGreaterThanOrEqual (line 117) | @Test
method testGenerateDurationFilterLessThan (line 126) | @Test
method testGenerateArgFilterStringEquals (line 135) | @Test
method testGenerateArgFilterStringNotEquals (line 146) | @Test
method testGenerateArgFilterNumberGreaterThan (line 156) | @Test
method testGenerateMultipleActions (line 166) | @Test
method testGenerateRegexPattern (line 178) | @Test
method testClassNameIsUnique (line 187) | @Test
method testGeneratedCodeHasCorrectPackage (line 202) | @Test
method testGeneratedCodeHasRequiredImports (line 211) | @Test
FILE: btrace-compiler/src/test/java/org/openjdk/btrace/compiler/oneliner/OnelinerIntegrationTest.java
class OnelinerIntegrationTest (line 15) | class OnelinerIntegrationTest {
method testCompileSimpleEntry (line 17) | @Test
method testCompileReturnWithFilter (line 26) | @Test
method testCompileCount (line 35) | @Test
method testCompileStack (line 44) | @Test
method testCompileMultipleActions (line 53) | @Test
method testCompileArgFilter (line 62) | @Test
method testCompileRegexPattern (line 71) | @Test
method testCompileError (line 80) | @Test
method testCompileTime (line 89) | @Test
method testCompilePrintAllIdentifiers (line 98) | @Test
method compileOneliner (line 110) | private byte[] compileOneliner(String oneliner) {
FILE: btrace-compiler/src/test/java/org/openjdk/btrace/compiler/oneliner/OnelinerParserTest.java
class OnelinerParserTest (line 8) | class OnelinerParserTest {
method testSimpleEntryProbe (line 10) | @Test
method testReturnProbe (line 24) | @Test
method testErrorProbe (line 32) | @Test
method testRegexPattern (line 42) | @Test
method testMethodRegexPattern (line 50) | @Test
method testPrintWithArguments (line 59) | @Test
method testPrintAllIdentifiers (line 70) | @Test
method testCountAction (line 85) | @Test
method testTimeAction (line 93) | @Test
method testStackAction (line 101) | @Test
method testStackActionWithDepth (line 110) | @Test
method testMultipleActions (line 119) | @Test
method testDurationFilterGreaterThan (line 130) | @Test
method testDurationFilterGreaterThanOrEqual (line 141) | @Test
method testArgFilterStringEquals (line 150) | @Test
method testArgFilterNumberGreaterThan (line 162) | @Test
method testArgFilterNotEquals (line 173) | @Test
method testErrorMissingDoubleColon (line 182) | @Test
method testErrorMissingAt (line 188) | @Test
method testErrorMissingActionBlock (line 194) | @Test
method testErrorMissingClosingBrace (line 200) | @Test
method testErrorInvalidLocation (line 206) | @Test
method testErrorInvalidAction (line 212) | @Test
method testErrorEmptyActionBlock (line 218) | @Test
FILE: btrace-compiler/src/test/resources/HistoProbe.java
class HistoProbe (line 9) | @BTrace public class HistoProbe {
method onMethod (line 11) | @OnMethod(clazz = "javax.swing.JComponent", method = "<init>")
method print (line 23) | @OnTimer(1000)
FILE: btrace-compiler/src/test/resources/JfrEventsProbe.java
class JfrEventsProbe (line 9) | @BTrace public class JfrEventsProbe {
method onMethod (line 20) | @OnMethod(clazz = "/.*/", method = "/.*/")
method onPeriod (line 28) | @PeriodicEvent(name = "PeriodicEvent", fields = @Event.Field(type = Ev...
FILE: btrace-compiler/src/test/resources/MetricsExtensionProbe.java
class MetricsExtensionProbe (line 24) | @BTrace
method onStringLength (line 33) | @OnMethod(clazz = "java.lang.String", method = "length", location = @L...
FILE: btrace-core/src/jmh/java/org/openjdk/btrace/core/comm/v2/BinaryProtocolBenchmark.java
class BinaryProtocolBenchmark (line 41) | @BenchmarkMode({Mode.Throughput, Mode.AverageTime})
method setup (line 60) | @Setup
method binarySerialize (line 130) | @Benchmark
method binaryDeserialize (line 137) | @Benchmark
method javaSerialize (line 147) | @Benchmark
method javaDeserialize (line 156) | @Benchmark
method binaryRoundTrip (line 171) | @Benchmark
method javaRoundTrip (line 185) | @Benchmark
method createByteArray (line 205) | private byte[] createByteArray(String size) {
method createString (line 227) | private String createString(String size) {
method createNumberMap (line 249) | private Map<String, Number> createNumberMap(String size) {
method createStringMap (line 271) | private Map<String, String> createStringMap(String size) {
method createGridData (line 293) | private List<Object[]> createGridData(String size) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/Args.java
class Args (line 3) | public final class Args {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/ArgsMap.java
class ArgsMap (line 31) | public final class ArgsMap implements Iterable<Map.Entry<String, String>> {
method ArgsMap (line 34) | public ArgsMap(Map<String, String> args) {
method ArgsMap (line 38) | public ArgsMap(String[] argLine) {
method ArgsMap (line 52) | public ArgsMap() {
method ArgsMap (line 56) | public ArgsMap(int initialCapacity) {
method merge (line 60) | public static ArgsMap merge(ArgsMap... maps) {
method get (line 68) | public String get(String key) {
method get (line 72) | public String get(int idx) {
method clear (line 85) | public void clear() {
method size (line 89) | public int size() {
method isEmpty (line 93) | public boolean isEmpty() {
method put (line 97) | public String put(String key, String value) {
method iterator (line 101) | @Override
method containsKey (line 106) | public boolean containsKey(String key) {
method equals (line 110) | @Override
method hashCode (line 115) | @Override
method toString (line 120) | @Override
method template (line 125) | public String template(String value) {
class PatternSingleton (line 145) | private static final class PatternSingleton {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/BTraceRuntime.java
class BTraceRuntime (line 65) | @SuppressWarnings("deprecation")
method BTraceRuntime (line 94) | private BTraceRuntime() {}
method getRt (line 96) | private static Impl getRt() {
method parseLong (line 101) | public static long parseLong(String value, long deflt) {
method parseInt (line 112) | public static int parseInt(String value, int deflt) {
method initUnsafe (line 126) | public static Unsafe initUnsafe() {
method getInstrumentationLevel (line 137) | static int getInstrumentationLevel() {
method setInstrumentationLevel (line 141) | static void setInstrumentationLevel(int level) {
method enter (line 145) | public static boolean enter() {
method leave (line 154) | public static void leave() {
method handleException (line 162) | public static void handleException(Throwable th) {
method identityStr (line 168) | private static String identityStr(Object obj) {
method speculation (line 173) | static int speculation() {
method speculate (line 177) | static void speculate(int id) {
method discard (line 181) | static void discard(int id) {
method commit (line 185) | static void commit(int id) {
method compare (line 198) | static boolean compare(Object obj1, Object obj2) {
method newHashMap (line 210) | static <K, V> Map<K, V> newHashMap() {
method newWeakMap (line 214) | static <K, V> Map<K, V> newWeakMap() {
method newDeque (line 218) | static <V> Deque<V> newDeque() {
method newStringBuilder (line 222) | static Appendable newStringBuilder(boolean threadSafe) {
method newStringBuilder (line 226) | static Appendable newStringBuilder() {
method size (line 230) | static <E> int size(Collection<E> coll) {
method isEmpty (line 238) | public static <E> boolean isEmpty(Collection<E> coll) {
method contains (line 246) | static <E> boolean contains(Collection<E> coll, Object obj) {
method toArray (line 259) | static <E> Object[] toArray(Collection<E> collection) {
method get (line 267) | static <K, V> V get(Map<K, V> map, K key) {
method containsKey (line 275) | static <K, V> boolean containsKey(Map<K, V> map, K key) {
method containsValue (line 283) | static <K, V> boolean containsValue(Map<K, V> map, V value) {
method put (line 291) | static <K, V> V put(Map<K, V> map, K key, V value) {
method remove (line 299) | static <K, V> V remove(Map<K, V> map, K key) {
method clear (line 307) | static <K, V> void clear(Map<K, V> map) {
method size (line 315) | static <K, V> int size(Map<K, V> map) {
method isEmpty (line 323) | static <K, V> boolean isEmpty(Map<K, V> map) {
method putAll (line 331) | static <K, V> void putAll(Map<K, V> src, Map<K, V> dst) {
method copy (line 335) | static <K, V> void copy(Map<K, V> src, Map<K, V> dst) {
method printMap (line 340) | @SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
method push (line 357) | public static <V> void push(Deque<V> queue, V value) {
method addLast (line 365) | public static <V> void addLast(Deque<V> queue, V value) {
method peekFirst (line 373) | public static <V> V peekFirst(Deque<V> queue) {
method peekLast (line 381) | public static <V> V peekLast(Deque<V> queue) {
method removeLast (line 389) | public static <V> V removeLast(Deque<V> queue) {
method removeFirst (line 397) | public static <V> V removeFirst(Deque<V> queue) {
method poll (line 405) | public static <V> V poll(Deque<V> queue) {
method peek (line 413) | public static <V> V peek(Deque<V> queue) {
method clear (line 421) | public static <V> void clear(Deque<V> queue) {
method append (line 429) | public static Appendable append(Appendable buffer, String strToAppend) {
method length (line 441) | public static int length(Appendable buffer) {
method printNumber (line 449) | static void printNumber(String name, Number value) {
method printNumberMap (line 453) | static void printNumberMap(String name, Map<String, ? extends Number> ...
method printStringMap (line 457) | static void printStringMap(String name, Map<String, String> data) {
method exit (line 462) | static void exit(int exitCode) {
method sizeof (line 466) | static long sizeof(Object obj) {
method $length (line 471) | static int $length() {
method $ (line 475) | static String $(int n) {
method $ (line 479) | static String $(String key) {
method instanceOf (line 486) | static boolean instanceOf(Object obj, String className) {
method newAtomicInteger (line 508) | static AtomicInteger newAtomicInteger(int initVal) {
method get (line 512) | static int get(AtomicInteger ai) {
method set (line 520) | static void set(AtomicInteger ai, int i) {
method lazySet (line 528) | static void lazySet(AtomicInteger ai, int i) {
method compareAndSet (line 536) | static boolean compareAndSet(AtomicInteger ai, int i, int j) {
method weakCompareAndSet (line 544) | static boolean weakCompareAndSet(AtomicInteger ai, int i, int j) {
method getAndIncrement (line 552) | static int getAndIncrement(AtomicInteger ai) {
method getAndDecrement (line 560) | static int getAndDecrement(AtomicInteger ai) {
method incrementAndGet (line 568) | static int incrementAndGet(AtomicInteger ai) {
method decrementAndGet (line 576) | static int decrementAndGet(AtomicInteger ai) {
method getAndAdd (line 584) | static int getAndAdd(AtomicInteger ai, int i) {
method addAndGet (line 592) | static int addAndGet(AtomicInteger ai, int i) {
method getAndSet (line 600) | static int getAndSet(AtomicInteger ai, int i) {
method newAtomicLong (line 608) | static AtomicLong newAtomicLong(long initVal) {
method get (line 612) | static long get(AtomicLong al) {
method set (line 620) | static void set(AtomicLong al, long i) {
method lazySet (line 628) | static void lazySet(AtomicLong al, long i) {
method compareAndSet (line 636) | static boolean compareAndSet(AtomicLong al, long i, long j) {
method weakCompareAndSet (line 644) | static boolean weakCompareAndSet(AtomicLong al, long i, long j) {
method getAndIncrement (line 652) | static long getAndIncrement(AtomicLong al) {
method getAndDecrement (line 660) | static long getAndDecrement(AtomicLong al) {
method incrementAndGet (line 668) | static long incrementAndGet(AtomicLong al) {
method decrementAndGet (line 676) | static long decrementAndGet(AtomicLong al) {
method getAndAdd (line 684) | static long getAndAdd(AtomicLong al, long i) {
method addAndGet (line 692) | static long addAndGet(AtomicLong al, long i) {
method getAndSet (line 700) | static long getAndSet(AtomicLong al, long i) {
method perfInt (line 709) | static int perfInt(String name) {
method perfLong (line 713) | static long perfLong(String name) {
method perfString (line 717) | static String perfString(String name) {
method stackTraceAllStr (line 722) | private static String stackTraceAllStr(int numFrames, boolean printWar...
method stackTraceAllStr (line 736) | static String stackTraceAllStr(int numFrames) {
method stackTraceAll (line 740) | static void stackTraceAll(int numFrames) {
method stackTraceStr (line 744) | static String stackTraceStr(StackTraceElement[] st, int strip, int num...
method stackTraceStr (line 748) | static String stackTraceStr(String prefix, StackTraceElement[] st, int...
method stackTraceStr (line 752) | private static String stackTraceStr(
method stackTrace (line 779) | static void stackTrace(StackTraceElement[] st, int strip, int numFrame...
method stackTrace (line 783) | static void stackTrace(String prefix, StackTraceElement[] st, int stri...
method print (line 788) | static void print(String str) {
method println (line 792) | static void println(String str) {
method println (line 796) | static void println() {
method property (line 800) | static String property(String name) {
method properties (line 804) | static Properties properties() {
method getenv (line 809) | static String getenv(String name) {
method getenv (line 813) | static Map<String, String> getenv() {
method heapUsage (line 818) | static MemoryUsage heapUsage() {
method nonHeapUsage (line 822) | static MemoryUsage nonHeapUsage() {
method finalizationCount (line 826) | static long finalizationCount() {
method vmStartTime (line 830) | static long vmStartTime() {
method vmUptime (line 834) | static long vmUptime() {
method getInputArguments (line 838) | static List<String> getInputArguments() {
method getVmVersion (line 842) | static String getVmVersion() {
method isBootClassPathSupported (line 846) | static boolean isBootClassPathSupported() {
method getBootClassPath (line 850) | static String getBootClassPath() {
method getThreadCount (line 854) | static long getThreadCount() {
method getPeakThreadCount (line 858) | static long getPeakThreadCount() {
method getTotalStartedThreadCount (line 862) | static long getTotalStartedThreadCount() {
method getDaemonThreadCount (line 866) | static long getDaemonThreadCount() {
method getCurrentThreadCpuTime (line 870) | static long getCurrentThreadCpuTime() {
method getCurrentThreadUserTime (line 876) | static long getCurrentThreadUserTime() {
method dumpHeap (line 882) | static void dumpHeap(String fileName, boolean live) {
method getTotalGcTime (line 893) | static long getTotalGcTime() {
method getMemoryPoolUsage (line 901) | static String getMemoryPoolUsage(String poolFormat) {
method getSystemLoadAverage (line 925) | static double getSystemLoadAverage() {
method getProcessCPUTime (line 929) | static long getProcessCPUTime() {
method serialize (line 939) | static void serialize(Object obj, String fileName) {
method toXML (line 953) | static String toXML(Object obj) {
method writeXML (line 957) | static void writeXML(Object obj, String fileName) {
method writeDOT (line 961) | static void writeDOT(Object obj, String fileName) {
method deadlocks (line 965) | static void deadlocks(boolean stackTrace) {
method dtraceProbe (line 1029) | static int dtraceProbe(String s1, String s2, int i1, int i2) {
method createEventFactory (line 1038) | public static JfrEvent.Factory createEventFactory(JfrEvent.Template te...
method isBootstrapClass (line 1042) | public static boolean isBootstrapClass(String className) {
method printSnapshot (line 1046) | static void printSnapshot(String name, Profiler.Snapshot snapshot) {
method printSnapshot (line 1060) | static void printSnapshot(String name, Profiler.Snapshot snapshot, Str...
method newProfiler (line 1067) | static Profiler newProfiler() {
method newProfiler (line 1074) | static Profiler newProfiler(int expectedMethodCnt) {
method recordEntry (line 1081) | static void recordEntry(Profiler profiler, String methodName) {
method recordExit (line 1090) | static void recordExit(Profiler profiler, String methodName, long dura...
method snapshot (line 1097) | static Profiler.Snapshot snapshot(Profiler profiler) {
method snapshotAndReset (line 1104) | static Profiler.Snapshot snapshotAndReset(Profiler profiler) {
method resetProfiler (line 1108) | static void resetProfiler(Profiler profiler) {
method getCallerClassloader (line 1112) | static ClassLoader getCallerClassloader(int stackDec) {
method getCallerClass (line 1116) | public static Class<?> getCallerClass(int stackDec) {
method dtraceProbe0 (line 1122) | private static native int dtraceProbe0(String s1, String s2, int i1, i...
type Impl (line 1128) | public interface Impl {
method send (line 1129) | void send(String msg);
method sendCommand (line 1131) | void sendCommand(Object cmd);
method sendNumberData (line 1133) | void sendNumberData(String name, Number value);
method sendNumberMapData (line 1135) | void sendNumberMapData(String name, Map<String, ? extends Number> da...
method sendStringMapData (line 1137) | void sendStringMapData(String name, Map<String, String> data);
method sendGridData (line 1139) | void sendGridData(String name, List<Object[]> data);
method sendGridData (line 1141) | void sendGridData(String name, List<Object[]> data, String format);
method enter (line 1143) | boolean enter();
method leave (line 1145) | void leave();
method getInstrumentationLevel (line 1147) | int getInstrumentationLevel();
method setInstrumentationLevel (line 1149) | void setInstrumentationLevel(int level);
method handleException (line 1151) | void handleException(Throwable th);
method speculation (line 1153) | int speculation();
method speculate (line 1155) | void speculate(int id);
method commit (line 1157) | void commit(int id);
method discard (line 1159) | void discard(int id);
method exit (line 1161) | void exit(int exitCode);
method sizeof (line 1163) | long sizeof(Object obj);
method $length (line 1165) | int $length();
method $ (line 1167) | String $(int n);
method $ (line 1169) | String $(String key);
method toXML (line 1171) | String toXML(Object obj);
method writeXML (line 1173) | void writeXML(Object obj, String fileName);
method writeDOT (line 1175) | void writeDOT(Object obj, String fileName);
method newProfiler (line 1177) | Profiler newProfiler();
method newProfiler (line 1179) | Profiler newProfiler(int expectedMethodCnt);
method perfInt (line 1181) | int perfInt(String name);
method perfLong (line 1183) | long perfLong(String name);
method perfString (line 1185) | String perfString(String name);
method resolveFileName (line 1187) | String resolveFileName(String name);
method isDTraceEnabled (line 1189) | boolean isDTraceEnabled();
method handleEvent (line 1191) | void handleEvent(Object cmd);
method handleExit (line 1193) | void handleExit(int i);
method shutdownCmdLine (line 1195) | void shutdownCmdLine();
method getMemoryPoolMXBeans (line 1197) | List<MemoryPoolMXBean> getMemoryPoolMXBeans();
method getHotspotMBean (line 1199) | HotSpotDiagnosticMXBean getHotspotMBean();
method getMemoryMXBean (line 1201) | MemoryMXBean getMemoryMXBean();
method getRuntimeMXBean (line 1203) | RuntimeMXBean getRuntimeMXBean();
method getThreadMXBean (line 1205) | ThreadMXBean getThreadMXBean();
method getOperatingSystemMXBean (line 1207) | OperatingSystemMXBean getOperatingSystemMXBean();
method getGCMBeans (line 1209) | List<GarbageCollectorMXBean> getGCMBeans();
method defineClass (line 1211) | Class<?> defineClass(byte[] code);
method getCallerClassLoader (line 1213) | ClassLoader getCallerClassLoader(int stackDec);
method getCallerClass (line 1215) | Class<?> getCallerClass(int stackDec);
method createEventFactory (line 1217) | JfrEvent.Factory createEventFactory(JfrEvent.Template template);
method version (line 1219) | int version();
method isBootstrapClass (line 1221) | boolean isBootstrapClass(String className);
method getClassName (line 1223) | String getClassName();
type BTraceRuntimeAccessor (line 1226) | public interface BTraceRuntimeAccessor {
method getRt (line 1227) | Impl getRt();
class BTraceAtomicInteger (line 1230) | private static final class BTraceAtomicInteger extends AtomicInteger {
method BTraceAtomicInteger (line 1231) | BTraceAtomicInteger(int initVal) {
class BTraceAtomicLong (line 1236) | private static final class BTraceAtomicLong extends AtomicLong {
method BTraceAtomicLong (line 1237) | BTraceAtomicLong(long initVal) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/BTraceRuntimeBridge.java
type BTraceRuntimeBridge (line 27) | public interface BTraceRuntimeBridge {
method start (line 28) | void start();
method leave (line 30) | void leave();
method handleException (line 32) | void handleException(Throwable th);
method isDisabled (line 34) | boolean isDisabled();
method newPerfCounter (line 36) | void newPerfCounter(Object value, String name, String desc);
method getPerfInt (line 38) | int getPerfInt(String name);
method putPerfInt (line 40) | void putPerfInt(int value, String name);
method getPerfFloat (line 42) | float getPerfFloat(String name);
method putPerfFloat (line 44) | void putPerfFloat(float value, String name);
method getPerfLong (line 46) | long getPerfLong(String name);
method putPerfLong (line 48) | void putPerfLong(long value, String name);
method getPerfString (line 50) | String getPerfString(String name);
method putPerfString (line 52) | void putPerfString(String value, String name);
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/BTraceUtils.java
class BTraceUtils (line 63) | public class BTraceUtils {
method BTraceUtils (line 72) | private BTraceUtils() {}
method isInteruppted (line 85) | public static boolean isInteruppted() {
method jstack (line 90) | public static void jstack() {
method jstack (line 99) | public static void jstack(int numFrames) {
method jstackAll (line 104) | public static void jstackAll() {
method jstackAll (line 113) | public static void jstackAll(int numFrames) {
method jstackStr (line 122) | public static String jstackStr() {
method jstackStr (line 134) | public static String jstackStr(int numFrames) {
method jstackAllStr (line 143) | public static String jstackAllStr() {
method jstackAllStr (line 154) | public static String jstackAllStr(int numFrames) {
method jstack (line 163) | public static void jstack(Throwable exception) {
method jstack (line 174) | public static void jstack(Throwable exception, int numFrames) {
method jstackStr (line 183) | public static String jstackStr(Throwable exception) {
method jstackStr (line 193) | public static String jstackStr(Throwable exception, int numFrames) {
method currentThread (line 202) | public static Thread currentThread() {
method threadId (line 211) | public static long threadId(Thread thread) {
method threadState (line 219) | public static Thread.State threadState(Thread thread) {
method holdsLock (line 238) | public static boolean holdsLock(Object obj) {
method deadlocks (line 243) | public static void deadlocks() {
method deadlocks (line 253) | public static void deadlocks(boolean stackTrace) {
method name (line 262) | public static String name(Thread thread) {
method loader (line 275) | public static ClassLoader loader(Class<?> clazz) {
method parentLoader (line 287) | public static ClassLoader parentLoader(ClassLoader loader) {
method str (line 303) | public static String str(Object obj) {
method str (line 307) | public static String str(Object[] array) {
method identityStr (line 317) | public static String identityStr(Object obj) {
method hash (line 331) | public static int hash(Object obj) {
method identityHashCode (line 347) | public static int identityHashCode(Object obj) {
method compare (line 360) | public static boolean compare(Object obj1, Object obj2) {
method classOf (line 372) | public static Class<?> classOf(Object obj) {
method instanceOf (line 386) | public static boolean instanceOf(Object obj, String className) {
method declaringClass (line 396) | public static Class<?> declaringClass(Field field) {
method name (line 401) | public static String name(Class<?> clazz) {
method name (line 411) | public static String name(Field field) {
method type (line 421) | public static Class<?> type(Field field) {
method accessFlags (line 426) | public static int accessFlags(Class<?> clazz) {
method accessFlags (line 431) | public static int accessFlags(Field field) {
method contextClassLoader (line 436) | public static ClassLoader contextClassLoader() {
method classForName (line 443) | public static Class classForName(String name) {
method classForName (line 448) | public static Class classForName(String name, ClassLoader cl) {
method isAssignableFrom (line 458) | public static boolean isAssignableFrom(Class<?> a, Class<?> b) {
method isInstance (line 474) | public static boolean isInstance(Class<?> clazz, Object obj) {
method getSuperclass (line 488) | public static Class<?> getSuperclass(Class<?> clazz) {
method isInterface (line 498) | public static boolean isInterface(Class<?> clazz) {
method isArray (line 509) | public static boolean isArray(Class<?> clazz) {
method isPrimitive (line 514) | public static boolean isPrimitive(Class<?> clazz) {
method getComponentType (line 519) | public static Class<?> getComponentType(Class<?> clazz) {
method field (line 537) | public static Field field(Class<?> clazz, String name, boolean throwEx...
method field (line 551) | public static Field field(Class<?> clazz, String name) {
method field (line 567) | public static Field field(String clazz, String name, boolean throwExce...
method field (line 582) | public static Field field(String clazz, String name) {
method getByte (line 595) | public static byte getByte(Field field) {
method getByte (line 606) | public static byte getByte(Field field, Object obj) {
method getShort (line 616) | public static short getShort(Field field) {
method getShort (line 627) | public static short getShort(Field field, Object obj) {
method getInt (line 637) | public static int getInt(Field field) {
method getInt (line 648) | public static int getInt(Field field, Object obj) {
method getLong (line 658) | public static long getLong(Field field) {
method getLong (line 669) | public static long getLong(Field field, Object obj) {
method getFloat (line 679) | public static float getFloat(Field field) {
method getFloat (line 690) | public static float getFloat(Field field, Object obj) {
method getDouble (line 700) | public static double getDouble(Field field) {
method getDouble (line 711) | public static double getDouble(Field field, Object obj) {
method getBoolean (line 721) | public static boolean getBoolean(Field field) {
method getBoolean (line 732) | public static boolean getBoolean(Field field, Object obj) {
method getChar (line 742) | public static char getChar(Field field) {
method getChar (line 753) | public static char getChar(Field field, Object obj) {
method get (line 763) | public static Object get(Field field) {
method get (line 774) | public static Object get(Field field, Object obj) {
method weakRef (line 786) | public static WeakReference weakRef(Object obj) {
method softRef (line 796) | public static SoftReference softRef(Object obj) {
method deref (line 808) | public static Object deref(Reference ref) {
method probeClass (line 820) | @Deprecated
method probeMethod (line 830) | @Deprecated
method probeLine (line 841) | public static int probeLine() {
method printMap (line 857) | public static void printMap(Map map) {
method printStringMap (line 867) | public static void printStringMap(String name, Map<String, String> dat...
method printNumberMap (line 877) | public static void printNumberMap(String name, Map<String, ? extends N...
method printNumber (line 887) | public static void printNumber(String name, Number value) {
method printArray (line 892) | public static void printArray(Object[] array) {
method printFields (line 909) | public static void printFields(Object obj) {
method printFields (line 921) | public static void printFields(Object obj, boolean classNamePrefix) {
method printStaticFields (line 931) | public static void printStaticFields(Class<?> clazz) {
method printStaticFields (line 943) | public static void printStaticFields(Class<?> clazz, boolean className...
method print (line 948) | public static void print(Object obj) {
method print (line 958) | public static void print(boolean b) {
method print (line 968) | public static void print(char c) {
method print (line 979) | public static void print(int i) {
method print (line 990) | public static void print(long l) {
method print (line 1001) | public static void print(float f) {
method print (line 1012) | public static void print(double d) {
method println (line 1017) | public static void println(Object obj) {
method println (line 1027) | public static void println(boolean b) {
method println (line 1037) | public static void println(char c) {
method println (line 1047) | public static void println(int i) {
method println (line 1057) | public static void println(long l) {
method println (line 1067) | public static void println(float f) {
method println (line 1077) | public static void println(double d) {
method println (line 1086) | public static void println() {
method vmStartTime (line 1096) | public static long vmStartTime() {
method vmUptime (line 1105) | public static long vmUptime() {
method timeMillis (line 1118) | public static long timeMillis() {
method timeNanos (line 1135) | public static long timeNanos() {
method timestamp (line 1146) | public static String timestamp(String format) {
method timestamp (line 1156) | public static String timestamp() {
method startsWith (line 1161) | public static boolean startsWith(String s, String start) {
method endsWith (line 1165) | public static boolean endsWith(String s, String end) {
method strcat (line 1174) | public static String strcat(String str1, String str2) {
method concat (line 1179) | public static String concat(String str1, String str2) {
method compareTo (line 1193) | public static int compareTo(String str1, String str2) {
method strcmp (line 1202) | public static int strcmp(String str1, String str2) {
method compareToIgnoreCase (line 1212) | public static int compareToIgnoreCase(String str1, String str2) {
method stricmp (line 1221) | public static int stricmp(String str1, String str2) {
method strstr (line 1226) | public static int strstr(String str1, String str2) {
method indexOf (line 1230) | public static int indexOf(String str1, String str2) {
method lastIndexOf (line 1234) | public static int lastIndexOf(String str1, String str2) {
method substr (line 1239) | public static String substr(String str, int start, int length) {
method substr (line 1243) | public static String substr(String str, int start) {
method length (line 1254) | public static int length(String str) {
method strlen (line 1263) | public static int strlen(String str) {
method regexp (line 1275) | public static Pattern regexp(String regex) {
method pattern (line 1284) | public static Pattern pattern(String regex) {
method regexp (line 1300) | public static Pattern regexp(String regex, int flags) {
method pattern (line 1309) | public static Pattern pattern(String regex, int flags) {
method matches (line 1317) | public static boolean matches(Pattern regex, String input) {
method matches (line 1349) | public static boolean matches(String regex, String input) {
method random (line 1360) | public static double random() {
method log (line 1379) | public static strictfp double log(double a) {
method log10 (line 1400) | public static strictfp double log10(double a) {
method exp (line 1421) | public static strictfp double exp(double a) {
method isNaN (line 1432) | public static boolean isNaN(double d) {
method isNaN (line 1443) | public static boolean isNaN(float f) {
method isInfinite (line 1455) | public static boolean isInfinite(double d) {
method isInfinite (line 1467) | public static boolean isInfinite(float f) {
method parseBoolean (line 1484) | public static boolean parseBoolean(String s) {
method parseByte (line 1497) | public static byte parseByte(String s) {
method parseShort (line 1510) | public static short parseShort(String s) {
method parseInt (line 1523) | public static int parseInt(String s) {
method parseLong (line 1540) | public static long parseLong(String s) {
method parseFloat (line 1551) | public static float parseFloat(String s) {
method parseDouble (line 1562) | public static double parseDouble(String s) {
method box (line 1576) | public static Boolean box(boolean b) {
method box (line 1586) | public static Character box(char c) {
method box (line 1596) | public static Byte box(byte b) {
method box (line 1606) | public static Short box(short s) {
method box (line 1616) | public static Integer box(int i) {
method box (line 1626) | public static Long box(long l) {
method box (line 1636) | public static Float box(float f) {
method box (line 1646) | public static Double box(double d) {
method unbox (line 1658) | public static boolean unbox(Boolean b) {
method unbox (line 1668) | public static char unbox(Character ch) {
method unbox (line 1678) | public static byte unbox(Byte b) {
method unbox (line 1688) | public static short unbox(Short s) {
method unbox (line 1698) | public static int unbox(Integer i) {
method unbox (line 1708) | public static long unbox(Long l) {
method unbox (line 1718) | public static float unbox(Float f) {
method unbox (line 1727) | public static double unbox(Double d) {
method str (line 1741) | public static String str(boolean b) {
method str (line 1752) | public static String str(char c) {
method str (line 1763) | public static String str(int i) {
method toHexString (line 1792) | public static String toHexString(int i) {
method str (line 1803) | public static String str(long l) {
method toHexString (line 1834) | public static String toHexString(long l) {
method str (line 1888) | public static String str(float f) {
method str (line 1942) | public static String str(double d) {
method exit (line 1953) | public static void exit(int exitCode) {
method exit (line 1962) | public static void exit() {
method perfInt (line 1967) | public static long perfInt(String name) {
method perfLong (line 1972) | public static long perfLong(String name) {
method perfString (line 1977) | public static String perfString(String name) {
method newHashMap (line 1983) | public static <K, V> Map<K, V> newHashMap() {
method newWeakMap (line 1987) | public static <K, V> Map<K, V> newWeakMap() {
method newDeque (line 1991) | public static <V> Deque<V> newDeque() {
method get (line 1996) | public static <K, V> V get(Map<K, V> map, K key) {
method containsKey (line 2001) | public static <K, V> boolean containsKey(Map<K, V> map, K key) {
method containsValue (line 2005) | public static <K, V> boolean containsValue(Map<K, V> map, V value) {
method put (line 2010) | public static <K, V> V put(Map<K, V> map, K key, V value) {
method remove (line 2015) | public static <K, V> V remove(Map<K, V> map, K key) {
method clear (line 2020) | public static <K, V> void clear(Map<K, V> map) {
method size (line 2025) | public static <K, V> int size(Map<K, V> map) {
method isEmpty (line 2029) | public static <K, V> boolean isEmpty(Map<K, V> map) {
method size (line 2034) | public static <E> int size(Collection<E> coll) {
method isEmpty (line 2038) | public static <E> boolean isEmpty(Collection<E> coll) {
method contains (line 2042) | public static <E> boolean contains(Collection<E> coll, Object obj) {
method contains (line 2046) | public static boolean contains(Object[] array, Object value) {
method push (line 2051) | public static <V> void push(Deque<V> queue, V value) {
method poll (line 2055) | public static <V> V poll(Deque<V> queue) {
method peek (line 2059) | public static <V> V peek(Deque<V> queue) {
method addLast (line 2063) | public static <V> void addLast(Deque<V> queue, V value) {
method peekFirst (line 2067) | public static <V> V peekFirst(Deque<V> queue) {
method peekLast (line 2071) | public static <V> V peekLast(Deque<V> queue) {
method removeLast (line 2075) | public static <V> V removeLast(Deque<V> queue) {
method removeFirst (line 2079) | public static <V> V removeFirst(Deque<V> queue) {
method getInstrumentationLevel (line 2092) | public static int getInstrumentationLevel() {
method setInstrumentationLevel (line 2105) | public static void setInstrumentationLevel(int level) {
method $ (line 2117) | public static String $(int n) {
method getpid (line 2122) | public static int getpid() {
method $length (line 2127) | public static int $length() {
method newAtomicInteger (line 2138) | public static AtomicInteger newAtomicInteger(int initialValue) {
method get (line 2148) | public static int get(AtomicInteger ai) {
method set (line 2158) | public static void set(AtomicInteger ai, int newValue) {
method lazySet (line 2168) | public static void lazySet(AtomicInteger ai, int newValue) {
method compareAndSet (line 2182) | public static boolean compareAndSet(AtomicInteger ai, int expect, int ...
method weakCompareAndSet (line 2198) | public static boolean weakCompareAndSet(AtomicInteger ai, int expect, ...
method getAndIncrement (line 2208) | public static int getAndIncrement(AtomicInteger ai) {
method getAndDecrement (line 2218) | public static int getAndDecrement(AtomicInteger ai) {
method incrementAndGet (line 2228) | public static int incrementAndGet(AtomicInteger ai) {
method decrementAndGet (line 2238) | public static int decrementAndGet(AtomicInteger ai) {
method getAndAdd (line 2249) | public static int getAndAdd(AtomicInteger ai, int delta) {
method addAndGet (line 2260) | public static int addAndGet(AtomicInteger ai, int delta) {
method getAndSet (line 2271) | public static int getAndSet(AtomicInteger ai, int newValue) {
method newAtomicLong (line 2280) | public static AtomicLong newAtomicLong(long initialValue) {
method get (line 2290) | public static long get(AtomicLong al) {
method set (line 2300) | public static void set(AtomicLong al, long newValue) {
method lazySet (line 2310) | public static void lazySet(AtomicLong al, long newValue) {
method compareAndSet (line 2324) | public static boolean compareAndSet(AtomicLong al, long expect, long u...
method weakCompareAndSet (line 2340) | public static boolean weakCompareAndSet(AtomicLong al, long expect, lo...
method getAndIncrement (line 2350) | public static long getAndIncrement(AtomicLong al) {
method getAndDecrement (line 2360) | public static long getAndDecrement(AtomicLong al) {
method incrementAndGet (line 2370) | public static long incrementAndGet(AtomicLong al) {
method decrementAndGet (line 2380) | public static long decrementAndGet(AtomicLong al) {
method getAndAdd (line 2391) | public static long getAndAdd(AtomicLong al, long delta) {
method addAndGet (line 2402) | public static long addAndGet(AtomicLong al, long delta) {
method getAndSet (line 2413) | public static long getAndSet(AtomicLong al, long newValue) {
method dtraceProbe (line 2422) | public static int dtraceProbe(String str1, String str2) {
method dtraceProbe (line 2431) | public static int dtraceProbe(String str1, String str2, int i1) {
method dtraceProbe (line 2443) | public static int dtraceProbe(String str1, String str2, int i1, int i2) {
method property (line 2456) | public static String property(String key) {
method properties (line 2465) | public static Properties properties() {
method printProperties (line 2470) | public static void printProperties() {
method getenv (line 2483) | public static String getenv(String name) {
method getenv (line 2493) | public static Map<String, String> getenv() {
method printEnv (line 2498) | public static void printEnv() {
method availableProcessors (line 2512) | public static long availableProcessors() {
method freeMemory (line 2525) | public static long freeMemory() {
method totalMemory (line 2539) | public static long totalMemory() {
method maxMemory (line 2550) | public static long maxMemory() {
method heapUsage (line 2555) | public static MemoryUsage heapUsage() {
method nonHeapUsage (line 2560) | public static MemoryUsage nonHeapUsage() {
method init (line 2568) | public static long init(MemoryUsage mu) {
method committed (line 2576) | public static long committed(MemoryUsage mu) {
method max (line 2584) | public static long max(MemoryUsage mu) {
method used (line 2589) | public static long used(MemoryUsage mu) {
method finalizationCount (line 2594) | public static long finalizationCount() {
method vmArguments (line 2613) | public static List<String> vmArguments() {
method printVmArguments (line 2622) | public static void printVmArguments() {
method vmVersion (line 2632) | public static String vmVersion() {
method isBootClassPathSupported (line 2643) | public static boolean isBootClassPathSupported() {
method bootClassPath (line 2662) | public static String bootClassPath() {
method classPath (line 2672) | public static String classPath() {
method libraryPath (line 2685) | public static String libraryPath() {
method threadCount (line 2694) | public static long threadCount() {
method peakThreadCount (line 2703) | public static long peakThreadCount() {
method totalStartedThreadCount (line 2713) | public static long totalStartedThreadCount() {
method daemonThreadCount (line 2722) | public static long daemonThreadCount() {
method currentThreadCpuTime (line 2732) | public static long currentThreadCpuTime() {
method currentThreadUserTime (line 2740) | public static long currentThreadUserTime() {
method getTotalGcTime (line 2750) | public static long getTotalGcTime() {
method sizeof (line 2766) | public static long sizeof(Object objectToSize) {
method dumpHeap (line 2777) | public static void dumpHeap(String fileName) {
method dumpHeap (line 2790) | public static void dumpHeap(String fileName, boolean live) {
method gc (line 2803) | public static void gc() {
method runFinalization (line 2816) | public static void runFinalization() {
method serialize (line 2828) | public static void serialize(Serializable obj, String fileName) {
method toXML (line 2836) | public static String toXML(Object obj) {
method writeXML (line 2845) | public static void writeXML(Object obj, String fileName) {
method writeDOT (line 2857) | public static void writeDOT(Object obj, String fileName) {
method speculation (line 2868) | public static int speculation() {
method speculate (line 2877) | public static void speculate(int id) {
method commit (line 2886) | public static void commit(int id) {
method discard (line 2895) | public static void discard(int id) {
method checkStatic (line 2900) | private static void checkStatic(Field field) {
method getField (line 2906) | private static Field getField(Class<?> clazz, String name, boolean thr...
method getAllFields (line 2939) | private static Field[] getAllFields(Class<?> clazz) {
method addFieldValues (line 2955) | private static void addFieldValues(
method addStaticFieldValues (line 2981) | private static void addStaticFieldValues(
method translate (line 3007) | private static RuntimeException translate(Exception exp) {
class Threads (line 3021) | public static class Threads {
method isInteruppted (line 3033) | public static boolean isInteruppted() {
method jstack (line 3038) | public static void jstack() {
method jstack (line 3048) | public static void jstack(int numFrames) {
method jstack (line 3053) | private static void jstack(int strip, int numFrames) {
method jstackAll (line 3060) | public static void jstackAll() {
method jstackAll (line 3070) | public static void jstackAll(int numFrames) {
method jstackAll (line 3074) | private static void jstackAll(int strip, int numFrames) {
method jstackStr (line 3083) | public static String jstackStr() {
method jstackStr (line 3095) | public static String jstackStr(int numFrames) {
method jstackStr (line 3102) | private static String jstackStr(int strip, int numFrames) {
method jstackAllStr (line 3115) | public static String jstackAllStr() {
method jstackAllStr (line 3126) | public static String jstackAllStr(int numFrames) {
method jstack (line 3138) | public static void jstack(Throwable exception) {
method jstack (line 3149) | public static void jstack(Throwable exception, int numFrames) {
method jstackStr (line 3171) | public static String jstackStr(Throwable exception) {
method jstackStr (line 3181) | public static String jstackStr(Throwable exception, int numFrames) {
method currentThread (line 3204) | public static Thread currentThread() {
method threadId (line 3213) | public static long threadId(Thread thread) {
method threadState (line 3221) | public static Thread.State threadState(Thread thread) {
method holdsLock (line 3240) | public static boolean holdsLock(Object obj) {
method deadlocks (line 3245) | public static void deadlocks() {
method deadlocks (line 3255) | public static void deadlocks(boolean stackTrace) {
method name (line 3264) | public static String name(Thread thread) {
class Strings (line 3273) | public static class Strings {
method startsWith (line 3274) | public static boolean startsWith(String s, String start) {
method endsWith (line 3278) | public static boolean endsWith(String s, String end) {
method strcat (line 3287) | public static String strcat(String str1, String str2) {
method concat (line 3292) | public static String concat(String str1, String str2) {
method compareTo (line 3306) | public static int compareTo(String str1, String str2) {
method strcmp (line 3315) | public static int strcmp(String str1, String str2) {
method compareToIgnoreCase (line 3325) | public static int compareToIgnoreCase(String str1, String str2) {
method stricmp (line 3334) | public static int stricmp(String str1, String str2) {
method strstr (line 3339) | public static int strstr(String str1, String str2) {
method indexOf (line 3343) | public static int indexOf(String str1, String str2) {
method lastIndexOf (line 3347) | public static int lastIndexOf(String str1, String str2) {
method substr (line 3352) | public static String substr(String str, int start, int length) {
method substr (line 3356) | public static String substr(String str, int start) {
method length (line 3367) | public static int length(String str) {
method strlen (line 3376) | public static int strlen(String str) {
method regexp (line 3388) | public static Pattern regexp(String regex) {
method pattern (line 3397) | public static Pattern pattern(String regex) {
method regexp (line 3413) | public static Pattern regexp(String regex, int flags) {
method pattern (line 3422) | public static Pattern pattern(String regex, int flags) {
method matches (line 3430) | public static boolean matches(Pattern regex, String input) {
method matches (line 3462) | public static boolean matches(String regex, String input) {
method str (line 3474) | public static String str(boolean b) {
method str (line 3485) | public static String str(char c) {
method str (line 3496) | public static String str(int i) {
method toHexString (line 3527) | public static String toHexString(int i) {
method str (line 3538) | public static String str(long l) {
method str (line 3552) | public static String str(Object obj) {
method str (line 3569) | public static String str(Object[] array) {
method toHexString (line 3612) | public static String toHexString(long l) {
method str (line 3667) | public static String str(float f) {
method str (line 3721) | public static String str(double d) {
method newStringBuilder (line 3733) | public static Appendable newStringBuilder(boolean threadSafe) {
method newStringBuilder (line 3744) | public static Appendable newStringBuilder() {
method append (line 3757) | public static Appendable append(Appendable buffer, String strToAppen...
method length (line 3769) | public static int length(Appendable buffer) {
class Numbers (line 3778) | public static class Numbers {
method random (line 3784) | public static double random() {
method log (line 3804) | public static strictfp double log(double a) {
method log10 (line 3826) | public static strictfp double log10(double a) {
method exp (line 3847) | public static strictfp double exp(double a) {
method isNaN (line 3858) | public static boolean isNaN(double d) {
method isNaN (line 3869) | public static boolean isNaN(float f) {
method isInfinite (line 3881) | public static boolean isInfinite(double d) {
method isInfinite (line 3893) | public static boolean isInfinite(float f) {
method parseBoolean (line 3910) | public static boolean parseBoolean(String s) {
method parseByte (line 3923) | public static byte parseByte(String s) {
method parseShort (line 3936) | public static short parseShort(String s) {
method parseInt (line 3949) | public static int parseInt(String s) {
method parseLong (line 3966) | public static long parseLong(String s) {
method parseFloat (line 3977) | public static float parseFloat(String s) {
method parseDouble (line 3989) | public static double parseDouble(String s) {
method box (line 4003) | public static Boolean box(boolean b) {
method box (line 4013) | public static Character box(char c) {
method box (line 4023) | public static Byte box(byte b) {
method box (line 4033) | public static Short box(short s) {
method box (line 4043) | public static Integer box(int i) {
method box (line 4053) | public static Long box(long l) {
method box (line 4063) | public static Float box(float f) {
method box (line 4073) | public static Double box(double d) {
method unbox (line 4085) | public static boolean unbox(Boolean b) {
method unbox (line 4095) | public static char unbox(Character ch) {
method unbox (line 4105) | public static byte unbox(Byte b) {
method unbox (line 4115) | public static short unbox(Short s) {
method unbox (line 4125) | public static int unbox(Integer i) {
method unbox (line 4135) | public static long unbox(Long l) {
method unbox (line 4145) | public static float unbox(Float f) {
method unbox (line 4154) | public static double unbox(Double d) {
class Time (line 4163) | public static class Time {
method millis (line 4173) | public static long millis() {
method nanos (line 4190) | public static long nanos() {
method timestamp (line 4201) | public static String timestamp(String format) {
method timestamp (line 4211) | public static String timestamp() {
class Collections (line 4220) | @SuppressWarnings("EmptyMethod")
method newHashMap (line 4223) | public static <K, V> Map<K, V> newHashMap() {
method newWeakMap (line 4227) | public static <K, V> Map<K, V> newWeakMap() {
method newDeque (line 4231) | public static <V> Deque<V> newDeque() {
method putAll (line 4235) | public static <K, V> void putAll(Map<K, V> src, Map<K, V> dst) {
method copy (line 4239) | public static <K, V> void copy(Map<K, V> src, Map<K, V> dst) {
method copy (line 4243) | public static <V> void copy(Collection<V> src, Collection<V> dst) {}
method get (line 4246) | public static <K, V> V get(Map<K, V> map, K key) {
method containsKey (line 4251) | public static <K, V> boolean containsKey(Map<K, V> map, K key) {
method containsValue (line 4255) | public static <K, V> boolean containsValue(Map<K, V> map, V value) {
method put (line 4260) | public static <K, V> V put(Map<K, V> map, K key, V value) {
method remove (line 4265) | public static <K, V> V remove(Map<K, V> map, K key) {
method clear (line 4270) | public static <K, V> void clear(Map<K, V> map) {
method size (line 4275) | public static <K, V> int size(Map<K, V> map) {
method isEmpty (line 4279) | public static <K, V> boolean isEmpty(Map<K, V> map) {
method size (line 4284) | public static <E> int size(Collection<E> coll) {
method isEmpty (line 4288) | public static <E> boolean isEmpty(Collection<E> coll) {
method contains (line 4292) | public static <E> boolean contains(Collection<E> coll, Object obj) {
method contains (line 4296) | public static boolean contains(Object[] array, Object value) {
method toArray (line 4305) | public static <E> Object[] toArray(Collection<E> collection) {
method push (line 4310) | public static <V> void push(Deque<V> queue, V value) {
method poll (line 4314) | public static <V> V poll(Deque<V> queue) {
method peek (line 4318) | public static <V> V peek(Deque<V> queue) {
method addLast (line 4322) | public static <V> void addLast(Deque<V> queue, V value) {
method peekFirst (line 4326) | public static <V> V peekFirst(Deque<V> queue) {
method peekLast (line 4330) | public static <V> V peekLast(Deque<V> queue) {
method removeLast (line 4334) | public static <V> V removeLast(Deque<V> queue) {
method removeFirst (line 4338) | public static <V> V removeFirst(Deque<V> queue) {
class Atomic (line 4347) | public static class Atomic {
method newAtomicInteger (line 4353) | public static AtomicInteger newAtomicInteger(int initialValue) {
method get (line 4363) | public static int get(AtomicInteger ai) {
method set (line 4373) | public static void set(AtomicInteger ai, int newValue) {
method lazySet (line 4383) | public static void lazySet(AtomicInteger ai, int newValue) {
method compareAndSet (line 4397) | public static boolean compareAndSet(AtomicInteger ai, int expect, in...
method weakCompareAndSet (line 4413) | public static boolean weakCompareAndSet(AtomicInteger ai, int expect...
method getAndIncrement (line 4423) | public static int getAndIncrement(AtomicInteger ai) {
method getAndDecrement (line 4433) | public static int getAndDecrement(AtomicInteger ai) {
method incrementAndGet (line 4443) | public static int incrementAndGet(AtomicInteger ai) {
method decrementAndGet (line 4453) | public static int decrementAndGet(AtomicInteger ai) {
method getAndAdd (line 4464) | public static int getAndAdd(AtomicInteger ai, int delta) {
method addAndGet (line 4475) | public static int addAndGet(AtomicInteger ai, int delta) {
method getAndSet (line 4486) | public static int getAndSet(AtomicInteger ai, int newValue) {
method newAtomicLong (line 4495) | public static AtomicLong newAtomicLong(long initialValue) {
method get (line 4505) | public static long get(AtomicLong al) {
method set (line 4515) | public static void set(AtomicLong al, long newValue) {
method lazySet (line 4525) | public static void lazySet(AtomicLong al, long newValue) {
method compareAndSet (line 4539) | public static boolean compareAndSet(AtomicLong al, long expect, long...
method weakCompareAndSet (line 4555) | public static boolean weakCompareAndSet(AtomicLong al, long expect, ...
method getAndIncrement (line 4565) | public static long getAndIncrement(AtomicLong al) {
method getAndDecrement (line 4575) | public static long getAndDecrement(AtomicLong al) {
method incrementAndGet (line 4585) | public static long incrementAndGet(AtomicLong al) {
method decrementAndGet (line 4595) | public static long decrementAndGet(AtomicLong al) {
method getAndAdd (line 4606) | public static long getAndAdd(AtomicLong al, long delta) {
method addAndGet (line 4617) | public static long addAndGet(AtomicLong al, long delta) {
method getAndSet (line 4628) | public static long getAndSet(AtomicLong al, long newValue) {
class Profiling (line 4638) | public static class Profiling {
method newProfiler (line 4644) | public static Profiler newProfiler() {
method newProfiler (line 4655) | public static Profiler newProfiler(int expectedBlockCnt) {
method recordEntry (line 4665) | public static void recordEntry(Profiler profiler, String blockName) {
method recordExit (line 4676) | public static void recordExit(Profiler profiler, String blockName, l...
method snapshot (line 4689) | public static Profiler.Snapshot snapshot(Profiler profiler) {
method snapshotAndReset (line 4693) | public static Profiler.Snapshot snapshotAndReset(Profiler profiler) {
method reset (line 4697) | public static void reset(Profiler profiler) {
method printSnapshot (line 4701) | public static void printSnapshot(String name, Profiler profiler) {
method printSnapshot (line 4705) | public static void printSnapshot(String name, Profiler profiler, Str...
class Speculation (line 4714) | public static class Speculation {
method speculation (line 4720) | public static int speculation() {
method speculate (line 4729) | public static void speculate(int id) {
method commit (line 4738) | public static void commit(int id) {
method discard (line 4747) | public static void discard(int id) {
class References (line 4756) | public static class References {
method weakRef (line 4763) | public static WeakReference weakRef(Object obj) {
method softRef (line 4773) | public static SoftReference softRef(Object obj) {
method deref (line 4786) | public static Object deref(Reference ref) {
class Reflective (line 4799) | public static class Reflective {
method classOf (line 4806) | public static Class<?> classOf(Object obj) {
method declaringClass (line 4816) | public static Class<?> declaringClass(Field field) {
method name (line 4821) | public static String name(Class<?> clazz) {
method name (line 4831) | public static String name(Field field) {
method type (line 4841) | public static Class<?> type(Field field) {
method accessFlags (line 4846) | public static int accessFlags(Class<?> clazz) {
method accessFlags (line 4851) | public static int accessFlags(Field field) {
method contextClassLoader (line 4856) | public static ClassLoader contextClassLoader() {
method classForName (line 4863) | public static Class<?> classForName(String name) {
method classForName (line 4869) | public static Class<?> classForName(String name, ClassLoader cl) {
method isAssignableFrom (line 4883) | public static boolean isAssignableFrom(Class<?> a, Class<?> b) {
method isInstance (line 4899) | public static boolean isInstance(Class<?> clazz, Object obj) {
method getSuperclass (line 4913) | public static Class<?> getSuperclass(Class<?> clazz) {
method isInterface (line 4923) | public static boolean isInterface(Class<?> clazz) {
method isArray (line 4934) | public static boolean isArray(Class<?> clazz) {
method isPrimitive (line 4939) | public static boolean isPrimitive(Class<?> clazz) {
method getComponentType (line 4944) | public static Class<?> getComponentType(Class<?> clazz) {
method field (line 4962) | public static Field field(Class clazz, String name, boolean throwExc...
method field (line 4976) | public static Field field(Class clazz, String name) {
method field (line 4992) | public static Field field(String clazz, String name, boolean throwEx...
method field (line 5007) | public static Field field(String clazz, String name) {
method getByte (line 5020) | public static byte getByte(Field field) {
method getByte (line 5036) | public static byte getByte(Field field, Object obj) {
method getByte (line 5052) | public static byte getByte(String name, Object instance) {
method getByteStatic (line 5065) | public static byte getByteStatic(String name, Class clazz) {
method getShort (line 5076) | public static short getShort(Field field) {
method getShort (line 5092) | public static short getShort(Field field, Object obj) {
method getShort (line 5108) | public static short getShort(String name, Object instance) {
method getShortStatic (line 5121) | public static short getShortStatic(String name, Class clazz) {
method getInt (line 5132) | public static int getInt(Field field) {
method getInt (line 5148) | public static int getInt(Field field, Object obj) {
method getInt (line 5164) | public static int getInt(String name, Object instance) {
method getIntStatic (line 5177) | public static int getIntStatic(String name, Class clazz) {
method getLong (line 5188) | public static long getLong(Field field) {
method getLong (line 5204) | public static long getLong(Field field, Object obj) {
method getLong (line 5220) | public static long getLong(String name, Object instance) {
method getLongStatic (line 5233) | public static long getLongStatic(String name, Class clazz) {
method getFloat (line 5244) | public static float getFloat(Field field) {
method getFloat (line 5260) | public static float getFloat(Field field, Object obj) {
method getFloat (line 5276) | public static float getFloat(String name, Object instance) {
method getFloatStatic (line 5289) | public static float getFloatStatic(String name, Class clazz) {
method getDouble (line 5300) | public static double getDouble(Field field) {
method getDouble (line 5316) | public static double getDouble(Field field, Object instance) {
method getDouble (line 5332) | public static double getDouble(String name, Object instance) {
method getDouble (line 5345) | public static double getDouble(String name, Class clazz) {
method getBoolean (line 5356) | public static boolean getBoolean(Field field) {
method getBoolean (line 5372) | public static boolean getBoolean(Field field, Object obj) {
method getBoolean (line 5388) | public static boolean getBoolean(String name, Object instance) {
method getBooleanStatic (line 5401) | public static boolean getBooleanStatic(String name, Class clazz) {
method getChar (line 5412) | public static char getChar(Field field) {
method getChar (line 5428) | public static char getChar(Field field, Object obj) {
method getChar (line 5444) | public static char getChar(String name, Object instance) {
method getCharStatic (line 5457) | public static char getCharStatic(String name, Class clazz) {
method get (line 5468) | public static Object get(Field field) {
method get (line 5484) | public static Object get(Field field, Object obj) {
method get (line 5500) | public static Object get(String name, Object instance) {
method getStatic (line 5513) | public static Object getStatic(String name, Class clazz) {
method printFields (line 5524) | public static void printFields(Object obj) {
method printFields (line 5536) | public static void printFields(Object obj, boolean classNamePrefix) {
method printStaticFields (line 5550) | public static void printStaticFields(Class clazz) {
method printStaticFields (line 5562) | public static void printStaticFields(Class clazz, boolean classNameP...
class Export (line 5575) | public static class Export {
method serialize (line 5584) | public static void serialize(Serializable obj, String fileName) {
method toXML (line 5592) | public static String toXML(Object obj) {
method writeXML (line 5602) | public static void writeXML(Object obj, String fileName) {
method writeDOT (line 5614) | public static void writeDOT(Object obj, String fileName) {
class Sys (line 5623) | public static class Sys {
method $ (line 5630) | public static String $(int n) {
method $ (line 5642) | public static String $(String key) {
method getpid (line 5647) | public static int getpid() {
method $length (line 5657) | public static int $length() {
method exit (line 5668) | public static void exit(int exitCode) {
method exit (line 5677) | public static void exit() {
class Env (line 5685) | public static class Env {
method property (line 5695) | public static String property(String key) {
method properties (line 5704) | public static Properties properties() {
method printProperties (line 5709) | public static void printProperties() {
method getenv (line 5722) | public static String getenv(String name) {
method getenv (line 5733) | public static Map<String, String> getenv() {
method printEnv (line 5738) | public static void printEnv() {
method availableProcessors (line 5752) | public static long availableProcessors() {
class Memory (line 5761) | public static class Memory {
method freeMemory (line 5771) | public static long freeMemory() {
method totalMemory (line 5785) | public static long totalMemory() {
method maxMemory (line 5797) | public static long maxMemory() {
method heapUsage (line 5802) | public static MemoryUsage heapUsage() {
method nonHeapUsage (line 5807) | public static MemoryUsage nonHeapUsage() {
method init (line 5815) | public static long init(MemoryUsage mu) {
method committed (line 5823) | public static long committed(MemoryUsage mu) {
method max (line 5831) | public static long max(MemoryUsage mu) {
method used (line 5836) | public static long used(MemoryUsage mu) {
method finalizationCount (line 5841) | public static long finalizationCount() {
method dumpHeap (line 5852) | public static void dumpHeap(String fileName) {
method dumpHeap (line 5865) | public static void dumpHeap(String fileName, boolean live) {
method gc (line 5878) | public static void gc() {
method getTotalGcTime (line 5888) | public static long getTotalGcTime() {
method getMemoryPoolUsage (line 5902) | public static String getMemoryPoolUsage(String poolFormat) {
method runFinalization (line 5915) | public static void runFinalization() {
class VM (line 5924) | public static class VM {
method vmArguments (line 5942) | public static List<String> vmArguments() {
method printVmArguments (line 5951) | public static void printVmArguments() {
method vmVersion (line 5961) | public static String vmVersion() {
method isBootClassPathSupported (line 5972) | public static boolean isBootClassPathSupported() {
method bootClassPath (line 5991) | public static String bootClassPath() {
method classPath (line 6001) | public static String classPath() {
method libraryPath (line 6014) | public static String libraryPath() {
method threadCount (line 6023) | public static long threadCount() {
method peakThreadCount (line 6033) | public static long peakThreadCount() {
method totalStartedThreadCount (line 6043) | public static long totalStartedThreadCount() {
method daemonThreadCount (line 6052) | public static long daemonThreadCount() {
method systemLoadAverage (line 6061) | public static double systemLoadAverage() {
method processCPUTime (line 6072) | public static long processCPUTime() {
method vmStartTime (line 6082) | public static long vmStartTime() {
method vmUptime (line 6091) | public static long vmUptime() {
method currentThreadCpuTime (line 6101) | public static long currentThreadCpuTime() {
method currentThreadUserTime (line 6109) | public static long currentThreadUserTime() {
class Counters (line 6119) | public static class Counters {
method perfInt (line 6121) | public static long perfInt(String name) {
method perfLong (line 6126) | public static long perfLong(String name) {
method perfString (line 6131) | public static String perfString(String name) {
class D (line 6140) | public static class D {
method probe (line 6146) | public static int probe(String str1, String str2) {
method probe (line 6155) | public static int probe(String str1, String str2, int i1) {
method probe (line 6167) | public static int probe(String str1, String str2, int i1, int i2) {
class Jfr (line 6177) | public static final class Jfr {
method prepareEvent (line 6185) | public static JfrEvent prepareEvent(JfrEvent.Factory eventFactory) {
method setEventField (line 6196) | public static void setEventField(JfrEvent event, String fieldName, b...
method setEventField (line 6207) | public static void setEventField(JfrEvent event, String fieldName, c...
method setEventField (line 6218) | public static void setEventField(JfrEvent event, String fieldName, s...
method setEventField (line 6229) | public static void setEventField(JfrEvent event, String fieldName, i...
method setEventField (line 6240) | public static void setEventField(JfrEvent event, String fieldName, l...
method setEventField (line 6251) | public static void setEventField(JfrEvent event, String fieldName, f...
method setEventField (line 6262) | public static void setEventField(JfrEvent event, String fieldName, d...
method setEventField (line 6273) | public static void setEventField(JfrEvent event, String fieldName, b...
method setEventField (line 6284) | public static void setEventField(JfrEvent event, String fieldName, S...
method shouldCommit (line 6295) | public static boolean shouldCommit(JfrEvent event) {
method commit (line 6305) | public static void commit(JfrEvent event) {
method begin (line 6309) | public static void begin(JfrEvent event) {
method end (line 6313) | public static void end(JfrEvent event) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/CircularBuffer.java
class CircularBuffer (line 3) | public final class CircularBuffer<T> {
method CircularBuffer (line 10) | @SuppressWarnings("unchecked")
method add (line 16) | public void add(T element) {
method forEach (line 28) | public boolean forEach(Function<T, Boolean> functor) {
method doNext (line 44) | public boolean doNext(Function<T, Boolean> nextWork) {
method getLength (line 54) | public int getLength() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/DebugSupport.java
class DebugSupport (line 41) | public final class DebugSupport {
method initLoggers (line 42) | public static void initLoggers(boolean debug, Logger logger) {
method DebugSupport (line 73) | public DebugSupport(SharedSettings s) {
method isDebug (line 77) | public boolean isDebug() {
method isDumpClasses (line 81) | public boolean isDumpClasses() {
method getDumpClassDir (line 85) | public String getDumpClassDir() {
method dumpClass (line 89) | public void dumpClass(String className, byte[] code) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/Function.java
type Function (line 3) | public interface Function<T, R> {
method apply (line 4) | R apply(T value);
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/HandlerRepository.java
type HandlerRepository (line 10) | @FunctionalInterface
method resolveHandler (line 12) | MethodHandle resolveHandler(String probeName, String handlerName, Meth...
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/Messages.java
class Messages (line 32) | public final class Messages {
method Messages (line 43) | private Messages() {}
method get (line 45) | public static String get(String key) {
method format (line 49) | public static String format(String key, Object... args) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/MethodID.java
class MethodID (line 37) | public class MethodID {
method getMethodId (line 48) | public static int getMethodId(String methodTag) {
method getMethodId (line 52) | public static int getMethodId(String className, String method, String ...
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/PrefixMap.java
class PrefixMap (line 28) | public class PrefixMap {
method add (line 31) | public void add(CharSequence val) {
method contains (line 45) | public boolean contains(CharSequence val) {
class Node (line 61) | private static final class Node {
method Node (line 65) | public Node() {
method getReferencedNode (line 69) | public Node getReferencedNode(char ch) {
method addReferencedNode (line 73) | public void addReferencedNode(char ch, Node n) {
method setValue (line 77) | public void setValue(CharSequence val) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/Profiler.java
class Profiler (line 43) | public abstract class Profiler {
method Profiler (line 51) | public Profiler() {
method recordEntry (line 62) | public abstract void recordEntry(String blockName);
method recordExit (line 72) | public abstract void recordExit(String blockName, long duration);
method snapshot (line 79) | public final Snapshot snapshot() {
method snapshot (line 91) | public abstract Snapshot snapshot(boolean reset);
method reset (line 94) | public abstract void reset();
type MBeanValueProvider (line 97) | public interface MBeanValueProvider {
method getMBeanValue (line 98) | Snapshot getMBeanValue();
class Record (line 106) | public static final class Record {
method Record (line 122) | public Record(String blockName) {
method duplicate (line 126) | public Record duplicate() {
method equals (line 138) | @Override
method hashCode (line 159) | @Override
method toString (line 169) | @Override
class Snapshot (line 209) | public static final class Snapshot {
method Snapshot (line 214) | public Snapshot(Record[] data, long startTs, long stopTs) {
method getGridData (line 220) | public List<Object[]> getGridData() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/SharedSettings.java
class SharedSettings (line 34) | public final class SharedSettings {
method from (line 73) | public void from(Map<String, Object> params) {
method parsePermissions (line 142) | public static PermissionSet parsePermissions(String permissionString) {
method from (line 161) | public void from(SharedSettings other) {
method isDebug (line 182) | public boolean isDebug() {
method setDebug (line 186) | public void setDebug(boolean value) {
method isDumpClasses (line 190) | public boolean isDumpClasses() {
method isUnsafe (line 194) | @Deprecated
method isTrusted (line 200) | public boolean isTrusted() {
method setTrusted (line 204) | public void setTrusted(boolean value) {
method getDumpDir (line 208) | public String getDumpDir() {
method setDumpDir (line 212) | public void setDumpDir(String value) {
method isTrackRetransforms (line 216) | public boolean isTrackRetransforms() {
method setTrackRetransforms (line 220) | public void setTrackRetransforms(boolean value) {
method getProbeDescPath (line 224) | public String getProbeDescPath() {
method setProbeDescPath (line 228) | public void setProbeDescPath(String probeDescPath) {
method getBootClassPath (line 232) | public String getBootClassPath() {
method setBootClassPath (line 236) | public void setBootClassPath(String bootClassPath) {
method getStatsdHost (line 240) | public String getStatsdHost() {
method setStatsdHost (line 244) | public void setStatsdHost(String statsdHost) {
method getStatsdPort (line 248) | public int getStatsdPort() {
method setStatsdPort (line 252) | public void setStatsdPort(int statsdPort) {
method getFileRollMilliseconds (line 256) | public int getFileRollMilliseconds() {
method setFileRollMilliseconds (line 260) | public void setFileRollMilliseconds(int fileRollMilliseconds) {
method getFileRollMaxRolls (line 264) | public int getFileRollMaxRolls() {
method setFileRollMaxRolls (line 268) | public void setFileRollMaxRolls(int fileRollMaxRolls) {
method isRetransformStartup (line 272) | public boolean isRetransformStartup() {
method setRetransformStartup (line 276) | public void setRetransformStartup(boolean val) {
method getScriptDir (line 280) | public String getScriptDir() {
method getOutputFile (line 284) | public String getOutputFile() {
method setOutputFile (line 288) | public void setOutputFile(String outputFile) {
method getScriptOutputDir (line 292) | public String getScriptOutputDir() {
method setScriptOutputDir (line 296) | public void setScriptOutputDir(String scriptOutputDir) {
method getClientName (line 300) | public String getClientName() {
method setClientName (line 304) | public void setClientName(String clientName) {
method getGrantedPermissions (line 308) | public PermissionSet getGrantedPermissions() {
method setGrantedPermissions (line 312) | public void setGrantedPermissions(PermissionSet grantedPermissions) {
method getDeniedPermissions (line 316) | public PermissionSet getDeniedPermissions() {
method setDeniedPermissions (line 320) | public void setDeniedPermissions(PermissionSet deniedPermissions) {
method isGrantAll (line 324) | public boolean isGrantAll() {
method setGrantAll (line 328) | public void setGrantAll(boolean grantAll) {
method getEffectivePermissions (line 346) | public PermissionSet getEffectivePermissions() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/VerifierException.java
class VerifierException (line 34) | public class VerifierException extends RuntimeException {
method VerifierException (line 35) | public VerifierException(String msg) {
method VerifierException (line 39) | public VerifierException(Throwable cause) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Event.java
type FieldType (line 40) | enum FieldType {
method FieldType (line 55) | FieldType(String type) {
method getType (line 59) | public String getType() {
type FieldKind (line 65) | enum FieldKind {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/annotations/InjectionMode.java
type InjectionMode (line 30) | public enum InjectionMode {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Kind.java
type Kind (line 36) | public enum Kind {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Sampled.java
type Sampler (line 74) | enum Sampler {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Where.java
type Where (line 34) | public enum Where {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/BinaryWireProtocol.java
class BinaryWireProtocol (line 54) | public class BinaryWireProtocol implements WireProtocol {
method BinaryWireProtocol (line 70) | public BinaryWireProtocol(InputStream inputStream, OutputStream output...
method read (line 76) | @Override
method write (line 89) | @Override
method flush (line 102) | @Override
method getVersion (line 109) | @Override
method close (line 114) | @Override
method getInputStream (line 153) | public InputStream getInputStream() {
method getOutputStream (line 164) | public OutputStream getOutputStream() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/Command.java
class Command (line 33) | public abstract class Command implements Serializable {
method write (line 59) | @Override
method read (line 62) | @Override
method Command (line 69) | protected Command(byte type) {
method Command (line 73) | protected Command(byte type, boolean urgent) {
method Command (line 81) | private Command() {
method write (line 86) | protected abstract void write(ObjectOutput out) throws IOException;
method read (line 88) | protected abstract void read(ObjectInput in) throws IOException, Class...
method getType (line 90) | public final byte getType() {
method isUrgent (line 94) | public final boolean isUrgent() {
method setUrgent (line 98) | final void setUrgent() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/CommandListener.java
type CommandListener (line 35) | public interface CommandListener {
method onCommand (line 36) | void onCommand(Command cmd) throws IOException;
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/DataCommand.java
class DataCommand (line 33) | public abstract class DataCommand extends Command implements PrintableCo...
method DataCommand (line 36) | public DataCommand(byte type, String name, boolean urgent) {
method getName (line 41) | public String getName() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/DisconnectCommand.java
class DisconnectCommand (line 11) | public final class DisconnectCommand extends Command implements Printabl...
method DisconnectCommand (line 14) | public DisconnectCommand() {
method DisconnectCommand (line 18) | public DisconnectCommand(String probeId) {
method write (line 23) | @Override
method read (line 28) | @SuppressWarnings("RedundantThrows")
method setProbeId (line 34) | public void setProbeId(String probeId) {
method getProbeId (line 38) | public String getProbeId() {
method print (line 42) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/ErrorCommand.java
class ErrorCommand (line 33) | public class ErrorCommand extends Command implements PrintableCommand {
method ErrorCommand (line 36) | public ErrorCommand(Throwable cause) {
method ErrorCommand (line 41) | protected ErrorCommand() {
method write (line 45) | @Override
method read (line 50) | @Override
method getCause (line 60) | public Throwable getCause() {
method print (line 64) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/EventCommand.java
class EventCommand (line 32) | public class EventCommand extends Command {
method EventCommand (line 35) | public EventCommand(String event) {
method EventCommand (line 40) | protected EventCommand() {
method write (line 44) | @Override
method read (line 49) | @Override
method getEvent (line 54) | public String getEvent() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/ExitCommand.java
class ExitCommand (line 32) | public class ExitCommand extends Command {
method ExitCommand (line 35) | public ExitCommand(int exitCode) {
method ExitCommand (line 40) | protected ExitCommand() {
method write (line 44) | @Override
method read (line 49) | @Override
method getExitCode (line 54) | public int getExitCode() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/GridDataCommand.java
class GridDataCommand (line 49) | public class GridDataCommand extends DataCommand {
method GridDataCommand (line 74) | public GridDataCommand() {
method GridDataCommand (line 84) | public GridDataCommand(String name, List<Object[]> data) {
method GridDataCommand (line 98) | public GridDataCommand(String name, List<Object[]> data, String format) {
method GridDataCommand (line 102) | public GridDataCommand(String name, List<String> columnNames, List<Obj...
method GridDataCommand (line 106) | public GridDataCommand(String name, List<String> columnNames, List<Obj...
method getData (line 113) | public List<Object[]> getData() {
method getColumnNames (line 117) | public List<String> getColumnNames() {
method getColumnWidth (line 127) | private Map<Integer, Integer> getColumnWidth(List<Object[]> objects) {
method print (line 147) | @Override
method getFormat (line 199) | private String getFormat(Object object, Map<Integer, Integer> columnWi...
method reformatMultilineValue (line 218) | private String reformatMultilineValue(String value) {
method write (line 228) | @Override
method read (line 253) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/InstrumentCommand.java
class InstrumentCommand (line 34) | public class InstrumentCommand extends Command {
method InstrumentCommand (line 39) | public InstrumentCommand(byte[] code, ArgsMap args) {
method InstrumentCommand (line 54) | public InstrumentCommand(byte[] code, String[] args) {
method InstrumentCommand (line 58) | public InstrumentCommand(byte[] code, Map<String, String> args) {
method InstrumentCommand (line 62) | protected InstrumentCommand() {
method write (line 66) | @Override
method read (line 78) | @Override
method getCode (line 92) | public byte[] getCode() {
method getArguments (line 96) | public ArgsMap getArguments() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/JavaSerializationProtocol.java
class JavaSerializationProtocol (line 55) | public class JavaSerializationProtocol implements WireProtocol {
method JavaSerializationProtocol (line 68) | public JavaSerializationProtocol(InputStream inputStream, OutputStream...
method JavaSerializationProtocol (line 100) | public JavaSerializationProtocol(ObjectInputStream ois, ObjectOutputSt...
method read (line 105) | @Override
method write (line 113) | @Override
method flush (line 122) | @Override
method getVersion (line 129) | @Override
method close (line 134) | @Override
method getObjectInputStream (line 174) | public ObjectInputStream getObjectInputStream() {
method getObjectOutputStream (line 186) | public ObjectOutputStream getObjectOutputStream() {
method reset (line 198) | public void reset() throws IOException {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/ListFailedExtensionsCommand.java
class ListFailedExtensionsCommand (line 17) | public class ListFailedExtensionsCommand extends Command implements Prin...
method ListFailedExtensionsCommand (line 21) | public ListFailedExtensionsCommand() {
method setFailedExtensions (line 25) | public void setFailedExtensions(Map<String, String> failures) {
method setFailedExtensionsList (line 34) | public void setFailedExtensionsList(List<String> failures) {
method getFailedExtensions (line 41) | public List<String> getFailedExtensions() {
method write (line 45) | @Override
method read (line 53) | @SuppressWarnings("RedundantThrows")
method print (line 62) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/ListProbesCommand.java
class ListProbesCommand (line 15) | public class ListProbesCommand extends Command implements PrintableComma...
method ListProbesCommand (line 19) | public ListProbesCommand() {
method setProbes (line 23) | public void setProbes(Collection<String> probes) {
method getProbes (line 30) | public List<String> getProbes() {
method write (line 34) | @Override
method read (line 42) | @SuppressWarnings("RedundantThrows")
method print (line 51) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/MessageCommand.java
class MessageCommand (line 36) | public class MessageCommand extends DataCommand {
method MessageCommand (line 43) | public MessageCommand(long time, String msg) {
method MessageCommand (line 47) | public MessageCommand(long time, String msg, boolean urgent) {
method MessageCommand (line 53) | public MessageCommand(String msg) {
method MessageCommand (line 57) | public MessageCommand(String msg, boolean urgent) {
method MessageCommand (line 61) | protected MessageCommand() {
method write (line 65) | @Override
method read (line 76) | @Override
method getTime (line 97) | public long getTime() {
method getMessage (line 101) | public String getMessage() {
method print (line 105) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/NumberDataCommand.java
class NumberDataCommand (line 38) | public class NumberDataCommand extends DataCommand {
method NumberDataCommand (line 41) | public NumberDataCommand() {
method NumberDataCommand (line 45) | public NumberDataCommand(String name, Number value) {
method print (line 50) | @Override
method getValue (line 59) | public Number getValue() {
method write (line 63) | @Override
method read (line 69) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/NumberMapDataCommand.java
class NumberMapDataCommand (line 39) | public class NumberMapDataCommand extends DataCommand {
method NumberMapDataCommand (line 43) | public NumberMapDataCommand() {
method NumberMapDataCommand (line 47) | public NumberMapDataCommand(String name, Map<String, ? extends Number>...
method getData (line 52) | public Map<String, ? extends Number> getData() {
method print (line 56) | @Override
method write (line 70) | @Override
method read (line 84) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/PrintableCommand.java
type PrintableCommand (line 35) | public interface PrintableCommand {
method print (line 41) | void print(PrintWriter out);
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/ProtocolConfig.java
class ProtocolConfig (line 61) | public class ProtocolConfig {
method ProtocolConfig (line 71) | private ProtocolConfig(ProtocolVersion version, boolean autoNegotiate,...
method getVersion (line 87) | public ProtocolVersion getVersion() {
method isAutoNegotiate (line 96) | public boolean isAutoNegotiate() {
method isForceVersion (line 105) | public boolean isForceVersion() {
method getDefault (line 116) | public static ProtocolConfig getDefault() {
method fromSystemProperties (line 125) | public static ProtocolConfig fromSystemProperties() {
method parseProtocolVersion (line 153) | private static ProtocolVersion parseProtocolVersion(String value) {
method builder (line 177) | public static Builder builder() {
method toString (line 181) | @Override
class Builder (line 194) | public static class Builder {
method Builder (line 199) | private Builder() {}
method version (line 207) | public Builder version(ProtocolVersion version) {
method autoNegotiate (line 218) | public Builder autoNegotiate(boolean autoNegotiate) {
method forceVersion (line 229) | public Builder forceVersion(boolean forceVersion) {
method build (line 240) | public ProtocolConfig build() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/ProtocolNegotiator.java
class ProtocolNegotiator (line 61) | public class ProtocolNegotiator {
method ProtocolNegotiator (line 71) | public ProtocolNegotiator() {
method ProtocolNegotiator (line 80) | public ProtocolNegotiator(ProtocolVersion preferredVersion) {
method negotiate (line 104) | public ProtocolVersion negotiate(InputStream is) throws IOException {
method negotiateWithPushback (line 122) | private ProtocolVersion negotiateWithPushback(PushbackInputStream pis)...
method negotiateWithMark (line 152) | private ProtocolVersion negotiateWithMark(InputStream is) throws IOExc...
method negotiateAgent (line 188) | public ProtocolVersion negotiateAgent(PushbackInputStream input, Outpu...
method negotiateClient (line 210) | public ProtocolVersion negotiateClient(
method getPreferredVersion (line 235) | public ProtocolVersion getPreferredVersion() {
method createNegotiationStream (line 248) | public static PushbackInputStream createNegotiationStream(InputStream ...
method getNegotiationTimeoutMs (line 255) | public static int getNegotiationTimeoutMs() {
method readFully (line 267) | private static int readFully(InputStream in, byte[] buffer) throws IOE...
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/ProtocolVersion.java
type ProtocolVersion (line 34) | public enum ProtocolVersion {
method ProtocolVersion (line 72) | ProtocolVersion(int version, byte[] magicBytes) {
method getVersion (line 82) | public int getVersion() {
method getMagicBytes (line 93) | public byte[] getMagicBytes() {
method hasMagicBytes (line 102) | public boolean hasMagicBytes() {
method fromVersion (line 113) | public static ProtocolVersion fromVersion(int version) {
method detectFromPrefix (line 131) | public static ProtocolVersion detectFromPrefix(byte[] prefix) {
method getDefault (line 161) | public static ProtocolVersion getDefault() {
method toString (line 165) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/ReconnectCommand.java
class ReconnectCommand (line 10) | public class ReconnectCommand extends Command {
method ReconnectCommand (line 15) | public ReconnectCommand() {
method ReconnectCommand (line 19) | public ReconnectCommand(String probeId) {
method write (line 24) | @Override
method read (line 29) | @SuppressWarnings("RedundantThrows")
method getProbeId (line 35) | public String getProbeId() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/RenameCommand.java
class RenameCommand (line 32) | public class RenameCommand extends Command {
method RenameCommand (line 35) | public RenameCommand(String newName) {
method RenameCommand (line 40) | protected RenameCommand() {
method write (line 44) | @Override
method read (line 49) | @Override
method getNewName (line 54) | public String getNewName() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/RetransformClassNotification.java
class RetransformClassNotification (line 38) | public class RetransformClassNotification extends Command implements Pri...
method RetransformClassNotification (line 41) | public RetransformClassNotification(String className) {
method RetransformClassNotification (line 46) | public RetransformClassNotification() {
method write (line 50) | @Override
method read (line 55) | @Override
method getClassName (line 60) | public String getClassName() {
method print (line 64) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/RetransformationStartNotification.java
class RetransformationStartNotification (line 40) | public class RetransformationStartNotification extends Command {
method RetransformationStartNotification (line 43) | public RetransformationStartNotification() {
method RetransformationStartNotification (line 47) | public RetransformationStartNotification(int numClasses) {
method write (line 52) | @Override
method read (line 57) | @SuppressWarnings("RedundantThrows")
method getNumClasses (line 63) | public int getNumClasses() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/SetSettingsCommand.java
class SetSettingsCommand (line 39) | public class SetSettingsCommand extends Command {
method SetSettingsCommand (line 42) | public SetSettingsCommand(Map<String, ?> params) {
method SetSettingsCommand (line 47) | protected SetSettingsCommand() {
method getParams (line 51) | public Map<String, Object> getParams() {
method write (line 55) | @Override
method read (line 64) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/StatusCommand.java
class StatusCommand (line 32) | public class StatusCommand extends Command {
method StatusCommand (line 37) | public StatusCommand(int flag) {
method StatusCommand (line 42) | public StatusCommand() {
method write (line 46) | @Override
method read (line 51) | @SuppressWarnings("RedundantThrows")
method getFlag (line 57) | public int getFlag() {
method isSuccess (line 61) | public boolean isSuccess() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/StringMapDataCommand.java
class StringMapDataCommand (line 40) | public class StringMapDataCommand extends DataCommand {
method StringMapDataCommand (line 44) | public StringMapDataCommand() {
method StringMapDataCommand (line 48) | public StringMapDataCommand(String name, Map<String, String> data) {
method getData (line 57) | public Map<String, String> getData() {
method print (line 61) | @Override
method write (line 73) | @Override
method read (line 83) | @SuppressWarnings("RedundantThrows")
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/WireIO.java
class WireIO (line 31) | public class WireIO {
method WireIO (line 34) | private WireIO() {}
method read (line 36) | public static Command read(ObjectInput in) throws IOException {
method write (line 102) | @SuppressWarnings("SynchronizationOnLocalVariableOrMethodParameter")
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/WireProtocol.java
type WireProtocol (line 68) | public interface WireProtocol extends Closeable {
method read (line 79) | Command read() throws IOException, ClassNotFoundException;
method write (line 90) | void write(Command command) throws IOException;
method flush (line 97) | void flush() throws IOException;
method getVersion (line 104) | ProtocolVersion getVersion();
method close (line 113) | @Override
method create (line 127) | static WireProtocol create(
method createWithNegotiation (line 152) | static WireProtocol createWithNegotiation(InputStream inputStream, Out...
method createWithConfig (line 172) | static WireProtocol createWithConfig(
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryClient.java
class BinaryClient (line 16) | public class BinaryClient {
method BinaryClient (line 27) | public BinaryClient(InputStream inputStream, OutputStream outputStream...
method sendEvent (line 36) | public void sendEvent(String event) throws IOException {
method sendExit (line 43) | public void sendExit(int exitCode) throws IOException {
method sendInstrument (line 50) | public void sendInstrument(byte[] code, String[] args) throws IOExcept...
method sendInstrument (line 57) | public void sendInstrument(byte[] code, Map<String, String> args) thro...
method sendMessage (line 64) | public void sendMessage(String message, boolean urgent) throws IOExcep...
method send (line 71) | public void send(BinaryCommand cmd) throws IOException {
method send (line 87) | public void send(Command cmd) throws IOException {
method commandLoop (line 94) | public void commandLoop() throws IOException {
method readCommand (line 119) | public BinaryCommand readCommand() throws IOException {
method close (line 135) | public void close() throws IOException {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryCommand.java
class BinaryCommand (line 14) | public abstract class BinaryCommand {
method registerCommand (line 66) | public static void registerCommand(byte type, Supplier<BinaryCommand> ...
method createCommand (line 73) | public static BinaryCommand createCommand(byte type) {
method BinaryCommand (line 84) | protected BinaryCommand(byte type) {
method BinaryCommand (line 88) | protected BinaryCommand(byte type, boolean urgent) {
method write (line 99) | protected abstract void write(OutputStream out) throws IOException;
method read (line 104) | protected abstract void read(InputStream in) throws IOException;
method getType (line 109) | public final byte getType() {
method isUrgent (line 116) | public final boolean isUrgent() {
method setUrgent (line 123) | final void setUrgent() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryDataCommand.java
class BinaryDataCommand (line 11) | public abstract class BinaryDataCommand extends BinaryCommand {
method BinaryDataCommand (line 14) | protected BinaryDataCommand(byte type, String name) {
method BinaryDataCommand (line 19) | protected BinaryDataCommand(byte type) {
method write (line 23) | @Override
method read (line 28) | @Override
method getName (line 33) | public String getName() {
method setName (line 37) | public void setName(String name) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryDisconnectCommand.java
class BinaryDisconnectCommand (line 7) | public class BinaryDisconnectCommand extends BinaryStringCommand {
method BinaryDisconnectCommand (line 13) | public BinaryDisconnectCommand(String probeId) {
method BinaryDisconnectCommand (line 17) | public BinaryDisconnectCommand() {
method getProbeId (line 21) | public String getProbeId() {
method setProbeId (line 25) | public void setProbeId(String probeId) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryErrorCommand.java
class BinaryErrorCommand (line 11) | public class BinaryErrorCommand extends BinaryCommand {
method BinaryErrorCommand (line 21) | public BinaryErrorCommand(String exceptionClass, String message, Strin...
method BinaryErrorCommand (line 28) | public BinaryErrorCommand() {
method write (line 32) | @Override
method read (line 39) | @Override
method getExceptionClass (line 46) | public String getExceptionClass() {
method setExceptionClass (line 50) | public void setExceptionClass(String exceptionClass) {
method getMessage (line 54) | public String getMessage() {
method setMessage (line 58) | public void setMessage(String message) {
method getStackTrace (line 62) | public String getStackTrace() {
method setStackTrace (line 66) | public void setStackTrace(String stackTrace) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryEventCommand.java
class BinaryEventCommand (line 7) | public class BinaryEventCommand extends BinaryStringCommand {
method BinaryEventCommand (line 13) | public BinaryEventCommand(String event) {
method BinaryEventCommand (line 17) | public BinaryEventCommand() {
method getEvent (line 21) | public String getEvent() {
method setEvent (line 25) | public void setEvent(String event) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryExitCommand.java
class BinaryExitCommand (line 11) | public class BinaryExitCommand extends BinaryCommand {
method BinaryExitCommand (line 19) | public BinaryExitCommand(int exitCode) {
method BinaryExitCommand (line 24) | public BinaryExitCommand() {
method write (line 28) | @Override
method read (line 33) | @Override
method getExitCode (line 38) | public int getExitCode() {
method setExitCode (line 42) | public void setExitCode(int exitCode) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryGridDataCommand.java
class BinaryGridDataCommand (line 13) | public class BinaryGridDataCommand extends BinaryDataCommand {
method BinaryGridDataCommand (line 24) | public BinaryGridDataCommand(String name, List<String> columnNames, Li...
method BinaryGridDataCommand (line 34) | public BinaryGridDataCommand() {
method write (line 38) | @Override
method read (line 65) | @Override
method getColumnNames (line 94) | public List<String> getColumnNames() {
method setColumnNames (line 98) | public void setColumnNames(List<String> columnNames) {
method getData (line 105) | public List<Object[]> getData() {
method setData (line 113) | public void setData(List<Object[]> data) {
method addRow (line 122) | public void addRow(Object[] row) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryInstrumentCommand.java
class BinaryInstrumentCommand (line 14) | public class BinaryInstrumentCommand extends BinaryCommand {
method BinaryInstrumentCommand (line 23) | public BinaryInstrumentCommand(byte[] code, ArgsMap args) {
method BinaryInstrumentCommand (line 29) | public BinaryInstrumentCommand(byte[] code, String[] args) {
method BinaryInstrumentCommand (line 33) | public BinaryInstrumentCommand(byte[] code, Map<String, String> args) {
method BinaryInstrumentCommand (line 37) | public BinaryInstrumentCommand() {
method write (line 41) | @Override
method read (line 56) | @Override
method getCode (line 73) | public byte[] getCode() {
method getArguments (line 77) | public ArgsMap getArguments() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryListFailedExtensionsCommand.java
class BinaryListFailedExtensionsCommand (line 14) | public class BinaryListFailedExtensionsCommand extends BinaryCommand {
method BinaryListFailedExtensionsCommand (line 21) | public BinaryListFailedExtensionsCommand() {
method setFailures (line 25) | public void setFailures(Collection<String> failures) {
method getFailures (line 32) | public List<String> getFailures() {
method write (line 36) | @Override
method read (line 44) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryListProbesCommand.java
class BinaryListProbesCommand (line 14) | public class BinaryListProbesCommand extends BinaryCommand {
method BinaryListProbesCommand (line 22) | public BinaryListProbesCommand() {
method setProbes (line 26) | public void setProbes(Collection<String> probes) {
method getProbes (line 31) | public List<String> getProbes() {
method write (line 35) | @Override
method read (line 43) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryMessageCommand.java
class BinaryMessageCommand (line 18) | public class BinaryMessageCommand extends BinaryCommand {
method BinaryMessageCommand (line 32) | public BinaryMessageCommand(long timestamp, String message, boolean ur...
method BinaryMessageCommand (line 39) | public BinaryMessageCommand(String message, boolean urgent) {
method BinaryMessageCommand (line 43) | public BinaryMessageCommand(String message) {
method BinaryMessageCommand (line 47) | public BinaryMessageCommand() {
method write (line 51) | @Override
method read (line 94) | @Override
method getMessage (line 142) | public String getMessage() {
method setMessage (line 146) | public void setMessage(String message) {
method getTimestamp (line 150) | public long getTimestamp() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryNumberDataCommand.java
class BinaryNumberDataCommand (line 11) | public class BinaryNumberDataCommand extends BinaryDataCommand {
method BinaryNumberDataCommand (line 22) | public BinaryNumberDataCommand(String name, Number value) {
method BinaryNumberDataCommand (line 27) | public BinaryNumberDataCommand() {
method write (line 31) | @Override
method read (line 40) | @Override
method getValue (line 49) | public Number getValue() {
method setValue (line 53) | public void setValue(Number value) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryNumberMapDataCommand.java
class BinaryNumberMapDataCommand (line 13) | public class BinaryNumberMapDataCommand extends BinaryDataCommand {
method BinaryNumberMapDataCommand (line 24) | public BinaryNumberMapDataCommand(String name, Map<String, Number> dat...
method BinaryNumberMapDataCommand (line 31) | public BinaryNumberMapDataCommand() {
method write (line 35) | @Override
method read (line 50) | @Override
method getData (line 70) | public Map<String, Number> getData() {
method setData (line 74) | public void setData(Map<String, Number> data) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryProtocol.java
class BinaryProtocol (line 13) | public class BinaryProtocol {
method readByte (line 21) | public static byte readByte(InputStream is) throws IOException {
method readInt (line 29) | public static int readInt(InputStream is) throws IOException {
method readLong (line 35) | public static long readLong(InputStream is) throws IOException {
method readFloat (line 41) | public static float readFloat(InputStream is) throws IOException {
method readDouble (line 47) | public static double readDouble(InputStream is) throws IOException {
method readBoolean (line 53) | public static boolean readBoolean(InputStream is) throws IOException {
method readString (line 57) | public static String readString(InputStream is) throws IOException {
method readByteArray (line 74) | public static byte[] readByteArray(InputStream is) throws IOException {
method writeByte (line 93) | public static void writeByte(OutputStream os, byte value) throws IOExc...
method writeInt (line 97) | public static void writeInt(OutputStream os, int value) throws IOExcep...
method writeLong (line 103) | public static void writeLong(OutputStream os, long value) throws IOExc...
method writeFloat (line 109) | public static void writeFloat(OutputStream os, float value) throws IOE...
method writeDouble (line 115) | public static void writeDouble(OutputStream os, double value) throws I...
method writeBoolean (line 121) | public static void writeBoolean(OutputStream os, boolean value) throws...
method writeString (line 125) | public static void writeString(OutputStream os, String value) throws I...
method writeByteArray (line 137) | public static void writeByteArray(OutputStream os, byte[] value) throw...
method readFully (line 150) | public static void readFully(InputStream is, byte[] buffer) throws IOE...
method readFully (line 154) | public static void readFully(InputStream is, byte[] buffer, int offset...
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryReconnectCommand.java
class BinaryReconnectCommand (line 7) | public class BinaryReconnectCommand extends BinaryStringCommand {
method BinaryReconnectCommand (line 15) | public BinaryReconnectCommand(String probeId) {
method BinaryReconnectCommand (line 19) | public BinaryReconnectCommand() {
method getProbeId (line 23) | public String getProbeId() {
method setProbeId (line 27) | public void setProbeId(String probeId) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryRenameCommand.java
class BinaryRenameCommand (line 7) | public class BinaryRenameCommand extends BinaryStringCommand {
method BinaryRenameCommand (line 13) | public BinaryRenameCommand(String newName) {
method BinaryRenameCommand (line 17) | public BinaryRenameCommand() {
method getNewName (line 21) | public String getNewName() {
method setNewName (line 25) | public void setNewName(String newName) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryRetransformClassNotification.java
class BinaryRetransformClassNotification (line 11) | public class BinaryRetransformClassNotification extends BinaryCommand {
method BinaryRetransformClassNotification (line 21) | public BinaryRetransformClassNotification(String className, int index,...
method BinaryRetransformClassNotification (line 28) | public BinaryRetransformClassNotification() {
method write (line 32) | @Override
method read (line 39) | @Override
method getClassName (line 46) | public String getClassName() {
method setClassName (line 50) | public void setClassName(String className) {
method getIndex (line 54) | public int getIndex() {
method setIndex (line 58) | public void setIndex(int index) {
method getTotal (line 62) | public int getTotal() {
method setTotal (line 66) | public void setTotal(int total) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryRetransformationStartNotification.java
class BinaryRetransformationStartNotification (line 11) | public class BinaryRetransformationStartNotification extends BinaryComma...
method BinaryRetransformationStartNotification (line 19) | public BinaryRetransformationStartNotification(int numClasses) {
method BinaryRetransformationStartNotification (line 24) | public BinaryRetransformationStartNotification() {
method write (line 28) | @Override
method read (line 33) | @Override
method getNumClasses (line 38) | public int getNumClasses() {
method setNumClasses (line 42) | public void setNumClasses(int numClasses) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinarySetSettingsCommand.java
class BinarySetSettingsCommand (line 13) | public class BinarySetSettingsCommand extends BinaryCommand {
method BinarySetSettingsCommand (line 38) | public BinarySetSettingsCommand(Map<String, ?> params) {
method BinarySetSettingsCommand (line 43) | public BinarySetSettingsCommand() {
method getParams (line 47) | public Map<String, Object> getParams() {
method write (line 51) | @Override
method read (line 63) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryStatusCommand.java
class BinaryStatusCommand (line 11) | public class BinaryStatusCommand extends BinaryCommand {
method BinaryStatusCommand (line 23) | public BinaryStatusCommand(int flag) {
method BinaryStatusCommand (line 27) | public BinaryStatusCommand(int flag, boolean success) {
method BinaryStatusCommand (line 33) | public BinaryStatusCommand() {
method write (line 37) | @Override
method read (line 43) | @Override
method getFlag (line 49) | public int getFlag() {
method setFlag (line 53) | public void setFlag(int flag) {
method isSuccess (line 57) | public boolean isSuccess() {
method setSuccess (line 61) | public void setSuccess(boolean success) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryStringCommand.java
class BinaryStringCommand (line 11) | public abstract class BinaryStringCommand extends BinaryCommand {
method BinaryStringCommand (line 14) | protected BinaryStringCommand(byte type, String payload) {
method BinaryStringCommand (line 19) | protected BinaryStringCommand(byte type) {
method write (line 23) | @Override
method read (line 28) | @Override
method getPayload (line 33) | public String getPayload() {
method setPayload (line 37) | public void setPayload(String payload) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryStringMapDataCommand.java
class BinaryStringMapDataCommand (line 13) | public class BinaryStringMapDataCommand extends BinaryDataCommand {
method BinaryStringMapDataCommand (line 21) | public BinaryStringMapDataCommand(String name, Map<String, String> dat...
method BinaryStringMapDataCommand (line 28) | public BinaryStringMapDataCommand() {
method write (line 32) | @Override
method read (line 47) | @Override
method getData (line 66) | public Map<String, String> getData() {
method setData (line 70) | public void setData(Map<String, String> data) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryWireIO.java
class BinaryWireIO (line 12) | public class BinaryWireIO {
method BinaryWireIO (line 18) | private BinaryWireIO() {}
method read (line 23) | public static BinaryCommand read(InputStream in) throws IOException {
method write (line 53) | public static void write(OutputStream out, BinaryCommand cmd) throws I...
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/CommandAdapter.java
class CommandAdapter (line 34) | public class CommandAdapter {
method CommandAdapter (line 35) | private CommandAdapter() {}
method toBtraceCommand (line 40) | public static Command toBtraceCommand(BinaryCommand binaryCmd) {
method toBinaryCommand (line 145) | public static BinaryCommand toBinaryCommand(Command originalCmd) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/CommandDeserializationException.java
class CommandDeserializationException (line 8) | public class CommandDeserializationException extends IOException {
method CommandDeserializationException (line 11) | public CommandDeserializationException(byte commandType, String messag...
method CommandDeserializationException (line 17) | public CommandDeserializationException(byte commandType, Throwable cau...
method getCommandType (line 22) | public byte getCommandType() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/MalformedCommandException.java
class MalformedCommandException (line 8) | public class MalformedCommandException extends IOException {
method MalformedCommandException (line 11) | public MalformedCommandException(byte commandType, String message) {
method MalformedCommandException (line 16) | public MalformedCommandException(byte commandType, String message, Thr...
method getCommandType (line 21) | public byte getCommandType() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/NumberEncoding.java
class NumberEncoding (line 13) | final class NumberEncoding {
method NumberEncoding (line 22) | NumberEncoding(
method writeNumber (line 39) | void writeNumber(OutputStream out, Number value) throws IOException {
method readNumber (line 69) | Number readNumber(InputStream in) throws IOException {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/ProtocolVersionMismatchException.java
class ProtocolVersionMismatchException (line 9) | public class ProtocolVersionMismatchException extends IOException {
method ProtocolVersionMismatchException (line 13) | public ProtocolVersionMismatchException(int expectedVersion, int actua...
method getExpectedVersion (line 20) | public int getExpectedVersion() {
method getActualVersion (line 24) | public int getActualVersion() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/RemoteException.java
class RemoteException (line 6) | class RemoteException extends RuntimeException {
method RemoteException (line 10) | RemoteException(String exceptionClass, String message, String remoteSt...
method printStackTrace (line 16) | @Override
method printStackTrace (line 25) | @Override
method toString (line 34) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/ScalarEncoding.java
class ScalarEncoding (line 12) | final class ScalarEncoding {
method ScalarEncoding (line 20) | ScalarEncoding(
method writeValue (line 37) | void writeValue(OutputStream out, Object value) throws IOException {
method readValue (line 67) | Object readValue(InputStream in) throws IOException {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/extensions/Extension.java
class Extension (line 46) | public abstract class Extension implements AutoCloseable {
method initialize (line 61) | public void initialize(ExtensionContext ctx) throws ExtensionException {
method close (line 76) | @Override
method getContext (line 87) | protected final ExtensionContext getContext() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/extensions/ExtensionContext.java
type ExtensionContext (line 12) | public interface ExtensionContext {
method send (line 18) | void send(String message);
method send (line 25) | void send(Command command);
method getArgs (line 32) | ArgsMap getArgs();
method getScriptClassName (line 39) | String getScriptClassName();
method getPermissions (line 46) | PermissionSet getPermissions();
method hasPermission (line 54) | boolean hasPermission(Permission permission);
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/extensions/ExtensionException.java
class ExtensionException (line 15) | public class ExtensionException extends RuntimeException {
method ExtensionException (line 21) | public ExtensionException(String message) {
method ExtensionException (line 31) | public ExtensionException(String message, Throwable cause) {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/extensions/ExtensionMeta.java
class ExtensionMeta (line 13) | public final class ExtensionMeta {
method ExtensionMeta (line 22) | private ExtensionMeta(
method from (line 46) | public static ExtensionMeta from(Class<? extends Extension> extensionC...
method getExtensionClass (line 84) | public Class<? extends Extension> getExtensionClass() {
method getName (line 93) | public String getName() {
method getVersion (line 102) | public String getVersion() {
method getDescription (line 111) | public String getDescription() {
method getMinBTraceVersion (line 120) | public String getMinBTraceVersion() {
method getRequiredPermissions (line 129) | public PermissionSet getRequiredPermissions() {
method getDependencies (line 138) | public Set<Class<? extends Extension>> getDependencies() {
method toString (line 142) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/extensions/Permission.java
type Permission (line 14) | public enum Permission {
method isDefault (line 58) | public boolean isDefault() {
method isStandard (line 67) | public boolean isStandard() {
method isPrivileged (line 76) | public boolean isPrivileged() {
method getRiskDescription (line 85) | public String getRiskDescription() {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/extensions/PermissionSet.java
class PermissionSet (line 12) | public final class PermissionSet implements Iterable<Permission> {
method PermissionSet (line 35) | private PermissionSet(EnumSet<Permission> permissions) {
method empty (line 44) | public static PermissionSet empty() {
method all (line 53) | public static PermissionSet all() {
method defaults (line 62) | public static PermissionSet defaults() {
method standard (line 71) | public static PermissionSet standard() {
method of (line 81) | public static PermissionSet of(Permission... permissions) {
method has (line 98) | public boolean has(Permission permission) {
method hasAll (line 108) | public boolean hasAll(PermissionSet other) {
method with (line 118) | public PermissionSet with(Permission... toAdd) {
method without (line 135) | public PermissionSet without(Permission... toRemove) {
method size (line 151) | public int size() {
method isEmpty (line 160) | public boolean isEmpty() {
method iterator (line 164) | @Override
method equals (line 169) | @Override
method hashCode (line 181) | @Override
method toString (line 186) | @Override
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/handlers/ErrorHandler.java
class ErrorHandler (line 5) | public final class ErrorHandler {
method ErrorHandler (line 8) | public ErrorHandler(String method) {
method getMethod (line 12) | public Method getMethod(Class<?> clz) throws NoSuchMethodException {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/handlers/EventHandler.java
class EventHandler (line 5) | public final class EventHandler {
method EventHandler (line 11) | public EventHandler(String method, String event) {
method getEvent (line 16) | public String getEvent() {
method getMethod (line 20) | public Method getMethod(Class<?> clz) throws NoSuchMethodException {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/handlers/ExitHandler.java
class ExitHandler (line 5) | public class ExitHandler {
method ExitHandler (line 8) | public ExitHandler(String method) {
method getMethod (line 12) | public Method getMethod(Class<?> clz) throws NoSuchMethodException {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/handlers/LowMemoryHandler.java
class LowMemoryHandler (line 7) | public final class LowMemoryHandler {
method LowMemoryHandler (line 15) | public LowMemoryHandler(
method getMethod (line 24) | public synchronized Method getMethod(Class<?> clz) throws NoSuchMethod...
method invoke (line 31) | public void invoke(Class<?> clz, Object... args)
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/handlers/TimerHandler.java
class TimerHandler (line 5) | public final class TimerHandler {
method TimerHandler (line 10) | public TimerHandler(String method, long period, String periodArg) {
method getMethod (line 16) | public Method getMethod(Class<?> clz) throws NoSuchMethodException {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/jfr/JfrEvent.java
class JfrEvent (line 3) | @SuppressWarnings("UnusedReturnValue")
class Template (line 5) | public static final class Template {
class Field (line 6) | public static final class Field {
method Field (line 14) | public Field(
method getName (line 29) | public String getName() {
method getType (line 33) | public String getType() {
method getLabel (line 37) | public String getLabel() {
method getDescription (line 41) | public String getDescription() {
method getSpecificationName (line 45) | public String getSpecificationName() {
method getSpecificationValue (line 49) | public String getSpecificationValue() {
method Template (line 64) | public Template(
method getOwner (line 85) | public String getOwner() {
method getName (line 89) | public String getName() {
method getLabel (line 93) | public String getLabel() {
method getDescription (line 97) | public String getDescription() {
method getCategory (line 101) | public String[] getCategory() {
method getFields (line 105) | public Field[] getFields() {
method isStacktrace (line 109) | public boolean isStacktrace() {
method getPeriod (line 113) | public String getPeriod() {
method getPeriodicHandler (line 117) | public String getPeriodicHandler() {
type Factory (line 122) | public interface Factory {
method newEvent (line 123) | JfrEvent newEvent();
method withValue (line 128) | @Override
method withValue (line 133) | @Override
method withValue (line 138) | @Override
method withValue (line 143) | @Override
method withValue (line 148) | @Override
method withValue (line 153) | @Override
method withValue (line 158) | @Override
method withValue (line 163) | @Override
method withValue (line 168) | @Override
method commit (line 173) | @Override
method shouldCommit (line 176) | @Override
method begin (line 181) | @Override
method end (line 184) | @Override
method withValue (line 188) | public abstract JfrEvent withValue(String fieldName, byte value);
method withValue (line 190) | public abstract JfrEvent withValue(String fieldName, boolean value);
method withValue (line 192) | public abstract JfrEvent withValue(String fieldName, char value);
method withValue (line 194) | public abstract JfrEvent withValue(String fieldName, short value);
method withValue (line 196) | public abstract JfrEvent withValue(String fieldName, int value);
method withValue (line 198) | public abstract JfrEvent withValue(String fieldName, float value);
method withValue (line 200) | public abstract JfrEvent withValue(String fieldName, long value);
method withValue (line 202) | public abstract JfrEvent withValue(String fieldName, double value);
method withValue (line 204) | public abstract JfrEvent withValue(String fieldName, String value);
method commit (line 206) | public abstract void commit();
method shouldCommit (line 208) | public abstract boolean shouldCommit();
method begin (line 210) | public abstract void begin();
method end (line 212) | public abstract void end();
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/types/AnyType.java
type AnyType (line 36) | public interface AnyType {
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/types/BTraceCollection.java
type BTraceCollection (line 35) | public interface BTraceCollection<T> extends Collection<T> {}
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/types/BTraceDeque.java
class BTraceDeque (line 36) | public class BTraceDeque<V> implements Deque<V>, BTraceCollection<V>, Cl...
method BTraceDeque (line 39) | public BTraceDeque(Deque<V> delegate) {
method toString (line 43) | @Override
method toArray (line 48) | @Override
method toArray (line 53) | @Override
method retainAll (line 58) | @Override
method removeAll (line 63) | @Override
method isEmpty (line 68) | @Override
method containsAll (line 73) | @Override
method clear (line 78) | @Override
method addAll (line 83) | @Override
method size (line 88) | @Override
method removeLastOccurrence (line 93) | @Override
method removeLast (line 98) | @Override
method removeFirstOccurrence (line 103) | @Override
method removeFirst (line 108) | @Override
method remove (line 113) | @Override
method remove (line 118) | @Override
method push (line 123) | @Override
method pop (line 128) | @Override
method pollLast (line 133) | @Override
method pollFirst (line 138) | @Override
method poll (line 143) | @Override
method peekLast (line 148) | @Override
method peekFirst (line 153) | @Override
method peek (line 158) | @Override
method offerLast (line 163) | @Override
method offerFirst (line 168) | @Override
method offer (line 173) | @Override
method iterator (line 178) | @Override
method getLast (line 183) | @Override
method getFirst (line 188) | @Override
method element (line 193) | @Override
method descendingIterator (line 198) | @Override
method contains (line 203) | @Override
method addLast (line 208) | @Override
method addFirst (line 213) | @Override
method add (line 218) | @Override
method hashCode (line 223) | @Override
method equals (line 228) | @Override
method clone (line 233) | @SuppressWarnings({"RedundantThrows", "MethodDoesntCallSuperMethod"})
FILE: btrace-core/src/main/java/org/openjdk/btrace/core/types/BTraceMap.java
class BTraceMap (line 39) | public final class BTraceMap<K, V> implements Map<K, V>, Cloneable {
method BTraceMap (line 47) | public BTraceMap(Map<K, V> m) {
method size (line 55) | @Override
method isEmpty (line 60) | @Override
method containsKey (line 65) | @Override
method containsValue (line 70) | @Override
method get (line 75) | @Override
method put (line 80) | @Override
method remove (line 85) | @Override
method putAll (line 90) | @Override
method clear (line 95) | @Override
method keySet (line 100) | @Override
method entrySet (line 108) | @Override
method values (line 116) | @Override
method equals (line 124) | @Override
method hashCode (line 129) | @Override
method toString (line 134) | @Override
method clone (line 139) | @SuppressWarnings({"RedundantThrows", "MethodDoesntCallSuperMethod"})
FILE: btrace-core/src/main/java/org/openjdk/btrace/runtime/BTraceRuntimeAccess.java
class BTraceRuntimeAccess (line 35) | public final class BTraceRuntimeAccess {
method BTraceRuntimeAccess (line 41) | private BTraceRuntimeAccess() {}
method install (line 43) | public static void install(Delegate delegate) {
method isUniqueClientClassNames (line 47) | public static boolean isUniqueClientClassNames() {
method enter (line 51) | public static boolean enter(BTraceRuntimeBridge currentRt) {
method leave (line 56) | public static void leave() {
method forClass (line 63) | public static BTraceRuntimeBridge forClass(
method newThreadLocal (line 76) | public static ThreadLocal newThreadLocal(Object initValue) {
method getClientName (line 81) | public static String getClientName(String forClassName) {
method currentContext (line 86) | public static ExtensionContext currentContext() {
type Delegate (line 91) | public interface Delegate {
method enter (line 92) | boolean enter(BTraceRuntimeBridge currentRt);
method leave (line 94) | void leave();
method forClass (line 96) | BTraceRuntimeBridge forClass(
method newThreadLocal (line 104) | ThreadLocal newThreadLocal(Object initValue);
method getClientName (line 106) | String getClientName(String forClassName);
method currentContext (line 108) | ExtensionContext currentContext();
FILE: btrace-core/src/main/java/org/openjdk/btrace/runtime/LinkingFlag.java
class LinkingFlag (line 3) | public final class LinkingFlag {
method guardLinking (line 6) | public static int guardLinking() {
method get (line 13) | public static int get() {
method reset (line 18) | public static void reset() {
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/CircularBufferTest.java
class CircularBufferTest (line 10) | public class CircularBufferTest {
method testAddOverflow (line 12) | @Test
method testAddOverflowSeveral (line 35) | @Test
method testAdd (line 61) | @Test
method testAddFull (line 80) | @Test
method testEmpty (line 100) | @Test
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/MethodIDTest.java
class MethodIDTest (line 17) | class MethodIDTest {
method resetState (line 19) | @BeforeEach
method singleThreadedConsistency (line 36) | @Test
method concurrentGenerationHasNoDuplicates (line 46) | @Test
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/PrefixMapTest.java
class PrefixMapTest (line 7) | class PrefixMapTest {
method addAndContainsWorkWithDuplicates (line 8) | @Test
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/ReflectiveFieldAccessTest.java
class ReflectiveFieldAccessTest (line 8) | class ReflectiveFieldAccessTest {
method getIntTest (line 10) | @Test
class A (line 18) | static class A {
class B (line 22) | static class B extends A {}
class C (line 24) | static class C extends A {}
class D (line 26) | static class D extends C {}
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/comm/InstrumentCommandTest.java
class InstrumentCommandTest (line 38) | class InstrumentCommandTest {
method testConstructorWithArgsMapMakesDefensiveCopy (line 40) | @Test
method testConstructorWithStringArrayArgs (line 63) | @Test
method testConstructorWithMapArgs (line 81) | @Test
method testGetCodeReturnsDefensiveCopy (line 98) | @Test
method testNullBytecode (line 117) | @Test
method testNullArgs (line 124) | @Test
method testEmptyBytecode (line 132) | @Test
method testEmptyArgs (line 141) | @Test
method testLargeBytecodeArray (line 151) | @Test
method testMultipleArguments (line 167) | @Test
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/comm/JavaSerializationProtocolLeakTest.java
class JavaSerializationProtocolLeakTest (line 14) | class JavaSerializationProtocolLeakTest {
class FailingInputStream (line 16) | static class FailingInputStream extends InputStream {
method read (line 17) | @Override
class CloseTrackingOutputStream (line 23) | static class CloseTrackingOutputStream extends OutputStream {
method write (line 26) | @Override
method close (line 31) | @Override
method constructorClosesOutputStreamOnInputInitFailure (line 38) | @Test
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/comm/ListProbesCommandConcurrencyTest.java
class ListProbesCommandConcurrencyTest (line 15) | class ListProbesCommandConcurrencyTest {
method concurrentSetAndIterateDoesNotThrow (line 17) | @Test
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/comm/NullSafetyTest.java
class NullSafetyTest (line 14) | class NullSafetyTest {
method testErrorCommandPrintWithNullCause (line 16) | @Test
method testGridDataCommandWithNullRow (line 29) | @Test
method testMessageCommandWithNullMessage (line 46) | @Test
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/comm/ProtocolConfigTest.java
class ProtocolConfigTest (line 9) | public class ProtocolConfigTest {
method clearSystemProperties (line 11) | @AfterEach
method testDefaultConfig (line 18) | @Test
method testBuilderDefaultValues (line 27) | @Test
method testBuilderCustomVersion (line 36) | @Test
method testBuilderDisableAutoNegotiate (line 45) | @Test
method testBuilderForceVersion (line 54) | @Test
method testBuilderInvalidConfiguration (line 68) | @Test
method testFromSystemPropertiesNoProperties (line 76) | @Test
method testFromSystemPropertiesProtocolV1 (line 86) | @Test
method testFromSystemPropertiesProtocolV2 (line 96) | @Test
method testFromSystemPropertiesProtocolNumeric (line 105) | @Test
method testFromSystemPropertiesProtocolUppercase (line 116) | @Test
method testFromSystemPropertiesInvalidProtocol (line 127) | @Test
method testFromSystemPropertiesAutoNegotiate (line 133) | @Test
method testFromSystemPropertiesForceVersion (line 141) | @Test
method testFromSystemPropertiesAllProperties (line 153) | @Test
method testToString (line 165) | @Test
method testBuilderChaining (line 175) | @Test
method testMultipleBuilds (line 189) | @Test
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/comm/ProtocolNegotiatorTest.java
class ProtocolNegotiatorTest (line 12) | public class ProtocolNegotiatorTest {
method testProtocolVersionV1 (line 14) | @Test
method testProtocolVersionV2 (line 21) | @Test
method testProtocolVersionFromVersion (line 33) | @Test
method testProtocolVersionDetectFromPrefix (line 43) | @Test
method testProtocolVersionGetDefault (line 70) | @Test
method testNegotiatorDefaultConstructor (line 75) | @Test
method testNegotiatorCustomVersion (line 81) | @Test
method testNegotiateV2WithPushback (line 87) | @Test
method testNegotiateV1WithPushback (line 103) | @Test
method testNegotiateV2WithMark (line 120) | @Test
method testNegotiateV1WithMark (line 136) | @Test
method testNegotiateEmptyStream (line 153) | @Test
method testNegotiateUnsupportedStream (line 162) | @Test
method testCreateNegotiationStream (line 182) | @Test
method testCreateNegotiationStreamAlreadyPushback (line 191) | @Test
method testNegotiateMultipleV2Connections (line 199) | @Test
method testNegotiateMultipleV1Connections (line 214) | @Test
method testProtocolVersionToString (line 229) | @Test
method testMagicBytesImmutable (line 238) | @Test
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/comm/TypeSafetyTest.java
class TypeSafetyTest (line 43) | class TypeSafetyTest {
method testNumberDataCommandValidNumber (line 45) | @Test
method testNumberDataCommandNullValue (line 56) | @Test
method testNumberDataCommandRejectsInvalidType (line 66) | @Test
method testErrorCommandValidThrowable (line 92) | @Test
method testErrorCommandNullCause (line 103) | @Test
method testErrorCommandRejectsInvalidType (line 112) | @Test
method testSetSettingsCommandValidTypes (line 135) | @Test
method testSetSettingsCommandRejectsInvalidType (line 155) | @Test
method testSetSettingsCommandRejectsNegativeSize (line 178) | @Test
method testSetSettingsCommandRejectsExcessiveSize (line 196) | @Test
method roundTrip (line 215) | private <T extends Command> T roundTrip(T cmd, Class<T> clazz) throws ...
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/comm/WireProtocolSessionTest.java
class WireProtocolSessionTest (line 21) | class WireProtocolSessionTest {
type SessionHandler (line 22) | private interface SessionHandler {
method handle (line 23) | void handle(WireProtocol protocol) throws Exception;
method testDisconnectThenListProbesAcrossConnections (line 26) | @Test
method runV2Session (line 66) | private static void runV2Session(SessionHandler serverHandler, Session...
method createServerProtocol (line 96) | private static WireProtocol createServerProtocol(InputStream in, Outpu...
method createClientProtocol (line 107) | private static WireProtocol createClientProtocol(InputStream in, Outpu...
method unwrap (line 117) | private static Exception unwrap(ExecutionException e) {
class Duplex (line 125) | private static final class Duplex {
method Duplex (line 131) | Duplex() throws Exception {
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/comm/WireProtocolTest.java
class WireProtocolTest (line 13) | public class WireProtocolTest {
method testJavaSerializationProtocolBasic (line 15) | @Test
method testBinaryWireProtocolBasic (line 47) | @Test
method testWireProtocolCreateV1 (line 68) | @Test
method testWireProtocolCreateV2 (line 80) | @Test
method testWireProtocolWithNegotiationV2 (line 90) | @Test
method testWireProtocolWithNegotiationV1 (line 106) | @Test
method testWireProtocolWithConfigForceV1 (line 121) | @Test
method testWireProtocolWithConfigAutoNegotiate (line 140) | @Test
method testMultipleCommandsV1 (line 160) | @Test
method testMultipleCommandsV2 (line 195) | @Test
method testCloseV1 (line 221) | @Test
method testCloseV2 (line 233) | @Test
method testJavaSerializationProtocolReset (line 244) | @Test
method testJavaSerializationProtocolAccessors (line 268) | @Test
method testBinaryWireProtocolAccessors (line 279) | @Test
method testV1V2Interoperability (line 289) | @Test
FILE: btrace-core/src/test/java/org/openjdk/btrace/core/comm/v2/BinaryProtocolEdgeCasesTest.java
class BinaryProtocolEdgeCasesTest (line 25) | public class BinaryProtocolEdgeCasesTest {
method testNullString (line 29) | @Test
method testEmptyString (line 39) | @Test
method testNullByteArray (line 50) | @Test
method testEmptyByteArray (line 60) | @Test
method testMessageCommandNullMessage (line 71) | @Test
method testErrorCommandNullMessage (line 87) | @Test
method testEventCommandNullEvent (line 104) | @Test
method
Condensed preview — 1026 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,444K chars).
[
{
"path": ".github/FUNDING.yml",
"chars": 645,
"preview": "# These are supported funding model platforms\n\ngithub: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [u"
},
{
"path": ".github/copilot-instructions.md",
"chars": 4562,
"preview": "# GitHub Copilot Instructions for BTrace\n\n## About BTrace\nBTrace is a safe, dynamic tracing tool for the Java platform. "
},
{
"path": ".github/workflows/README.md",
"chars": 9258,
"preview": "# BTrace GitHub Actions Workflows\n\n## Overview\n\nThis directory contains GitHub Actions workflows for continuous integrat"
},
{
"path": ".github/workflows/codeql-analysis.yml",
"chars": 1820,
"preview": "# For most projects, this workflow file will not need changing; you simply need\n# to commit it to your repository.\n#\n# Y"
},
{
"path": ".github/workflows/continuous.yml",
"chars": 6643,
"preview": "# This workflow will build a Java project with Gradle\n# For more information see: https://help.github.com/actions/langua"
},
{
"path": ".github/workflows/release.yml",
"chars": 37032,
"preview": "# BTrace Release Workflow\n#\n# This workflow handles the complete release process:\n# 1. Validates inputs and prerequisite"
},
{
"path": ".github/workflows/stale.yml",
"chars": 421,
"preview": "name: Mark stale issues and pull requests\n\non:\n schedule:\n - cron: \"0 0 * * *\"\n\njobs:\n stale:\n\n runs-on: ubuntu-la"
},
{
"path": ".github/workflows/update-jdk-versions.yml",
"chars": 1386,
"preview": "name: Update JDK Test Versions\n\non:\n schedule:\n - cron: '0 6 * * 1'\n workflow_dispatch:\n\npermissions:\n contents: w"
},
{
"path": ".github/workflows/v2-protocol-tests.yml",
"chars": 12649,
"preview": "# Workflow for testing BTrace Binary Protocol v2\n# This workflow runs comprehensive tests for the v2 protocol implementa"
},
{
"path": ".gitignore",
"chars": 729,
"preview": "*.class\n\n# Mobile Tools for Java (J2ME)\n.mtj.tmp/\n\n# Package Files #\n*.jar\n*.war\n*.ear\n\n# Un-ignore specific files\n!btra"
},
{
"path": ".muse/advisor.md",
"chars": 2819,
"preview": "# BTrace Project Advisor\n\n## Repository: btraceio/btrace\n\n### Branch model\n\n- **`develop`** is the sole integration bran"
},
{
"path": "AGENTS.md",
"chars": 12954,
"preview": "# Repository Guidelines\n\n## Project Structure & Modules\n- Root uses Gradle with multiple modules named `btrace-*`.\n- Cor"
},
{
"path": "CONTRIBUTING.md",
"chars": 3430,
"preview": "# Contributing to BTrace\n\nThanks for your interest in contributing! This guide covers local development, running tests, "
},
{
"path": "LICENSE",
"chars": 19340,
"preview": "The GNU General Public License (GPL)\n\nVersion 2, June 1991\n\nCopyright (C) 1989, 1991 Free Software Foundation, Inc.\n59 T"
},
{
"path": "README.md",
"chars": 3908,
"preview": "# BTrace\n\n**Safe, dynamic tracing for Java applications**\n\n[\n}\n\ndescription 'A JMH benchmark to assert the overhead imposed by variou"
},
{
"path": "benchmarks/agent-benchmark/src/jmh/btrace/TraceScript.java",
"chars": 3717,
"preview": "import static org.openjdk.btrace.core.BTraceUtils.*;\n\nimport org.openjdk.btrace.core.annotations.BTrace;\nimport org.open"
},
{
"path": "benchmarks/agent-benchmark/src/jmh/java/benchmark/BTraceBench.java",
"chars": 11559,
"preview": "/*\n * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "benchmarks/runtime-benchmarks/build.gradle",
"chars": 1951,
"preview": "plugins {\n id 'java'\n alias(libs.plugins.jmh)\n}\n\ndescription 'A JMH benchmark to assert the overhead imposed by variou"
},
{
"path": "benchmarks/runtime-benchmarks/src/jmh/btrace/TraceScript.java",
"chars": 3829,
"preview": "import static org.openjdk.btrace.core.BTraceUtils.*;\n\nimport org.openjdk.btrace.core.annotations.BTrace;\nimport org.open"
},
{
"path": "benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/ClassFilterBenchmark.java",
"chars": 3866,
"preview": "/*\n * Copyright (c) 2018, Jaroslav Bachorik <j.bachorik@btrace.io>.\n * All rights reserved.\n * DO NOT ALTER OR REMOVE CO"
},
{
"path": "benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/DispatchBenchmark.java",
"chars": 4514,
"preview": "/*\n * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/OnMethodTemplateBenchmark.java",
"chars": 2744,
"preview": "/*\n * Copyright (c) 2018, Jaroslav Bachorik <j.bachorik@btrace.io>.\n * All rights reserved.\n * DO NOT ALTER OR REMOVE CO"
},
{
"path": "benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/ProbeLoadingBenchmark.java",
"chars": 2916,
"preview": "/*\n * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/ProfilerBenchmark.java",
"chars": 4780,
"preview": "/*\n * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/StatsdBenchmark.java",
"chars": 3049,
"preview": "/*\n * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "benchmarks/runtime-benchmarks/src/jmh/java/org/openjdk/btrace/bench/StringOpBenchmark.java",
"chars": 3304,
"preview": "/*\n * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-agent/build.gradle",
"chars": 1034,
"preview": "compileJava {\n // Keep Java 8 compatibility while accessing JDK internal APIs\n options.fork = true\n options.for"
},
{
"path": "btrace-agent/src/main/java/org/openjdk/btrace/agent/Client.java",
"chars": 24744,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-agent/src/main/java/org/openjdk/btrace/agent/ClientContext.java",
"chars": 2141,
"preview": "/*\n * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-agent/src/main/java/org/openjdk/btrace/agent/FileClient.java",
"chars": 5438,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-agent/src/main/java/org/openjdk/btrace/agent/Main.java",
"chars": 40371,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-agent/src/main/java/org/openjdk/btrace/agent/PerfReaderImpl.java",
"chars": 3575,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-agent/src/main/java/org/openjdk/btrace/agent/RemoteClient.java",
"chars": 15259,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-agent/src/main/java/org/openjdk/btrace/agent/TraceOutputWriter.java",
"chars": 7587,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-agent/src/main/resources/META-INF/MANIFEST.MF",
"chars": 178,
"preview": "Premain-Class: org.openjdk.btrace.agent.Main\nAgent-Class: org.openjdk.btrace.agent.Main\nCan-Redefine-Classes: true\nCan-R"
},
{
"path": "btrace-agent/src/test/java/org/openjdk/btrace/agent/MainTest.java",
"chars": 1270,
"preview": "package org.openjdk.btrace.agent;\n\nimport static org.junit.jupiter.api.Assertions.assertEquals;\nimport static org.junit."
},
{
"path": "btrace-api/build.gradle",
"chars": 223,
"preview": "// BTrace API module for compile-time dependencies\n// This module provides the compile-time API for BTrace scripts\n\ndepe"
},
{
"path": "btrace-boot/build.gradle",
"chars": 451,
"preview": "plugins {\n id 'java-library'\n}\n\njava {\n toolchain {\n languageVersion.set(JavaLanguageVersion.of(8))\n }\n}"
},
{
"path": "btrace-boot/src/main/java/org/openjdk/btrace/boot/Loader.java",
"chars": 10352,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-boot/src/main/java/org/openjdk/btrace/boot/MaskedClassLoader.java",
"chars": 8869,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-boot/src/main/java/org/openjdk/btrace/boot/MaskedJarUtils.java",
"chars": 3483,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-bootstrap/build.gradle",
"chars": 3339,
"preview": "plugins {\n id 'java-library'\n alias(libs.plugins.shadow)\n}\n\ndef bootIncludes = {\n if (it.directory) {\n r"
},
{
"path": "btrace-client/build.gradle",
"chars": 1322,
"preview": "import java.text.SimpleDateFormat\nimport java.util.Date\n\nbuildscript { scriptHandler ->\n apply from: rootProject.file"
},
{
"path": "btrace-client/src/main/java/org/openjdk/btrace/client/Client.java",
"chars": 46898,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-client/src/main/java/org/openjdk/btrace/client/JpsUtils.java",
"chars": 2593,
"preview": "package org.openjdk.btrace.client;\n\nimport com.sun.tools.attach.VirtualMachine;\nimport java.io.IOException;\nimport java."
},
{
"path": "btrace-client/src/main/java/org/openjdk/btrace/client/Main.java",
"chars": 22023,
"preview": "/*\n * Copyright (c) 2008-2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NO"
},
{
"path": "btrace-client/src/main/java/org/openjdk/btrace/client/ProbePrinter.java",
"chars": 2170,
"preview": "package org.openjdk.btrace.client;\n\nimport java.io.BufferedInputStream;\nimport java.io.FileInputStream;\nimport java.io.I"
},
{
"path": "btrace-client/src/test/java/org/openjdk/btrace/client/ClientTest.java",
"chars": 5709,
"preview": "package org.openjdk.btrace.client;\n\nimport static org.junit.jupiter.api.Assertions.*;\n\nimport java.io.File;\nimport java."
},
{
"path": "btrace-client/src/test/java/org/openjdk/btrace/client/MainTest.java",
"chars": 6417,
"preview": "package org.openjdk.btrace.client;\n\nimport static org.junit.jupiter.api.Assertions.*;\n\nimport java.io.File;\nimport java."
},
{
"path": "btrace-compiler/build.gradle",
"chars": 594,
"preview": "dependencies {\n implementation libs.slf4j\n implementation libs.slf4j.simple\n implementation libs.asm\n implem"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/AnnotationSerializer.java",
"chars": 250,
"preview": "package org.openjdk.btrace.compiler;\n\nimport org.objectweb.asm.tree.AnnotationNode;\n\npublic class AnnotationSerializer {"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/ClassDataJavaFileObject.java",
"chars": 5648,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/Compiler.java",
"chars": 9246,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/CompilerClassWriter.java",
"chars": 3169,
"preview": "/*\n * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/CompilerHelper.java",
"chars": 10782,
"preview": "package org.openjdk.btrace.compiler;\n\nimport com.sun.source.util.JavacTask;\nimport java.io.File;\nimport java.io.FileOutp"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/ConcatenatingReader.java",
"chars": 5811,
"preview": "/*\n * Copyright (c) 2008 Sun Microsystems, Inc. All Rights Reserved.\n *\n * Redistribution and use in source and binary f"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/MaskedJavaFileManager.java",
"chars": 7231,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/MemoryJavaFileManager.java",
"chars": 5975,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/PCPP.java",
"chars": 28544,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/PackGenerator.java",
"chars": 162,
"preview": "package org.openjdk.btrace.compiler;\n\nimport java.io.IOException;\n\npublic interface PackGenerator {\n byte[] generatePro"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/Postprocessor.java",
"chars": 23085,
"preview": "/*\n * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/Printer.java",
"chars": 1447,
"preview": "package org.openjdk.btrace.compiler;\n\nimport java.io.PrintWriter;\nimport java.io.Writer;\nimport java.util.ArrayList;\n\ncl"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/Verifier.java",
"chars": 8152,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/VerifierVisitor.java",
"chars": 29201,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerAST.java",
"chars": 4287,
"preview": "package org.openjdk.btrace.compiler.oneliner;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Objec"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerCodeGenerator.java",
"chars": 10726,
"preview": "package org.openjdk.btrace.compiler.oneliner;\n\nimport java.util.ArrayList;\nimport java.util.HashSet;\nimport java.util.Li"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerException.java",
"chars": 1270,
"preview": "package org.openjdk.btrace.compiler.oneliner;\n\n/**\n * Exception thrown when parsing or validating BTrace oneliner expres"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerLexer.java",
"chars": 7548,
"preview": "package org.openjdk.btrace.compiler.oneliner;\n\nimport java.util.ArrayList;\nimport java.util.HashMap;\nimport java.util.Li"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerParser.java",
"chars": 10134,
"preview": "package org.openjdk.btrace.compiler.oneliner;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport org.openjdk.btr"
},
{
"path": "btrace-compiler/src/main/java/org/openjdk/btrace/compiler/oneliner/OnelinerValidator.java",
"chars": 5741,
"preview": "package org.openjdk.btrace.compiler.oneliner;\n\nimport java.util.HashSet;\nimport java.util.Set;\nimport java.util.regex.Pa"
},
{
"path": "btrace-compiler/src/test/java/org/openjdk/btrace/compiler/JfrEventsTest.java",
"chars": 1490,
"preview": "package org.openjdk.btrace.compiler;\n\nimport java.io.File;\nimport java.io.PrintWriter;\nimport java.io.StringWriter;\nimpo"
},
{
"path": "btrace-compiler/src/test/java/org/openjdk/btrace/compiler/TypeErasureTest.java",
"chars": 1656,
"preview": "package org.openjdk.btrace.compiler;\n\nimport org.junit.jupiter.api.Test;\nimport org.objectweb.asm.ClassReader;\nimport or"
},
{
"path": "btrace-compiler/src/test/java/org/openjdk/btrace/compiler/oneliner/OnelinerCodeGeneratorTest.java",
"chars": 8322,
"preview": "package org.openjdk.btrace.compiler.oneliner;\n\nimport static org.junit.jupiter.api.Assertions.*;\n\nimport org.junit.jupit"
},
{
"path": "btrace-compiler/src/test/java/org/openjdk/btrace/compiler/oneliner/OnelinerIntegrationTest.java",
"chars": 4536,
"preview": "package org.openjdk.btrace.compiler.oneliner;\n\nimport static org.junit.jupiter.api.Assertions.*;\n\nimport java.io.PrintWr"
},
{
"path": "btrace-compiler/src/test/java/org/openjdk/btrace/compiler/oneliner/OnelinerParserTest.java",
"chars": 7498,
"preview": "package org.openjdk.btrace.compiler.oneliner;\n\nimport static org.junit.jupiter.api.Assertions.*;\n\nimport org.junit.jupit"
},
{
"path": "btrace-compiler/src/test/resources/HistoProbe.java",
"chars": 822,
"preview": "package test;\n\nimport static org.openjdk.btrace.core.BTraceUtils.*;\nimport org.openjdk.btrace.core.annotations.*;\n\nimpor"
},
{
"path": "btrace-compiler/src/test/resources/JfrEventsProbe.java",
"chars": 1212,
"preview": "package test;\n\nimport org.openjdk.btrace.core.BTraceUtils;\nimport org.openjdk.btrace.core.annotations.*;\nimport org.open"
},
{
"path": "btrace-compiler/src/test/resources/MetricsExtensionProbe.java",
"chars": 2133,
"preview": "package resources;\n\nimport org.openjdk.btrace.core.annotations.BTrace;\nimport org.openjdk.btrace.core.annotations.Durati"
},
{
"path": "btrace-core/JMH_BENCHMARKS.md",
"chars": 5232,
"preview": "# JMH Benchmarks for Binary Protocol v2\n\n## Overview\n\nThis document describes how to run the JMH (Java Microbenchmark Ha"
},
{
"path": "btrace-core/build.gradle",
"chars": 1346,
"preview": "import org.apache.tools.ant.filters.*\n\nbuildscript { scriptHandler ->\n apply from: rootProject.file('buildSrc/shared."
},
{
"path": "btrace-core/src/jmh/java/org/openjdk/btrace/core/comm/v2/BinaryProtocolBenchmark.java",
"chars": 10962,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.ByteArrayInputStream;\nimport java.io.ByteArrayOutputStream;\nimp"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/Args.java",
"chars": 1786,
"preview": "package org.openjdk.btrace.core;\n\npublic final class Args {\n public static final String SYSTEM_CLASS_PATH = \"systemClas"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/ArgsMap.java",
"chars": 4100,
"preview": "/*\n * Copyright (c) 2018, Jaroslav Bachorik <j.bachorik@btrace.io>.\n * All rights reserved.\n * DO NOT ALTER OR REMOVE CO"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/BTraceRuntime.java",
"chars": 34908,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/BTraceRuntimeBridge.java",
"chars": 1709,
"preview": "/*\n * Copyright (c) 2026, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/BTraceUtils.java",
"chars": 216421,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/CircularBuffer.java",
"chars": 1284,
"preview": "package org.openjdk.btrace.core;\n\npublic final class CircularBuffer<T> {\n private final T[] elements;\n private final i"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/DebugSupport.java",
"chars": 4274,
"preview": "/*\n * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/Function.java",
"chars": 90,
"preview": "package org.openjdk.btrace.core;\n\npublic interface Function<T, R> {\n R apply(T value);\n}\n"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/HandlerRepository.java",
"chars": 403,
"preview": "package org.openjdk.btrace.core;\n\nimport java.lang.invoke.MethodHandle;\nimport java.lang.invoke.MethodType;\n\n/**\n * A br"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/Messages.java",
"chars": 1830,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/MethodID.java",
"chars": 2217,
"preview": "/*\n * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/PrefixMap.java",
"chars": 2361,
"preview": "/*\n * Copyright (c) 2017, Jaroslav Bachorik <j.bachorik@btrace.io>.\n * All rights reserved.\n * DO NOT ALTER OR REMOVE CO"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/Profiler.java",
"chars": 7848,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/SharedSettings.java",
"chars": 10317,
"preview": "/*\n * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/VerifierException.java",
"chars": 1593,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/BTrace.java",
"chars": 2011,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/DTrace.java",
"chars": 1721,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/DTraceRef.java",
"chars": 1760,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Duration.java",
"chars": 1915,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Event.java",
"chars": 3555,
"preview": "package org.openjdk.btrace.core.annotations;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Reten"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Export.java",
"chars": 1660,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Injected.java",
"chars": 2233,
"preview": "/*\n * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/InjectionMode.java",
"chars": 1506,
"preview": "/*\n * Copyright (c) 2025, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Kind.java",
"chars": 13783,
"preview": "/*\n * Copyright (c) 2008, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Level.java",
"chars": 2437,
"preview": "/*\n * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Location.java",
"chars": 2664,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/OnError.java",
"chars": 1676,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/OnEvent.java",
"chars": 1866,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/OnExit.java",
"chars": 1697,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/OnLowMemory.java",
"chars": 1807,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/OnMethod.java",
"chars": 5010,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/OnProbe.java",
"chars": 2069,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/OnTimer.java",
"chars": 2124,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/PeriodicEvent.java",
"chars": 1529,
"preview": "package org.openjdk.btrace.core.annotations;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Reten"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/ProbeClassName.java",
"chars": 1756,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/ProbeMethodName.java",
"chars": 1890,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Property.java",
"chars": 1873,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Return.java",
"chars": 1631,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Sampled.java",
"chars": 2884,
"preview": "/*\n * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Self.java",
"chars": 1628,
"preview": "/*\n * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/TLS.java",
"chars": 1923,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/TargetInstance.java",
"chars": 1784,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/TargetMethodOrField.java",
"chars": 1871,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/annotations/Where.java",
"chars": 1554,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/BinaryWireProtocol.java",
"chars": 5027,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/Command.java",
"chars": 3332,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/CommandListener.java",
"chars": 1468,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/DataCommand.java",
"chars": 1617,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/DisconnectCommand.java",
"chars": 992,
"preview": "package org.openjdk.btrace.core.comm;\n\nimport java.io.IOException;\nimport java.io.ObjectInput;\nimport java.io.ObjectOutp"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/ErrorCommand.java",
"chars": 2366,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/EventCommand.java",
"chars": 1830,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/ExitCommand.java",
"chars": 1814,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/GridDataCommand.java",
"chars": 8980,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/InstrumentCommand.java",
"chars": 3109,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/JavaSerializationProtocol.java",
"chars": 5984,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/ListFailedExtensionsCommand.java",
"chars": 2121,
"preview": "package org.openjdk.btrace.core.comm;\n\nimport java.io.IOException;\nimport java.io.ObjectInput;\nimport java.io.ObjectOutp"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/ListProbesCommand.java",
"chars": 1455,
"preview": "package org.openjdk.btrace.core.comm;\n\nimport java.io.IOException;\nimport java.io.ObjectInput;\nimport java.io.ObjectOutp"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/MessageCommand.java",
"chars": 3335,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/NumberDataCommand.java",
"chars": 2438,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/NumberMapDataCommand.java",
"chars": 2933,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/PrintableCommand.java",
"chars": 1600,
"preview": "/*\n * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/ProtocolConfig.java",
"chars": 7280,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/ProtocolNegotiator.java",
"chars": 9724,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/ProtocolVersion.java",
"chars": 5174,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/ReconnectCommand.java",
"chars": 775,
"preview": "package org.openjdk.btrace.core.comm;\n\nimport java.io.IOException;\nimport java.io.ObjectInput;\nimport java.io.ObjectOutp"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/RenameCommand.java",
"chars": 1826,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/RetransformClassNotification.java",
"chars": 2290,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/RetransformationStartNotification.java",
"chars": 2320,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/SetSettingsCommand.java",
"chars": 2899,
"preview": "/*\n * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/StatusCommand.java",
"chars": 1985,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/StringMapDataCommand.java",
"chars": 2846,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/WireIO.java",
"chars": 3514,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/WireProtocol.java",
"chars": 6820,
"preview": "/*\n * Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT N"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryClient.java",
"chars": 4103,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryCommand.java",
"chars": 4433,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryDataCommand.java",
"chars": 946,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryDisconnectCommand.java",
"chars": 700,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\n/**\n * Binary implementation of the DisconnectCommand.\n * This command is used"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryErrorCommand.java",
"chars": 1853,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryEventCommand.java",
"chars": 630,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\n/**\n * Binary implementation of the EventCommand.\n * This command is used to s"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryExitCommand.java",
"chars": 1031,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryGridDataCommand.java",
"chars": 3695,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryInstrumentCommand.java",
"chars": 2192,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryListFailedExtensionsCommand.java",
"chars": 1482,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryListProbesCommand.java",
"chars": 1382,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryMessageCommand.java",
"chars": 5075,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.ByteArrayOutputStream;\nimport java.io.ByteArrayInputStream;\nimp"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryNumberDataCommand.java",
"chars": 1468,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryNumberMapDataCommand.java",
"chars": 2270,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryProtocol.java",
"chars": 5354,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryReconnectCommand.java",
"chars": 723,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\n/**\n * Binary implementation of the ReconnectCommand.\n * This command is used "
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryRenameCommand.java",
"chars": 647,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\n/**\n * Binary implementation of the RenameCommand.\n * This command is used to "
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryRetransformClassNotification.java",
"chars": 1770,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryRetransformationStartNotification.java",
"chars": 1233,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinarySetSettingsCommand.java",
"chars": 2456,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryStatusCommand.java",
"chars": 1499,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryStringCommand.java",
"chars": 1006,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryStringMapDataCommand.java",
"chars": 2112,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/BinaryWireIO.java",
"chars": 2129,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/CommandAdapter.java",
"chars": 12873,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.PrintWriter;\nimport java.io.StringWriter;\nimport java.util.Arra"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/CommandDeserializationException.java",
"chars": 796,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\n\n/**\n * Exception thrown when deserialization of a"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/MalformedCommandException.java",
"chars": 752,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\n\n/**\n * Exception thrown when a command has invali"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/NumberEncoding.java",
"chars": 3004,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/ProtocolVersionMismatchException.java",
"chars": 783,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\n\n/**\n * Exception thrown when the protocol version"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/README.md",
"chars": 4270,
"preview": "# BTrace Binary Protocol (v2)\n\nThis package contains a new binary protocol implementation for BTrace that replaces the o"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/RemoteException.java",
"chars": 1132,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.PrintStream;\nimport java.io.PrintWriter;\n\nclass RemoteException"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/comm/v2/ScalarEncoding.java",
"chars": 2836,
"preview": "package org.openjdk.btrace.core.comm.v2;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputS"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/extensions/Extension.java",
"chars": 2777,
"preview": "package org.openjdk.btrace.core.extensions;\n\n/**\n * Base class for all BTrace extensions.\n *\n * <p>Extensions provide ad"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/extensions/ExtensionContext.java",
"chars": 1239,
"preview": "package org.openjdk.btrace.core.extensions;\n\nimport org.openjdk.btrace.core.ArgsMap;\nimport org.openjdk.btrace.core.comm"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/extensions/ExtensionDescriptor.java",
"chars": 1591,
"preview": "package org.openjdk.btrace.core.extensions;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/extensions/ExtensionException.java",
"chars": 840,
"preview": "package org.openjdk.btrace.core.extensions;\n\n/**\n * Exception thrown when extension operations fail.\n *\n * <p>This excep"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/extensions/ExtensionMeta.java",
"chars": 4029,
"preview": "package org.openjdk.btrace.core.extensions;\n\nimport java.util.Collections;\nimport java.util.HashSet;\nimport java.util.Se"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/extensions/Permission.java",
"chars": 4012,
"preview": "package org.openjdk.btrace.core.extensions;\n\n/**\n * Permissions that can be requested by BTrace extensions.\n *\n * <p>Per"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/extensions/PermissionSet.java",
"chars": 4755,
"preview": "package org.openjdk.btrace.core.extensions;\n\nimport java.util.EnumSet;\nimport java.util.Iterator;\n\n/**\n * Immutable set "
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/extensions/ServiceDescriptor.java",
"chars": 1125,
"preview": "package org.openjdk.btrace.core.extensions;\n\nimport java.lang.annotation.ElementType;\nimport java.lang.annotation.Retent"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/handlers/ErrorHandler.java",
"chars": 340,
"preview": "package org.openjdk.btrace.core.handlers;\n\nimport java.lang.reflect.Method;\n\npublic final class ErrorHandler {\n public "
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/handlers/EventHandler.java",
"chars": 519,
"preview": "package org.openjdk.btrace.core.handlers;\n\nimport java.lang.reflect.Method;\n\npublic final class EventHandler {\n public "
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/handlers/ExitHandler.java",
"chars": 326,
"preview": "package org.openjdk.btrace.core.handlers;\n\nimport java.lang.reflect.Method;\n\npublic class ExitHandler {\n public final S"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/handlers/LowMemoryHandler.java",
"chars": 1130,
"preview": "package org.openjdk.btrace.core.handlers;\n\nimport java.lang.management.MemoryUsage;\nimport java.lang.reflect.InvocationT"
},
{
"path": "btrace-core/src/main/java/org/openjdk/btrace/core/handlers/TimerHandler.java",
"chars": 473,
"preview": "package org.openjdk.btrace.core.handlers;\n\nimport java.lang.reflect.Method;\n\npublic final class TimerHandler {\n public "
}
]
// ... and 826 more files (download for full content)
About this extraction
This page contains the full source code of the jbachorik/btrace GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 1026 files (4.0 MB), approximately 1.1M tokens, and a symbol index with 5822 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.