├── .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 |
4 |
5 | \n");
59 | info.append(heapInfo);
60 | info.append("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.
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.
";
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 |
| Copyright 2006-2016 - Ingo Rockel <ingo.rockel@gmail.com> | |||||||||||||||||||||||||||||||||||
12 |
|
| ||||||||||||||||||||||||||||||||||
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
--------------------------------------------------------------------------------