Android code JIT friendliness detection tool
During the weekend, I wrote a tool to detect the JIT friendliness of Android code, named droid jitchecker. I hope it can help you quickly find bad code and correct it in time.
Noun interpretation
what is it?
Premise preparation
install
Installing the jitwatch component
Get code
git clone git@github.com :AdoptOpenJDK/jitwatch. git
compile
Enter the above repo directory and use one of the following three methods
ant
ant clean compile test run
Maven
mvn clean compile test exec:java
Gradle
gradlew clean build run
to configure
Get the code of this repo and open config INI file modification
Modification Description
How to use
It is easy to use. Open the terminal and execute the following statement
ruby jitChecker. rb your_ android_ project jarTask
Note: jartask is a task to compile the java files of the project into jar packages, which can be executed by/ View gradlew tasks, and then select the task that starts with jar.
View results
A typical content example
MD4. mdfour64
How to solve
Contribution code
Any helpful suggestions are welcome.
The following code contributions are welcome
Beautify the result display page (HTML, CSS)
problem
Q: do methods with large bytes have to be modified? Can they be JIT compiled after modification
A: it is recommended to modify the method with large bytes, which is not mandatory. After modification, it may not be able to JIT compile, because JIT optimization does not mean that JIT compiles the method. Other factors are required, such as the call frequency of the method. So this is something you love and I want.
Why ruby
A: I'm very tangled with idea because I'm not sure what language to use, especially between Python and ruby. I asked many students for this. Finally, I decided to use ruby. I don't like Python's forced alignment and I really like Ruby's string template. Ruby is very simple and user-friendly. I'm sure you'll like it.
Source code
DroidJitChecker@Github
The above is the data sorting of Android JIT code friendliness detection tool. Thank you for your support to this site!