Skip to content

ellamongo/ASMPoC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ASM Method Analysis Tool

This tool provides two main features for analyzing Java applications:

  1. Static Call Hierarchy Analysis
  2. Execution Path Logging

Prerequisites

  • Java 11 or higher
  • Maven 3.6 or higher

Building the Tool

mvn clean package

This will create a JAR file in the target directory named asm-analyzer-1.0-SNAPSHOT-jar-with-dependencies.jar.

Usage

The tool accepts the following command-line arguments:

  • -p, --project <path>: Path to the Java project directory (required)
  • -a, --analyze: Perform static call hierarchy analysis
  • -l, --log: Instrument the project for execution path logging
  • -o, --output <path>: Output file path for analysis results (default: call-hierarchy.txt)
  • -h, --help: Display help message

Examples

  1. Analyze static call hierarchy:
java -jar target/asm-analyzer-1.0-SNAPSHOT-jar-with-dependencies.jar -p /path/to/project -a -o analysis.txt
  1. Instrument for execution path logging:
java -jar target/asm-analyzer-1.0-SNAPSHOT-jar-with-dependencies.jar -p /path/to/project -l
  1. Both analysis and logging:
java -jar target/asm-analyzer-1.0-SNAPSHOT-jar-with-dependencies.jar -p /path/to/project -a -l

Output

Static Call Hierarchy Analysis

The analysis results will be saved to the specified output file (default: call-hierarchy.txt). The file contains a hierarchical view of method calls in the project.

Execution Path Logging

When the project is instrumented for execution path logging, the tool will:

  1. Modify the class files to add logging statements
  2. Log method entry and exit events to both console and a file named execution.log
  3. Show the call hierarchy depth through indentation

Notes

  • The tool requires compiled .class files to analyze
  • For execution path logging, the project must be recompiled after instrumentation
  • The tool will process all .class files in the specified directory and its subdirectories

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages