├── .gitignore ├── LICENSE ├── README.md ├── tda-main-screen.png ├── tda-netbeans-module ├── build.xml ├── component │ ├── build.xml │ ├── manifest.mf │ ├── nbproject │ │ ├── build-impl.xml │ │ ├── genfiles.properties │ │ ├── project.properties │ │ ├── project.xml │ │ └── suite.properties │ └── src │ │ └── com │ │ └── pironet │ │ └── tda │ │ └── netbeans │ │ ├── Bundle.properties │ │ ├── TDAAction.java │ │ ├── TDATopComponent.java │ │ ├── layer.xml │ │ ├── plugin.gif │ │ └── plugin24.gif ├── lib │ ├── COPYING │ ├── build.xml │ ├── manifest.mf │ ├── nbproject │ │ ├── build-impl.xml │ │ ├── genfiles.properties │ │ ├── project.properties │ │ ├── project.xml │ │ └── suite.properties │ └── src │ │ └── com │ │ └── pironet │ │ └── tda │ │ └── Bundle.properties └── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── platform.properties │ ├── project.properties │ └── project.xml ├── tda-visualvm-module ├── build.xml ├── logfile-visualvm-module │ ├── build.xml │ ├── manifest.mf │ ├── nbproject │ │ ├── build-impl.xml │ │ ├── genfiles.properties │ │ ├── project.properties │ │ ├── project.xml │ │ └── suite.properties │ └── src │ │ └── net │ │ └── java │ │ └── dev │ │ └── tda │ │ └── visualvm │ │ └── logfile │ │ ├── AddLogfileAction.java │ │ ├── Bundle.properties │ │ ├── Install.java │ │ ├── LogPanel.java │ │ ├── Logfile.java │ │ ├── LogfileCategory.java │ │ ├── LogfileDataSource.java │ │ ├── LogfileDescriptor.java │ │ ├── LogfileDescriptorProvider.java │ │ ├── LogfileDumpView.java │ │ ├── LogfileDumpViewProvider.java │ │ ├── LogfileProvider.java │ │ ├── LogfileSupport.java │ │ ├── layer.xml │ │ └── resources │ │ ├── logfile.png │ │ ├── logfileadd.png │ │ └── logfiles.png ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── platform.properties │ ├── platform.xml │ ├── project.properties │ └── project.xml ├── tda-lib-component │ ├── .gitignore │ ├── COPYING │ ├── build.xml │ ├── manifest.mf │ ├── nbproject │ │ ├── build-impl.xml │ │ ├── genfiles.properties │ │ ├── project.properties │ │ ├── project.xml │ │ └── suite.properties │ └── src │ │ └── net │ │ └── java │ │ └── dev │ │ └── tda │ │ └── Bundle.properties └── tda-visualvm-module │ ├── build.xml │ ├── manifest.mf │ ├── nbproject │ ├── build-impl.xml │ ├── genfiles.properties │ ├── project.properties │ ├── project.xml │ └── suite.properties │ └── src │ └── net │ └── java │ └── dev │ └── tda │ └── visualvm │ ├── Bundle.properties │ ├── Install.java │ ├── TDAView.java │ ├── TDAViewProvider.java │ ├── VisualvmOptionsCategory.java │ ├── VisualvmOptionsPanelController.java │ ├── layer.xml │ └── resources │ ├── help.png │ ├── options.png │ └── tda.png ├── tda ├── bin │ ├── tda.bat │ └── tda.sh ├── build.xml ├── lib │ ├── jconsole.jar │ ├── swingx-0.9.1-javadoc.jar │ ├── swingx-0.9.1-sources.jar │ └── swingx-0.9.1.jar ├── manifest.mf ├── nbproject │ ├── build-impl.xml │ ├── build-jaws-impl.xml │ ├── genfiles.properties │ ├── private │ │ ├── config.properties │ │ ├── private.properties │ │ └── private.xml │ ├── profiler-build-impl.xml │ ├── project.properties │ └── project.xml ├── src │ ├── java │ │ ├── META-INF │ │ │ └── services │ │ │ │ └── com.sun.tools.jconsole.JConsolePlugin │ │ └── com │ │ │ └── pironet │ │ │ └── tda │ │ │ ├── AbstractCategory.java │ │ │ ├── AbstractDumpParser.java │ │ │ ├── AbstractInfo.java │ │ │ ├── Analyzer.java │ │ │ ├── BeaJDKParser.java │ │ │ ├── Category.java │ │ │ ├── CustomCategoriesDialog.java │ │ │ ├── CustomCategory.java │ │ │ ├── DumpParser.java │ │ │ ├── DumpParserFactory.java │ │ │ ├── DumpStore.java │ │ │ ├── EditCustomCategoryDialog.java │ │ │ ├── EditFilterDialog.java │ │ │ ├── FilterDialog.java │ │ │ ├── HeapInfo.java │ │ │ ├── HelpOverviewDialog.java │ │ │ ├── HistogramInfo.java │ │ │ ├── InfoDialog.java │ │ │ ├── LogFileContent.java │ │ │ ├── Logfile.java │ │ │ ├── LongThreadDialog.java │ │ │ ├── MainMenu.java │ │ │ ├── MonitorMap.java │ │ │ ├── PreferencesDialog.java │ │ │ ├── SearchDialog.java │ │ │ ├── SunJDKParser.java │ │ │ ├── TDA.java │ │ │ ├── TableCategory.java │ │ │ ├── ThreadDumpInfo.java │ │ │ ├── ThreadInfo.java │ │ │ ├── TreeCategory.java │ │ │ ├── WrappedSunJDKParser.java │ │ │ ├── doc │ │ │ ├── COPYING │ │ │ ├── README │ │ │ ├── fileopen.png │ │ │ ├── help.png │ │ │ ├── important.png │ │ │ ├── info.png │ │ │ ├── settings.png │ │ │ ├── stylesheet.css │ │ │ ├── tips.properties │ │ │ └── welcome.html │ │ │ ├── filter │ │ │ ├── Filter.java │ │ │ └── FilterChecker.java │ │ │ ├── icons │ │ │ ├── About.png │ │ │ ├── CloseFile.png │ │ │ ├── Collapsed.png │ │ │ ├── CustomCat.png │ │ │ ├── Deadlock.png │ │ │ ├── DiffDumps.png │ │ │ ├── Document.png │ │ │ ├── Empty.gif │ │ │ ├── Expanded.png │ │ │ ├── FileOpen.png │ │ │ ├── Filters.png │ │ │ ├── FindLRThreads.png │ │ │ ├── Help.png │ │ │ ├── Histogram.png │ │ │ ├── LogfileContent.png │ │ │ ├── Monitor.png │ │ │ ├── MonitorRed.png │ │ │ ├── Monitors-nolocks.png │ │ │ ├── Monitors.png │ │ │ ├── Preferences.png │ │ │ ├── Root.png │ │ │ ├── TDA.png │ │ │ ├── Thread.png │ │ │ ├── ThreadDump.png │ │ │ ├── Threads.png │ │ │ ├── ThreadsLocking.png │ │ │ ├── ThreadsSleeping.png │ │ │ ├── ThreadsWaiting.png │ │ │ ├── splash.png │ │ │ └── tda-logo.png │ │ │ ├── jconsole │ │ │ ├── MBeanDumper.java │ │ │ └── TDAPlugin.java │ │ │ ├── locale.properties │ │ │ └── utils │ │ │ ├── AppInfo.java │ │ │ ├── Browser.java │ │ │ ├── ColoredTable.java │ │ │ ├── DateMatcher.java │ │ │ ├── HistogramTableModel.java │ │ │ ├── IconFactory.java │ │ │ ├── MonitorComparator.java │ │ │ ├── MonitorsTableModel.java │ │ │ ├── PrefManager.java │ │ │ ├── ResourceManager.java │ │ │ ├── StatusBar.java │ │ │ ├── SwingWorker.java │ │ │ ├── TableSorter.java │ │ │ ├── ThreadsTableModel.java │ │ │ ├── ThreadsTableSelectionModel.java │ │ │ ├── TipOfDay.java │ │ │ ├── TreeRenderer.java │ │ │ ├── ViewScrollPane.java │ │ │ └── jedit │ │ │ ├── DefaultInputHandler.java │ │ │ ├── InputHandler.java │ │ │ ├── JEditTextArea.java │ │ │ ├── KeywordMap.java │ │ │ ├── PopupMenu.java │ │ │ ├── SyntaxDocument.java │ │ │ ├── SyntaxStyle.java │ │ │ ├── SyntaxUtilities.java │ │ │ ├── TextAreaDefaults.java │ │ │ ├── TextAreaPainter.java │ │ │ ├── TextUtilities.java │ │ │ ├── Token.java │ │ │ └── TokenMarker.java │ └── none │ │ └── resources │ │ ├── splash.xcf │ │ ├── tda-logo.xcf │ │ └── welcome-logo.xcf └── test │ ├── java │ ├── RootSuite.java │ └── com │ │ └── pironet │ │ └── tda │ │ ├── BeaJDKParserTest.java │ │ ├── DumpParserFactoryTest.java │ │ ├── SunJDKParserTest.java │ │ └── TdaSuite.java │ └── none │ ├── hpdump.log │ ├── java11dump.log │ ├── java8dump.log │ ├── jrockit_14_dump.txt │ ├── jrockit_15_dump.txt │ ├── sapdump.log │ ├── test.log │ ├── test64bit.log │ ├── testwithhistogram.log │ ├── urlthread.log │ └── visualvmremote.log └── wiki-images ├── categories.png ├── filters.png ├── histogram.png ├── info.png ├── jconsole.png ├── longrunning.png ├── monitor.png ├── threaddumps.png ├── visualvm.png └── welcome.png /.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | tda/build/ 3 | tda/builddist/ 4 | /tda-visualvm-module/nbproject/private/ 5 | /tda-visualvm-module/build/ 6 | /tda-visualvm-module/tda-lib-component/build/ 7 | /tda-visualvm-module/logfile-visualvm-module/build/ 8 | /tda-visualvm-module/tda-visualvm-module/build/ 9 | /tda-visualvm-module/logfile-visualvm-module/nbproject/private/ 10 | /tda-visualvm-module/tda-lib-component/nbproject/private/ 11 | /tda-visualvm-module/tda-visualvm-module/nbproject/private/ 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

TDA - Thread Dump Analyzer

2 | 3 | 4 | 5 |

News

6 |

2020-08-21 TDA 2.4 released

7 | This release fixed parsing of JDK 11 Thread dumps and provides integration for VisualVM 2.0. 8 | For Downloads and Release Notes see here: https://github.com/irockel/tda/releases/tag/2.4 9 | 10 |

2017-11-16 Migrated Online-Help to GitHub Wiki

11 | The broken Online-Help is migrated to the Wiki and is available again. 12 | 13 |

2016-07-27 TDA 2.3.3 released

14 | For Downloads and Release Notes see here: https://github.com/irockel/tda/releases/tag/2.3.3 15 | 16 |

2016-07-23 TDA 2.3.2 released

17 | For Downloads and Release Notes see here: https://github.com/irockel/tda/releases/tag/2.3.2 18 | 19 |

2016-07-21 TDA 2.3.1 released

20 | For Downloads and Release Notes see here: https://github.com/irockel/tda/releases/tag/2.3.1 21 | 22 |

2016-07-12 TDA 2.3 released

23 | For Downloads and Release Notes see here: https://github.com/irockel/tda/releases/tag/2.3 24 | 25 |

Overview

