JITWatch plugin for IntelliJ IDEA

Overview

JITWatch Plugin for IntelliJ IDEA

The plugin can be used to view and analyze HotSpot JIT compilation logs inside IntelliJ IDEA. It uses JITWatch to load and analyze the logs and provides a UI for exploring the compilation data directly in your code editor.

Video Demo

Here is a video of a demo of the JITWatch plugin, recorded at the JVM Language Summit 2016.

Creating and Loading the Compilation Log

The simple option for creating and loading the compilation log is to enable the "Log compilation" option in the "JITWatch" tab of the run configuration settings.

If you enable the option, the plugin will create a HotSpot log in a temporary directory and automatically load it after the execution completes.

Alternatively, you can add the logging options to the VM options of your run configuration, and then load the log file manually using the Analyze | Load HotSpot Compilation Log... menu item. To enable logging, you need the following options:

-XX:+UnlockDiagnosticVMOptions
-XX:+TraceClassLoading
-XX:+LogCompilation

The plugin does not support viewing the assembly code at this time, so you shouldn't enable the -XX:+PrintAssembly option.

Comments
  • Tab close button

    Tab close button

    It could really use a close button for the tab to get rid of the tab and related data in the editor (similar to closing the code coverage tab).

    (Great plugin, thanks!)

    opened by robeden 2
  • how do I make it work with Kotlin

    how do I make it work with Kotlin

    here's what I'm getting with a simple kotlin file

    fun main(args: Array<String>): Unit {
      println(fact(100000))
    }
    
    fun fact(what: Long): BigInteger =
        if (what == 0L) {
          BigInteger.ZERO
        } else {
          var p = BigInteger.ONE
          for (i in 1..what) {
            p *= BigInteger.valueOf(i)
          }
          p
        }
    

    http://grab.by/RWD2

    opened by meoyawn 2
  • Fix plugin to run on 2019.2 - 2019.3 with Kotlin 1.3

    Fix plugin to run on 2019.2 - 2019.3 with Kotlin 1.3

    I have updated the plugin to work with both IntelliJ 2019.2 and 2019.3 EAP and Kotlin plugin versions 1.3.41 and 1.3.50


    I have updated the plugin to work with IntelliJ 2018.1, 2018.2, 2018.3 and 2019.1

    The plugin didn't build for me after checkout due to some path handling issue in gradle-intellij-plugin, so I've updated it. This also required a Gradle update.

    It's possible to compile the plugin against each version by changing the platformVersion property in gradle.properties. I've adapted the approach the Rust plugin takes for that.

    The Kotlin support seems to be "working" for the simple test case I threw at it. KotlinTypeMapper takes different arguments now so I've taken a best guess as to what to pass for the parameters.

    opened by alshain 6
  • fix issue #7 NoClassDefFoundError: com/intellij/util/PathKt

    fix issue #7 NoClassDefFoundError: com/intellij/util/PathKt

    Hi,

    I've fixed issue #7 by using another static import based on JRE helper method isRegularFile(). This solves the issue and fully preserves all semantics. The only downside is that I still can't explain why :-/

    Any feedback is welcome.

    Regards Martin

    opened by nitram509 10
  • NoClassDefFoundError: com/intellij/util/PathKt

    NoClassDefFoundError: com/intellij/util/PathKt

    Hi,

    first of all, thank you for this great plugin. Unfortunately I've got this NoClassDefFoundError, when using it.

    Steps to reproduce:

    1. use jitwatch-intellj plugin code from HEAD (02-Oct-2016)
    2. exec gradlew buildPlugin
    3. install plugin locally
    4. run an arbitrary project with JitWatch enabled
    5. JitWatch report is loaded and show
    6. click on one method -> editor opens and method is show
    7. in editor click on icon left of line number, to open JitWatch window to show the java code ==> crash
    java.lang.NoClassDefFoundError: com/intellij/util/PathKt
        at ru.yole.jitwatch.JitWatchModelService.findJavapPath(JitWatchModelService.kt:185)
        at ru.yole.jitwatch.JitWatchModelService.loadBytecode(JitWatchModelService.kt:166)
        at ru.yole.jitwatch.JitWatchModelService$loadBytecodeAsync$1.run(JitWatchModelService.kt:154)
        at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:309)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.ClassNotFoundException: com.intellij.util.PathKt PluginClassLoader[ru.yole.jitwatch-intellij, 1.0.1]
        at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:64)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 9 more
    

    Any help is welcome.

    opened by nitram509 8
  • Already disposed

    Already disposed

    Already disposed: Project (Disposed) testHibernate
    java.lang.AssertionError: Already disposed: Project (Disposed) testHibernate
        at com.intellij.openapi.components.impl.ComponentManagerImpl.getComponent(ComponentManagerImpl.java:171)
        at com.intellij.openapi.wm.ToolWindowManager.getInstance(ToolWindowManager.java:37)
        at ru.yole.jitwatch.JitActionsKt.registerToolWindows(JitActions.kt:49)
        at ru.yole.jitwatch.JitActionsKt.loadLogAndShowUI(JitActions.kt:32)
        at ru.yole.jitwatch.JitRunConfigurationExtension$attachToProcess$1$processTerminated$1.run(JitRunConfigurationExtension.kt:90)
        at com.intellij.openapi.application.TransactionGuardImpl$6.run(TransactionGuardImpl.java:294)
        at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.a(LaterInvocator.java:334)
        at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:318)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
        at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:831)
        at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:667)
        at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:387)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    
    opened by krasa 1
  • Exception

    Exception

    Read access is allowed from event dispatch thread or inside read-action only (see com.intellij.openapi.application.Application.runReadAction())
    Details: Current thread: Thread[ApplicationImpl pooled thread 22,4,Idea Thread Group] 1470409042
    ; dispatch thread: false; isDispatchThread(): false
    SystemEventQueueThread: Thread[AWT-EventQueue-0 2016.2.2#IU-162.1628.40 IDEA, eap:false, os:Windows 7 6.1, java-version:JetBrains s.r.o 1.8.0_76-release-b218,6,main] 1331135866
    java.lang.Throwable
        at com.intellij.openapi.diagnostic.Logger.error(Logger.java:138)
        at com.intellij.openapi.application.impl.ApplicationImpl.assertReadAccessAllowed(ApplicationImpl.java:951)
        at com.intellij.openapi.module.impl.ModuleManagerImpl.moduleDependencyComparator(ModuleManagerImpl.java:519)
        at com.intellij.openapi.module.ModuleUtilCore.findModuleForPsiElement(ModuleUtilCore.java:113)
        at ru.yole.jitwatch.JitWatchModelService.loadBytecode(JitWatchModelService.kt:163)
        at ru.yole.jitwatch.JitWatchModelService$loadBytecodeAsync$1.run(JitWatchModelService.kt:154)
        at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:308)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    
    opened by tanmatra 1
  • NoClassDefFoundError when Kotlin not found

    NoClassDefFoundError when Kotlin not found

    When the Kotlin plugin is disabled the plugin fails with a java.lang.NoClassDefFoundError: org/jetbrains/kotlin/idea/search/SearchUtilKt. I don't know enough about IntelliJ plugins. Can the Kotlin plugin be a dependency or do you have to package some Kotlin runtime in this one or at least add some documentation?

    Stack Trace

    org/jetbrains/kotlin/idea/search/SearchUtilKt
    java.lang.NoClassDefFoundError: org/jetbrains/kotlin/idea/search/SearchUtilKt
        at ru.yole.jitwatch.languages.JitWatchJavaSupport.findClass(JitWatchJavaSupport.kt:24)
        at ru.yole.jitwatch.languages.JitWatchJavaSupport.findClass(JitWatchJavaSupport.kt:17)
        at ru.yole.jitwatch.JitWatchModelService.getPsiClass(JitWatchModelService.kt:144)
        at ru.yole.jitwatch.JitWatchModelService.getPsiMember(JitWatchModelService.kt:137)
        at ru.yole.jitwatch.JitWatchModelService$loadLog$2$run$1.invoke(JitWatchModelService.kt:92)
        at ru.yole.jitwatch.JitWatchModelService$loadLog$2$run$1.invoke(JitWatchModelService.kt:84)
        at ru.yole.jitwatch.InlineAnalyzer$InlineJournalVisitor.processParseTag(InlineAnalyzer.kt:87)
        at ru.yole.jitwatch.InlineAnalyzer$InlineJournalVisitor.processParseTag$default(InlineAnalyzer.kt:61)
        at ru.yole.jitwatch.InlineAnalyzer$InlineJournalVisitor.visitTag(InlineAnalyzer.kt:58)
        at org.adoptopenjdk.jitwatch.journal.JournalUtil.visitParseTagsOfLastTask(JournalUtil.java:81)
        at ru.yole.jitwatch.InlineAnalyzer.visit(InlineAnalyzer.kt:47)
        at org.adoptopenjdk.jitwatch.treevisitor.TreeVisitor.walkPackage(TreeVisitor.java:48)
        at org.adoptopenjdk.jitwatch.treevisitor.TreeVisitor.walkPackage(TreeVisitor.java:39)
        at org.adoptopenjdk.jitwatch.treevisitor.TreeVisitor.walkTree(TreeVisitor.java:29)
        at ru.yole.jitwatch.JitWatchModelService$loadLog$2$run$2.run(JitWatchModelService.kt:96)
        at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:856)
        at ru.yole.jitwatch.JitWatchModelService$loadLog$2.run(JitWatchModelService.kt:95)
        at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:635)
        at com.intellij.openapi.progress.impl.CoreProgressManager$3.run(CoreProgressManager.java:170)
        at com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:494)
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:443)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
        at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:155)
        at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:128)
        at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:308)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.ClassNotFoundException: org.jetbrains.kotlin.idea.search.SearchUtilKt PluginClassLoader[ru.yole.jitwatch-intellij, 1.0]
        at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:64)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        ... 30 more
    
    opened by lfrancke 3
