All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Backend plugin versioning - Plugins now follow main project version
jfr-shell-jdkandjfr-shell-jafarsync with main project version- API compatibility enforced via japicmp for breaking change detection
- jfr-mcp publishing - Fixed Maven Central artifact to use shadowJar
- Added mavenPublishing configuration to publish fat JAR as main artifact
- jfr-mcp now includes all dependencies and proper Main-Class manifest
- JBang catalog update - Fixed workflow to preserve dev/snapshot entries
- Changed from sed global replacement to jq precise JSON updates
jfr-mcpalias updated to releases,jfr-mcp-devstays on SNAPSHOTjafar-shell-latestalias updated to releases,jafar-shellstays on java file
- JFR Shell backend plugin system - Extensible architecture for custom JFR backends (#48)
- Plugin discovery and loading with version management
- Plugin-specific backends with configurable settings
- Remote plugin registry support with fallback to local registry
- Command-line plugin management (
--plugin,--list-plugins) - Comprehensive plugin API for third-party extensions
- MCP server for AI-assisted JFR analysis - Model Context Protocol server integration (#53, #54)
- Natural language queries for JFR analysis
- JfrPath query generation and execution
- Session management with multiple concurrent recordings
- Built-in diagnostic tools (USE method, TSA, flamegraphs, hotmethods)
- Integration with Claude and other AI assistants
- Comprehensive documentation and tutorials
- Advanced map operations - Enhanced variable system with map support (#38, #39)
toMap()function for converting lists to mapsmerge()function for combining maps- Map variable support with nested operations
- Time range support - Query filtering by time ranges (#46)
- Time range syntax for filtering events by timestamp
- Duration-based queries
- Comprehensive test coverage - Extensive JFR Shell testing (#45)
- Unit tests for shell commands and operations
- Integration tests for complex workflows
- Fuzzy testing for robustness (#46)
- JFR Shell completion system - Major improvements to code completion (#47)
- Context-aware completion for JfrPath queries
- Field name completion from metadata
- Function and operator suggestions
- File path completion
- Syntax highlighting - Enhanced visual feedback in shell (#46)
- Keyword highlighting
- String and number coloring
- Operator and function highlighting
- Documentation restructure - Organized documentation by component (#54)
- Separate directories for parser, CLI, MCP, JBang
- Improved navigation and discoverability
- PascalCase naming convention for all docs
- Array iteration - Fixed array handling in JfrPath queries (#42)
- Conditional flow - Corrected parameter handling in shell conditionals (#43)
- CI workflows - Fixed protected branch handling and catalog updates (#49)
- Plugin registry tests - Prevented remote registry fetches during testing (#50, #51)
- Expression support in select() - Computed field expressions with arithmetic, string operations, and functions (#37)
- Arithmetic operators:
+,-,*,/ - String concatenation:
+ - String templates:
"${field} text ${expr}"for cleaner string interpolation - Built-in functions:
if(),upper(),lower(),substring(),length(),coalesce() - Expression AST with BinExpr, FuncExpr, FieldRef, Literal, StringTemplate
- Examples:
select(bytes / 1024 as kb),select("${path} (${bytes} bytes)" as info)
- Arithmetic operators:
- Multi-event type queries - Query multiple event types simultaneously (#37)
- Pipe-separated syntax:
events/(Type1|Type2|Type3) - Works with all query operations (filters, aggregations, select)
- Tab completion for multiple event types
- Examples:
events/(jdk.FileRead|jdk.FileWrite) | count()
- Pipe-separated syntax:
- CSV output format - Export-friendly format with session-level setting (#37)
set output csvto set CSV as default format- CSV format with proper escaping and quoting
- Override per-query with
--formatflag
- Nested field projection - Better handling of nested fields in select() (#37)
- Nested fields preserve parent structure in output
- Leaf segment used as column name for flat projections
- Tab completion for nested fields in select()
- JFR Shell UX improvements - Various completion and pager fixes (#37)
- Fixed completion for
decorateByTime()anddecorateByKey()functions - Fixed script command hanging on pager prompts
- Added filesystem completion for
record startcommand - Added type IDs to metadata views
- Fixed completion for
- JFR Shell scripting support - Full scripting capabilities for automated JFR analysis (#34)
- Variable system with type inference (numbers, strings, lists, maps, booleans, null)
- Conditional execution (
if/elif/else/endif) with boolean expressions and nested conditions - Command recording (
record/endrecord) for creating reusable command sequences - Script execution with
.jfrsfiles and embedded example scripts - Variable substitution using
$variableor${variable}syntax - Non-interactive mode enhancements for scripting and CI integration
- Example scripts:
basic-analysis.jfrs,gc-analysis.jfrs,thread-profiling.jfrs - Comprehensive scripting documentation and tutorials
- JfrPath completion - Enhanced completion for scripting variables and control flow
- Shell state management - Added variable store and conditional state tracking
- Build-time handler generation - New annotation processor for compile-time handler generation as alternative to runtime bytecode generation (#33)
- 85% allocation reduction with equivalent throughput
- ServiceLoader auto-discovery of generated factories
- Thread-local caching for reduced allocations
- Backward compatible with runtime generation fallback
- New
jafar-processormodule with annotation processor - New
HandlerFactory<T>interface for factory pattern
- Event decoration query language - JFR Shell now supports joining and correlating events (#32)
decorateByTime()for temporal event joins on same threaddecorateByKey()for correlation by matching keys- Decorator fields accessible via
$decorator.prefix - Memory-efficient lazy evaluation
- JFR Shell completion framework redesign - Reduced ShellCompleter from 1300+ lines to ~220 lines using Strategy pattern (#32)
- 12 specialized completers for different contexts
- Centralized CompletionContextAnalyzer for testable context detection
- MetadataService with caching for metadata lookups
- Support for chunk IDs, metadata subprops, nested filter paths
- 41 comprehensive completion tests
- Metadata search - Improved error reporting for metadata scan failures
- Tilde expansion - Fixed path expansion for user home directory
- JBang Java requirement - Updated to require Java 25+ to match jafar-shell compilation target
- Removed JitPack publishing - All artifacts now published exclusively to Maven Central and GitHub Packages
- Artifact naming consistency - Renamed
jfr-shelltojafar-shellfor consistency with other artifacts - JBang catalog improvements - Updated to use Maven Central instead of JitPack, automatic updates on release
- Publishing system migration - Switched from legacy OSSRH (nexus-publish plugin) to new Sonatype Central Portal (vanniktech maven-publish plugin)
- Automatic signing - All artifacts are now automatically signed with GPG
- Complete POM metadata - All publications now include required Maven Central metadata (license, developers, SCM)
- Maven Central compliance - Added sources and javadoc JARs to jfr-shell (required for Maven Central validation)
- Sonatype publishing - Fixed close and release to run in same Gradle invocation
- Sonatype publishing - Added automatic close and release of staging repositories to Maven Central
- JFR Shell publishing - Now published to Maven Central (io.btrace:jfr-shell) for public JBang access
- JFR Shell groupId - Changed from io.jafar to io.btrace to match other artifacts and enable Sonatype publishing
- JBang catalog - Updated to use Maven Central coordinates (io.btrace:jfr-shell)
- Automated release workflow - Complete CI/CD pipeline for publishing releases (#32)
- Single-command release process triggered by version tags
- Automatic publishing to Maven Central, GitHub Packages, and JitPack
- Automatic JBang catalog updates
- GitHub Release creation with changelog extraction
- Gradle toolchain auto-provisioning - Added Foojay resolver for automatic JDK downloads
- Fixes JitPack builds requiring multiple Java versions
- Enables seamless multi-module builds with different Java requirements
- GitHub Packages publishing - Use specific publication task to avoid Sonatype credential conflicts
- CI workflow separation - Snapshot publishing (main branch) now separate from release publishing (tags)
- JFR Shell - New interactive CLI tool for exploring and analyzing JFR recordings with JfrPath query language (#31)
- JfrPath query language for navigating events, metadata, chunks, and constant pools
- Tab completion, command history, and multi-session management
- Aggregations (groupBy, top, sum, stats) and filtering with boolean expressions
- Non-interactive mode for scripting and CI integration
- JBang distribution support for easy installation
- Standalone jlink distribution with bundled JRE
- Comprehensive tutorials - Added detailed tutorials for Typed API, Untyped API, and JFR Shell (#31)
- Demo applications - Added DatadogProfilerDemo showcasing both typed and untyped API usage patterns (#31)
- JBang publishing workflow - Automated GitHub Actions workflow for publishing to JitPack (#31)
- TypeGenerator naming convention - Generated type interfaces now include the full namespace to prevent collisions. For example,
jdk.ExecutionSamplegeneratesJFRJdkExecutionSampleanddatadog.ExecutionSamplegeneratesJFRDatadogExecutionSample. This ensures distinct interfaces when multiple events share the same simple name across different namespaces (#30)
- Circular type resolution in TypeGenerator - Fixed infinite recursion when generating types with circular references (#29)
- Irregular attribute names - Fixed handling of field names containing dots (e.g.,
_dd.trace.operation) by sanitizing them to valid Java identifiers (#29) - Type filters in Java 21 TypeGenerator - Added support for event type filters in Java 21 version of TypeGenerator (#29)
- Simple type constant resolution - Fixed resolution of simple type constants in untyped parser's constant pool accessor (#29)
- String type skipping - Fixed type skipping for strings and simple types in constant pools (#29)
0.2.0 - 2024-12-14
- Iterator-style API - New
ParsingContext.iterateEvents()method for streaming JFR events without loading entire file into memory (#25) - Metadata fingerprinting - Handler class reuse across parsing sessions with same metadata fingerprint for improved performance (#26)
- Multi-tier untyped parser optimization - Adaptive strategy system automatically switches between optimized and generic parsers based on event complexity (#27)
- Typed parser simple type unwrapping - Fixed null values for simple types like
jdk.types.Symbolby implementing transitive closure for type filtering (#28)
0.1.0 - 2024-12-04
- Core typed parser API - Define Java interfaces annotated with
@JfrTypeand@JfrFieldfor type-safe JFR event parsing - Core untyped parser API - Parse JFR events as
Map<String, Object>without pre-defining interfaces - Multi-Release JAR support - Single JAR optimized for Java 8, 9, 13, and 21 runtimes
- Dual constant pool access - Access both resolved values and raw CP indices for the same field via
@JfrField(raw = true) - Chunk-based parallel processing - Parse large JFR files efficiently using multi-threaded chunk processing (#5)
- Control API - Abort parsing early, access chunk metadata, and query stream position from event handlers
- ParsingContext reuse - Reuse parsing context across multiple files for improved performance
- Gradle plugin - Automatically generate JFR type interfaces from JFR recordings (
io.jafar.jafar-gradle-plugin) - Scrubbing tool - Redact sensitive field values from JFR recordings
- JMH benchmarks - Performance benchmarking infrastructure for parser optimization
- CI/CD pipeline - GitHub Actions workflows testing on JDK 8 and 21
- Synthetic test generation - Generate JFR test files programmatically for edge case validation
- ChunkInfo API - Expose chunk ID and metadata to typed and untyped parsers
- Time conversion utilities - Convert JFR ticks to wall-clock timestamps (#21)
- Optimized handler code generation - Reworked ASM-based bytecode generation for better performance (#7)
- Optimized metadata parsing - Reduced allocation and improved parsing speed for JFR metadata sections
- Optimized constant pool loading - Lazy rehydration of constant pools for memory efficiency
- Optimized string parsing - Improved performance for string deserialization
- Optimized deserialization - Reduced allocations during event deserialization
- More flexible string parsing - Enhanced robustness for various string encodings
- Improved time conversion API - More user-friendly tick-to-timestamp conversion (#21)
- Consistent Control usage - Unified Control object handling across typed and untyped APIs
- Java 8 compatibility - Parser module now targets Java 8 bytecode (#20)
- parseLongSWAR overflow - Fixed NumberFormatException for negative long values in optimized string parsing (Dec 3, 2024)
- Null pointer protection - Added safety checks for malformed JFR files (Dec 2, 2024)
- Erroneous skipper bytecode - Fixed incorrect bytecode generation in skip paths (Dec 1, 2024)
- Local variable index tracking - Corrected LVT indices in recursive skip bytecode generation (Dec 1, 2024)
- Recursive type generation - Fixed infinite loops in Gradle plugin for recursive JFR types (Dec 1, 2024)
- Raw pointer support - Fixed handling of raw constant pool pointers (Aug 17, 2024)
- Untyped parser thread safety - Create new ParsingContext per chunk to avoid race conditions (#17)
- BytePackingTest - Fixed test failures for byte packing utilities (Aug 12, 2024)
- Large file handling - Added support for very large JFR files (multi-GB)
- Thread safety improvements - Enhanced concurrency safety in parser internals
This is the first public release of JAFAR.