JITWatch JarScan Maven Plugin

A Maven plugin that scans the project artifact and its dependencies for methods that cannot be inlined by the JIT compiler. It uses the JarScan utility from the JITWatch project to do that. See https://github.com/AdoptOpenJDK/jitwatch .

Лицензия

Лицензия

Категории

Категории

Maven Компиляция и сборка JITWatch Тестирование приложения и мониторинг Performance analysis
Группа

Группа

com.github.ferstl
Идентификатор

Идентификатор

jitwatch-jarscan-maven-plugin
Последняя версия

Последняя версия

1.1
Дата

Дата

Тип

Тип

maven-plugin
Описание

Описание

JITWatch JarScan Maven Plugin
A Maven plugin that scans the project artifact and its dependencies for methods that cannot be inlined by the JIT compiler. It uses the JarScan utility from the JITWatch project to do that. See https://github.com/AdoptOpenJDK/jitwatch .
Ссылка на сайт

Ссылка на сайт

https://github.com/ferstl/jitwatch-jarscan-maven-plugin
Система контроля версий

Система контроля версий

https://github.com/ferstl/jitwatch-jarscan-maven-plugin

Скачать jitwatch-jarscan-maven-plugin

Как подключить последнюю версию

<plugin>
    <groupId>com.github.ferstl</groupId>
    <artifactId>jitwatch-jarscan-maven-plugin</artifactId>
    <version>1.1</version>
</plugin>

Зависимости

compile (6)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-plugin-api jar 3.3.3
org.apache.maven.shared : maven-common-artifact-filters jar 1.4
org.apache.maven.plugin-tools : maven-plugin-annotations jar 3.4
org.slf4j : slf4j-api jar 1.7.7
ch.qos.logback : logback-classic jar 1.1.2
ch.qos.logback : logback-core jar 1.1.2

provided (1)

Идентификатор библиотеки Тип Версия
org.apache.maven : maven-core jar 3.3.3

system (1)

Идентификатор библиотеки Тип Версия
com.oracle » tools.jar jar 1.7

Модули Проекта

Данный проект не имеет модулей.

jitwatch-jarscan-maven-plugin

- A Maven plugin for the JITWatch JarScan Tool

Build Status Maven Central

The jitwatch-jarscan-maven-plugin integrates JITWatch's JarScan Tool with Apache Maven. It allows you to scan your projects' artifacts and their dependencies during a Maven build. The supported scan modes are:

  • maxMethodSize
  • sequenceCount
  • invokeCount
  • nextInstructionFreq
  • allocationCount
  • instructionCount
  • sequenceSearch
  • methodSizeHisto
  • methodLength

Please refer to the plugin documentation for all configuration options of this plugin.

How to use it

The plugin is available on Maven Central. So no further repository configuration is required.

Option 1: Run it directly on your project

mvn com.github.ferstl:jitwatch-jarscan-maven-plugin:<mode>

# Example
mvn com.github.ferstl:jitwatch-jarscan-maven-plugin:maxMethodSize -Dlimit=325

If you add com.github.ferstl as <pluginGroup> to your settings.xml file, you can just run:

mvn jarscan:maxMethodSize -Dlimit=325

Option 2: Integrate it into your Maven build

The plugin runs during the verify phase by default in order to be able to scan the artifact which was built in the preceding package phase.

<plugin>
  <groupId>com.github.ferstl</groupId>
  <artifactId>jitwatch-jarscan-maven-plugin</artifactId>
  <version>1.1</version>
  <executions>
    <execution>
      <id>max-method-size</id>
      <goals>
        <goal>maxMethodSize</goal>
      </goals>
      <configuration>
        <limit>325</limit>
        <packages>com.github.ferstl</packages>
        <reportFile>${project.build.directory}/jarscan-max-method-size.txt</reportFile>
      </configuration>
    </execution>
  </executions>
</plugin>

FAQ

Q: Where is the plugin documentation?

A: Here: http://ferstl.github.io/jitwatch-jarscan-maven-plugin/plugin-info.html


Q: How does this Maven plugin scan the own artifact for a project

A: The plugin runs in the verify phase of the Maven build by default. This phase is after the package phase in the build lifecycle where the JAR file for the project is crated. If you invoke the plugin directly you need to make sure to have a built project artifact in your target folder. The plugin will log a warning if no artifact is found.


Q: There are no releases or tags of JITWatch at the moment. How do you integrate it?

A: JITWatch is added to this project as Git submodule. The Maven build for this plugin will copy the classes for the JarScan Tool and makes it part of this project. Take a look at the Git repository of this project to see which revision of JITWatch is used.

Build

Build the Plugin:

# Use --recursive for the submodule
git clone --recursive git@github.com:ferstl/jitwatch-jarscan-maven-plugin.git
mvn install

# Alternatively inititialize the submodule after cloning:
git clone git@github.com:ferstl/jitwatch-jarscan-maven-plugin.git
git submodule init
git submodule update
mvn install

Create and deploy the plugin documentation:

mvn site-deploy

Create the Release:

mvn release:prepare -DpreparationGoals="clean deploy site-deploy"

(mvn release:prepare release:perform does not work because the jitWatch sumodule is not checked out during release:perform)

Версии библиотеки

Версия
1.1
1.0.1
1.0.0