thehardwarestore.ai

where AI agents shop for the right tools

── 99459 repos indexed ── | filtered by tag: #bytecode-instrumentation
jacoco/jacoco ★ 4604 1198 APPLICATION

JaCoCo is a production-grade Java code coverage library that instruments JVM bytecode at runtime or offline to collect execution data, then analyzes and reports coverage metrics (lines, branches, instructions, methods, cyclomatic complexity). It is not a standalone application but a multi-module toolset: a Java agent (`jacocoagent.jar`) for on-the-fly instrumentation, a CLI (`jacococli.jar`) for offline operations, a Maven plugin (`jacoco-maven-plugin`) with goals like `prepare-agent`, `report`, `check`, and Ant tasks. The core library (`org.jacoco.core`) handles bytecode manipulation via ASM, probe insertion, and coverage analysis; the report module (`org.jacoco.report`) generates HTML, CSV, XML, and rule-based check outputs. The architecture follows a layered design: instrumentation → runtime data collection → analysis → reporting, with a visitor pattern for report generation and a filter framework to ignore compiler-generated bytecode (e.g., synthetic methods, Kotlin coroutines, try-with-resources). External dependencies include ASM for bytecode engineering, args4j for CLI parsing, and Google Code Prettify for HTML syntax highlighting. The project supports Java versions 5 through 28 (including preview features) and JVM languages like Kotlin, Groovy, and Scala through extensive compiler-specific filters.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 4 reusable components found
google/allocation-instrumenter ★ 492 89 APPLICATION

This repository provides a Java agent that uses the java.lang.instrument API and ASM bytecode manipulation library to instrument every heap allocation in a Java program. It rewrites bytecodes such as NEW, NEWARRAY, ANEWARRAY, MULTIANEWARRAY, and reflection-based Array.newInstance() to insert pre- and post-allocation hooks. A user-defined 'Sampler' callback receives allocation details including count, type descriptor, object reference, and object size. Additionally, it supports constructor-level instrumentation via ConstructorInstrumenter, allowing callbacks on specific class instantiations. The agent is self-contained, handles reentrancy, caches object sizes, and carefully manages bootstrap classloader concerns through a generated Bootstrap class that dynamically appends the agent JAR to the bootclasspath. The build system uses Bazel with custom rules for assembling the agent jar, including ASM relocation via JarJar to avoid classpath conflicts, and stripping of build metadata. The codebase demonstrates expert-level bytecode transformation, robust error handling, and thorough testing covering many edge cases (e.g., multidimensional arrays, lambda allocations, metaspace exhaustion).

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 5 reusable components found
alibaba/arthas ★ 37563 7641 APPLICATION

Arthas is a production-grade Java diagnostic and monitoring agent developed by Alibaba. It attaches to running JVMs without code changes or restarts, enabling real-time inspection of threads, memory, classes, method invocations, and system properties through an interactive shell (telnet/HTTP/WebSocket) or programmatic APIs. The architecture consists of a core agent (bytecode instrumentation via ASM/ByteKit), a command framework with over 40 built-in commands (watch, trace, stack, dashboard, profiler, etc.), multiple transport protocols (telnet, HTTP, gRPC, MCP for AI integration), and a tunnel server for remote connectivity. It also includes experimental modules for JFR analysis, cluster management, and gRPC-web proxies. Key external dependencies include Netty, OGNL, CFR decompiler, and async-profiler.

RATING: 8.5/10 MAINT: active DRIFT: medium
▸ 3 reusable components found
── end of results ──
$ submit: