Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-09-19 08:55:00 +0000
committerLars Vogel2019-09-19 10:41:41 +0000
commit5f82cf63a762295655e90b25c3eae85b8613b09d (patch)
tree5803184aa44fce836d4fae9a66b349efb008e769
parentd0ce58398740f9a4dac0eb31f1c04919e3023a58 (diff)
downloadeclipse.platform.resources-5f82cf63a762295655e90b25c3eae85b8613b09d.tar.gz
eclipse.platform.resources-5f82cf63a762295655e90b25c3eae85b8613b09d.tar.xz
eclipse.platform.resources-5f82cf63a762295655e90b25c3eae85b8613b09d.zip
Bug 551237 - Add tracing option for build cyclesI20190919-1800I20190919-0850
Logging the build cycle Change-Id: I2259fdbf947b61d1d31cc300a83185ff3c2c7b08 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.core.resources/.options3
-rw-r--r--bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java6
-rw-r--r--bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Policy.java2
3 files changed, 11 insertions, 0 deletions
diff --git a/bundles/org.eclipse.core.resources/.options b/bundles/org.eclipse.core.resources/.options
index d8a2ced81..ceb6653d7 100644
--- a/bundles/org.eclipse.core.resources/.options
+++ b/bundles/org.eclipse.core.resources/.options
@@ -27,6 +27,9 @@ org.eclipse.core.resources/build/invoking=false
# Reports the start and end of build delta calculations
org.eclipse.core.resources/build/delta=false
+# Reports build cycles
+org.eclipse.core.resources/build/cycle=false
+
# For incremental builds, displays which builder is being run
# and because of changes in which project.
org.eclipse.core.resources/build/needbuild=false
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java
index 13dac15db..1aa80f9a4 100644
--- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java
+++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/Workspace.java
@@ -491,6 +491,12 @@ public class Workspace extends PlatformObject implements IWorkspace, ICoreConsta
}
if (buildGraph != null) {
buildGraph.freeze();
+ if (Policy.DEBUG_BUILD_CYCLE && buildGraph.containsCycles()) {
+ List<IBuildConfiguration[]> nonTrivialComponents = buildGraph.nonTrivialComponents();
+ for (IBuildConfiguration[] iBuildConfigurations : nonTrivialComponents) {
+ Policy.debug("Cycle: " + Arrays.toString(iBuildConfigurations)); //$NON-NLS-1$
+ }
+ }
allConfigs = ComputeProjectOrder.computeVertexOrder(buildGraph, IBuildConfiguration.class).vertexes;
}
diff --git a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Policy.java b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Policy.java
index 2d3eeddae..88675f456 100644
--- a/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Policy.java
+++ b/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/utils/Policy.java
@@ -33,6 +33,7 @@ public class Policy {
DEBUG_AUTO_REFRESH = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/refresh", false); //$NON-NLS-1$
DEBUG_BUILD_DELTA = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/build/delta", false); //$NON-NLS-1$
+ DEBUG_BUILD_CYCLE = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/build/cycle", false); //$NON-NLS-1$
DEBUG_BUILD_FAILURE = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/build/failure", false); //$NON-NLS-1$
DEBUG_BUILD_INTERRUPT = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/build/interrupt", false); //$NON-NLS-1$
DEBUG_BUILD_INVOKING = DEBUG && options.getBooleanOption(ResourcesPlugin.PI_RESOURCES + "/build/invoking", false); //$NON-NLS-1$
@@ -74,6 +75,7 @@ public class Policy {
//debug constants
public static boolean DEBUG_BUILD_DELTA = false;
+ public static boolean DEBUG_BUILD_CYCLE = false;
public static boolean DEBUG_BUILD_FAILURE = false;
public static boolean DEBUG_BUILD_INTERRUPT = false;
public static boolean DEBUG_BUILD_INVOKING = false;

Back to the top