Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 207052 Details for
Bug 345298
[breakpoints] BreakpointManager deadlocks trying to restore breakpoints
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
performance tests
bpmanager-start-perf-.patch (text/plain), 13.58 KB, created by
Michael Rennie
on 2011-11-15 15:08:19 EST
(
hide
)
Description:
performance tests
Filename:
MIME Type:
Creator:
Michael Rennie
Created:
2011-11-15 15:08:19 EST
Size:
13.58 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.debug.tests/.cvsignore b/org.eclipse.jdt.debug.tests/.cvsignore >deleted file mode 100644 >index c5e82d7..0000000 >--- a/org.eclipse.jdt.debug.tests/.cvsignore >+++ /dev/null >@@ -1 +0,0 @@ >-bin >\ No newline at end of file >diff --git a/org.eclipse.jdt.debug.tests/testprograms/BPManagerPerf.java b/org.eclipse.jdt.debug.tests/testprograms/BPManagerPerf.java >new file mode 100644 >index 0000000..7dce071 >--- /dev/null >+++ b/org.eclipse.jdt.debug.tests/testprograms/BPManagerPerf.java >@@ -0,0 +1,214 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+public class BPManagerPerf { >+ public static void main(String[] args) { >+ System.out.println("0"); >+ System.out.println("1"); >+ System.out.println("2"); >+ System.out.println("3"); >+ System.out.println("4"); >+ System.out.println("5"); >+ System.out.println("6"); >+ System.out.println("7"); >+ System.out.println("8"); >+ System.out.println("9"); >+ System.out.println("10"); >+ System.out.println("11"); >+ System.out.println("12"); >+ System.out.println("13"); >+ System.out.println("14"); >+ System.out.println("15"); >+ System.out.println("16"); >+ System.out.println("17"); >+ System.out.println("18"); >+ System.out.println("19"); >+ System.out.println("20"); >+ System.out.println("21"); >+ System.out.println("22"); >+ System.out.println("23"); >+ System.out.println("24"); >+ System.out.println("25"); >+ System.out.println("26"); >+ System.out.println("27"); >+ System.out.println("28"); >+ System.out.println("29"); >+ System.out.println("30"); >+ System.out.println("31"); >+ System.out.println("32"); >+ System.out.println("33"); >+ System.out.println("34"); >+ System.out.println("35"); >+ System.out.println("36"); >+ System.out.println("37"); >+ System.out.println("38"); >+ System.out.println("39"); >+ System.out.println("40"); >+ System.out.println("41"); >+ System.out.println("42"); >+ System.out.println("43"); >+ System.out.println("44"); >+ System.out.println("45"); >+ System.out.println("46"); >+ System.out.println("47"); >+ System.out.println("48"); >+ System.out.println("49"); >+ System.out.println("50"); >+ System.out.println("51"); >+ System.out.println("52"); >+ System.out.println("53"); >+ System.out.println("54"); >+ System.out.println("55"); >+ System.out.println("56"); >+ System.out.println("57"); >+ System.out.println("58"); >+ System.out.println("59"); >+ System.out.println("60"); >+ System.out.println("61"); >+ System.out.println("62"); >+ System.out.println("63"); >+ System.out.println("64"); >+ System.out.println("65"); >+ System.out.println("66"); >+ System.out.println("67"); >+ System.out.println("68"); >+ System.out.println("69"); >+ System.out.println("70"); >+ System.out.println("71"); >+ System.out.println("72"); >+ System.out.println("73"); >+ System.out.println("74"); >+ System.out.println("75"); >+ System.out.println("76"); >+ System.out.println("77"); >+ System.out.println("78"); >+ System.out.println("79"); >+ System.out.println("80"); >+ System.out.println("81"); >+ System.out.println("82"); >+ System.out.println("83"); >+ System.out.println("84"); >+ System.out.println("85"); >+ System.out.println("86"); >+ System.out.println("87"); >+ System.out.println("88"); >+ System.out.println("89"); >+ System.out.println("90"); >+ System.out.println("91"); >+ System.out.println("92"); >+ System.out.println("93"); >+ System.out.println("94"); >+ System.out.println("95"); >+ System.out.println("96"); >+ System.out.println("97"); >+ System.out.println("98"); >+ System.out.println("99"); >+ System.out.println("0"); >+ System.out.println("1"); >+ System.out.println("2"); >+ System.out.println("3"); >+ System.out.println("4"); >+ System.out.println("5"); >+ System.out.println("6"); >+ System.out.println("7"); >+ System.out.println("8"); >+ System.out.println("9"); >+ System.out.println("10"); >+ System.out.println("11"); >+ System.out.println("12"); >+ System.out.println("13"); >+ System.out.println("14"); >+ System.out.println("15"); >+ System.out.println("16"); >+ System.out.println("17"); >+ System.out.println("18"); >+ System.out.println("19"); >+ System.out.println("20"); >+ System.out.println("21"); >+ System.out.println("22"); >+ System.out.println("23"); >+ System.out.println("24"); >+ System.out.println("25"); >+ System.out.println("26"); >+ System.out.println("27"); >+ System.out.println("28"); >+ System.out.println("29"); >+ System.out.println("30"); >+ System.out.println("31"); >+ System.out.println("32"); >+ System.out.println("33"); >+ System.out.println("34"); >+ System.out.println("35"); >+ System.out.println("36"); >+ System.out.println("37"); >+ System.out.println("38"); >+ System.out.println("39"); >+ System.out.println("40"); >+ System.out.println("41"); >+ System.out.println("42"); >+ System.out.println("43"); >+ System.out.println("44"); >+ System.out.println("45"); >+ System.out.println("46"); >+ System.out.println("47"); >+ System.out.println("48"); >+ System.out.println("49"); >+ System.out.println("50"); >+ System.out.println("51"); >+ System.out.println("52"); >+ System.out.println("53"); >+ System.out.println("54"); >+ System.out.println("55"); >+ System.out.println("56"); >+ System.out.println("57"); >+ System.out.println("58"); >+ System.out.println("59"); >+ System.out.println("60"); >+ System.out.println("61"); >+ System.out.println("62"); >+ System.out.println("63"); >+ System.out.println("64"); >+ System.out.println("65"); >+ System.out.println("66"); >+ System.out.println("67"); >+ System.out.println("68"); >+ System.out.println("69"); >+ System.out.println("70"); >+ System.out.println("71"); >+ System.out.println("72"); >+ System.out.println("73"); >+ System.out.println("74"); >+ System.out.println("75"); >+ System.out.println("76"); >+ System.out.println("77"); >+ System.out.println("78"); >+ System.out.println("79"); >+ System.out.println("80"); >+ System.out.println("81"); >+ System.out.println("82"); >+ System.out.println("83"); >+ System.out.println("84"); >+ System.out.println("85"); >+ System.out.println("86"); >+ System.out.println("87"); >+ System.out.println("88"); >+ System.out.println("89"); >+ System.out.println("90"); >+ System.out.println("91"); >+ System.out.println("92"); >+ System.out.println("93"); >+ System.out.println("94"); >+ System.out.println("95"); >+ System.out.println("96"); >+ System.out.println("97"); >+ System.out.println("98"); >+ System.out.println("99"); >+ } >+} >diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/PerformanceSuite.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/PerformanceSuite.java >index bff1d3a..91c4ddd 100644 >--- a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/PerformanceSuite.java >+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/PerformanceSuite.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2007 IBM Corporation and others. >+ * Copyright (c) 2000, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -13,6 +13,7 @@ > import junit.framework.Test; > import junit.framework.TestSuite; > >+import org.eclipse.jdt.debug.tests.performance.BreakpointManagerPerfTests; > import org.eclipse.jdt.debug.tests.performance.PerfBreakpointTests; > import org.eclipse.jdt.debug.tests.performance.PerfConditionalBreakpointsTests; > import org.eclipse.jdt.debug.tests.performance.PerfConsoleTests; >@@ -45,5 +46,6 @@ > addTest(new TestSuite(PerfSteppingTests.class)); > addTest(new TestSuite(PerfConsoleTests.class)); > addTest(new TestSuite(PerfVariableDetailTests.class)); >+ addTest(new TestSuite(BreakpointManagerPerfTests.class)); > } > } >diff --git a/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/BreakpointManagerPerfTests.java b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/BreakpointManagerPerfTests.java >new file mode 100644 >index 0000000..c279438 >--- /dev/null >+++ b/org.eclipse.jdt.debug.tests/tests/org/eclipse/jdt/debug/tests/performance/BreakpointManagerPerfTests.java >@@ -0,0 +1,165 @@ >+/******************************************************************************* >+ * Copyright (c) 2011 IBM Corporation and others. >+ * All rights reserved. This program and the accompanying materials >+ * are made available under the terms of the Eclipse Public License v1.0 >+ * which accompanies this distribution, and is available at >+ * http://www.eclipse.org/legal/epl-v10.html >+ * >+ * Contributors: >+ * IBM Corporation - initial API and implementation >+ *******************************************************************************/ >+package org.eclipse.jdt.debug.tests.performance; >+ >+import java.util.ArrayList; >+ >+import org.eclipse.core.resources.IFile; >+import org.eclipse.core.resources.IResource; >+import org.eclipse.debug.core.model.IBreakpoint; >+import org.eclipse.debug.internal.core.BreakpointManager; >+import org.eclipse.jdt.core.IType; >+import org.eclipse.jdt.core.Signature; >+import org.eclipse.jdt.debug.tests.AbstractDebugPerformanceTest; >+import org.eclipse.test.performance.Dimension; >+import org.eclipse.ui.IEditorPart; >+ >+/** >+ * Tests the performance of various parts of the {@link BreakpointManager} >+ * >+ * @since 3.8 >+ */ >+public class BreakpointManagerPerfTests extends AbstractDebugPerformanceTest { >+ >+ /** >+ * Constructor >+ * @param name >+ */ >+ public BreakpointManagerPerfTests() { >+ super("Breakpoint Manager Performance"); >+ } >+ >+ static IBreakpoint[] NO_BREAKPOINTS = new IBreakpoint[0]; >+ static String fgTypeName = "BPManagerPerf"; >+ >+ /** >+ * Create the given number of breakpoints in the given resource starting from the given line >+ * >+ * @param count >+ * @throws Exception >+ * @return the collection of breakpoints >+ */ >+ IBreakpoint[] generateBreakpoints(int count) throws Exception { >+ IType type = getType(fgTypeName); >+ assertNotNull("the type "+fgTypeName+" should exist", type); >+ assertTrue("The type "+fgTypeName+" must be a file", type.getResource().getType() == IResource.FILE); >+ IEditorPart editor = openEditor((IFile)type.getResource()); >+ assertNotNull("the editor for "+fgTypeName+" should have been created", editor); >+ ArrayList bps = new ArrayList(count); >+ IBreakpoint bp = createClassPrepareBreakpoint(type); >+ if(bp != null) { >+ bps.add(bp); >+ } >+ bp = createMethodBreakpoint(fgTypeName, "main", Signature.createMethodSignature(new String[] {"[Ljava.lang.String;"}, Signature.SIG_VOID), true, true); >+ if(bp != null) { >+ bps.add(bp); >+ } >+ int end = 9+count; >+ for(int i = 11; i < end; i++) { >+ bp = createLineBreakpoint(i, fgTypeName); >+ if(bp != null) { >+ bps.add(bp); >+ } >+ } >+ assertEquals("the should have been "+count+" breakpoints created", count, bps.size()); >+ return (IBreakpoint[]) bps.toArray(new IBreakpoint[bps.size()]); >+ } >+ >+ /** >+ * Tests the time required to start the {@link BreakpointManager} >+ * @throws Exception >+ */ >+ public void testStartup200Breakpoints() throws Exception { >+ tagAsSummary("Start Breakpoint Manager - 200 BPs", Dimension.ELAPSED_PROCESS); >+ try { >+ IBreakpoint[] bps = generateBreakpoints(200); >+ assertTrue("There should be 200 breakpoints", bps.length == 200); >+ BreakpointManager mgr = (BreakpointManager) getBreakpointManager(); >+ //clean it up before starting >+ mgr.shutdown(); >+ for(int i = 0; i < 6500; i++) { >+ try { >+ startMeasuring(); >+ mgr.start(); >+ stopMeasuring(); >+ } >+ finally { >+ mgr.shutdown(); >+ } >+ } >+ commitMeasurements(); >+ assertPerformance(); >+ } >+ finally { >+ removeAllBreakpoints(); >+ } >+ } >+ >+ /** >+ * Tests the time required to start the {@link BreakpointManager} >+ * @throws Exception >+ */ >+ public void testStartup50Breakpoints() throws Exception { >+ tagAsSummary("Start Breakpoint Manager - 50 BPs", Dimension.ELAPSED_PROCESS); >+ try { >+ IBreakpoint[] bps = generateBreakpoints(50); >+ assertTrue("There should be 50 breakpoints", bps.length == 50); >+ BreakpointManager mgr = (BreakpointManager) getBreakpointManager(); >+ //clean it up before starting >+ mgr.shutdown(); >+ for(int i = 0; i < 6500; i++) { >+ try { >+ startMeasuring(); >+ mgr.start(); >+ stopMeasuring(); >+ } >+ finally { >+ mgr.shutdown(); >+ } >+ } >+ commitMeasurements(); >+ assertPerformance(); >+ } >+ finally { >+ removeAllBreakpoints(); >+ } >+ } >+ >+ /** >+ * Tests the time required to start the {@link BreakpointManager} >+ * @throws Exception >+ */ >+ public void testStartup100Breakpoints() throws Exception { >+ tagAsSummary("Start Breakpoint Manager - 100 BPs", Dimension.ELAPSED_PROCESS); >+ try { >+ IBreakpoint[] bps = generateBreakpoints(100); >+ assertTrue("There should be 100 breakpoints", bps.length == 100); >+ BreakpointManager mgr = (BreakpointManager) getBreakpointManager(); >+ //clean it up before starting >+ mgr.shutdown(); >+ for(int i = 0; i < 6500; i++) { >+ try { >+ startMeasuring(); >+ mgr.start(); >+ stopMeasuring(); >+ } >+ finally { >+ mgr.shutdown(); >+ } >+ } >+ commitMeasurements(); >+ assertPerformance(); >+ } >+ finally { >+ removeAllBreakpoints(); >+ } >+ } >+}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 345298
:
195241
|
195244
|
195245
|
195260
|
195261
|
205458
|
206104
|
207048
| 207052