Library Usage Analyzer
Since I am writing a simple JVM.Most part of JVM work is implement libries.But it is impossible for me to implement all clases specified in JDK.So I need anlyze classies in JK_fist puthiare
So I implemented an Library Usage tool to analze it.
the jar file only depend jdk.
How to run it.
java-jar Analyzer.jar
All option supported will be print out.
So I implemented an Library Usage tool to analze it.
the jar file only depend jdk.
How to run it.
java-jar Analyzer.jar
All option supported will be print out.
Analyze class usage. It can be used in to scenarios
scenario 1:
which part in a library are most common be used.
e.g. which part of jdk are most common be used.
the most common used part can be think about be optimized.
scenario 2:
what are most common be used by the library.
Command Format
Analyzer -fjarfilename [-sprefix] [-aprefix] [-eprefix]
Options
-f : jar files want to be analyzed
it must be provided one or more jar files
-s : prefix of class name want to be output to statistic
it can be accept more than one option
default class prefix is 'java.' if do not provide any option
-n : prefix of class name do not want to be output to statistic
it can be accept more than one option
-a : prefix of class name want to be analyzed
it can be accept more than one option
all classes in jar files will be analyzed if do not provide any option
-e : prefix of class name do not want to be analyzed
it can be accept more than one option
Examples :
Analyzer -fbcel.jar
all classes in bcel.jar will be analyzed.
statistics for classes with 'java.' prefix will be outputted
Analyzer -fbcel.jar -fdom4j.jar
all classes in bcel.jar and dom4j.jar will be analyzed.
statistics for classes with 'java.' prefix will be outputted
Analyzer -fbcel.jar -fdom4j.jar -pjava.lang -pjava.util
all classes in bcel.jar and dom4j will be analyzed.
statistics for classes with 'java.' and 'java.util' prefix will be outputted
Analyzer -fbcel.jar -aorg.apache
all classes with 'org.apache' prefix in bcel.jar will be analyzed.
statistics for classes with 'java' prefix will be outputted
Analyzer -fbcel.jar -eorg.apache
all classes are not with 'org.apache' prefix in bcel.jar will be analyzed.
statistics for classes with 'java' prefix will be outputted
Analyzer -fbcel.jar -njava
all classes except classes with 'org.apache' prefix in bcel.jar will be analyzed.
statistics for classes are not with 'java' prefix will be outputted