26 | 27 | The TDA Thread Dump Analyzer for Java is a small Swing GUI for analyzing Thread Dumps and Heap Information generated by the Sun Java VM (currently tested with 1.4.x, 1.5.0_x, 1.6.0_x, 1.7.0_x and 1.8.0_x releases). It parses the thread dumps and class histograms from a provided log file. TDA needs at least Java 1.4.2_x to run. 28 | 29 | It provides statistic informations about the found thread dumps, gives information about locked monitors and waiting threads. It can diff between threads to look for similarities and has a "long-running-thread" detection. It also provides overview of heap objects at a thread dump, if class histogram was logged. 30 | 31 | Features are in detail: 32 | 33 | 43 | 44 | The emphasis of the TDA is to provide analysis support of offline information gathered from production environments. 45 | 46 | In addition to TDA you might find the GCViewer helpful. It parses the output of the garbage collector from a loggc file and displays it graphically, so you can analyse the memory usage over the time. See here: https://github.com/chewiebug/GCViewer 47 | 48 | -------------------------------------------------------------------------------- /tda-main-screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda-main-screen.png -------------------------------------------------------------------------------- /tda-netbeans-module/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds the module suite tda-netbeans-module. 7 | 8 | 9 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project com.pironet.tda.netbeans. 7 | 8 | 9 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | OpenIDE-Module: com.pironet.tda.netbeans 3 | OpenIDE-Module-Layer: com/pironet/tda/netbeans/layer.xml 4 | OpenIDE-Module-Localizing-Bundle: com/pironet/tda/netbeans/Bundle.properties 5 | OpenIDE-Module-Specification-Version: 1.0 6 | 7 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | You must set 'suite.dir' to point to your containing module suite 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=792ec373 2 | build.xml.script.CRC32=97b83793 3 | build.xml.stylesheet.CRC32=79c3b980 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=792ec373 7 | nbproject/build-impl.xml.script.CRC32=a89a484f 8 | nbproject/build-impl.xml.stylesheet.CRC32=deb65f65 9 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | javac.source=1.5 2 | javac.compilerargs=-Xlint -Xlint:-serial 3 | license.file=../lib/COPYING 4 | nbm.homepage=tda.dev.java.net 5 | nbm.module.author=Ingo Rockel 6 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.apisupport.project 4 | 5 | 6 | com.pironet.tda.netbeans 7 | 8 | 9 | 10 | com.pironet.tda 11 | 12 | 13 | 14 | 1.0 15 | 16 | 17 | 18 | org.openide.util 19 | 20 | 21 | 22 | 7.9.0.1 23 | 24 | 25 | 26 | org.openide.windows 27 | 28 | 29 | 30 | 6.17 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/nbproject/suite.properties: -------------------------------------------------------------------------------- 1 | suite.dir=${basedir}/.. 2 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/src/com/pironet/tda/netbeans/Bundle.properties: -------------------------------------------------------------------------------- 1 | CTL_TDAAction=Thread Dumps 2 | UnsavedFileNameFormat=Thread Dumps {0} 3 | OpenIDE-Module-Display-Category=Debugging 4 | OpenIDE-Module-Name=tda-module-component 5 | OpenIDE-Module-Short-Description=TDA - Thread Dump Analyzer Module Component 6 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/src/com/pironet/tda/netbeans/TDAAction.java: -------------------------------------------------------------------------------- 1 | package com.pironet.tda.netbeans; 2 | 3 | import org.openide.util.HelpCtx; 4 | import org.openide.util.NbBundle; 5 | import org.openide.util.actions.CallableSystemAction; 6 | 7 | public final class TDAAction extends CallableSystemAction { 8 | 9 | public void performAction() { 10 | TDATopComponent tc = new TDATopComponent(); 11 | tc.open(); 12 | tc.requestActive(); 13 | } 14 | 15 | public String getName() { 16 | return NbBundle.getMessage(TDAAction.class, "CTL_TDAAction"); 17 | } 18 | 19 | protected @Override 20 | String iconResource() { 21 | return "com/pironet/tda/netbeans/plugin.gif"; 22 | } 23 | 24 | public HelpCtx getHelpCtx() { 25 | return HelpCtx.DEFAULT_HELP; 26 | } 27 | 28 | protected @Override 29 | boolean asynchronous() { 30 | return false; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/src/com/pironet/tda/netbeans/TDATopComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | package com.pironet.tda.netbeans; 7 | 8 | import com.pironet.tda.TDA; 9 | import java.awt.BorderLayout; 10 | import java.awt.event.ActionEvent; 11 | import java.awt.event.ActionListener; 12 | import javax.swing.event.ChangeEvent; 13 | import javax.swing.event.ChangeListener; 14 | import org.openide.util.NbBundle; 15 | import org.openide.windows.TopComponent; 16 | 17 | /** 18 | * 19 | * @author irockel 20 | */ 21 | public class TDATopComponent extends TopComponent implements ActionListener, ChangeListener { 22 | TDA tdaPanel; 23 | private static int ct = 0; //A counter you use to provide names for new dump views. 24 | 25 | public TDATopComponent() { 26 | 27 | initComponents(); 28 | 29 | String displayName = NbBundle.getMessage( 30 | TDATopComponent.class, 31 | "UnsavedFileNameFormat", 32 | new Object[] { new Integer(ct++) } 33 | ); 34 | 35 | setDisplayName(displayName); 36 | 37 | } 38 | 39 | public void actionPerformed(ActionEvent e) { 40 | } 41 | 42 | public void stateChanged(ChangeEvent e) { 43 | } 44 | 45 | @Override 46 | public int getPersistenceType() { 47 | return PERSISTENCE_NEVER; 48 | } 49 | 50 | @Override 51 | public String preferredID() { 52 | return "TDA"; 53 | } 54 | 55 | private void initComponents() { 56 | setLayout(new BorderLayout()); 57 | tdaPanel = new TDA(false); 58 | tdaPanel.init(false, true); 59 | 60 | add(tdaPanel, BorderLayout.CENTER); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/src/com/pironet/tda/netbeans/layer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /tda-netbeans-module/component/src/com/pironet/tda/netbeans/plugin.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda-netbeans-module/component/src/com/pironet/tda/netbeans/plugin.gif -------------------------------------------------------------------------------- /tda-netbeans-module/component/src/com/pironet/tda/netbeans/plugin24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda-netbeans-module/component/src/com/pironet/tda/netbeans/plugin24.gif -------------------------------------------------------------------------------- /tda-netbeans-module/lib/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project com.pironet.tda. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tda-netbeans-module/lib/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | AutoUpdate-Show-In-Client: true 3 | OpenIDE-Module: com.pironet.tda 4 | OpenIDE-Module-Localizing-Bundle: com/pironet/tda/Bundle.properties 5 | OpenIDE-Module-Specification-Version: 1.0 6 | 7 | -------------------------------------------------------------------------------- /tda-netbeans-module/lib/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | You must set 'suite.dir' to point to your containing module suite 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /tda-netbeans-module/lib/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=d338f2dc 2 | build.xml.script.CRC32=8cd2646c 3 | build.xml.stylesheet.CRC32=79c3b980 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=0834b0de 7 | nbproject/build-impl.xml.script.CRC32=ab1ca6e8 8 | nbproject/build-impl.xml.stylesheet.CRC32=deb65f65 9 | -------------------------------------------------------------------------------- /tda-netbeans-module/lib/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | is.autoload=true 2 | license.file=${basedir}/COPYING 3 | nbm.homepage=http://tda.dev.java.net 4 | nbm.module.author=Ingo Rockel 5 | -------------------------------------------------------------------------------- /tda-netbeans-module/lib/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.apisupport.project 4 | 5 | 6 | com.pironet.tda 7 | 8 | 9 | 10 | com.pironet.tda 11 | com.pironet.tda.filter 12 | com.pironet.tda.utils 13 | com.pironet.tda.utils.jedit 14 | 15 | 16 | ext/tda.jar 17 | release/modules/ext/tda.jar 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /tda-netbeans-module/lib/nbproject/suite.properties: -------------------------------------------------------------------------------- 1 | suite.dir=${basedir}/.. 2 | -------------------------------------------------------------------------------- /tda-netbeans-module/lib/src/com/pironet/tda/Bundle.properties: -------------------------------------------------------------------------------- 1 | OpenIDE-Module-Display-Category=Debugging 2 | OpenIDE-Module-Name=tda-lib-component 3 | OpenIDE-Module-Short-Description=Library Componet for TDA - Thread Dump Analyzer Module 4 | -------------------------------------------------------------------------------- /tda-netbeans-module/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /tda-netbeans-module/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=75d962e8 2 | build.xml.script.CRC32=3ac5599c 3 | build.xml.stylesheet.CRC32=531c622b 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=75d962e8 7 | nbproject/build-impl.xml.script.CRC32=4b7f31e1 8 | nbproject/build-impl.xml.stylesheet.CRC32=196c7090 9 | -------------------------------------------------------------------------------- /tda-netbeans-module/nbproject/platform.properties: -------------------------------------------------------------------------------- 1 | nbplatform.active=default 2 | -------------------------------------------------------------------------------- /tda-netbeans-module/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | modules=\ 2 | ${project.com.pironet.tda}:\ 3 | ${project.com.pironet.tda.netbeans} 4 | project.com.pironet.tda=lib 5 | project.com.pironet.tda.netbeans=component 6 | -------------------------------------------------------------------------------- /tda-netbeans-module/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.apisupport.project.suite 4 | 5 | 6 | tda-netbeans-module 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tda-visualvm-module/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds the module suite tda-visualvm-module. 7 | 8 | 9 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project net.java.dev.tda.visualvm.logfile. 7 | 8 | 9 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | AutoUpdate-Show-In-Client: false 3 | OpenIDE-Module: net.java.dev.tda.visualvm.logfile/2 4 | OpenIDE-Module-Localizing-Bundle: net/java/dev/tda/visualvm/logfile/Bundle.properties 5 | OpenIDE-Module-Specification-Version: 2.4 6 | OpenIDE-Module-Install: net/java/dev/tda/visualvm/logfile/Install.class 7 | OpenIDE-Module-Layer: net/java/dev/tda/visualvm/logfile/layer.xml 8 | 9 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | You must set 'suite.dir' to point to your containing module suite 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=456b0f45 2 | build.xml.script.CRC32=24439c16 3 | build.xml.stylesheet.CRC32=15ca8a54@2.80 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=456b0f45 7 | nbproject/build-impl.xml.script.CRC32=9db5b15c 8 | nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.80 9 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | is.eager=true 2 | javac.source=1.8 3 | javac.compilerargs=-Xlint -Xlint:-serial 4 | license.file=../tda-lib-component/COPYING 5 | nbm.homepage=https://github.com/irockel/tda 6 | nbm.module.author=Ingo Rockel 7 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.apisupport.project 4 | 5 | 6 | net.java.dev.tda.visualvm.logfile 7 | 8 | 9 | 10 | net.java.dev.tda 11 | 12 | 13 | 14 | 2 15 | 2.0 16 | 17 | 18 | 19 | org.graalvm.visualvm.core 20 | 21 | 22 | 23 | 2 24 | 2.2 25 | 26 | 27 | 28 | org.openide.modules 29 | 30 | 31 | 32 | 7.3.1 33 | 34 | 35 | 36 | org.openide.util 37 | 38 | 39 | 40 | 7.10.1.1 41 | 42 | 43 | 44 | org.openide.util.ui 45 | 46 | 47 | 48 | 9.15 49 | 50 | 51 | 52 | 53 | net.java.dev.tda.visualvm.logfile 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/nbproject/suite.properties: -------------------------------------------------------------------------------- 1 | suite.dir=${basedir}/.. 2 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/AddLogfileAction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: AddLogfileAction.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import com.pironet.tda.utils.PrefManager; 23 | import java.awt.Image; 24 | import java.awt.event.ActionEvent; 25 | import java.io.File; 26 | import javax.swing.ImageIcon; 27 | import javax.swing.JFileChooser; 28 | import org.graalvm.visualvm.core.ui.actions.SingleDataSourceAction; 29 | import org.openide.util.NbBundle; 30 | import org.openide.util.Utilities; 31 | 32 | /** 33 | * popup menu action for adding log files. 34 | * @author irockel 35 | */ 36 | public class AddLogfileAction extends SingleDataSourceAction { 37 | 38 | private static final String ICON_PATH = "net/java/dev/tda/visualvm/logfile/resources/logfileadd.png"; // NOI18N 39 | private static final Image ICON = Utilities.loadImage(ICON_PATH); 40 | private static JFileChooser fc = null; 41 | 42 | private boolean tracksSelection = false; 43 | 44 | private static AddLogfileAction alwaysEnabled; 45 | private static AddLogfileAction selectionAware; 46 | 47 | private AddLogfileAction() { 48 | super(LogfileDataSource.class); 49 | putValue(NAME, NbBundle.getMessage(LogfileDumpView.class, "LBL_Add_Logfile")); // NOI18N 50 | putValue(SHORT_DESCRIPTION, NbBundle.getMessage(LogfileDumpView.class, "ToolTip_Add_Logfile")); // NOI18N 51 | } 52 | 53 | public static synchronized AddLogfileAction alwaysEnabled() { 54 | if (alwaysEnabled == null) { 55 | alwaysEnabled = new AddLogfileAction(); 56 | alwaysEnabled.putValue(SMALL_ICON, new ImageIcon(ICON)); 57 | alwaysEnabled.putValue("iconBase", ICON_PATH); // NOI18N 58 | } 59 | return alwaysEnabled; 60 | } 61 | 62 | public static synchronized AddLogfileAction selectionAware() { 63 | if (selectionAware == null) { 64 | selectionAware = new AddLogfileAction(); 65 | selectionAware.tracksSelection = true; 66 | } 67 | return selectionAware; 68 | } 69 | 70 | public void actionPerformed(LogfileDataSource container, ActionEvent e) { 71 | if(fc == null) { 72 | fc = new JFileChooser(); 73 | fc.setMultiSelectionEnabled(true); 74 | fc.setCurrentDirectory(PrefManager.get().getSelectedPath()); 75 | } 76 | if(fc.showOpenDialog(null) == JFileChooser.APPROVE_OPTION) { 77 | File[] files = fc.getSelectedFiles(); 78 | for(int i = 0; i < files.length; i++) { 79 | LogfileProvider.createLogfile(files[i]); 80 | } 81 | PrefManager.get().setSelectedPath(fc.getCurrentDirectory()); 82 | } 83 | } 84 | 85 | 86 | protected boolean isEnabled(LogfileDataSource container) { 87 | return true; 88 | } 89 | 90 | @Override 91 | protected void initialize() { 92 | if (tracksSelection) { 93 | super.initialize(); 94 | } 95 | } 96 | } 97 | 98 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/Bundle.properties: -------------------------------------------------------------------------------- 1 | OpenIDE-Module-Display-Category=Tools 2 | OpenIDE-Module-Long-Description=\ 3 | Logfile Plugin for VisualVM, needed by TDA Plugin 4 | OpenIDE-Module-Name=VisualVM-Logfile-Module 5 | 6 | ExplorerNode_Name_Logfiles=Logfiles 7 | OpenIDE-Module-Short-Description=LogfilePlugin 8 | ToolTip_Add_Logfile=Add Logfile 9 | LBL_Add_Logfile=Add Logfile... 10 | LBL_Logfile=Logfile 11 | LBL_Prefix=Logfile 12 | MSG_Logfile=Logfile 13 | 14 | LBL_RequestDump=Request Dump 15 | LBL_Dump_results=Thread Dump Results 16 | LBL_Filters=Filters 17 | LBL_Categories=Categories 18 | LBL_CollapseTree=Collapse Tree 19 | LBL_ExpandTree=Expand Tree 20 | MSG_Dump=Thread Dumps 21 | MSG_Dump_results=Thread Dump Results 22 | 23 | LBL_DumpView=Logfile 24 | MSG_DumpView=Logfile 25 | 26 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/Install.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: Install.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import org.openide.modules.ModuleInstall; 23 | 24 | /** 25 | * 26 | * @author irockel 27 | */ 28 | public class Install extends ModuleInstall { 29 | 30 | @Override 31 | public void restored() { 32 | try { 33 | LogfileProvider.initialize(); 34 | } catch (Exception e) { 35 | e.printStackTrace(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/LogPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: LogPanel.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import com.pironet.tda.TDA; 23 | import com.pironet.tda.utils.jedit.JEditTextArea; 24 | import com.pironet.tda.utils.jedit.PopupMenu; 25 | import java.awt.BorderLayout; 26 | import java.awt.Color; 27 | import java.awt.event.ActionListener; 28 | import java.awt.event.KeyEvent; 29 | import javax.swing.BorderFactory; 30 | import javax.swing.JPanel; 31 | import javax.swing.KeyStroke; 32 | 33 | /** 34 | * 35 | * @author irockel 36 | */ 37 | public class LogPanel extends JPanel { 38 | JEditTextArea editComp = new JEditTextArea(); 39 | 40 | public LogPanel(TDA ref) { 41 | super(new BorderLayout()); 42 | setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY)); 43 | 44 | editComp.setEditable(false); 45 | editComp.setBackground(Color.WHITE); 46 | setOpaque(true); 47 | setBackground(Color.WHITE); 48 | 49 | editComp.setCaretVisible(false); 50 | editComp.setCaretBlinkEnabled(false); 51 | editComp.setRightClickPopup(new PopupMenu(editComp, ref, true)); 52 | editComp.getInputHandler().addKeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), (ActionListener) editComp.getRightClickPopup()); 53 | editComp.getInputHandler().addKeyBinding(KeyStroke.getKeyStroke(KeyEvent.VK_C, KeyEvent.CTRL_MASK), (ActionListener) editComp.getRightClickPopup()); 54 | 55 | add(editComp, BorderLayout.CENTER); 56 | } 57 | 58 | public void setCaretPosition(int i) { 59 | editComp.setCaretPosition(i); 60 | } 61 | 62 | public void setText(String content) { 63 | editComp.setText(content); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/Logfile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: Logfile.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import java.io.File; 23 | import java.io.IOException; 24 | import org.graalvm.visualvm.core.datasource.DataSource; 25 | import org.graalvm.visualvm.core.snapshot.Snapshot; 26 | 27 | /** 28 | * 29 | * @author irockel 30 | */ 31 | public class Logfile extends Snapshot { 32 | 33 | public Logfile(File file) throws IOException { 34 | this(file, null); 35 | } 36 | 37 | public Logfile(File file, DataSource master) throws IOException { 38 | super(file, LogfileSupport.getCategory(), master); 39 | 40 | if (!file.exists() || !file.isFile()) 41 | throw new IOException("File " + file.getAbsolutePath() + " does not exist"); // NOI18N 42 | } 43 | 44 | @Override 45 | public boolean supportsSaveAs() { 46 | return false; 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/LogfileCategory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: LogfileCategory.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import org.graalvm.visualvm.core.snapshot.SnapshotCategory; 23 | import org.openide.util.NbBundle; 24 | 25 | /** 26 | * 27 | * @author irockel 28 | */ 29 | public class LogfileCategory extends SnapshotCategory { 30 | 31 | private static final String NAME = NbBundle.getMessage(LogfileDumpView.class, "LBL_Logfile"); // NOI18N 32 | private static final String PREFIX = NbBundle.getMessage(LogfileDumpView.class, "LBL_Prefix"); 33 | private static final String SUFFIX = null; 34 | 35 | public LogfileCategory() { 36 | super(NAME, Logfile.class, PREFIX, SUFFIX, POSITION_NONE); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/LogfileDataSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: LogfileDataSource.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import java.awt.Image; 23 | import org.graalvm.visualvm.core.datasource.DataSource; 24 | import org.graalvm.visualvm.core.datasource.descriptor.DataSourceDescriptor; 25 | import org.graalvm.visualvm.core.datasource.descriptor.DataSourceDescriptorFactory; 26 | import org.graalvm.visualvm.core.model.AbstractModelProvider; 27 | import org.openide.util.NbBundle; 28 | import org.openide.util.Utilities; 29 | 30 | /** 31 | * Logfile node in explorer view. 32 | * 33 | * @author irockel 34 | */ 35 | public class LogfileDataSource extends DataSource { 36 | private static LogfileDataSource sharedInstance; 37 | 38 | 39 | public static synchronized LogfileDataSource sharedInstance() { 40 | if (sharedInstance == null) { 41 | sharedInstance = new LogfileDataSource(); 42 | } 43 | 44 | return sharedInstance; 45 | } 46 | 47 | 48 | private LogfileDataSource() { 49 | DataSourceDescriptorFactory.getDefault().registerProvider(new LogfileDataSourceDescriptorProvider()); 50 | DataSource.ROOT.getRepository().addDataSource(this); 51 | } 52 | 53 | 54 | private static class LogfileDataSourceDescriptor extends DataSourceDescriptor { 55 | private static final Image NODE_ICON = Utilities.loadImage("net/java/dev/tda/visualvm/logfile/resources/logfiles.png", true); // NOI18N 56 | 57 | LogfileDataSourceDescriptor() { 58 | super(LogfileDataSource.sharedInstance(), NbBundle.getMessage(LogfileDumpView.class, "ExplorerNode_Name_Logfiles"), null, NODE_ICON, 20, EXPAND_ON_EACH_NEW_CHILD); // NOI18N 59 | } 60 | 61 | } 62 | 63 | private static class LogfileDataSourceDescriptorProvider extends AbstractModelProvider { 64 | 65 | public DataSourceDescriptor createModelFor(DataSource ds) { 66 | if (LogfileDataSource.sharedInstance().equals(ds)) { 67 | return new LogfileDataSourceDescriptor(); 68 | } 69 | return null; 70 | } 71 | } 72 | 73 | 74 | } 75 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/LogfileDescriptor.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: LogfileDescriptor.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import java.awt.Image; 23 | import org.graalvm.visualvm.core.snapshot.SnapshotDescriptor; 24 | import org.openide.util.*; 25 | 26 | /** 27 | * logfile descriptor for specified logfile 28 | * @author irockel 29 | */ 30 | public class LogfileDescriptor extends SnapshotDescriptor { 31 | 32 | private static final Image ICON = Utilities.loadImage("net/java/dev/tda/visualvm/logfile/resources/logfile.png", true); // NOI18N 33 | 34 | public LogfileDescriptor(Logfile logFile) { 35 | super(logFile, ICON); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/LogfileDescriptorProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: LogfileDescriptorProvider.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import org.graalvm.visualvm.core.datasource.DataSource; 23 | import org.graalvm.visualvm.core.datasource.descriptor.DataSourceDescriptor; 24 | import org.graalvm.visualvm.core.model.AbstractModelProvider; 25 | 26 | /** 27 | * provider for logfile descriptors 28 | * 29 | * @author irockel 30 | */ 31 | public class LogfileDescriptorProvider extends AbstractModelProvider { 32 | 33 | public DataSourceDescriptor createModelFor(DataSource ds) { 34 | if (ds instanceof Logfile) { 35 | return new LogfileDescriptor((Logfile) ds); 36 | } 37 | return null; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/LogfileDumpView.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: LogfileDumpView.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import com.pironet.tda.TDA; 23 | import java.io.BufferedReader; 24 | import java.io.FileReader; 25 | import java.io.IOException; 26 | import javax.swing.ImageIcon; 27 | import org.graalvm.visualvm.core.ui.DataSourceView; 28 | import org.graalvm.visualvm.core.ui.components.DataViewComponent; 29 | import org.openide.util.Exceptions; 30 | import org.openide.util.NbBundle; 31 | import org.openide.util.Utilities; 32 | 33 | /** 34 | * 35 | * @author irockel 36 | */ 37 | public class LogfileDumpView extends DataSourceView { 38 | private static final String IMAGE_PATH = "net/java/dev/tda/visualvm/logfile/resources/logfile.png"; // NOI18N 39 | private Logfile logfile; 40 | private TDA tdaPanel; 41 | private LogPanel logPanel = null; 42 | 43 | public LogfileDumpView(Logfile logfile) { 44 | super(logfile, NbBundle.getMessage(LogfileDumpView.class, "LBL_DumpView"), new ImageIcon(Utilities.loadImage(IMAGE_PATH, true)).getImage(), 0, false); // NOI18N 45 | this.logfile = logfile; 46 | } 47 | 48 | @Override 49 | protected DataViewComponent createComponent() { 50 | tdaPanel = new TDA(false, logfile.getFile().getAbsolutePath()); 51 | 52 | // init panel and set border 53 | tdaPanel.init(false, true); 54 | 55 | // display the logfile 56 | tdaPanel.initDumpDisplay(null); 57 | 58 | logPanel = new LogPanel(tdaPanel); 59 | logPanel.setText(readText()); 60 | 61 | DataViewComponent dvc = new DataViewComponent(new DataViewComponent.MasterView(NbBundle.getMessage(LogfileDumpView.class, 62 | "MSG_DumpView"), null, logPanel), 63 | new DataViewComponent.MasterViewConfiguration(true)); 64 | logPanel.revalidate(); 65 | return(dvc); 66 | } 67 | 68 | /** 69 | * read log file 70 | * 71 | * @return 72 | */ 73 | private String readText() { 74 | BufferedReader br = null; 75 | try { 76 | StringBuffer text = new StringBuffer(); 77 | br = new BufferedReader(new FileReader(logfile.getFile())); 78 | while(br.ready()) { 79 | text.append(br.readLine()); 80 | text.append("\n"); 81 | } 82 | return(text.toString()); 83 | } catch (IOException ex) { 84 | Exceptions.printStackTrace(ex); 85 | } finally { 86 | try { 87 | if(br != null) { 88 | br.close(); 89 | } 90 | } catch (IOException ex) { 91 | Exceptions.printStackTrace(ex); 92 | } 93 | } 94 | return(""); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/LogfileDumpViewProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: LogfileDumpViewProvider.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import java.util.Set; 23 | import org.graalvm.visualvm.core.ui.DataSourceView; 24 | import org.graalvm.visualvm.core.ui.PluggableDataSourceViewProvider; 25 | 26 | /** 27 | * datasource view provider for logfile view. 28 | * 29 | * @author irockel 30 | */ 31 | public class LogfileDumpViewProvider extends PluggableDataSourceViewProvider{ 32 | 33 | protected boolean supportsViewFor(Logfile coreDump) { 34 | return true; 35 | } 36 | 37 | protected DataSourceView createView(Logfile logfile) { 38 | return new LogfileDumpView(logfile); 39 | } 40 | 41 | public Set getPluggableLocations(DataSourceView view) { 42 | return ALL_LOCATIONS; 43 | } 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/LogfileProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: LogfileProvider.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | 21 | package net.java.dev.tda.visualvm.logfile; 22 | 23 | import java.io.File; 24 | import java.io.IOException; 25 | import java.util.logging.Level; 26 | import java.util.logging.Logger; 27 | import org.graalvm.visualvm.core.datasource.descriptor.DataSourceDescriptorFactory; 28 | import org.graalvm.visualvm.core.snapshot.RegisteredSnapshotCategories; 29 | import org.graalvm.visualvm.core.ui.DataSourceViewsManager; 30 | 31 | /** 32 | * provides logfile support. 33 | * 34 | * @author irockel 35 | */ 36 | public class LogfileProvider { 37 | private static final Logger LOGGER = Logger.getLogger(LogfileProvider.class.getName()); 38 | 39 | public static void createLogfile(File logfile) { 40 | try { 41 | Logfile newLogfile = new Logfile(logfile); 42 | 43 | // add data source. 44 | LogfileDataSource.sharedInstance().getRepository().addDataSource(newLogfile); 45 | } catch (IOException ex) { 46 | LOGGER.log(Level.SEVERE, "Error loading logfile", ex); 47 | } 48 | } 49 | 50 | public static void initialize() { 51 | DataSourceDescriptorFactory.getDefault().registerProvider(new LogfileDescriptorProvider()); 52 | LogfileDataSource.sharedInstance(); 53 | //CoreDumpProvider.register(); registers persisted core dumps 54 | RegisteredSnapshotCategories.sharedInstance().registerCategory(LogfileSupport.getCategory()); 55 | DataSourceViewsManager.sharedInstance().addViewProvider(LogfileSupport.getOverviewView(), Logfile.class); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/LogfileSupport.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: LogfileSupport.java,v 1.1 2008-09-30 19:21:59 irockel Exp $ 19 | */ 20 | package net.java.dev.tda.visualvm.logfile; 21 | 22 | import org.graalvm.visualvm.core.ui.PluggableDataSourceViewProvider; 23 | 24 | 25 | /** 26 | * 27 | * @author irockel 28 | */ 29 | public class LogfileSupport { 30 | private static LogfileCategory category; 31 | private static PluggableDataSourceViewProvider viewProvider; 32 | 33 | public static LogfileCategory getCategory() { 34 | if(category == null) { 35 | category = new LogfileCategory(); 36 | } 37 | 38 | return(category); 39 | } 40 | 41 | public static PluggableDataSourceViewProvider getOverviewView() { 42 | if(viewProvider == null) { 43 | viewProvider = new LogfileDumpViewProvider(); 44 | } 45 | return viewProvider; 46 | } 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/layer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/resources/logfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/resources/logfile.png -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/resources/logfileadd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/resources/logfileadd.png -------------------------------------------------------------------------------- /tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/resources/logfiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda-visualvm-module/logfile-visualvm-module/src/net/java/dev/tda/visualvm/logfile/resources/logfiles.png -------------------------------------------------------------------------------- /tda-visualvm-module/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /tda-visualvm-module/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=5f1e5302 2 | build.xml.script.CRC32=a3a8c8ab 3 | build.xml.stylesheet.CRC32=70ce5c94@2.80 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=5f1e5302 7 | nbproject/build-impl.xml.script.CRC32=37a2de31 8 | nbproject/build-impl.xml.stylesheet.CRC32=473dc988@2.80 9 | nbproject/platform.xml.data.CRC32=5f1e5302 10 | nbproject/platform.xml.script.CRC32=6dcbd131 11 | nbproject/platform.xml.stylesheet.CRC32=ae64f0b6@2.80 12 | -------------------------------------------------------------------------------- /tda-visualvm-module/nbproject/platform.properties: -------------------------------------------------------------------------------- 1 | cluster.path=\ 2 | ${nbplatform.active.dir}/platform:\ 3 | ${nbplatform.active.dir}/visualvm 4 | # Deprecated since 5.0u1; for compatibility with 5.0: 5 | disabled.clusters= 6 | nbplatform.active=VisualVM_2.0.4 7 | -------------------------------------------------------------------------------- /tda-visualvm-module/nbproject/platform.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /tda-visualvm-module/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | auxiliary.org-netbeans-modules-apisupport-installer.license-type=no 2 | auxiliary.org-netbeans-modules-apisupport-installer.os-linux=true 3 | auxiliary.org-netbeans-modules-apisupport-installer.os-macosx=false 4 | auxiliary.org-netbeans-modules-apisupport-installer.os-solaris=false 5 | auxiliary.org-netbeans-modules-apisupport-installer.os-windows=false 6 | modules=\ 7 | ${project.net.java.dev.tda.visualvm}:\ 8 | ${project.net.java.dev.tda}:\ 9 | ${project.net.java.dev.tda.visualvm.logfile} 10 | project.net.java.dev.tda=tda-lib-component 11 | project.net.java.dev.tda.visualvm=tda-visualvm-module 12 | project.net.java.dev.tda.visualvm.logfile=logfile-visualvm-module 13 | -------------------------------------------------------------------------------- /tda-visualvm-module/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.apisupport.project.suite 4 | 5 | 6 | tda-visualvm-module 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-lib-component/.gitignore: -------------------------------------------------------------------------------- 1 | release 2 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-lib-component/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project net.java.dev.tda. 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-lib-component/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | OpenIDE-Module: net.java.dev.tda/2 3 | OpenIDE-Module-Localizing-Bundle: net/java/dev/tda/Bundle.properties 4 | OpenIDE-Module-Specification-Version: 2.4 5 | 6 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-lib-component/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | You must set 'suite.dir' to point to your containing module suite 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-lib-component/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=7f87e326 2 | build.xml.script.CRC32=9de2c5c2 3 | build.xml.stylesheet.CRC32=79c3b980 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=b514762b 7 | nbproject/build-impl.xml.script.CRC32=8185a4ce 8 | nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.80 9 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-lib-component/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | is.autoload=true 2 | license.file=${basedir}/COPYING 3 | nbm.homepage=https://github.com/irockel/tda 4 | nbm.module.author=Ingo Rockel 5 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-lib-component/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.apisupport.project 4 | 5 | 6 | net.java.dev.tda 7 | 8 | 9 | 10 | org.graalvm.visualvm.application 11 | 12 | 13 | 14 | 2 15 | 2.0 16 | 17 | 18 | 19 | org.graalvm.visualvm.application.views 20 | 21 | 22 | 23 | 2 24 | 2.0 25 | 26 | 27 | 28 | org.graalvm.visualvm.core 29 | 30 | 31 | 32 | 2 33 | 2.2 34 | 35 | 36 | 37 | org.graalvm.visualvm.threaddump 38 | 39 | 40 | 41 | 2 42 | 2.0 43 | 44 | 45 | 46 | org.graalvm.visualvm.tools 47 | 48 | 49 | 50 | 2 51 | 2.0 52 | 53 | 54 | 55 | 56 | com.pironet.tda 57 | com.pironet.tda.filter 58 | com.pironet.tda.jconsole 59 | com.pironet.tda.utils 60 | com.pironet.tda.utils.jedit 61 | 62 | 63 | ext/tda.jar 64 | release/modules/ext/tda.jar 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-lib-component/nbproject/suite.properties: -------------------------------------------------------------------------------- 1 | suite.dir=${basedir}/.. 2 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-lib-component/src/net/java/dev/tda/Bundle.properties: -------------------------------------------------------------------------------- 1 | OpenIDE-Module-Name=VisualVM-TDA-Library-Component 2 | OpenIDE-Module-Display-Category=Tools 3 | OpenIDE-Module-Long-Description=\ 4 | VisualVM TDA Library Component, needed by TDA Module 5 | OpenIDE-Module-Short-Description=TDALibraryComponent 6 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project net.java.dev.tda.visualvm. 7 | 8 | 9 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | AutoUpdate-Show-In-Client: true 3 | OpenIDE-Module: net.java.dev.tda.visualvm/2 4 | OpenIDE-Module-Localizing-Bundle: net/java/dev/tda/visualvm/Bundle.properties 5 | OpenIDE-Module-Specification-Version: 2.4 6 | OpenIDE-Module-Install: net/java/dev/tda/visualvm/Install.class 7 | OpenIDE-Module-Layer: net/java/dev/tda/visualvm/layer.xml 8 | 9 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | You must set 'suite.dir' to point to your containing module suite 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=9dea483a 2 | build.xml.script.CRC32=e2ffc8a0 3 | build.xml.stylesheet.CRC32=15ca8a54@2.80 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=9dea483a 7 | nbproject/build-impl.xml.script.CRC32=e85af957 8 | nbproject/build-impl.xml.stylesheet.CRC32=49aa68b0@2.80 9 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | is.eager=true 2 | javac.source=1.8 3 | javac.compilerargs=-Xlint -Xlint:-serial 4 | license.file=../tda-lib-component/COPYING 5 | nbm.homepage=https://github.com/irockel/tda 6 | nbm.module.author=Ingo Rockel 7 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/nbproject/suite.properties: -------------------------------------------------------------------------------- 1 | suite.dir=${basedir}/.. 2 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/Bundle.properties: -------------------------------------------------------------------------------- 1 | # Module configuration 2 | OpenIDE-Module-Display-Category=Tools 3 | OpenIDE-Module-Long-Description=\ 4 | VisualVM Module of TDA - Thread Dump Analyzer 5 | OpenIDE-Module-Name=VisualVM-TDA-Module 6 | OpenIDE-Module-Short-Description=TDAModule 7 | 8 | # specific translations 9 | AdvancedOption_DisplayName_Visualvm=TDA 10 | AdvancedOption_Tooltip_Visualvm=Settings for Thread Dump Parsing 11 | OptionsCategory_Name_Visualvm=TDA 12 | OptionsCategory_Title_Visualvm=TDA 13 | CTL_HelpOverviewAction=TDA 14 | LBL_RequestDump=Request Dump 15 | LBL_Dump_results=Thread Dump Results 16 | LBL_Filters=Filters 17 | LBL_Categories=Categories 18 | LBL_CollapseTree=Collapse Tree 19 | LBL_ExpandTree=Expand Tree 20 | MSG_Dump=Thread Dumps 21 | MSG_Dump_results=Thread Dump Results 22 | 23 | 24 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/Install.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | package net.java.dev.tda.visualvm; 19 | 20 | import org.openide.modules.ModuleInstall; 21 | 22 | /** 23 | * 24 | * @author irockel 25 | */ 26 | public class Install extends ModuleInstall { 27 | 28 | @Override 29 | public void restored() { 30 | try { 31 | TDAViewProvider.initialize(); 32 | } catch (Exception e) { 33 | e.printStackTrace(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/TDAViewProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | package net.java.dev.tda.visualvm; 19 | 20 | import java.util.HashMap; 21 | import java.util.Map; 22 | import net.java.dev.tda.visualvm.logfile.Logfile; 23 | import org.graalvm.visualvm.core.datasource.DataSource; 24 | import org.graalvm.visualvm.core.snapshot.Snapshot; 25 | import org.graalvm.visualvm.core.ui.DataSourceView; 26 | import org.graalvm.visualvm.core.ui.DataSourceViewProvider; 27 | import org.graalvm.visualvm.core.ui.DataSourceViewsManager; 28 | import org.graalvm.visualvm.threaddump.ThreadDump; 29 | 30 | /** 31 | * provides a tda view. 32 | * 33 | * @author irockel 34 | */ 35 | public class TDAViewProvider extends DataSourceViewProvider { 36 | /* 37 | * FIXME: this is just a hack to add newly added thread dumps to an existing thread dump view. 38 | */ 39 | private final Map views = new HashMap<>(); 40 | 41 | static void initialize() { 42 | DataSourceViewsManager.sharedInstance().addViewProvider(new TDAViewProvider(), DataSource.class); 43 | } 44 | 45 | @Override 46 | protected boolean supportsViewFor(DataSource logContent) { 47 | return ((logContent instanceof ThreadDump) || (logContent instanceof Logfile)); 48 | } 49 | 50 | @Override 51 | protected DataSourceView createView(DataSource logContent) { 52 | TDAView tdaView; 53 | if(views.containsKey(logContent.getMaster())) { 54 | tdaView = views.get(logContent.getMaster()); 55 | tdaView.addToTDA(((Snapshot) logContent).getFile().getAbsolutePath()); 56 | return(tdaView); 57 | } else { 58 | tdaView = new TDAView(logContent); 59 | views.put(logContent.getMaster(), tdaView); 60 | } 61 | return(tdaView); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/VisualvmOptionsCategory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | package net.java.dev.tda.visualvm; 19 | 20 | import javax.swing.Icon; 21 | import javax.swing.ImageIcon; 22 | import org.netbeans.spi.options.OptionsCategory; 23 | import org.netbeans.spi.options.OptionsPanelController; 24 | import org.openide.util.NbBundle; 25 | import org.openide.util.Utilities; 26 | 27 | public final class VisualvmOptionsCategory extends OptionsCategory { 28 | 29 | @Override 30 | public Icon getIcon() { 31 | return new ImageIcon(Utilities.loadImage("net/java/dev/tda/visualvm/resources/options.png")); 32 | } 33 | 34 | @Override 35 | public String getCategoryName() { 36 | return NbBundle.getMessage(VisualvmOptionsCategory.class, "OptionsCategory_Name_Visualvm"); 37 | } 38 | 39 | @Override 40 | public String getTitle() { 41 | return NbBundle.getMessage(VisualvmOptionsCategory.class, "OptionsCategory_Title_Visualvm"); 42 | } 43 | 44 | @Override 45 | public OptionsPanelController create() { 46 | return new VisualvmOptionsPanelController(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/VisualvmOptionsPanelController.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | package net.java.dev.tda.visualvm; 19 | 20 | import com.pironet.tda.CustomCategoriesDialog; 21 | import com.pironet.tda.CustomCategoriesDialog.CategoriesPanel; 22 | import com.pironet.tda.FilterDialog; 23 | import com.pironet.tda.FilterDialog.FilterPanel; 24 | import com.pironet.tda.PreferencesDialog; 25 | import java.beans.PropertyChangeListener; 26 | import java.beans.PropertyChangeSupport; 27 | import javax.swing.JComponent; 28 | import javax.swing.JTabbedPane; 29 | import org.netbeans.spi.options.OptionsPanelController; 30 | import org.openide.util.HelpCtx; 31 | import org.openide.util.Lookup; 32 | import org.openide.util.NbBundle; 33 | import org.openide.windows.WindowManager; 34 | 35 | final class VisualvmOptionsPanelController extends OptionsPanelController { 36 | 37 | private JTabbedPane panel; 38 | private PreferencesDialog prefDialog; 39 | private final PropertyChangeSupport pcs = new PropertyChangeSupport(this); 40 | private boolean changed; 41 | private FilterPanel filterPanel; 42 | private CategoriesPanel catPanel; 43 | 44 | @Override 45 | public void update() { 46 | prefDialog.loadSettings(); 47 | changed = false; 48 | } 49 | 50 | @Override 51 | public void applyChanges() { 52 | prefDialog.saveSettings(); 53 | filterPanel.saveSettings(); 54 | catPanel.saveSettings(); 55 | changed = false; 56 | } 57 | 58 | @Override 59 | public void cancel() { 60 | // need not do anything special, if no changes have been persisted yet 61 | } 62 | 63 | @Override 64 | public boolean isValid() { 65 | return true; 66 | } 67 | 68 | @Override 69 | public boolean isChanged() { 70 | return changed; 71 | } 72 | 73 | @Override 74 | public HelpCtx getHelpCtx() { 75 | return null; // new HelpCtx("...ID") if you have a help set 76 | 77 | } 78 | 79 | @Override 80 | public JComponent getComponent(Lookup masterLookup) { 81 | return getPanel(); 82 | } 83 | 84 | @Override 85 | public void addPropertyChangeListener(PropertyChangeListener l) { 86 | pcs.addPropertyChangeListener(l); 87 | } 88 | 89 | @Override 90 | public void removePropertyChangeListener(PropertyChangeListener l) { 91 | pcs.removePropertyChangeListener(l); 92 | } 93 | 94 | private JTabbedPane getPanel() { 95 | WindowManager wm = WindowManager.getDefault(); 96 | if (panel == null) { 97 | prefDialog = new PreferencesDialog(wm.getMainWindow()); 98 | filterPanel = new FilterDialog.FilterPanel(wm.getMainWindow()); 99 | catPanel = new CustomCategoriesDialog.CategoriesPanel(wm.getMainWindow()); 100 | 101 | panel = prefDialog.getPane(); 102 | panel.addTab(NbBundle.getMessage(TDAView.class, "LBL_Filters"), filterPanel); 103 | panel.addTab(NbBundle.getMessage(TDAView.class, "LBL_Categories"), catPanel); 104 | } 105 | return panel; 106 | } 107 | 108 | void changed() { 109 | if (!changed) { 110 | changed = true; 111 | pcs.firePropertyChange(OptionsPanelController.PROP_CHANGED, false, true); 112 | } 113 | pcs.firePropertyChange(OptionsPanelController.PROP_VALID, null, null); 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/layer.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/resources/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/resources/help.png -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/resources/options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/resources/options.png -------------------------------------------------------------------------------- /tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/resources/tda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda-visualvm-module/tda-visualvm-module/src/net/java/dev/tda/visualvm/resources/tda.png -------------------------------------------------------------------------------- /tda/bin/tda.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | rem *********** 3 | rem Basic start script for TDA for Windows 4 | rem *********** 5 | rem If you have big log file you might need to adjust Xmx setting 6 | 7 | java -Xmx512m -jar "%~dp0/../tda.jar" 8 | -------------------------------------------------------------------------------- /tda/bin/tda.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Unix shell script for starting tda. If you have big log files 3 | # you might need to adjzst Xmx setting. 4 | 5 | cd $(dirname $(readlink -f $0))/..; java -Xmx512m -jar ./tda.jar 6 | -------------------------------------------------------------------------------- /tda/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project tda. 7 | 8 | 9 | 10 | 11 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /tda/lib/jconsole.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/lib/jconsole.jar -------------------------------------------------------------------------------- /tda/lib/swingx-0.9.1-javadoc.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/lib/swingx-0.9.1-javadoc.jar -------------------------------------------------------------------------------- /tda/lib/swingx-0.9.1-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/lib/swingx-0.9.1-sources.jar -------------------------------------------------------------------------------- /tda/lib/swingx-0.9.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/lib/swingx-0.9.1.jar -------------------------------------------------------------------------------- /tda/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | SplashScreen-Image: com/pironet/tda/icons/splash.png 3 | X-COMMENT: Main-Class will be added automatically by build 4 | 5 | -------------------------------------------------------------------------------- /tda/nbproject/build-jaws-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 22 | 23 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /tda/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=33fbf6b9 2 | build.xml.script.CRC32=af590f61 3 | build.xml.stylesheet.CRC32=d5b6853a 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=f9c89286 7 | nbproject/build-impl.xml.script.CRC32=b9e4f7c9 8 | nbproject/build-impl.xml.stylesheet.CRC32=f89f7d21@1.95.0.48 9 | nbproject/build-jaws-impl.xml.data.CRC32=33fbf6b9 10 | nbproject/build-jaws-impl.xml.script.CRC32=e8ee679a 11 | nbproject/build-jaws-impl.xml.stylesheet.CRC32=3fb929ac 12 | nbproject/profiler-build-impl.xml.data.CRC32=33fbf6b9 13 | nbproject/profiler-build-impl.xml.script.CRC32=abda56ed 14 | nbproject/profiler-build-impl.xml.stylesheet.CRC32=a5b6598e 15 | -------------------------------------------------------------------------------- /tda/nbproject/private/config.properties: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/nbproject/private/config.properties -------------------------------------------------------------------------------- /tda/nbproject/private/private.properties: -------------------------------------------------------------------------------- 1 | compile.on.save=true 2 | do.depend=false 3 | do.jar=true 4 | do.jlink=false 5 | javac.debug=true 6 | javadoc.preview=true 7 | jlink.strip=false 8 | user.properties.file=/home/irockel/snap/netbeans/common/data/12.0/build.properties 9 | -------------------------------------------------------------------------------- /tda/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/AbstractInfo.java 8 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/TDA.java 9 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/SunJDKParser.java 10 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/ThreadInfo.java 11 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/InfoDialog.java 12 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/doc/README 13 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/locale.properties 14 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/HelpOverviewDialog.java 15 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/utils/AppInfo.java 16 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/utils/ThreadsTableModel.java 17 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/utils/Browser.java 18 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/utils/ColoredTable.java 19 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/utils/ViewScrollPane.java 20 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/TableCategory.java 21 | file:/home/irockel/Entwicklung/tda/tda/test/java/com/pironet/tda/SunJDKParserTest.java 22 | file:/home/irockel/Entwicklung/tda/tda/src/java/com/pironet/tda/AbstractCategory.java 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /tda/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | debug.modulepath=\ 2 | ${run.modulepath} 3 | debug.test.modulepath=\ 4 | ${run.test.modulepath} 5 | javac.modulepath= 6 | javac.processormodulepath= 7 | javac.test.modulepath=\ 8 | ${javac.modulepath} 9 | javadoc.html5=false 10 | jlink.launcher=false 11 | jlink.launcher.name=tda 12 | #Sat May 11 17:15:08 ART 2019 13 | jnlp.offline-allowed=false 14 | javadoc.splitindex=true 15 | build.classes.excludes=**/*.java,**/*.form 16 | conf.jnlp=tda.jnlp 17 | jnlp.codebase.url=file\:/home/irockel/tda/tda/dist/ 18 | javadoc.author=false 19 | build.sysclasspath=ignore 20 | j2ee.platform=1.4 21 | jmx.jconsole.enabled=true 22 | dist.war=${dist.dir}/tda.war 23 | javac.target=1.8 24 | build.generated.dir=${build.dir}/generated 25 | file.reference.jconsole.jar=lib/jconsole.jar 26 | run.classpath=\ 27 | ${javac.classpath}:\ 28 | ${build.classes.dir} 29 | run.modulepath=\ 30 | ${javac.modulepath} 31 | run.test.modulepath=\ 32 | ${javac.test.modulepath} 33 | src.java.dir=src/java 34 | jmx.jconsole.use.classpath=true 35 | test.java.dir=test/java 36 | application.args= 37 | debug.test.classpath=${run.test.classpath} 38 | jnlp.descriptor=application 39 | jmx.rmi.port=1099 40 | build.dir=build 41 | javac.deprecation=false 42 | jnlp.signed=false 43 | jar.archive.disabled=${jnlp.enabled} 44 | junit.selected.version=4 45 | includes=** 46 | application.vendor=irockel 47 | mkdist.disabled=false 48 | jar.compress=true 49 | jmx.config.file= 50 | jnlp.mixed.code=default 51 | annotation.processing.processors.list= 52 | javac.external.vm=false 53 | javadoc.version=false 54 | build.classes.dir=${build.dir}/classes 55 | dist.dir=dist 56 | manifest.file=manifest.mf 57 | javac.source=1.8 58 | run.jvmargs=-Xmx320m -XX\:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote.port\=1090 -Dcom.sun.management.jmxremote.ssl\=false -Dcom.sun.management.jmxremote.authenticate\=false -Dawt.useSystemAAFontSettings\=lcd 59 | manifest.custom.permissions= 60 | run.test.classpath=\ 61 | ${javac.test.classpath}:\ 62 | ${build.test.classes.dir} 63 | build.generated.sources.dir=${build.dir}/generated-sources 64 | web.dir=web 65 | jnlp.signing= 66 | javadoc.notree=false 67 | src.none.dir=src/none 68 | dist.jar=${dist.dir}/tda.jar 69 | jmx.jconsole.classpath.plugins=true 70 | platform.active=default_platform 71 | annotation.processing.enabled=true 72 | main.class=com.pironet.tda.TDA 73 | dist.javadoc.dir=${dist.dir}/javadoc 74 | file.reference.src-java=src/java 75 | javadoc.additionalparam= 76 | auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml 77 | javac.classpath=\ 78 | ${file.reference.jconsole.jar} 79 | javadoc.noindex=false 80 | manifest.custom.codebase= 81 | annotation.processing.enabled.in.editor=false 82 | javadoc.private=false 83 | javadoc.encoding= 84 | build.test.classes.dir=${build.dir}/test/classes 85 | jar.index=${jnlp.enabled} 86 | javac.compilerargs= 87 | j2ee.server.type=Tomcat55 88 | jmx.jconsole.plugins.path= 89 | jmx.rmi.use.port=true 90 | jnlp.signing.keystore= 91 | meta.inf.dir=${src.dir}/META-INF 92 | annotation.processing.run.all.processors=true 93 | excludes= 94 | application.title=tda 95 | jnlp.codebase.type=local 96 | javac.processorpath=\ 97 | ${javac.classpath} 98 | build.test.results.dir=${build.dir}/test/results 99 | endorsed.classpath= 100 | javadoc.use=true 101 | jmx.jconsole.period=4 102 | javadoc.nonavbar=false 103 | jnlp.signing.alias= 104 | javadoc.windowtitle= 105 | javac.test.classpath=\ 106 | ${javac.classpath}:\ 107 | ${build.classes.dir}:\ 108 | ${libs.junit_4.classpath}:\ 109 | ${libs.hamcrest.classpath} 110 | jmx.rmi.enabled=false 111 | debug.classpath=${run.classpath} 112 | jnlp.enabled=false 113 | -------------------------------------------------------------------------------- /tda/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.java.j2seproject 4 | 5 | 6 | tda 7 | 1.6.5 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /tda/src/java/META-INF/services/com.sun.tools.jconsole.JConsolePlugin: -------------------------------------------------------------------------------- 1 | com.pironet.tda.jconsole.TDAPlugin 2 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/AbstractInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * AbstractInfo.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: AbstractInfo.java,v 1.1 2007-12-08 09:58:34 irockel Exp $ 21 | */ 22 | 23 | package com.pironet.tda; 24 | 25 | import java.io.Serializable; 26 | 27 | /** 28 | * abstract info for presenting node data in the main tree. 29 | * 30 | * @author irockel 31 | */ 32 | public abstract class AbstractInfo implements Serializable { 33 | private String name; 34 | 35 | /** 36 | * get the name of the node. 37 | * @return 38 | */ 39 | public String getName() { 40 | return name; 41 | } 42 | 43 | /** 44 | * set the name of the node. 45 | * @param name 46 | */ 47 | public void setName(String name) { 48 | this.name = name; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/Category.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * TDA is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * TDA is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with TDA; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: Category.java,v 1.19 2008-03-09 06:36:50 irockel Exp $ 19 | */ 20 | package com.pironet.tda; 21 | 22 | import com.pironet.tda.filter.FilterChecker; 23 | import java.util.Comparator; 24 | import java.util.EventListener; 25 | import javax.swing.Icon; 26 | import javax.swing.JComponent; 27 | import javax.swing.JScrollPane; 28 | import javax.swing.tree.DefaultMutableTreeNode; 29 | 30 | /** 31 | * 32 | * @author irockel 33 | */ 34 | public interface Category { 35 | 36 | /** 37 | * add the passed node to the category tree 38 | */ 39 | void addToCatNodes(DefaultMutableTreeNode node); 40 | 41 | /** 42 | * get the node at the given position 43 | * @param index the index to look up. 44 | * @return the node at the given index, null otherwise. 45 | */ 46 | public DefaultMutableTreeNode getNodeAt(int index); 47 | 48 | /** 49 | * return category tree with filtered child nodes 50 | */ 51 | JComponent getCatComponent(EventListener listener); 52 | 53 | /** 54 | * get the currently selected user object. 55 | * @return 56 | */ 57 | ThreadInfo getCurrentlySelectedUserObject(); 58 | 59 | FilterChecker getFilterChecker(); 60 | 61 | Icon getIcon(); 62 | 63 | /** 64 | * get the last view if there is one, null otherwise. 65 | * @return the last view 66 | */ 67 | JScrollPane getLastView(); 68 | 69 | String getName(); 70 | 71 | int getNodeCount(); 72 | 73 | /** 74 | * return amount of filtered nodes 75 | */ 76 | int howManyFiltered(); 77 | 78 | void setLastView(JScrollPane view); 79 | 80 | void setName(String value); 81 | 82 | int showing(); 83 | 84 | /** 85 | * sorts the category tree by the given comparator. 86 | * @param nodeComp 87 | */ 88 | void sort(Comparator nodeComp); 89 | 90 | void setInfo(String info); 91 | 92 | String getInfo(); 93 | 94 | } 95 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/CustomCategory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * CustomCategory.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: CustomCategory.java,v 1.1 2008-03-09 06:36:51 irockel Exp $ 21 | */ 22 | package com.pironet.tda; 23 | 24 | import com.pironet.tda.filter.Filter; 25 | import java.util.HashMap; 26 | import java.util.Iterator; 27 | import java.util.Map; 28 | 29 | /** 30 | * stores information for a custom category. 31 | * @author irockel 32 | */ 33 | public class CustomCategory { 34 | private String name = null; 35 | 36 | private Map filters = null; 37 | 38 | public CustomCategory(String name) { 39 | setName(name); 40 | } 41 | 42 | public String getName() { 43 | return name; 44 | } 45 | 46 | public void setName(String name) { 47 | this.name = name; 48 | } 49 | 50 | /** 51 | * get iterator over all filters for this custom category 52 | * @return 53 | */ 54 | public Iterator iterOfFilters() { 55 | return filters != null ? filters.values().iterator() : null; 56 | } 57 | 58 | /** 59 | * add filter to category filters 60 | * @param filter 61 | */ 62 | public void addToFilters(Filter filter) { 63 | if(filters == null) { 64 | filters = new HashMap(); 65 | } 66 | 67 | filters.put(filter.getName(), filter); 68 | } 69 | 70 | /** 71 | * checks if given name is in list of filters 72 | * @param name the key to check. 73 | * @return true if found, false otherwise. 74 | */ 75 | public boolean hasInFilters(String name) { 76 | return (filters != null ? filters.containsKey(name) : false); 77 | } 78 | 79 | /** 80 | * resets the filter set to null 81 | */ 82 | public void resetFilters() { 83 | filters = null; 84 | } 85 | 86 | public String toString() { 87 | return(getName()); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/DumpParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DumpParser.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * Foobar is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Foobar is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with Foobar; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: DumpParser.java,v 1.11 2007-11-27 09:42:20 irockel Exp $ 21 | */ 22 | 23 | package com.pironet.tda; 24 | 25 | import java.io.IOException; 26 | import java.io.InputStream; 27 | import java.util.Map; 28 | import javax.swing.tree.DefaultMutableTreeNode; 29 | import javax.swing.tree.MutableTreeNode; 30 | import javax.swing.tree.TreePath; 31 | 32 | /** 33 | * Dump Parser Interface, defines base methods for all dump parsers. 34 | * 35 | * @author irockel 36 | */ 37 | public interface DumpParser { 38 | public boolean hasMoreDumps(); 39 | 40 | public MutableTreeNode parseNext(); 41 | 42 | public void close() throws IOException; 43 | 44 | public void findLongRunningThreads(DefaultMutableTreeNode root, Map dumpStore, TreePath[] paths, int minOccurence, String regex); 45 | 46 | public void mergeDumps(DefaultMutableTreeNode root, Map dumpStore, TreePath[] dumps, int minOccurence, String regex); 47 | 48 | public boolean isFoundClassHistograms(); 49 | 50 | public void parseLoggcFile(InputStream loggcFileStream, DefaultMutableTreeNode root); 51 | 52 | public void setDumpHistogramCounter(int value); 53 | } 54 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/DumpStore.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DumpStore.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * Foobar is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Foobar is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: DumpStore.java,v 1.2 2007-11-01 14:59:39 irockel Exp $ 21 | */ 22 | package com.pironet.tda; 23 | 24 | import java.io.Serializable; 25 | import java.util.HashMap; 26 | import java.util.Iterator; 27 | import java.util.Map; 28 | 29 | /** 30 | * stores a tree of dump files 31 | * @author irockel 32 | */ 33 | public class DumpStore implements Serializable { 34 | 35 | private Map dumpFiles; 36 | 37 | /** 38 | * Creates a new instance of DumpStore 39 | */ 40 | public DumpStore() { 41 | } 42 | 43 | /** 44 | * add the found thread dumps of a dump file to dump store 45 | * @param key the key to store the thread dumps in, usually the file name 46 | * @param threadDumpsInFile new found thread dumps to add. 47 | */ 48 | public void addFileToDumpFiles(String key, Map threadDumpsInFile) { 49 | // first check if map is null, and if so, create new instance 50 | if(dumpFiles == null) { 51 | dumpFiles = new HashMap(); 52 | } 53 | if(threadDumpsInFile != null) { 54 | dumpFiles.put(key, threadDumpsInFile); 55 | } 56 | } 57 | 58 | /** 59 | * get the thread dumps for the specified file key from the store 60 | */ 61 | public Map getFromDumpFiles(String key) { 62 | return(dumpFiles != null ? (Map) dumpFiles.get(key) : null); 63 | } 64 | 65 | /** 66 | * get an iterator on the dumps file keys 67 | */ 68 | public Iterator iterOfDumpFilesKeys() { 69 | return(dumpFiles != null ? dumpFiles.keySet().iterator() : null); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/HeapInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * HeapInfo.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: HeapInfo.java,v 1.1 2008-08-13 15:52:19 irockel Exp $ 21 | */ 22 | 23 | package com.pironet.tda; 24 | 25 | /** 26 | * stores a heap information block for a thread dump 27 | * heap Information are only available for Sun JDK 1.6 so 28 | * far. 29 | * No parsing is done so far, the block is just stored "as-is". 30 | * @author irockel 31 | */ 32 | public class HeapInfo { 33 | private String heapInfo = null; 34 | 35 | public HeapInfo(String value) { 36 | this.heapInfo = value; 37 | } 38 | 39 | /** 40 | * @return the heapInfo 41 | */ 42 | public String getHeapInfo() { 43 | return heapInfo; 44 | } 45 | 46 | /** 47 | * @param heapInfo the heapInfo to set 48 | */ 49 | public void setHeapInfo(String heapInfo) { 50 | this.heapInfo = heapInfo; 51 | } 52 | 53 | public String toString() { 54 | StringBuffer info = new StringBuffer(); 55 | info.append(""); 56 | info.append("Heap Information:
"); 58 | info.append("
\n");
59 |         info.append(heapInfo);
60 |         info.append("
"); 61 | 62 | return(info.toString()); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/HistogramInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DumpGeneralInfo.java 3 | * 4 | * 5 | * This file is part of TDA - Thread Dump Analysis Tool. 6 | * 7 | * TDA is free software; you can redistribute it and/or modify 8 | * it under the terms of the Lesser GNU General Public License as published by 9 | * the Free Software Foundation; either version 2.1 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * TDA is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * Lesser GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the Lesser GNU General Public License 18 | * along with TDA; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 | * 21 | * $Id: HistogramInfo.java,v 1.1 2006-03-01 19:19:37 irockel Exp $ 22 | */ 23 | 24 | package com.pironet.tda; 25 | 26 | /** 27 | * 28 | * @author irockel 29 | */ 30 | public class HistogramInfo { 31 | public String threadDumpName; 32 | public Object content; 33 | 34 | public HistogramInfo(String name, Object content) { 35 | threadDumpName = name; 36 | this.content = content; 37 | } 38 | 39 | public String toString() { 40 | return threadDumpName; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/InfoDialog.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PreferencesDialog.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | 22 | package com.pironet.tda; 23 | 24 | import java.awt.BorderLayout; 25 | import java.awt.FlowLayout; 26 | import java.awt.event.ActionEvent; 27 | import java.awt.event.ActionListener; 28 | import javax.swing.JButton; 29 | import javax.swing.JDialog; 30 | import javax.swing.JFrame; 31 | import javax.swing.JLabel; 32 | import javax.swing.JPanel; 33 | 34 | /** 35 | * display copyright notice. 36 | * @author irockel 37 | */ 38 | public class InfoDialog extends JDialog { 39 | 40 | /** 41 | * Creates a new instance of PreferencesDialog 42 | */ 43 | public InfoDialog(JFrame owner) { 44 | super(owner, "About TDA", true); 45 | BorderLayout layout = new BorderLayout(); 46 | layout.setHgap(30); 47 | getContentPane().setLayout(layout); 48 | initPanel(); 49 | } 50 | 51 | private void initPanel() { 52 | BorderLayout upperLayout = new BorderLayout(); 53 | upperLayout.setVgap(10); 54 | upperLayout.setHgap(10); 55 | JPanel upperPane = new JPanel(upperLayout); 56 | upperPane.add(new JLabel(TDA.createImageIcon("tda-logo.png")), BorderLayout.CENTER); 57 | upperPane.add(new JLabel(" "), BorderLayout.EAST); 58 | upperPane.add(new JLabel(" "), BorderLayout.WEST); 59 | upperPane.add(new JLabel(""), BorderLayout.NORTH); 60 | upperPane.add(new JLabel(""), BorderLayout.SOUTH); 61 | getContentPane().add(upperPane, BorderLayout.NORTH); 62 | 63 | String info = "" + 64 | "

Java Version: " + System.getProperty("java.version") + "

" + 65 | "(C) 2006-2020 by Ingo Rockel <ingo.rockel@gmail.com>,
" + 66 | "with contributions from Robert Whitehurst <maestoso@java.net>.

" + 67 | "Icons used are based on Benno System Icons by Benno Meyer.
" + 68 | "Welcome screen uses icons from NuoveXT2 icon set by Alexandre Moore.
" + 69 | "Contains classes from JEdit for logfile display.


" + 70 | "

TDA is free software; you can redistribute it and/or modify it under
" + 71 | "the terms of the Lesser GNU General Public License as published by
" + 72 | "the Free Software Foundation; either version 2.1 of the License, or
" + 73 | "(at your option) any later version.


" + 74 | "TDA is distributed in the hope that it will be useful, but WITHOUT ANY
" + 75 | "WARRANTY; without even the implied warranty of MERCHANTABILITY or
" + 76 | "FITNESS FOR A PARTICULAR PURPOSE. See the Lesser GNU General Public
" + 77 | "License for more details.


"; 78 | 79 | getContentPane().add(new JLabel(info), BorderLayout.CENTER); 80 | getContentPane().add(new JLabel(""), BorderLayout.EAST); 81 | getContentPane().add(new JLabel(""), BorderLayout.WEST); 82 | JButton okButton = new JButton("Close"); 83 | okButton.addActionListener( new ActionListener() { 84 | public void actionPerformed(ActionEvent e) { 85 | dispose(); 86 | } 87 | }); 88 | JPanel buttonPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); 89 | buttonPanel.add(okButton); 90 | getContentPane().add(buttonPanel, BorderLayout.SOUTH); 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/LogFileContent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * LogFileContent.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * Foobar is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Foobar is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: LogFileContent.java,v 1.7 2008-01-16 11:33:27 irockel Exp $ 21 | */ 22 | 23 | package com.pironet.tda; 24 | 25 | import java.io.BufferedReader; 26 | import java.io.File; 27 | import java.io.FileReader; 28 | import java.io.IOException; 29 | import java.io.Serializable; 30 | import java.lang.ref.SoftReference; 31 | 32 | /** 33 | * logfile content info object of log file thread dump information. 34 | * @author irockel 35 | */ 36 | public class LogFileContent extends AbstractInfo implements Serializable { 37 | 38 | private String logFile; 39 | 40 | /** 41 | * stored as soft reference, as this content might get quite big. 42 | */ 43 | private transient SoftReference content; 44 | 45 | private transient StringBuffer contentBuffer; 46 | 47 | /** 48 | * Creates a new instance of LogFileContent 49 | */ 50 | public LogFileContent(String logFile) { 51 | setLogFile(logFile); 52 | } 53 | 54 | public String getLogfile() { 55 | return(logFile); 56 | } 57 | 58 | public void setLogFile(String value) { 59 | logFile = value; 60 | } 61 | 62 | public String toString() { 63 | return("Logfile"); 64 | } 65 | 66 | /** 67 | * get the content as string, it is stored as soft reference, 68 | * so it might be loaded from disk again, as the vm needed memory 69 | * after the last access to it. 70 | */ 71 | public String getContent() { 72 | if(contentBuffer == null) { 73 | if (content == null || content.get() == null) { 74 | readContent(); 75 | } 76 | 77 | return (((StringBuffer) content.get()).toString()); 78 | } else { 79 | return (contentBuffer.toString()); 80 | } 81 | } 82 | 83 | /** 84 | * append the given string to the content buffer for this logfile 85 | * @param append the string to append. 86 | */ 87 | public void appendToContentBuffer(String append) { 88 | if(contentBuffer == null) { 89 | contentBuffer = new StringBuffer(append); 90 | } else { 91 | contentBuffer.append("\n"); 92 | contentBuffer.append(append); 93 | } 94 | } 95 | 96 | /** 97 | * read the content in the soft reference object, currently used 98 | * StringBuffer to maintain 1.4 compability. Should be switched 99 | * to StringReader if switched to 1.5 for better performance as 100 | * synchronization is not needed here. 101 | */ 102 | private void readContent() { 103 | StringBuffer contentReader = new StringBuffer(); 104 | 105 | BufferedReader br = null; 106 | try { 107 | br = new BufferedReader(new FileReader(getLogfile())); 108 | while(br.ready()) { 109 | contentReader.append(br.readLine()); 110 | contentReader.append("\n"); 111 | } 112 | } catch (IOException ex) { 113 | ex.printStackTrace(); 114 | contentReader.append("The Logfile unavailable! " + ex.getMessage()); 115 | } finally { 116 | try { 117 | br.close(); 118 | } catch (IOException ex) { 119 | ex.printStackTrace(); 120 | } 121 | } 122 | content = new SoftReference(contentReader); 123 | } 124 | 125 | } 126 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/Logfile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Logfile.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * Foobar is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Foobar is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: Logfile.java,v 1.8 2008-02-16 18:00:24 irockel Exp $ 21 | */ 22 | 23 | package com.pironet.tda; 24 | 25 | /** 26 | * root node info object of log file thread dump information 27 | * @author irockel 28 | */ 29 | public class Logfile extends AbstractInfo { 30 | private String content; 31 | private DumpParser usedParser; 32 | 33 | /** 34 | * Creates a new instance of Logfile 35 | */ 36 | public Logfile(String value) { 37 | content = value; 38 | setName(value); 39 | } 40 | 41 | /** 42 | * returns the text content of this node 43 | */ 44 | public Object getContent() { 45 | return content; 46 | } 47 | 48 | public String toString() { 49 | return((String) getContent()); 50 | } 51 | 52 | /** 53 | * return the parser used in this log file 54 | * @return used parser, null if no dump was found in log file. 55 | */ 56 | public DumpParser getUsedParser() { 57 | return(usedParser); 58 | } 59 | 60 | /** 61 | * set the used parser to the passed parser. Method can only be 62 | * called once during lifetime of object. 63 | * @param parser new parser. 64 | */ 65 | public void setUsedParser(DumpParser parser) { 66 | if(usedParser == null) { 67 | usedParser = parser; 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/ThreadInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ThreadDumpInfo.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: ThreadInfo.java,v 1.9 2008-03-13 21:16:08 irockel Exp $ 21 | */ 22 | 23 | package com.pironet.tda; 24 | 25 | /** 26 | * Info (name, content tuple) for thread dump display tree. 27 | * 28 | * @author irockel 29 | */ 30 | public class ThreadInfo extends AbstractInfo { 31 | private String content; 32 | private String info; 33 | private int stackLines; 34 | private String[] tokens; 35 | private boolean aLotOfWaiting; 36 | private int childCount; 37 | 38 | public ThreadInfo(String name, String info, String content, int stackLines, String[] tableTokens) { 39 | setName(name); 40 | this.info = info; 41 | this.content = content; 42 | this.stackLines = stackLines; 43 | tokens = tableTokens; 44 | } 45 | 46 | public String toString() { 47 | return getName(); 48 | } 49 | 50 | public String getContent() { 51 | return content; 52 | } 53 | 54 | public void setContent(String content) { 55 | this.content = content; 56 | } 57 | 58 | public String getInfo() { 59 | return info; 60 | } 61 | 62 | public void setInfo(String info) { 63 | this.info = info; 64 | } 65 | 66 | public int getStackLines() { 67 | return stackLines; 68 | } 69 | 70 | public void setStackLines(int stackLines) { 71 | this.stackLines = stackLines; 72 | } 73 | 74 | public String[] getTokens() { 75 | return(tokens); 76 | } 77 | 78 | public void setALotOfWaiting(boolean b) { 79 | aLotOfWaiting = b; 80 | } 81 | 82 | public boolean areALotOfWaiting() { 83 | return(aLotOfWaiting); 84 | } 85 | 86 | public void setChildCount(int childCount) { 87 | this.childCount = childCount; 88 | } 89 | 90 | public int getChildCount() { 91 | return childCount; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/WrappedSunJDKParser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * WrappedSunJDKParser.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * Foobar is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Foobar is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with Foobar; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | */ 21 | package com.pironet.tda; 22 | 23 | import java.io.BufferedReader; 24 | import java.io.IOException; 25 | import java.util.Map; 26 | 27 | import com.pironet.tda.utils.DateMatcher; 28 | 29 | public class WrappedSunJDKParser extends SunJDKParser { 30 | 31 | /** 32 | * Creates a new instance of WrappedSunJDKParser: A SunJDKParser reading a log 33 | * file created by the Tanuki Service Wrapper. 34 | */ 35 | public WrappedSunJDKParser(BufferedReader bis, Map threadStore, int lineCounter, 36 | boolean withCurrentTimeStamp, int startCounter, DateMatcher dm) { 37 | super(bis, threadStore, lineCounter, withCurrentTimeStamp, startCounter, dm); 38 | } 39 | 40 | /** 41 | * check if the passed logline contains the beginning of a sun jdk thread 42 | * dump. 43 | * 44 | * @param logLine the line of the logfile to test 45 | * @return true, if the start of a sun thread dump is detected. 46 | */ 47 | public static boolean checkForSupportedThreadDump(String logLine) { 48 | return logLine.startsWith("INFO | jvm ") 49 | && logLine.trim().indexOf(" | Full thread dump") >= 0; 50 | } 51 | 52 | protected String getNextLine() throws IOException { 53 | return getBis().readLine().substring(42); 54 | } 55 | 56 | 57 | } 58 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/doc/fileopen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/doc/fileopen.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/doc/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/doc/help.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/doc/important.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/doc/important.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/doc/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/doc/info.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/doc/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/doc/settings.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/doc/stylesheet.css: -------------------------------------------------------------------------------- 1 | /* Javadoc style sheet */ 2 | 3 | /* Define colors, fonts and other style attributes here to override the defaults */ 4 | 5 | /* Page background color */ 6 | 7 | body { font-family: Verdana, Arial, Helvetica; font-size: 10px; margin-left: 15px; } 8 | 9 | body,h1,h2,h3,i,p,td,th,tt,ol,ul,div { font-family: Verdana, Arial, Helvetica; } 10 | 11 | 12 | h1,h2,h3,h4,h5 { font-weight: bold; } 13 | h1 { font-size: 20px; color: #2c2b27; } 14 | h2 { font-size: 18px; color: #2c2b27; } 15 | h3 { font-size: 16px; color: #969494; } 16 | h4 { font-size: 14px; color: #969494; } 17 | h5 { font-size: 12px; color: #969494; } 18 | 19 | BODY,P,TD { font-family: Verdana, Arial, Helvetica; font-size: 10px; } /*letter-spacing:0.2mm; word-spacing:0.8mm; */ 20 | TD { vertical-align:top; } 21 | HR { width:100%; height:1px; margin-bottom:8pt; border:0px; } 22 | 23 | A:link { color: #9C3300; text-decoration: underline; font-weight: normal;} 24 | A:visited { color: #9C3300; text-decoration: underline; font-weight: normal;} 25 | A:active { color: #9C3300; text-decoration: underline; font-weight: normal;} 26 | A:hover { color: #9C3300; text-decoration: none; font-weight: normal;} 27 | 28 | /* Headings */ 29 | h1 { font-size: 145% } 30 | table.topindex { } 31 | td { border-width:1px; border-style:solid; border-color:#ffffff; } 32 | /* Table colors */ 33 | .TableHeadingColor { background: #f0f0f3 } /* Dark mauve */ 34 | .TableSubHeadingColor { background: #FBEFE8 } /* Light mauve */ 35 | .TableRowColor { background: #FFFFFF } /* White */ 36 | 37 | /* Font used in left-hand frame lists */ 38 | .FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif} 39 | .FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } 40 | .FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif } 41 | 42 | 43 | /* Navigation bar fonts and colors */ 44 | .NavBarCell1 { background-color:#FBEFE8;} /* Light mauve */ 45 | .NavBarCell1Rev { background-color:#E37B55;} /* Dark Blue */ 46 | .NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;} 47 | .NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;} 48 | 49 | .NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} 50 | .NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF;} 51 | 52 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/doc/tips.properties: -------------------------------------------------------------------------------- 1 | # Tips of the day. 2 | tips.count=5 3 | tip.0=If you open a logfile with thread dumps you should check the thread dump nodes if there was anything special detected about this dump. 4 | tip.1=Using Filters you can easily filter out uninteresting threads, like e.g. sleeping pool threads. Click on the Filters on the right to set up filters. 5 | tip.2=Using the long running thread detection after selected several thread dumps you can get an overview of threads which are active in all threads. 6 | tip.3=You can define custom categories, e.g. "Application Server Requests Threads", which displays all request threads found in a dump. Categories use filters to present the data. If a category is empty it is not displayed. 7 | tip.4=TDA can also be used as JConsole or VisualVM plugin, see Help Contents for further information. -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/doc/welcome.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 45 |
Copyright 2006-2016 - Ingo Rockel <ingo.rockel@gmail.com>
12 |
13 | 14 | 15 | 18 | 19 | 20 |

Tip of the day


16 |


17 |
21 |
22 |
23 | 24 | 29 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 |
Actions
Open Logfile...
25 | 26 | 27 |
28 |
Open Session...
30 | 31 | 32 |
33 |
Configuration
Preferences
Filters
Categories
Help
TDA on GitHub
Wiki
46 | 47 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/About.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/About.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/CloseFile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/CloseFile.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Collapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Collapsed.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/CustomCat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/CustomCat.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Deadlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Deadlock.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/DiffDumps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/DiffDumps.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Document.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Empty.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Empty.gif -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Expanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Expanded.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/FileOpen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/FileOpen.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Filters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Filters.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/FindLRThreads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/FindLRThreads.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Help.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Histogram.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/LogfileContent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/LogfileContent.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Monitor.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/MonitorRed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/MonitorRed.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Monitors-nolocks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Monitors-nolocks.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Monitors.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Monitors.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Preferences.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Preferences.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Root.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Root.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/TDA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/TDA.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Thread.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Thread.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/ThreadDump.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/ThreadDump.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/Threads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/Threads.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/ThreadsLocking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/ThreadsLocking.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/ThreadsSleeping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/ThreadsSleeping.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/ThreadsWaiting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/ThreadsWaiting.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/splash.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/icons/tda-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/java/com/pironet/tda/icons/tda-logo.png -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/locale.properties: -------------------------------------------------------------------------------- 1 | # i18n properties/English. 2 | # 3 | # This file is part of TDA - Thread Dump Analysis Tool. 4 | # 5 | # Foobar is free software; you can redistribute it and/or modify 6 | # it under the terms of the Lesser GNU General Public License as published by 7 | # the Free Software Foundation; either version 2.1 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # Foobar is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # Lesser GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the Lesser GNU General Public License 16 | # along with TDA; if not, write to the Free Software 17 | # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 | # 19 | # $Id: locale.properties,v 1.5 2008-09-19 12:52:09 irockel Exp $ 20 | # 21 | # common translations 22 | ok.button=Ok 23 | cancel.button=Cancel 24 | 25 | # Main Menu 26 | file.menu=File 27 | file.menu.mnem=F 28 | file.menu.description=File Menu 29 | file.open=Open... 30 | file.open.mnem=O 31 | file.open.accel=alt O 32 | file.open.description=Open Log File with dumps. 33 | file.close=Close... 34 | file.close.mnem=C 35 | file.close.description=Close currently selected dump file. 36 | file.closeall=Close all... 37 | file.closeall.mnem=A 38 | file.closeall.description=Close all open dump files. 39 | file.recentfiles=Open recent file 40 | file.recentfiles.mnem=R 41 | file.recentfiles.description=Open recent file. 42 | file.getfromclipboard=Get Logfile from clipboard 43 | file.getfromclipboard.mnem=L 44 | file.getfromclipboard.accel=alt P 45 | file.getfromclipboard.description=Fetch a logfile with dumps from clipboard 46 | file.savesession=Save Session... 47 | file.savesession.mnem=S 48 | file.savesession.description=Save the current session of loaded log files. 49 | file.opensession=Open Session... 50 | file.opensession.mnem=P 51 | file.opensession.description=Open a stored session of logfiles. 52 | file.recentsessions=Open recent session 53 | file.recentsessions.mnem=C 54 | file.recentsessions.description=Open recent session. 55 | file.preferences=Preferences 56 | file.preferences.mnem=P 57 | file.preferences.description=Set Preferences. 58 | file.exit=Exit TDA 59 | file.exit.mnem=X 60 | file.exit.accel=alt X 61 | file.exit.description=Exit TDA. 62 | 63 | view.menu=View 64 | view.menu.mnem=V 65 | view.menu.description=View Menu 66 | view.expand=Expand all Dump nodes 67 | view.expand.mnem=E 68 | view.expand.accel=alt E 69 | view.expand.description=Expand all Dump nodes. 70 | view.collapse=Collapse all Dump nodes 71 | view.collapse.mnem=C 72 | view.collapse.accel=alt C 73 | view.collapse.description=Collapse all Dump nodes. 74 | view.showtoolbar=Show Toolbar 75 | view.showtoolbar.mnem=S 76 | 77 | tools.menu=Tools 78 | tools.menu.mnem=T 79 | tools.menu.description=Tools Menu 80 | tools.longrunning=Find long running threads... 81 | tools.longrunning.mnem=L 82 | tools.longrunning.accel=alt L 83 | tools.longrunning.description=Find long running threads. 84 | tools.filters=Filters 85 | tools.filters.mnem=F 86 | tools.filters.accel=alt F 87 | tools.filters.description=Thread Filters. 88 | 89 | help.menu=Help 90 | help.menu.mnem=H 91 | help.menu.description=Help Menu 92 | help.contents=Contents 93 | help.contents.mnem=C 94 | help.contents.accel=F1 95 | help.contents.description=Help Contents 96 | 97 | # Edit/Add Custom Category 98 | customcategory.add.button=< Add 99 | customcategory.remove.button=Remove > 100 | customcategory.name.label=Name 101 | customcategory.availfilter.label=Available Filters 102 | customcategory.catfilter.label=Category Filters 103 | 104 | 105 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/AppInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * AppInfo.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | */ 20 | package com.pironet.tda.utils; 21 | 22 | /** 23 | * provides static application information like name and version 24 | * @author irockel 25 | */ 26 | public class AppInfo { 27 | private static final String APP_SHORT_NAME = "TDA"; 28 | private static final String APP_FULL_NAME = "Thread Dump Analyzer"; 29 | private static final String VERSION = "2.4"; 30 | 31 | private static final String COPYRIGHT = "2006-2020"; 32 | 33 | /** 34 | * get info text for status bar if no real info is displayed. 35 | */ 36 | public static String getStatusBarInfo() { 37 | return(APP_SHORT_NAME + " - " + APP_FULL_NAME + " " + VERSION); 38 | } 39 | 40 | public static String getAppInfo() { 41 | return(APP_SHORT_NAME + " - " + APP_FULL_NAME); 42 | } 43 | 44 | public static String getVersion() { 45 | return(VERSION); 46 | } 47 | 48 | public static String getCopyright() { 49 | return(COPYRIGHT); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/Browser.java: -------------------------------------------------------------------------------- 1 | /** 2 | * class Browser Copyright (C) 1999-2001 Fredrik Ehnbom 3 | * available at 4 | * 5 | * used under the terms of the GNU public license 6 | * 7 | * Launches the default browser of the current OS with the supplied URL. 8 | * 9 | * $Id: Browser.java,v 1.1 2007-05-03 09:18:07 irockel Exp $ 10 | */ 11 | package com.pironet.tda.utils; 12 | 13 | import java.io.IOException; 14 | 15 | /** 16 | * helper class for launching the default browser 17 | */ 18 | public class Browser { 19 | 20 | /** 21 | * Starts the default browser for the current platform. 22 | * 23 | * @param url The link to point the browser to. 24 | */ 25 | public static void open(String url) throws InterruptedException, IOException { 26 | String cmd = null; 27 | 28 | if (isWindows()) { 29 | cmd = ("rundll32 url.dll,FileProtocolHandler " + maybeFixupURLForWindows(url)); 30 | Runtime.getRuntime().exec(cmd); 31 | } else { 32 | if(System.getenv("BROWSER") != null) { 33 | cmd = System.getenv("BROWSER") + " " + url; 34 | } else { 35 | cmd = "firefox -remote openURL(" + url + ")"; 36 | } 37 | Process p = Runtime.getRuntime().exec(cmd); 38 | int exitcode = p.waitFor(); 39 | if (exitcode != 0) { 40 | cmd = "firefox " + url; 41 | Runtime.getRuntime().exec(cmd); 42 | } 43 | } 44 | } 45 | 46 | /** 47 | * If the default browser is Internet Explorer 5.0 or greater, 48 | * the URL.DLL program fails if the url ends with .htm or .html . 49 | * This problem is described by Microsoft at 50 | * http://support.microsoft.com/support/kb/articles/Q283/2/25.ASP 51 | * Of course, their suggested workaround is to use the classes from the 52 | * microsoft Java SDK, but fortunately another workaround does exist. 53 | * If you alter the url slightly so it no longer ends with ".htm", 54 | * the URL can launch successfully. The logic here appends a null query 55 | * string onto the end of the URL if none is already present, or 56 | * a bogus query parameter if there is already a query string ending in 57 | * ".htm" 58 | */ 59 | private static String maybeFixupURLForWindows(String url) { 60 | // plain filenames (e.g. c:\some_file.html or \\server\filename) do 61 | // not need fixing. 62 | if (url == null || url.length() < 2 || url.charAt(0) == '\\' || url.charAt(1) == ':') 63 | return url; 64 | String lower_url = url.toLowerCase(); 65 | int i = badEndings.length; 66 | while (i-- > 0) 67 | if (lower_url.endsWith(badEndings[i])) 68 | return fixupURLForWindows(url); 69 | return url; 70 | } 71 | 72 | static final String[] badEndings = { ".htm", ".html", ".htw", ".mht", ".cdf", ".mhtml", ".stm" }; 73 | 74 | private static String fixupURLForWindows(String url) { 75 | if (url.indexOf('?') == -1) 76 | return url + "?"; 77 | else return url + "&workaroundStupidWindowsBug"; 78 | } 79 | 80 | /** 81 | * Checks if the OS is windows. 82 | * 83 | * @return true if it is, false if it's not. 84 | */ 85 | public static boolean isWindows() { 86 | if (System.getProperty("os.name").indexOf("Windows") != -1) { 87 | return true; } else { return false; } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/ColoredTable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * ColoredTable.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: ColoredTable.java,v 1.2 2008-01-10 20:36:11 irockel Exp $ 21 | */ 22 | package com.pironet.tda.utils; 23 | 24 | import java.awt.Color; 25 | import javax.swing.JTable; 26 | import javax.swing.table.DefaultTableCellRenderer; 27 | import javax.swing.table.TableCellRenderer; 28 | import javax.swing.table.TableModel; 29 | 30 | /** 31 | * GrayWhiteTable renders its rows with a sequential color combination of white 32 | * and gray. Rows with even indicies are rendered white, odd indicies light grey. 33 | * Note: Do not use GrayWhiteTable for tables with custom renderers such as 34 | * check boxes. Use JTable instead and modify DefaultTableCellRenderer. Just keep 35 | * in mind that in order to display a table with more than 1 row colors, you 36 | * must have 2 separate intances of the renderer, one for each color. 37 | * 38 | * @author irockel 39 | */ 40 | public class ColoredTable extends JTable { 41 | 42 | private DefaultTableCellRenderer whiteRenderer; 43 | private DefaultTableCellRenderer grayRenderer; 44 | 45 | public ColoredTable() { 46 | super(); 47 | } 48 | 49 | public ColoredTable(TableModel tm) { 50 | super(tm); 51 | } 52 | 53 | public ColoredTable(Object[][] data, Object[] columns) { 54 | super(data, columns); 55 | } 56 | 57 | public ColoredTable(int rows, int columns) { 58 | super(rows, columns); 59 | } 60 | 61 | /** 62 | * If row is an even number, getCellRenderer() returns a DefaultTableCellRenderer 63 | * with white background. For odd rows, this method returns a DefaultTableCellRenderer 64 | * with a light gray background. 65 | */ 66 | public TableCellRenderer getCellRenderer(int row, int column) { 67 | if (whiteRenderer == null) { 68 | whiteRenderer = new DefaultTableCellRenderer(); 69 | whiteRenderer.setBackground(Color.WHITE); 70 | whiteRenderer.setForeground(Color.BLACK); 71 | } 72 | 73 | if (grayRenderer == null) { 74 | grayRenderer = new DefaultTableCellRenderer(); 75 | grayRenderer.setBackground(new Color(240, 240, 240)); 76 | grayRenderer.setForeground(Color.BLACK); 77 | } 78 | 79 | if ((row % 2) == 0) { 80 | return whiteRenderer; 81 | } else { 82 | return grayRenderer; 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/IconFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * IconFactory.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: IconFactory.java,v 1.2 2008-03-12 09:50:53 irockel Exp $ 21 | */ 22 | package com.pironet.tda.utils; 23 | 24 | import com.pironet.tda.TDA; 25 | import javax.swing.Icon; 26 | 27 | /** 28 | * icon factory for the tree icons. 29 | * @author irockel 30 | */ 31 | public class IconFactory { 32 | public static IconFactory iconFactory; 33 | 34 | public static final int THREADS = 0; 35 | public static final int THREADS_WAITING = 1; 36 | public static final int THREADS_SLEEPING = 2; 37 | public static final int THREADS_LOCKING = 3; 38 | public static final int DEADLOCKS = 4; 39 | public static final int DIFF_DUMPS = 5; 40 | public static final int MONITORS = 6; 41 | public static final int MONITORS_NOLOCKS = 7; 42 | public static final int CUSTOM_CATEGORY = 8; 43 | 44 | private final Icon[] icons = { TDA.createImageIcon("Threads.png"), 45 | TDA.createImageIcon("ThreadsWaiting.png"), 46 | TDA.createImageIcon("ThreadsSleeping.png"), 47 | TDA.createImageIcon("ThreadsLocking.png"), 48 | TDA.createImageIcon("Deadlock.png"), 49 | TDA.createImageIcon("DiffDumps.png"), 50 | TDA.createImageIcon("Monitors.png"), 51 | TDA.createImageIcon("Monitors-nolocks.png"), 52 | TDA.createImageIcon("CustomCat.png") 53 | }; 54 | 55 | public static IconFactory get() { 56 | if(iconFactory == null) { 57 | iconFactory = new IconFactory(); 58 | } 59 | 60 | return(iconFactory); 61 | } 62 | 63 | private IconFactory() { 64 | // private empty constructor 65 | } 66 | 67 | public Icon getIconFor(int index) { 68 | return(icons[index]); 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/MonitorComparator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * MonitorComparator.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: MonitorComparator.java,v 1.2 2007-11-22 14:47:24 irockel Exp $ 21 | */ 22 | package com.pironet.tda.utils; 23 | 24 | import java.util.Comparator; 25 | import javax.swing.tree.DefaultMutableTreeNode; 26 | 27 | import com.pironet.tda.ThreadInfo; 28 | 29 | /** 30 | * compares monitor nodes based on the amount of threads refering to the monitors. 31 | * It return 0 for two monitors having the same amount of threads refering to them. 32 | * Using this in a TreeSet is not feasible as only one thread of on thread amount 33 | * refering to it would survive, the others would be lost. 34 | * 35 | * @author irockel 36 | */ 37 | public class MonitorComparator implements Comparator { 38 | 39 | /** 40 | * compares two monitor nodes based on the amount of threads refering to the monitors. 41 | * @param arg0 first monitor node 42 | * @param arg1 second monitor node 43 | * @return difference between amount of refering threads. 44 | */ 45 | public int compare(Object arg0, Object arg1) { 46 | if (arg0 instanceof DefaultMutableTreeNode && arg1 instanceof DefaultMutableTreeNode) { 47 | DefaultMutableTreeNode firstNode = (DefaultMutableTreeNode) arg0; 48 | DefaultMutableTreeNode secondNode = (DefaultMutableTreeNode) arg1; 49 | Object o1 = firstNode.getUserObject(); 50 | Object o2 = secondNode.getUserObject(); 51 | if (o1 instanceof ThreadInfo && o2 instanceof ThreadInfo) { 52 | return ((ThreadInfo) o2).getChildCount() - ((ThreadInfo) o1).getChildCount(); 53 | } 54 | return (secondNode.getChildCount() - firstNode.getChildCount()); 55 | } 56 | return (0); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/MonitorsTableModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | package com.pironet.tda.utils; 7 | 8 | //import org.jdesktop.swingx.treetable.AbstractTreeTableModel; 9 | 10 | /** 11 | * 12 | * @author irockel 13 | */ 14 | public class MonitorsTableModel {//extends AbstractTreeTableModel { 15 | 16 | public int getColumnCount() { 17 | throw new UnsupportedOperationException("Not supported yet."); 18 | } 19 | 20 | public Object getValueAt(Object arg0, int arg1) { 21 | throw new UnsupportedOperationException("Not supported yet."); 22 | } 23 | 24 | public Object getChild(Object parent, int index) { 25 | throw new UnsupportedOperationException("Not supported yet."); 26 | } 27 | 28 | public int getChildCount(Object parent) { 29 | throw new UnsupportedOperationException("Not supported yet."); 30 | } 31 | 32 | public int getIndexOfChild(Object parent, Object child) { 33 | throw new UnsupportedOperationException("Not supported yet."); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/ResourceManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | package com.pironet.tda.utils; 7 | 8 | import java.util.ResourceBundle; 9 | 10 | /** 11 | * 12 | * @author irockel 13 | */ 14 | public class ResourceManager { 15 | private static ResourceBundle locale; 16 | 17 | public static String translate(String key) { 18 | if(locale == null) { 19 | locale = ResourceBundle.getBundle("com/pironet/tda/locale"); 20 | } 21 | 22 | return(locale.getString(key)); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/ThreadsTableSelectionModel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this template, choose Tools | Templates 3 | * and open the template in the editor. 4 | */ 5 | 6 | package com.pironet.tda.utils; 7 | 8 | import javax.swing.DefaultListSelectionModel; 9 | import javax.swing.JTable; 10 | 11 | /** 12 | * 13 | * @author irockel 14 | */ 15 | public class ThreadsTableSelectionModel extends DefaultListSelectionModel { 16 | private JTable table = null; 17 | 18 | public ThreadsTableSelectionModel(JTable table) { 19 | this.table = table; 20 | 21 | } 22 | 23 | public JTable getTable() { 24 | return(table); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/TipOfDay.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TipOfDay.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: TipOfDay.java,v 1.1 2008-09-16 20:46:27 irockel Exp $ 21 | */ 22 | package com.pironet.tda.utils; 23 | 24 | import com.pironet.tda.TDA; 25 | import java.io.IOException; 26 | import java.util.Properties; 27 | import java.util.Random; 28 | 29 | /** 30 | * read random tip of day from tips.properties. 31 | * 32 | * @author irockel 33 | */ 34 | public class TipOfDay { 35 | private static Properties tips; 36 | private static int tipsCount = 0; 37 | private static Random rand = new Random(); 38 | 39 | public static String getTipOfDay() { 40 | if(tips == null) { 41 | loadTips(); 42 | } 43 | return(tips.getProperty("tip." + (rand.nextInt(tipsCount)))); 44 | } 45 | 46 | private static void loadTips() { 47 | tips = new Properties(); 48 | try { 49 | tips.load(TDA.class.getResourceAsStream("doc/tips.properties")); 50 | } catch (IOException ex) { 51 | ex.printStackTrace(); 52 | } 53 | tipsCount = Integer.parseInt(tips.getProperty("tips.count")); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/ViewScrollPane.java: -------------------------------------------------------------------------------- 1 | /* 2 | * PreferencesDialog.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * TDA is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * TDA is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with TDA; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: ViewScrollPane.java,v 1.1 2008-04-27 20:31:14 irockel Exp $ 21 | */ 22 | package com.pironet.tda.utils; 23 | 24 | import java.awt.Color; 25 | import java.awt.Component; 26 | import javax.swing.BorderFactory; 27 | import javax.swing.JScrollPane; 28 | 29 | /** 30 | * custom scroll pane to be used in tda for consistent look and feel in the tool. 31 | * 32 | * @author irockel 33 | */ 34 | public class ViewScrollPane extends JScrollPane { 35 | 36 | /** 37 | * constructor for the view scroll pane 38 | * 39 | * @param comp the component to wrap into the scroll pane 40 | * @param white true, if the scrollpane should be in flat white. 41 | */ 42 | public ViewScrollPane(Component comp, boolean white) { 43 | super(comp); 44 | if(white) { 45 | setOpaque(true); 46 | setBorder(BorderFactory.createEmptyBorder()); 47 | setBackground(Color.WHITE); 48 | getHorizontalScrollBar().setBackground(Color.WHITE); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/jedit/KeywordMap.java: -------------------------------------------------------------------------------- 1 | /* 2 | * KeywordMap.java - Fast keyword->id map 3 | * Copyright (C) 1998, 1999 Slava Pestov 4 | * Copyright (C) 1999 Mike Dillon 5 | * 6 | * You may use and modify this package for any purpose. Redistribution is 7 | * permitted, in both source and binary form, provided that this notice 8 | * remains intact in all source distributions of this package. 9 | */ 10 | package com.pironet.tda.utils.jedit; 11 | 12 | import javax.swing.text.Segment; 13 | 14 | /** 15 | * A KeywordMap is similar to a hashtable in that it maps keys 16 | * to values. However, the `keys' are Swing segments. This allows lookups of 17 | * text substrings without the overhead of creating a new string object. 18 | *

19 | * This class is used by CTokenMarker to map keywords to ids. 20 | * 21 | * @author Slava Pestov, Mike Dillon 22 | * @version $Id: KeywordMap.java,v 1.1 2007-10-03 12:50:26 irockel Exp $ 23 | */ 24 | public class KeywordMap 25 | { 26 | /** 27 | * Creates a new KeywordMap. 28 | * @param ignoreCase True if keys are case insensitive 29 | */ 30 | public KeywordMap(boolean ignoreCase) 31 | { 32 | this(ignoreCase, 52); 33 | this.ignoreCase = ignoreCase; 34 | } 35 | 36 | /** 37 | * Creates a new KeywordMap. 38 | * @param ignoreCase True if the keys are case insensitive 39 | * @param mapLength The number of `buckets' to create. 40 | * A value of 52 will give good performance for most maps. 41 | */ 42 | public KeywordMap(boolean ignoreCase, int mapLength) 43 | { 44 | this.mapLength = mapLength; 45 | this.ignoreCase = ignoreCase; 46 | map = new Keyword[mapLength]; 47 | } 48 | 49 | /** 50 | * Looks up a key. 51 | * @param text The text segment 52 | * @param offset The offset of the substring within the text segment 53 | * @param length The length of the substring 54 | */ 55 | public byte lookup(Segment text, int offset, int length) 56 | { 57 | if(length == 0) 58 | return Token.NULL; 59 | Keyword k = map[getSegmentMapKey(text, offset, length)]; 60 | while(k != null) 61 | { 62 | if(length != k.keyword.length) 63 | { 64 | k = k.next; 65 | continue; 66 | } 67 | if(SyntaxUtilities.regionMatches(ignoreCase,text,offset, 68 | k.keyword)) 69 | return k.id; 70 | k = k.next; 71 | } 72 | return Token.NULL; 73 | } 74 | 75 | /** 76 | * Adds a key-value mapping. 77 | * @param keyword The key 78 | * @param id The value 79 | */ 80 | public void add(String keyword, byte id) 81 | { 82 | int key = getStringMapKey(keyword); 83 | map[key] = new Keyword(keyword.toCharArray(),id,map[key]); 84 | } 85 | 86 | /** 87 | * Returns true if the keyword map is set to be case insensitive, 88 | * false otherwise. 89 | */ 90 | public boolean getIgnoreCase() 91 | { 92 | return ignoreCase; 93 | } 94 | 95 | /** 96 | * Sets if the keyword map should be case insensitive. 97 | * @param ignoreCase True if the keyword map should be case 98 | * insensitive, false otherwise 99 | */ 100 | public void setIgnoreCase(boolean ignoreCase) 101 | { 102 | this.ignoreCase = ignoreCase; 103 | } 104 | 105 | // protected members 106 | protected int mapLength; 107 | 108 | protected int getStringMapKey(String s) 109 | { 110 | return (Character.toUpperCase(s.charAt(0)) + 111 | Character.toUpperCase(s.charAt(s.length()-1))) 112 | % mapLength; 113 | } 114 | 115 | protected int getSegmentMapKey(Segment s, int off, int len) 116 | { 117 | return (Character.toUpperCase(s.array[off]) + 118 | Character.toUpperCase(s.array[off + len - 1])) 119 | % mapLength; 120 | } 121 | 122 | // private members 123 | class Keyword 124 | { 125 | public Keyword(char[] keyword, byte id, Keyword next) 126 | { 127 | this.keyword = keyword; 128 | this.id = id; 129 | this.next = next; 130 | } 131 | 132 | public char[] keyword; 133 | public byte id; 134 | public Keyword next; 135 | } 136 | 137 | private Keyword[] map; 138 | private boolean ignoreCase; 139 | } 140 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/jedit/SyntaxStyle.java: -------------------------------------------------------------------------------- 1 | /* 2 | * SyntaxStyle.java - A simple text style class 3 | * Copyright (C) 1999 Slava Pestov 4 | * 5 | * You may use and modify this package for any purpose. Redistribution is 6 | * permitted, in both source and binary form, provided that this notice 7 | * remains intact in all source distributions of this package. 8 | */ 9 | package com.pironet.tda.utils.jedit; 10 | 11 | import java.awt.*; 12 | import java.util.StringTokenizer; 13 | 14 | /** 15 | * A simple text style class. It can specify the color, italic flag, 16 | * and bold flag of a run of text. 17 | * @author Slava Pestov 18 | * @version $Id: SyntaxStyle.java,v 1.1 2007-10-03 12:50:26 irockel Exp $ 19 | */ 20 | public class SyntaxStyle 21 | { 22 | /** 23 | * Creates a new SyntaxStyle. 24 | * @param color The text color 25 | * @param italic True if the text should be italics 26 | * @param bold True if the text should be bold 27 | */ 28 | public SyntaxStyle(Color color, boolean italic, boolean bold) 29 | { 30 | this.color = color; 31 | this.italic = italic; 32 | this.bold = bold; 33 | } 34 | 35 | /** 36 | * Returns the color specified in this style. 37 | */ 38 | public Color getColor() 39 | { 40 | return color; 41 | } 42 | 43 | /** 44 | * Returns true if no font styles are enabled. 45 | */ 46 | public boolean isPlain() 47 | { 48 | return !(bold || italic); 49 | } 50 | 51 | /** 52 | * Returns true if italics is enabled for this style. 53 | */ 54 | public boolean isItalic() 55 | { 56 | return italic; 57 | } 58 | 59 | /** 60 | * Returns true if boldface is enabled for this style. 61 | */ 62 | public boolean isBold() 63 | { 64 | return bold; 65 | } 66 | 67 | /** 68 | * Returns the specified font, but with the style's bold and 69 | * italic flags applied. 70 | */ 71 | public Font getStyledFont(Font font) 72 | { 73 | if(font == null) 74 | throw new NullPointerException("font param must not" 75 | + " be null"); 76 | if(font.equals(lastFont)) 77 | return lastStyledFont; 78 | lastFont = font; 79 | lastStyledFont = new Font(font.getFamily(), 80 | (bold ? Font.BOLD : 0) 81 | | (italic ? Font.ITALIC : 0), 82 | font.getSize()); 83 | return lastStyledFont; 84 | } 85 | 86 | /** 87 | * Returns the font metrics for the styled font. 88 | */ 89 | public FontMetrics getFontMetrics(Font font) 90 | { 91 | if(font == null) 92 | throw new NullPointerException("font param must not" 93 | + " be null"); 94 | if(font.equals(lastFont) && fontMetrics != null) 95 | return fontMetrics; 96 | lastFont = font; 97 | lastStyledFont = new Font(font.getFamily(), 98 | (bold ? Font.BOLD : 0) 99 | | (italic ? Font.ITALIC : 0), 100 | font.getSize()); 101 | fontMetrics = Toolkit.getDefaultToolkit().getFontMetrics( 102 | lastStyledFont); 103 | return fontMetrics; 104 | } 105 | 106 | /** 107 | * Sets the foreground color and font of the specified graphics 108 | * context to that specified in this style. 109 | * @param gfx The graphics context 110 | * @param font The font to add the styles to 111 | */ 112 | public void setGraphicsFlags(Graphics gfx, Font font) 113 | { 114 | Font _font = getStyledFont(font); 115 | gfx.setFont(_font); 116 | gfx.setColor(color); 117 | } 118 | 119 | /** 120 | * Returns a string representation of this object. 121 | */ 122 | public String toString() 123 | { 124 | return getClass().getName() + "[color=" + color + 125 | (italic ? ",italic" : "") + 126 | (bold ? ",bold" : "") + "]"; 127 | } 128 | 129 | // private members 130 | private Color color; 131 | private boolean italic; 132 | private boolean bold; 133 | private Font lastFont; 134 | private Font lastStyledFont; 135 | private FontMetrics fontMetrics; 136 | } 137 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/jedit/TextAreaDefaults.java: -------------------------------------------------------------------------------- 1 | /* 2 | * $Id: TextAreaDefaults.java,v 1.3 2008-09-30 19:20:56 irockel Exp $ 3 | * 4 | * TextAreaDefaults.java - Encapsulates default values for various settings 5 | * Copyright (C) 1999 Slava Pestov 6 | * 7 | * You may use and modify this package for any purpose. Redistribution is 8 | * permitted, in both source and binary form, provided that this notice 9 | * remains intact in all source distributions of this package. 10 | */ 11 | package com.pironet.tda.utils.jedit; 12 | 13 | import javax.swing.JPopupMenu; 14 | import java.awt.Color; 15 | 16 | /** 17 | * Encapsulates default settings for a text area. This can be passed 18 | * to the constructor once the necessary fields have been filled out. 19 | * The advantage of doing this over calling lots of set() methods after 20 | * creating the text area is that this method is faster. 21 | */ 22 | public class TextAreaDefaults 23 | { 24 | private static TextAreaDefaults DEFAULTS; 25 | 26 | public InputHandler inputHandler; 27 | public SyntaxDocument document; 28 | public boolean editable; 29 | 30 | public boolean caretVisible; 31 | public boolean caretBlinks; 32 | public boolean blockCaret; 33 | public int electricScroll; 34 | 35 | public int cols; 36 | public int rows; 37 | public SyntaxStyle[] styles; 38 | public Color caretColor; 39 | public Color selectionColor; 40 | public Color lineHighlightColor; 41 | public boolean lineHighlight; 42 | public Color bracketHighlightColor; 43 | public boolean bracketHighlight; 44 | public Color eolMarkerColor; 45 | public boolean eolMarkers; 46 | public boolean paintInvalid; 47 | 48 | public JPopupMenu popup; 49 | 50 | /** 51 | * Returns a new TextAreaDefaults object with the default values filled 52 | * in. 53 | */ 54 | public static TextAreaDefaults getDefaults() 55 | { 56 | DEFAULTS = new TextAreaDefaults(); 57 | 58 | DEFAULTS.inputHandler = new DefaultInputHandler(); 59 | DEFAULTS.inputHandler.addDefaultKeyBindings(); 60 | DEFAULTS.document = new SyntaxDocument(); 61 | DEFAULTS.editable = true; 62 | 63 | DEFAULTS.caretVisible = true; 64 | DEFAULTS.caretBlinks = true; 65 | DEFAULTS.electricScroll = 3; 66 | 67 | DEFAULTS.cols = 80; 68 | DEFAULTS.rows = 5; 69 | DEFAULTS.styles = SyntaxUtilities.getDefaultSyntaxStyles(); 70 | DEFAULTS.caretColor = Color.red; 71 | DEFAULTS.selectionColor = new Color(0xccccff); 72 | DEFAULTS.lineHighlightColor = new Color(0xe0e0e0); 73 | DEFAULTS.lineHighlight = true; 74 | DEFAULTS.bracketHighlightColor = Color.black; 75 | DEFAULTS.bracketHighlight = true; 76 | DEFAULTS.eolMarkerColor = new Color(0x009999); 77 | DEFAULTS.eolMarkers = true; 78 | DEFAULTS.paintInvalid = true; 79 | 80 | return DEFAULTS; 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /tda/src/java/com/pironet/tda/utils/jedit/Token.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Token.java - Generic token 3 | * Copyright (C) 1998, 1999 Slava Pestov 4 | * 5 | * You may use and modify this package for any purpose. Redistribution is 6 | * permitted, in both source and binary form, provided that this notice 7 | * remains intact in all source distributions of this package. 8 | */ 9 | package com.pironet.tda.utils.jedit; 10 | 11 | /** 12 | * A linked list of tokens. Each token has three fields - a token 13 | * identifier, which is a byte value that can be looked up in the 14 | * array returned by SyntaxDocument.getColors() 15 | * to get a color value, a length value which is the length of the 16 | * token in the text, and a pointer to the next token in the list. 17 | * 18 | * @author Slava Pestov 19 | * @version $Id: Token.java,v 1.1 2007-10-03 12:50:26 irockel Exp $ 20 | */ 21 | public class Token 22 | { 23 | /** 24 | * Normal text token id. This should be used to mark 25 | * normal text. 26 | */ 27 | public static final byte NULL = 0; 28 | 29 | /** 30 | * Comment 1 token id. This can be used to mark a comment. 31 | */ 32 | public static final byte COMMENT1 = 1; 33 | 34 | /** 35 | * Comment 2 token id. This can be used to mark a comment. 36 | */ 37 | public static final byte COMMENT2 = 2; 38 | 39 | 40 | /** 41 | * Literal 1 token id. This can be used to mark a string 42 | * literal (eg, C mode uses this to mark "..." literals) 43 | */ 44 | public static final byte LITERAL1 = 3; 45 | 46 | /** 47 | * Literal 2 token id. This can be used to mark an object 48 | * literal (eg, Java mode uses this to mark true, false, etc) 49 | */ 50 | public static final byte LITERAL2 = 4; 51 | 52 | /** 53 | * Label token id. This can be used to mark labels 54 | * (eg, C mode uses this to mark ...: sequences) 55 | */ 56 | public static final byte LABEL = 5; 57 | 58 | /** 59 | * Keyword 1 token id. This can be used to mark a 60 | * keyword. This should be used for general language 61 | * constructs. 62 | */ 63 | public static final byte KEYWORD1 = 6; 64 | 65 | /** 66 | * Keyword 2 token id. This can be used to mark a 67 | * keyword. This should be used for preprocessor 68 | * commands, or variables. 69 | */ 70 | public static final byte KEYWORD2 = 7; 71 | 72 | /** 73 | * Keyword 3 token id. This can be used to mark a 74 | * keyword. This should be used for data types. 75 | */ 76 | public static final byte KEYWORD3 = 8; 77 | 78 | /** 79 | * Operator token id. This can be used to mark an 80 | * operator. (eg, SQL mode marks +, -, etc with this 81 | * token type) 82 | */ 83 | public static final byte OPERATOR = 9; 84 | 85 | /** 86 | * Invalid token id. This can be used to mark invalid 87 | * or incomplete tokens, so the user can easily spot 88 | * syntax errors. 89 | */ 90 | public static final byte INVALID = 10; 91 | 92 | /** 93 | * The total number of defined token ids. 94 | */ 95 | public static final byte ID_COUNT = 11; 96 | 97 | /** 98 | * The first id that can be used for internal state 99 | * in a token marker. 100 | */ 101 | public static final byte INTERNAL_FIRST = 100; 102 | 103 | /** 104 | * The last id that can be used for internal state 105 | * in a token marker. 106 | */ 107 | public static final byte INTERNAL_LAST = 126; 108 | 109 | /** 110 | * The token type, that along with a length of 0 111 | * marks the end of the token list. 112 | */ 113 | public static final byte END = 127; 114 | 115 | /** 116 | * The length of this token. 117 | */ 118 | public int length; 119 | 120 | /** 121 | * The id of this token. 122 | */ 123 | public byte id; 124 | 125 | /** 126 | * The next token in the linked list. 127 | */ 128 | public Token next; 129 | 130 | /** 131 | * Creates a new token. 132 | * @param length The length of the token 133 | * @param id The id of the token 134 | */ 135 | public Token(int length, byte id) 136 | { 137 | this.length = length; 138 | this.id = id; 139 | } 140 | 141 | /** 142 | * Returns a string representation of this token. 143 | */ 144 | public String toString() 145 | { 146 | return "[id=" + id + ",length=" + length + "]"; 147 | } 148 | } 149 | -------------------------------------------------------------------------------- /tda/src/none/resources/splash.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/none/resources/splash.xcf -------------------------------------------------------------------------------- /tda/src/none/resources/tda-logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/none/resources/tda-logo.xcf -------------------------------------------------------------------------------- /tda/src/none/resources/welcome-logo.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/src/none/resources/welcome-logo.xcf -------------------------------------------------------------------------------- /tda/test/java/RootSuite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * RootSuite.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * Foobar is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Foobar is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with Foobar; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: RootSuite.java,v 1.2 2007-11-06 09:36:37 irockel Exp $ 21 | */ 22 | import junit.framework.*; 23 | 24 | /** 25 | * 26 | * @author irockel 27 | */ 28 | public class RootSuite extends TestCase { 29 | 30 | public RootSuite(String testName) { 31 | super(testName); 32 | } 33 | 34 | protected void setUp() throws Exception { 35 | } 36 | 37 | protected void tearDown() throws Exception { 38 | } 39 | 40 | /** 41 | * suite method automatically generated by JUnit module 42 | */ 43 | public static Test suite() { 44 | TestSuite suite = new TestSuite("RootSuite"); 45 | suite.addTest(com.pironet.tda.TdaSuite.suite()); 46 | return suite; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /tda/test/java/com/pironet/tda/BeaJDKParserTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of TDA - Thread Dump Analysis Tool. 3 | * 4 | * Foobar is free software; you can redistribute it and/or modify 5 | * it under the terms of the Lesser GNU General Public License as published by 6 | * the Free Software Foundation; either version 2.1 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * Foobar is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * Lesser GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the Lesser GNU General Public License 15 | * along with Foobar; if not, write to the Free Software 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17 | * 18 | * $Id: BeaJDKParserTest.java,v 1.4 2010-04-01 08:58:58 irockel Exp $ 19 | */ 20 | 21 | package com.pironet.tda; 22 | 23 | import java.io.FileInputStream; 24 | import java.io.FileNotFoundException; 25 | import java.io.IOException; 26 | import java.util.HashMap; 27 | import java.util.Map; 28 | import java.util.Vector; 29 | import junit.framework.Test; 30 | import junit.framework.TestCase; 31 | import junit.framework.TestSuite; 32 | 33 | /** 34 | * 35 | * @author irockel 36 | */ 37 | public class BeaJDKParserTest extends TestCase { 38 | 39 | public BeaJDKParserTest(String testName) { 40 | super(testName); 41 | } 42 | 43 | protected void setUp() throws Exception { 44 | super.setUp(); 45 | } 46 | 47 | protected void tearDown() throws Exception { 48 | super.tearDown(); 49 | } 50 | 51 | public static Test suite() { 52 | TestSuite suite = new TestSuite(BeaJDKParserTest.class); 53 | 54 | return suite; 55 | } 56 | 57 | /** 58 | * Test of hasMoreDumps method, of class com.pironet.tda.SunJDKParser. 59 | */ 60 | public void testDumpLoad() throws FileNotFoundException, IOException { 61 | System.out.println("dumpLoad"); 62 | FileInputStream fis = null; 63 | DumpParser instance = null; 64 | 65 | try { 66 | fis = new FileInputStream("test/none/jrockit_15_dump.txt"); 67 | Map dumpMap = new HashMap(); 68 | Vector topNodes = new Vector(); 69 | instance = DumpParserFactory.get().getDumpParserForLogfile(fis, dumpMap, false, 0); 70 | 71 | assertTrue(instance instanceof BeaJDKParser); 72 | 73 | while (instance.hasMoreDumps()) { 74 | topNodes.add(instance.parseNext()); 75 | } 76 | 77 | // check if three dumps are in it. 78 | //assertEquals(3, topNodes.size()); 79 | } finally { 80 | if(instance != null) { 81 | instance.close(); 82 | } 83 | if(fis != null) { 84 | fis.close(); 85 | } 86 | } 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /tda/test/java/com/pironet/tda/DumpParserFactoryTest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * DumpParserFactoryTest.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * Foobar is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Foobar is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with Foobar; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: DumpParserFactoryTest.java,v 1.5 2008-02-15 09:05:04 irockel Exp $ 21 | */ 22 | package com.pironet.tda; 23 | 24 | import java.io.FileInputStream; 25 | import java.io.FileNotFoundException; 26 | import junit.framework.*; 27 | import java.io.InputStream; 28 | import java.util.Map; 29 | 30 | /** 31 | * 32 | * @author irockel 33 | */ 34 | public class DumpParserFactoryTest extends TestCase { 35 | 36 | public DumpParserFactoryTest(String testName) { 37 | super(testName); 38 | } 39 | 40 | protected void setUp() throws Exception { 41 | } 42 | 43 | protected void tearDown() throws Exception { 44 | } 45 | 46 | public static Test suite() { 47 | TestSuite suite = new TestSuite(DumpParserFactoryTest.class); 48 | 49 | return suite; 50 | } 51 | 52 | /** 53 | * Test of get method, of class com.pironet.tda.DumpParserFactory. 54 | */ 55 | public void testGet() { 56 | System.out.println("get"); 57 | 58 | DumpParserFactory result = DumpParserFactory.get(); 59 | assertNotNull(result); 60 | } 61 | 62 | /** 63 | * Test of getDumpParserForVersion method, of class com.pironet.tda.DumpParserFactory. 64 | */ 65 | public void testGetDumpParserForSunLogfile() throws FileNotFoundException { 66 | System.out.println("getDumpParserForVersion"); 67 | 68 | InputStream dumpFileStream = new FileInputStream("test/none/test.log"); 69 | Map threadStore = null; 70 | DumpParserFactory instance = DumpParserFactory.get(); 71 | 72 | DumpParser result = instance.getDumpParserForLogfile(dumpFileStream, threadStore, false, 0); 73 | assertNotNull(result); 74 | 75 | assertTrue(result instanceof com.pironet.tda.SunJDKParser); 76 | } 77 | 78 | /** 79 | * Test of getDumpParserForVersion method, of class com.pironet.tda.DumpParserFactory. 80 | */ 81 | public void testGetDumpParserForBeaLogfile() throws FileNotFoundException { 82 | System.out.println("getDumpParserForVersion"); 83 | 84 | InputStream dumpFileStream = new FileInputStream("test/none/jrockit_15_dump.txt"); 85 | Map threadStore = null; 86 | DumpParserFactory instance = DumpParserFactory.get(); 87 | 88 | DumpParser result = instance.getDumpParserForLogfile(dumpFileStream, threadStore, false, 0); 89 | assertNotNull(result); 90 | 91 | assertTrue(result instanceof com.pironet.tda.BeaJDKParser); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /tda/test/java/com/pironet/tda/TdaSuite.java: -------------------------------------------------------------------------------- 1 | /* 2 | * TdaSuite.java 3 | * 4 | * This file is part of TDA - Thread Dump Analysis Tool. 5 | * 6 | * Foobar is free software; you can redistribute it and/or modify 7 | * it under the terms of the Lesser GNU General Public License as published by 8 | * the Free Software Foundation; either version 2.1 of the License, or 9 | * (at your option) any later version. 10 | * 11 | * Foobar is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * Lesser GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the Lesser GNU General Public License 17 | * along with Foobar; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 | * 20 | * $Id: TdaSuite.java,v 1.3 2007-11-06 09:36:36 irockel Exp $ 21 | */ 22 | package com.pironet.tda; 23 | 24 | import junit.framework.*; 25 | 26 | /** 27 | * 28 | * @author irockel 29 | */ 30 | public class TdaSuite extends TestCase { 31 | 32 | public TdaSuite(String testName) { 33 | super(testName); 34 | } 35 | 36 | protected void setUp() throws Exception { 37 | } 38 | 39 | protected void tearDown() throws Exception { 40 | } 41 | 42 | /** 43 | * suite method automatically generated by JUnit module 44 | */ 45 | public static Test suite() { 46 | TestSuite suite = new TestSuite("TdaSuite"); 47 | suite.addTest(com.pironet.tda.DumpParserFactoryTest.suite()); 48 | suite.addTest(com.pironet.tda.SunJDKParserTest.suite()); 49 | return suite; 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /tda/test/none/hpdump.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/tda/test/none/hpdump.log -------------------------------------------------------------------------------- /tda/test/none/java11dump.log: -------------------------------------------------------------------------------- 1 | 2020-04-16 02:53:41 2 | Full thread dump OpenJDK 64-Bit Server VM (11.0.6+10 mixed mode): 3 | 4 | "main" #1 prio=5 os_prio=0 cpu=1124.82ms elapsed=116459.50s tid=0x00007f6aec016800 nid=0xaba runnable [0x00007f6af4245000] 5 | java.lang.Thread.State: RUNNABLE 6 | at java.net.PlainSocketImpl.socketAccept(java.base@11.0.6/Native Method) 7 | at java.net.AbstractPlainSocketImpl.accept(java.base@11.0.6/AbstractPlainSocketImpl.java:458) 8 | at java.net.ServerSocket.implAccept(java.base@11.0.6/ServerSocket.java:565) 9 | at java.net.ServerSocket.accept(java.base@11.0.6/ServerSocket.java:533) 10 | at org.apache.catalina.core.StandardServer.await(StandardServer.java:466) 11 | at org.apache.catalina.startup.Catalina.await(Catalina.java:776) 12 | at org.apache.catalina.startup.Catalina.start(Catalina.java:722) 13 | at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@11.0.6/Native Method) 14 | at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@11.0.6/NativeMethodAccessorImpl.java:62) 15 | at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@11.0.6/DelegatingMethodAccessorImpl.java:43) 16 | at java.lang.reflect.Method.invoke(java.base@11.0.6/Method.java:566) 17 | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:353) 18 | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493) 19 | 20 | Locked ownable synchronizers: 21 | - None 22 | 23 | "Reference Handler" #2 daemon prio=10 os_prio=0 cpu=74835.02ms elapsed=116459.48s tid=0x00007f6aec0a8800 nid=0xabe waiting on condition [0x00007f6ab3af8000] 24 | java.lang.Thread.State: RUNNABLE 25 | at java.lang.ref.Reference.waitForReferencePendingList(java.base@11.0.6/Native Method) 26 | at java.lang.ref.Reference.processPendingReferences(java.base@11.0.6/Reference.java:241) 27 | at java.lang.ref.Reference$ReferenceHandler.run(java.base@11.0.6/Reference.java:213) 28 | 29 | Locked ownable synchronizers: 30 | - None 31 | 32 | "VM Thread" os_prio=0 cpu=1400820.85ms elapsed=116459.49s tid=0x00007f6aec0a0000 nid=0xabc runnable 33 | 34 | "ParGC Thread#0" os_prio=0 cpu=531433.46ms elapsed=116459.51s tid=0x00007f6aec040000 nid=0xabb runnable 35 | 36 | "ParGC Thread#1" os_prio=0 cpu=532378.30ms elapsed=116452.11s tid=0x00007f6aac005000 nid=0xb35 runnable 37 | 38 | "ParGC Thread#2" os_prio=0 cpu=531378.18ms elapsed=116452.11s tid=0x00007f6aac006800 nid=0xb36 runnable 39 | 40 | "ParGC Thread#3" os_prio=0 cpu=531444.52ms elapsed=116452.10s tid=0x00007f6aac008000 nid=0xb37 runnable 41 | 42 | "ParGC Thread#4" os_prio=0 cpu=531319.95ms elapsed=116452.10s tid=0x00007f6aac009800 nid=0xb38 runnable 43 | 44 | "ParGC Thread#5" os_prio=0 cpu=531506.14ms elapsed=116452.10s tid=0x00007f6aac00b000 nid=0xb39 runnable 45 | 46 | "ParGC Thread#6" os_prio=0 cpu=531183.48ms elapsed=116452.10s tid=0x00007f6aac00c800 nid=0xb3a runnable 47 | 48 | "ParGC Thread#7" os_prio=0 cpu=532862.62ms elapsed=116452.10s tid=0x00007f6aac00e000 nid=0xb3b runnable 49 | 50 | "ParGC Thread#8" os_prio=0 cpu=531416.13ms elapsed=116436.06s tid=0x00007f6aac015000 nid=0xcf8 runnable 51 | 52 | "ParGC Thread#9" os_prio=0 cpu=531990.95ms elapsed=116436.06s tid=0x00007f6aac016800 nid=0xcf9 runnable 53 | 54 | "VM Periodic Task Thread" os_prio=0 cpu=60646.16ms elapsed=116459.40s tid=0x00007f6aec18f000 nid=0xaca waiting on condition 55 | 56 | JNI global refs: 173, weak refs: 5 57 | -------------------------------------------------------------------------------- /tda/test/none/test64bit.log: -------------------------------------------------------------------------------- 1 | Full thread dump Java HotSpot(TM) 64-Bit Server VM (1.5.0_13-b05 mixed mode): 2 | 3 | "LeaseRenewalManager Task" daemon prio=1 tid=0x0000002ac6c9b0a0 nid=0x57f8 in Object.wait() [0x0000000051d6d000..0x0000000051d6dd30] 4 | at java.lang.Object.wait(Native Method) 5 | at com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:341) 6 | - locked <0x0000002aa55b63a0> (a com.sun.jini.thread.TaskManager) 7 | 8 | "LookupDiscovery Task" daemon prio=1 tid=0x0000002ac4f4ce90 nid=0x16b8 in Object.wait() [0x0000000051c6c000..0x0000000051c6cd30] 9 | at java.lang.Object.wait(Native Method) 10 | at com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:341) 11 | - locked <0x0000002aa55b8cb8> (a com.sun.jini.thread.TaskManager) 12 | 13 | "Space LookupDiscovery Task" daemon prio=1 tid=0x0000002ac7322f00 nid=0x16b7 in Object.wait() [0x000000004abfc000..0x000000004abfceb0] 14 | at java.lang.Object.wait(Native Method) 15 | at com.sun.jini.thread.TaskManager$TaskThread.run(TaskManager.java:341) 16 | - locked <0x0000002aa5920c40> (a com.sun.jini.thread.TaskManager) 17 | 18 | 19 | -------------------------------------------------------------------------------- /wiki-images/categories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/wiki-images/categories.png -------------------------------------------------------------------------------- /wiki-images/filters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/wiki-images/filters.png -------------------------------------------------------------------------------- /wiki-images/histogram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/wiki-images/histogram.png -------------------------------------------------------------------------------- /wiki-images/info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/wiki-images/info.png -------------------------------------------------------------------------------- /wiki-images/jconsole.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/wiki-images/jconsole.png -------------------------------------------------------------------------------- /wiki-images/longrunning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/wiki-images/longrunning.png -------------------------------------------------------------------------------- /wiki-images/monitor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/wiki-images/monitor.png -------------------------------------------------------------------------------- /wiki-images/threaddumps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/wiki-images/threaddumps.png -------------------------------------------------------------------------------- /wiki-images/visualvm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/wiki-images/visualvm.png -------------------------------------------------------------------------------- /wiki-images/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/irockel/tda/e7397bf86dd22f450d1b0572395cf32e3664de57/wiki-images/welcome.png --------------------------------------------------------------------------------