Owner
Dmitry Jemerov
Dmitry Jemerov
A plugin for the ja-netfilter, it can dump the transformed classes.

A plugin for the ja-netfilter, it can dump the transformed classes.

null 7 Apr 17, 2022
IntelliJ IDEA Community Edition & IntelliJ Platform

IntelliJ IDEA Community Edition These instructions will help you build IntelliJ IDEA Community Edition from source code, which is the basis for Intell

JetBrains 14.8k Jan 7, 2023
A plugin to help you easily edit Swagger and OpenAPI specification files inside IntelliJ IDEA

Swagger Plugin Swagger Plugin makes it easy to edit Swagger and OpenAPI specification files inside IntelliJ IDEA. You can find it on JetBrains' plugin

Zalando SE 1.1k Dec 15, 2022
Spotless-intellij-gradle - An IntelliJ plugin to allow running the Spotless gradle task from within the IDE.

Spotless Intellij Gradle An IntelliJ plugin to allow running the spotless gradle task from within the IDE on the current file selected in the editor.

Ryan Gurney 30 Dec 17, 2022
Markdown language support for IntelliJ IDEA (abandonned).

idea-markdown Markdown language support for IntelliJ IDEA, RubyMine, PhpStorm, WebStorm, PyCharm, AppCode and Android Studio. This plugin is no more m

