Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/luontola/visualvm4idea
VisualVM Profiler, an IntelliJ IDEA plugin. [UNMAINTAINED]
https://github.com/luontola/visualvm4idea
Last synced: 4 days ago
JSON representation
VisualVM Profiler, an IntelliJ IDEA plugin. [UNMAINTAINED]
- Host: GitHub
- URL: https://github.com/luontola/visualvm4idea
- Owner: luontola
- License: other
- Created: 2009-05-08T18:59:29.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2009-05-08T19:07:33.000Z (over 15 years ago)
- Last Synced: 2024-04-15T07:10:18.894Z (7 months ago)
- Language: Java
- Homepage: http://plugins.intellij.net/plugin/?id=3749
- Size: 434 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.txt
- License: LICENSE.txt
Awesome Lists containing this project
README
BUILDING
Edit the paths in profiles.xml to point to your installations of IDEA and
VisualVM. Build with the Maven command "mvn clean package".RELEASING
To release a new version, use the following steps:
svn up
mvn release:prepare -DautoVersionSubmodules=true
mvn release:cleanThen export from SVN the tag which was just created, and build it.
HOW THE PLUGIN HOOKS INTO VISUALVM
To be able to send commands to VisualVM, we must load some of our own code
inside the same JVM as VisualVM, so that we would have direct access VisualVM's
internal classes at runtime. Then we can just send commands from the IDEA plugin
to the VisualVM over a socket.This is complicated by the fact that VisualVM uses NetBeans platform, which
separates each module into its own class loader. So it's not enough that we load
some code using the system class loader, because it would not see the classes in
VisualVM's modules. Also, VisualVM uses a custom executable for launching
itself, but fortunately it allows us to specify JVM command line parameters.This plugin launches VisualVM with command line parameters (see
VisualVmLauncher), which cause VisualVM's JVM to load a Java agent provided by
this plugin (visualvm4idea-visualvm-agent.jar). VisualVM also recieves as
command line options the path of this plugin's core libraries (visualvm4idea-
core.jar) and the number of the port which this plugin listens to.The Java agent modifies the bytecode of the Installer class in VisualVM's
profiler module (see HookLoadingClassAdapter) by inserting there a method call
to our own HookLoader class. The HookLoader in turn takes from system properties
the path of our plugin's core libraries, and creates a custom class loader which
is a child class loader of VisualVM's profiler module and which adds our
plugin's core libraries to the class path. Then it loads VisualVmHook (from
visualvm4idea-core.jar) inside that class loader. VisualVmHook in turn connects
to the IDEA plugin through a socket and begins to wait for commands.This way the plugin can execute any commands inside VisualVM's JVM and it has
access to all the same classes as VisualVM's profiler module has.