null 602 Dec 30, 2022
IntelliJ IDEA and JUnit: Writing, Finding, and Running Tests

IntelliJ IDEA and JUnit: Writing, Finding, and Running Tests ?? Webinar https://blog.jetbrains.com/idea/2021/11/live-stream-recording-intellij-idea-an

Christian Stein 11 Jul 23, 2022
✨LiteFlowX is an idea plugin to increase productivity when using the LiteFlow framework.

LiteFlowX English | 简体中文 LiteFlowX is designed to increase productivity when you use the LiteFlow framework. ?? LiteFlowX Features: Support for LiteFl

码农小易 13 Dec 15, 2022
Vim emulation plugin for IDEs based on the IntelliJ Platform

IdeaVim IdeaVim is a Vim emulation plugin for IntelliJ Platform-based IDEs. Contact maintainers: Bug tracker @IdeaVim on Twitter Chat on gitter Unoffi

JetBrains 7.1k Jan 5, 2023
IntelliJ Platform plugin that shows the file name of the currently open file in the status bar.

IntelliJ Platform plugin that shows the file name of the currently open file in the status bar. Clicking shows a list of recent files.

Christoffer Hammarström 4 May 9, 2022
An intelliJ plugin providing a UI layer for git-flow, which in itself is a collection of Git extensions to provide high-level repository operations for Vincent Driessen's branching model.

Git Flow Integration Plus for Intellij An intelliJ plugin providing a UI layer for git-flow, which in itself is a collection of Git extensions to prov

RubinCarter 35 Nov 8, 2022
IntelliJ plugin for continuous OpenAPI linting using the Spectral OpenAPI linter

Spectral IntelliJ Plugin This plugin is a wrapper for the tool Spectral, a linter for OpenApi schemas. It supports all Jetbrains IDEs starting at vers

Schwarz IT 19 Jun 6, 2022
Tiger language plugin for IntelliJ-based IDEs (including CLion)

Tiger IDEA Tiger language plugin for IntelliJ-based IDEs (including CLion). From the marketplace Search "Tiger" in the Preferences => Plugins section

Adrien Navratil 7 Dec 15, 2022
IDEA 久坐提醒插件

IDEA 久坐提醒插件 前言 对于程序员来说,经常会遇到项目周期短的状况。白天开会讨论需求,晚上加班写代码,熬夜发版本,上线改 Bug。工作日就是:开会、写代码、倒水、上厕所、抽烟、改 Bug,一天最开心的时刻就是带薪拉屎。 好不容易到了周末,有时还会通宵玩游戏,半个月也不运动一次。再好的身体,也会

null 439 Jan 1, 2023
An area maximisation game based on the idea of merging convex shapes.

Convex Merger Convex Merger is an area maximisation game based on the idea of merging convex shapes. The goal of the game is to claim as large an area

Roan 10 Dec 15, 2022
Spawn in the nether with a set of items. Made by logwet, designed by k4yfour, idea by Fyroah.

Noverworld Noverworld About Creating your own custom inventory Support FAQ About When you create a new world, you will spawn in the nether at a portal

null 13 Nov 24, 2022
IntelliJ Platform A full-featured WYSIWYG editor for markdown

markdown-editor IntelliJ Platform A full-featured WYSIWYG editor for markdown English Document 中文文档 Useful Links Custom Style Features Support three e

null 101 Dec 19, 2022
Supports the development of Spryker applications with Intellij Integration.

SprykerKit - intellij plugin for spryker file generation integrated into your ide Supports the development of Spryker applications with Intellij IDEA.

valantic CX 3 Oct 13, 2022
DnD Plugin submission using Atlas. Plugin inspired on the TrollGUI bukkit plugin

?? PunishGUI DnD Plugin submission using Atlas. Plugin inspired on the TrollGUI bukkit plugin ?? Dependencies ?? Paper 1.18 ?? Atlas ?? Commands /hell

null 1 Jan 19, 2022
This plugin disables commands specified in the configuration and prevents granting the "OP" authority to people not authorized in the plugin configuration.

Ares This plugin disables commands specified in the configuration and prevents granting the "OP" authority to people not authorized in the plugin conf

ᴠᴀʟᴇɴᴛɪɴ ᴢʜᴇʟᴇᴠ 6 Aug 30, 2022