From fcab2a6573f7f9c484221ab75f6bde5775cf1217 Mon Sep 17 00:00:00 2001 From: fariba Date: Wed, 24 Apr 2024 14:38:51 -0400 Subject: [PATCH 1/5] execution comparison: adding reset button and some modifications Introduce a module to compare two groups of executions using a differential flame graph. An "EventDensityView" is used to select a time range for each group. Select the desired traces in an experiment. Showing the difference ratio based on self time (it required a modification to AggregatedCalledFunction). Introducing the "ParametricWeightedTreeUtils" to get "SelfTime" instead of "duration" while building the differential Trees. Isolating duplicating flame graph TODO: * add grouping strategies (WALL TIME) Not Valid: It was Discussed for Async Trace Comparison * move grouping to hamburger menu * add progress bar * instrument code (pretty good) * add tests * Make work with mainline (should be a simple ID swap) * Make a registry for tracetype->callstack ID * remove hard disk operations from UI thread (in progress) * Add way to select the entire trace easily: * Add way to manually select precise time range (import from main?) * query will be added Signed-off-by: Fariba Daneshgar Signed-off-by: Matthew Khouzam --- .../.classpath | 15 + .../.gitignore | 1 + .../.project | 28 + .../org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.core.runtime.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 428 ++++++ .../.settings/org.eclipse.jdt.ui.prefs | 60 + .../.settings/org.eclipse.pde.prefs | 32 + .../META-INF/MANIFEST.MF | 16 + .../about.html | 36 + .../build.properties | 17 + .../plugin.properties | 13 + .../core/tests/ActivatorTest.java | 122 ++ .../.classpath | 15 + .../.gitignore | 1 + .../.project | 34 + .../org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.core.runtime.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 442 ++++++ .../.settings/org.eclipse.jdt.ui.prefs | 60 + .../.settings/org.eclipse.pde.api.tools.prefs | 99 ++ .../.settings/org.eclipse.pde.prefs | 32 + .../META-INF/MANIFEST.MF | 34 + .../about.html | 36 + .../build.properties | 18 + .../plugin.properties | 13 + .../plugin.xml | 25 + .../executioncomparision/core/Activator.java | 49 + .../core/DifferentialCallGraphProvider.java | 89 ++ .../core/DifferentialFlamePalette.java | 184 +++ .../DifferentialSeqCallGraphAnalysis.java | 377 +++++ .../executioncomparision/core/Messages.java | 63 + .../core/ParametricWeightedTreeUtils.java | 246 +++ .../core/TmfCheckboxChangedSignal.java | 48 + .../TmfComparisonFilteringUpdatedSignal.java | 155 ++ .../core/messages.properties | 23 + .../core/package-info.java | 13 + .../.classpath | 15 + .../.gitignore | 1 + .../.project | 34 + .../org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.core.runtime.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 428 ++++++ .../.settings/org.eclipse.jdt.ui.prefs | 60 + .../.settings/org.eclipse.pde.prefs | 32 + .../META-INF/MANIFEST.MF | 19 + .../about.html | 36 + .../build.properties | 17 + .../plugin.properties | 14 + .../swtbot-test-plugin.properties | 1 + .../.classpath | 15 + .../.gitignore | 1 + .../.project | 34 + .../.settings/.api_filters | 45 + .../org.eclipse.core.resources.prefs | 2 + .../.settings/org.eclipse.core.runtime.prefs | 2 + .../.settings/org.eclipse.jdt.core.prefs | 465 ++++++ .../.settings/org.eclipse.jdt.ui.prefs | 60 + .../.settings/org.eclipse.pde.api.tools.prefs | 99 ++ .../.settings/org.eclipse.pde.prefs | 32 + .../META-INF/MANIFEST.MF | 26 + .../about.html | 36 + .../build.properties | 18 + .../plugin.properties | 14 + .../plugin.xml | 33 + .../executioncomparision/ui/Activator.java | 59 + .../ui/DifferentialFlameGraphView.java | 1315 +++++++++++++++++ .../executioncomparision/ui/Messages.java | 82 + .../ui/MultipleDensityView.java | 642 ++++++++ .../ui/MultipleEventDensityViewer.java | 79 + .../ui/messages.properties | 23 + .../executioncomparision/ui/package-info.java | 15 + .../.project | 17 + .../build.properties | 13 + .../feature.properties | 18 + .../feature.xml | 43 + .../callgraph/AbstractCalledFunction.java | 185 --- .../callgraph/AggregatedCalledFunction.java | 345 ----- 78 files changed, 6681 insertions(+), 530 deletions(-) create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.classpath create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.gitignore create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.project create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.resources.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.runtime.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.core.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.ui.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.pde.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/about.html create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/build.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/plugin.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparision/core/tests/ActivatorTest.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.classpath create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.gitignore create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.project create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.resources.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.runtime.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.core.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.ui.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.api.tools.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/about.html create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/build.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/Activator.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialCallGraphProvider.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialFlamePalette.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/Messages.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfCheckboxChangedSignal.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfComparisonFilteringUpdatedSignal.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/messages.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/package-info.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.classpath create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.gitignore create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.pde.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/about.html create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/build.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/plugin.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/swtbot-test-plugin.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.classpath create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.gitignore create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.project create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/.api_filters create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.resources.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.runtime.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.core.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.ui.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.api.tools.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.prefs create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/about.html create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/build.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Activator.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/package-info.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision/.project create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision/build.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.properties create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.xml delete mode 100644 callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AbstractCalledFunction.java delete mode 100644 callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AggregatedCalledFunction.java diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.classpath b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.classpath new file mode 100644 index 000000000..b8d064f66 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.classpath @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.gitignore b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.gitignore new file mode 100644 index 000000000..ae3c17260 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.project new file mode 100644 index 000000000..8d98e49e7 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.project @@ -0,0 +1,28 @@ + + + org.eclipse.tracecompass.incubator.executioncomparision.core.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.resources.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..99f26c020 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.runtime.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 000000000..5a0ad22d2 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.core.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..bb4dd23d9 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,428 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes=f +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=error +org.eclipse.jdt.core.compiler.problem.deadCode=error +org.eclipse.jdt.core.compiler.problem.deprecation=error +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=error +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=error +org.eclipse.jdt.core.compiler.problem.finalParameterBound=error +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=error +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error +org.eclipse.jdt.core.compiler.problem.parameterAssignment=error +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error +org.eclipse.jdt.core.compiler.problem.potentialNullReference=error +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.rawTypeReference=error +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=error +org.eclipse.jdt.core.compiler.problem.unusedLocal=error +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=250 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.ui.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 000000000..dbbef8b06 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,60 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_tmf-test-style +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.overrideannotation=true +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=false +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=false +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.pde.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.pde.prefs new file mode 100644 index 000000000..c367d4bd0 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.pde.prefs @@ -0,0 +1,32 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=0 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=0 +compilers.p.build.src.includes=0 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=1 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=2 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF new file mode 100644 index 000000000..45b32e14c --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-Vendor: %Bundle-Vendor +Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparision.core.tests +Bundle-Version: 0.1.0.qualifier +Bundle-Localization: plugin +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.tracecompass.common.core, + org.eclipse.tracecompass.incubator.executioncomparision.core, + org.junit, + org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional +Export-Package: org.eclipse.tracecompass.incubator.executioncomparision.core.tests +Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparision.core.tests diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/about.html b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/about.html new file mode 100644 index 000000000..164f781a8 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/build.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/build.properties new file mode 100644 index 000000000..fc2472710 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/build.properties @@ -0,0 +1,17 @@ +############################################################################### +# Copyright (c) 2022 École Polytechnique de Montréal +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.properties diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/plugin.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/plugin.properties new file mode 100644 index 000000000..b310b75e9 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/plugin.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2022 École Polytechnique de Montréal +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +Bundle-Vendor = Eclipse Trace Compass Incubator +Bundle-Name = Trace Compass Incubator ExecutionComparision Core Tests Plug-in diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparision/core/tests/ActivatorTest.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparision/core/tests/ActivatorTest.java new file mode 100644 index 000000000..c83b01e2f --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparision/core/tests/ActivatorTest.java @@ -0,0 +1,122 @@ +/******************************************************************************* + * Copyright (c) 2022 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.executioncomparision.core.tests; + +import static org.junit.Assert.assertEquals; + +import java.io.IOException; +import java.net.URL; + +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.runtime.Plugin; +import org.eclipse.tracecompass.common.core.TraceCompassActivator; +import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.Activator; +import org.junit.Test; +import org.osgi.framework.BundleContext; + +/** + * Test the activator name. This class is there mostly to create a non empty + * test plugin + * + * @author Geneviève Bastien + */ +public class ActivatorTest extends Plugin { + // ------------------------------------------------------------------------ + // Attributes + // ------------------------------------------------------------------------ + + /** + * The plug-in ID + */ + public static final String PLUGIN_ID = "org.eclipse.tracecompass.incubator.executioncomparision.core.tests"; //$NON-NLS-1$ + + /** + * The shared instance + */ + private static Plugin PLUGIN; + + // ------------------------------------------------------------------------ + // Constructors + // ------------------------------------------------------------------------ + + /** + * The constructor + */ + public ActivatorTest() { + } + + // ------------------------------------------------------------------------ + // Accessors + // ------------------------------------------------------------------------ + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Plugin getDefault() { + return PLUGIN; + } + + // ------------------------------------------------------------------------ + // Operators + // ------------------------------------------------------------------------ + + @Override + public void start(BundleContext context) throws Exception { + super.start(context); + PLUGIN = this; + } + + @Override + public void stop(BundleContext context) throws Exception { + PLUGIN = null; + super.stop(context); + } + + /** + * Test Activator + */ + @Test + public void testActivator() { + TraceCompassActivator instance = Activator.getInstance(); + assertEquals("org.eclipse.tracecompass.incubator.executioncomparision.core", instance.getPluginId()); + } + + /** + * Return a path to a file relative to this plugin's base directory + * + * @param relativePath + * The path relative to the plugin's root directory + * @return The path corresponding to the relative path in parameter + */ + public static IPath getAbsoluteFilePath(String relativePath) { + Plugin plugin = getDefault(); + if (plugin == null) { + /* + * Shouldn't happen but at least throw something to get the test to + * fail early + */ + throw new IllegalStateException(); + } + URL location = FileLocator.find(plugin.getBundle(), new Path(relativePath), null); + try { + return new Path(FileLocator.toFileURL(location).getPath()); + } catch (IOException e) { + throw new IllegalStateException(); + } + } + +} + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.classpath b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.classpath new file mode 100644 index 000000000..b8d064f66 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.classpath @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.gitignore b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.gitignore new file mode 100644 index 000000000..ae3c17260 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.project new file mode 100644 index 000000000..85f6c38ff --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.project @@ -0,0 +1,34 @@ + + + org.eclipse.tracecompass.incubator.executioncomparision.core + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.resources.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..99f26c020 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.runtime.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 000000000..5a0ad22d2 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.core.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..630f1ed42 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,442 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes=f +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=error +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=error +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=error +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=warning +org.eclipse.jdt.core.compiler.problem.finalParameterBound=error +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=error +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error +org.eclipse.jdt.core.compiler.problem.parameterAssignment=error +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=error +org.eclipse.jdt.core.compiler.problem.unusedLocal=error +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=warning +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=250 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.ui.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 000000000..232a3fd76 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,60 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_tmf-style +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.overrideannotation=true +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=false +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=false +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.api.tools.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 000000000..3c9b07acf --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,99 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Ignore +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Ignore +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_JAVADOC_TAG=Warning +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +MISSING_EE_DESCRIPTIONS=Ignore +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.prefs new file mode 100644 index 000000000..01d624df1 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.prefs @@ -0,0 +1,32 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=0 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=0 +compilers.p.build.src.includes=0 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=1 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF new file mode 100644 index 000000000..39ac6b684 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF @@ -0,0 +1,34 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-Vendor: %Bundle-Vendor +Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparision.core;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-Localization: plugin +Bundle-Activator: org.eclipse.tracecompass.incubator.internal.executioncomparision.core.Activator +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-17 +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.tracecompass.common.core, + org.eclipse.tracecompass.datastore.core, + org.eclipse.tracecompass.segmentstore.core, + org.eclipse.tracecompass.incubator.analysis.core, + org.eclipse.tracecompass.analysis.timing.core, + org.eclipse.tracecompass.tmf.core, + org.eclipse.tracecompass.tmf.analysis.xml.core, + org.eclipse.tracecompass.tmf.ctf.core, + org.eclipse.tracecompass.lttng2.common.core, + org.eclipse.tracecompass.lttng2.ust.core, + org.eclipse.tracecompass.analysis.os.linux.core, + org.eclipse.tracecompass.analysis.profiling.core, + org.eclipse.tracecompass.incubator.callstack.core, + org.eclipse.tracecompass.incubator.traceevent.core, + org.eclipse.jdt.annotation +Export-Package: org.eclipse.tracecompass.incubator.internal.executioncomparision.core;x-friends:="org.eclipse.tracecompass.incubator.executioncomparision.ui,org.eclipse.tracecompass.incubator.executioncomparision.core.tests" +Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparision.core +Import-Package: com.google.common.annotations, + com.google.common.base, + com.google.common.cache, + com.google.common.collect, + org.apache.commons.lang3 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/about.html b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/about.html new file mode 100644 index 000000000..164f781a8 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/build.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/build.properties new file mode 100644 index 000000000..21645b6d6 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/build.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2022 École Polytechnique de Montréal +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.properties,\ + plugin.xml diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.properties new file mode 100644 index 000000000..34e0fb51c --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2022 École Polytechnique de Montréal +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +Bundle-Vendor = Eclipse Trace Compass Incubator +Bundle-Name = Trace Compass ExecutionComparision Core Plug-in (Incubator) diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml new file mode 100644 index 000000000..5661c2cb2 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/Activator.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/Activator.java new file mode 100644 index 000000000..0229bf8ba --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/Activator.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2022 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; + +import org.eclipse.tracecompass.common.core.TraceCompassActivator; + +/** + * Activator + */ +public class Activator extends TraceCompassActivator { + + /** The plug-in ID */ + public static final String PLUGIN_ID = "org.eclipse.tracecompass.incubator.executioncomparision.core"; //$NON-NLS-1$ + + /** + * The constructor + */ + public Activator() { + super(PLUGIN_ID); + } + + /** + * Returns the instance of this plug-in + * + * @return The plugin instance + */ + public static TraceCompassActivator getInstance() { + return TraceCompassActivator.getInstance(PLUGIN_ID); + } + + @Override + protected void startActions() { + } + + @Override + protected void stopActions() { + } + +} + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialCallGraphProvider.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialCallGraphProvider.java new file mode 100644 index 000000000..2c5c437f1 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialCallGraphProvider.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; + +import java.util.Collection; + +import org.eclipse.tracecompass.analysis.profiling.core.base.ICallStackElement; +import org.eclipse.tracecompass.analysis.profiling.core.base.ICallStackSymbol; +import org.eclipse.tracecompass.analysis.profiling.core.base.IDataPalette; +import org.eclipse.tracecompass.analysis.profiling.core.callgraph.AggregatedCallSite; +import org.eclipse.tracecompass.analysis.profiling.core.callgraph.ICallGraphProvider2; +import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeProvider; +import org.eclipse.tracecompass.analysis.profiling.core.tree.WeightedTree; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTree; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeSet; + +/** + * + * @author Fateme Faraji Daneshgar + */ +public class DifferentialCallGraphProvider extends DifferentialWeightedTreeProvider { + + private final ICallGraphProvider2 fOriginalTree; + + /** + * Constructor + * + * @param instrumentedCallStackAnalysis + * the original tree + * @param trees + * the other trees to compare + */ + public DifferentialCallGraphProvider(IWeightedTreeProvider instrumentedCallStackAnalysis, + Collection> trees) { + this(instrumentedCallStackAnalysis, DifferentialWeightedTreeSet. create(trees)); + } + + /** + * Constructor + * + * @param originalTree + * The original tree provider, used to get information for texts + * and metrics. + * @param treeSet + * The differential tree set + */ + @SuppressWarnings("unchecked") + public DifferentialCallGraphProvider( + IWeightedTreeProvider> originalTree, + DifferentialWeightedTreeSet treeSet) { + super((IWeightedTreeProvider>)originalTree, treeSet); + fOriginalTree = (ICallGraphProvider2) originalTree; + } + + @Override + public IDataPalette getPalette() { + return DifferentialFlamePalette.getInstance(); + } + + @SuppressWarnings("null") + @Override + public String toDisplayString(DifferentialWeightedTree tree) { + double difference = tree.getDifference(); + WeightedTree originalTree = tree.getOriginalTree(); + String label = ""; //$NON-NLS-1$ + if (originalTree instanceof AggregatedCallSite) { + label = fOriginalTree.toDisplayString((AggregatedCallSite) originalTree); + } + else { + label = String.valueOf(originalTree.getObject().resolve(null)); + } + if (Double.isFinite(difference)) { + return String.format("(%#.02f %% ) %s", difference * 100, label); //$NON-NLS-1$ + } + return label; + + } + +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialFlamePalette.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialFlamePalette.java new file mode 100644 index 000000000..971abe230 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialFlamePalette.java @@ -0,0 +1,184 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; + +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tracecompass.analysis.profiling.core.base.IDataPalette; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTree; +import org.eclipse.tracecompass.tmf.core.dataprovider.X11ColorUtils; +import org.eclipse.tracecompass.tmf.core.model.OutputElementStyle; +import org.eclipse.tracecompass.tmf.core.model.StyleProperties; +import org.eclipse.tracecompass.tmf.core.presentation.IPaletteProvider; +import org.eclipse.tracecompass.tmf.core.presentation.RGBAColor; +import org.eclipse.tracecompass.tmf.core.presentation.RotatingPaletteProvider; + +import com.google.common.collect.ImmutableMap; + +/** + * Class to manage the colors of the differential flame graph views + * + * @author Fateme Faraji Daneshgar + */ +public final class DifferentialFlamePalette implements IDataPalette { + + private static final String NAN = Objects.requireNonNull(Objects.toString(Double.NaN)); + private static final String NO_DIFFERENCE = "NO-Difference"; //$NON-NLS-1$ + private static String generateRed(int i) { + return "RED" + i; //$NON-NLS-1$ + } + + private static String generateBlue(int i) { + return "BLUE" + i; //$NON-NLS-1$ + } + + /** + * The state index for the multiple state + */ + private static double fMinThreshold = 1; + private static final int MIN_HUE = 0; + private static final int MAX_HUE = 255; + private static final int NUM_COLORS = 360; + private static final String RED_COLOR = Objects.requireNonNull(X11ColorUtils.toHexColor(255, 0, 0)); + private static final String WHITE_COLOR = Objects.requireNonNull(X11ColorUtils.toHexColor(255, 255, 255)); + + + private static final Map STYLES; + // Map of styles with the parent + private static final Map STYLE_MAP = Collections.synchronizedMap(new HashMap<>()); + + static { + IPaletteProvider palette = new RotatingPaletteProvider.Builder().setNbColors(NUM_COLORS).build(); + int i = 0; + ImmutableMap.Builder builder = new ImmutableMap.Builder<>(); + for (RGBAColor color : palette.get()) { + builder.put(String.valueOf(i), new OutputElementStyle(null, ImmutableMap.of( + StyleProperties.STYLE_NAME, String.valueOf(i), + StyleProperties.BACKGROUND_COLOR, X11ColorUtils.toHexColor(color.getRed(), color.getGreen(), color.getBlue()), + StyleProperties.OPACITY, (float) color.getAlpha() / 255, + StyleProperties.BORDER_STYLE, StyleProperties.BorderStyle.SOLID))); + i++; + } + int j=0; + // Add dark red color for Nan + builder.put(NAN, new OutputElementStyle(null, ImmutableMap.of( + StyleProperties.STYLE_NAME, NAN, + StyleProperties.BACKGROUND_COLOR, RED_COLOR, + StyleProperties.OPACITY, 1, + StyleProperties.BORDER_STYLE, StyleProperties.BorderStyle.SOLID))); + // Add White White for NoDifference + String noDiff = NO_DIFFERENCE; + builder.put(noDiff, new OutputElementStyle(null, ImmutableMap.of( + StyleProperties.STYLE_NAME, noDiff, + StyleProperties.BACKGROUND_COLOR, WHITE_COLOR, + StyleProperties.OPACITY, 1, + StyleProperties.BORDER_STYLE, StyleProperties.BorderStyle.SOLID))); + // Add Blue tenses for Shorter duration + for (i = MIN_HUE; i <= MAX_HUE; i++) { + j = (i-50)>0 ? i-50:0; + String blueKey = generateBlue(i); + builder.put(blueKey, new OutputElementStyle(null, ImmutableMap.of( + StyleProperties.STYLE_NAME, blueKey, + StyleProperties.BACKGROUND_COLOR, X11ColorUtils.toHexColor(j, i, 255), + StyleProperties.OPACITY, 1, + StyleProperties.BORDER_STYLE, StyleProperties.BorderStyle.SOLID))); + } + // Add Red tenses for Longer duration + for (i = MIN_HUE; i <= MAX_HUE; i++) { + String redKey = generateRed(i); + builder.put(redKey, new OutputElementStyle(null, ImmutableMap.of( + StyleProperties.STYLE_NAME, redKey, + StyleProperties.BACKGROUND_COLOR, X11ColorUtils.toHexColor(255, i, i), + StyleProperties.OPACITY, 1, + StyleProperties.BORDER_STYLE, StyleProperties.BorderStyle.SOLID))); + } + STYLES = builder.build(); + STYLE_MAP.putAll(STYLES); + } + + + private static @Nullable DifferentialFlamePalette fInstance = null; + + private DifferentialFlamePalette() { + // Do nothing + } + + /** + * Get the instance of this palette + * + * @return The instance of the palette + */ + public static DifferentialFlamePalette getInstance() { + DifferentialFlamePalette instance = fInstance; + if (instance == null) { + instance = new DifferentialFlamePalette(); + fInstance = instance; + } + return instance; + } + + /** + * Get the map of styles for this palette + * + * @return The styles + */ + @Override + public Map getStyles() { + return STYLES; + } + + /** + * Get the style element for a given value + * + * @param object + * The value to get an element for + * @return The output style + */ + + @Override + public OutputElementStyle getStyleFor(Object object) { + if (object instanceof DifferentialWeightedTree) { + DifferentialWeightedTree tree = (DifferentialWeightedTree) object; + double difference = tree.getDifference(); + double step = MAX_HUE - MIN_HUE; + if (Double.isNaN(difference)) { + return STYLE_MAP.computeIfAbsent(NAN, OutputElementStyle::new); + } + if ((difference <= 0.05) &&(difference >= -0.05)) { + return STYLE_MAP.computeIfAbsent(NO_DIFFERENCE, OutputElementStyle::new); + } + if (difference < 0) { + return STYLE_MAP.computeIfAbsent(generateBlue((int) (MAX_HUE + Math.floor(difference * step))), OutputElementStyle::new); + } + + if (Math.abs(difference) > fMinThreshold) { + difference = fMinThreshold; + } + + return STYLE_MAP.computeIfAbsent(generateRed(MAX_HUE - (int) (Math.floor((difference / fMinThreshold) * step))), OutputElementStyle::new); + + } + throw new IllegalStateException("Cannot find the value of " + object); //$NON-NLS-1$ + } + + /** + * @param min the minimum threshold for coloring. + */ + public static void setMinThreshold(double min) { + fMinThreshold = Math.round(min); + } + +} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java new file mode 100644 index 000000000..ddc9353d0 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java @@ -0,0 +1,377 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.logging.Level; +import java.util.logging.Logger; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tracecompass.analysis.profiling.core.base.ICallStackElement; +import org.eclipse.tracecompass.analysis.profiling.core.base.ICallStackSymbol; +import org.eclipse.tracecompass.analysis.profiling.core.callgraph.AggregatedCallSite; +import org.eclipse.tracecompass.analysis.profiling.core.callgraph.CallGraph; +import org.eclipse.tracecompass.analysis.profiling.core.callgraph.ICallGraphProvider2; +import org.eclipse.tracecompass.analysis.profiling.core.instrumented.InstrumentedCallStackAnalysis; +import org.eclipse.tracecompass.analysis.profiling.core.tree.ITree; +import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeProvider; +import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeSet; +import org.eclipse.tracecompass.analysis.profiling.core.tree.WeightedTree; +import org.eclipse.tracecompass.analysis.profiling.core.tree.WeightedTreeSet; +import org.eclipse.tracecompass.common.core.log.TraceCompassLog; +import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.ScopeLog; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTree; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeSet; +import org.eclipse.tracecompass.internal.analysis.profiling.core.callgraph2.AggregatedCalledFunction; +import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule; +import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; +import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; +import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; +import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; +import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager; +import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils; +import org.eclipse.tracecompass.tmf.core.trace.experiment.TmfExperiment; + +import com.google.common.collect.Iterables; + +/** + * build a differential call graph using the differentialWeightedTreeSet from + * two sets of call graphs. + * + * + * @author Fateme Faraji Daneshgar + */ +@SuppressWarnings("restriction") +public class DifferentialSeqCallGraphAnalysis extends TmfAbstractAnalysisModule { + + /** + * The ID + */ + public static final String ID = "org.eclipse.tracecompass.incubator.executioncomparision.diffcallgraph"; //$NON-NLS-1$ + private static final Logger LOGGER = TraceCompassLog.getLogger(DifferentialSeqCallGraphAnalysis.class); + + private static final String MERGE = "Merge"; //$NON-NLS-1$ + private @Nullable DifferentialCallGraphProvider fDifferentialCallGraphProvider; + private static Map fcallStackAnalysisMap = new HashMap<>(); + private static Map fTraceCallGraphRegistry = new HashMap<>(); + private ITmfTimestamp fStartA = TmfTimestamp.BIG_BANG; + private ITmfTimestamp fEndA = TmfTimestamp.BIG_CRUNCH; + private ITmfTimestamp fStartB = TmfTimestamp.BIG_BANG; + private ITmfTimestamp fEndB = TmfTimestamp.BIG_CRUNCH; + private String fStatistic = ""; //$NON-NLS-1$ + private List fTraceListA = new ArrayList<>(); + private List fTraceListB = new ArrayList<>(); + private @Nullable Job fDiffJob = null; + + /** + * Constructor + */ + public DifferentialSeqCallGraphAnalysis() { + super(); + // TODO: Make a way to register tracetype->callstack IDs. + fcallStackAnalysisMap.put("org.eclipse.tracecompass.incubator.traceevent.core.trace", "org.eclipse.tracecompass.incubator.traceevent.analysis.callstack"); //$NON-NLS-1$ //$NON-NLS-2$ + fcallStackAnalysisMap.put("org.eclipse.linuxtools.lttng2.ust.tracetype", "org.eclipse.tracecompass.incubator.callstack.core.lttng.ust"); //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * Refresh differential call graph + * + * @param monitor + * the progress monitor + */ + public void refreshDiffCG(@Nullable IProgressMonitor monitor) { + try (ScopeLog sl = new ScopeLog(LOGGER, Level.CONFIG, "DifferentialSequenceCGA::refresh()")) { //$NON-NLS-1$ + Collection> originalTree = new ArrayList<>(); + Collection> diffTree = new ArrayList<>(); + /* + * if (fEndA == null || fStartA == null) { fEndA = + * TmfTimestamp.BIG_CRUNCH; } if (fStartA == null) { fStartA = + * TmfTimestamp.BIG_BANG; } if (fEndB == null) { fEndB = + * TmfTimestamp.BIG_CRUNCH; } if (fStartB == null) { fStartB = + * TmfTimestamp.BIG_BANG; } + */ + WeightedTreeSet callGraphA = mergeCallGraph(fStartA, fEndA, fTraceListA); + Collection<@NonNull ?> processes = callGraphA.getTreesForNamed(MERGE); + for (Object process : processes) { + originalTree.add((AggregatedCalledFunction) process); + } + + WeightedTreeSet callGraphB = mergeCallGraph(fStartB, fEndB, fTraceListB); + processes = callGraphB.getTreesForNamed(MERGE); + for (Object process : processes) { + diffTree.add((AggregatedCalledFunction) process); + } + + Collection> trees; + if (diffTree.isEmpty()) { + trees = ParametricWeightedTreeUtils.diffTrees(diffTree, originalTree, fStatistic); + } else { + trees = ParametricWeightedTreeUtils.diffTrees(originalTree, diffTree, fStatistic); + } + + IWeightedTreeProvider instrumentedCallStackAnalysis = Iterables.get(fTraceCallGraphRegistry.values(), 0); + setDifferentialCallGraphProvider(new DifferentialCallGraphProvider(instrumentedCallStackAnalysis, trees)); + } + } + + /** + * Merge callgraph + * + * @param start + * the start time + * @param end + * the end time stamp + * @param traceList + * the list of traces to merge + * @return WeightedTreeSet the merged call graph + * + */ + public WeightedTreeSet mergeCallGraph(ITmfTimestamp start, ITmfTimestamp end, List traceList) { + try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "DifferenentialSequenceCGA::MergeCallGraph")) { //$NON-NLS-1$ + List cGList = new ArrayList<>(); + WeightedTreeSet newTreeSet = new WeightedTreeSet<>(); + String mainGroup = MERGE; + + for (String traceName : traceList) { + ICallGraphProvider2 instrumentedCallStackAnalysis = fTraceCallGraphRegistry.get(traceName); + if (instrumentedCallStackAnalysis != null) { + cGList.add(instrumentedCallStackAnalysis.getCallGraph(start, end)); + } + } + + for (CallGraph callGraph : cGList) { + Collection elements = getLeafElements(callGraph); + for (ICallStackElement element : elements) { + recurseAddElementData(element, mainGroup, callGraph, newTreeSet); + } + } + return newTreeSet; + } + } + + /** + * get CallGraph + * + * @return DifferentialCallGraph + */ + public IWeightedTreeSet> getCallGraph() { + DifferentialCallGraphProvider differentialCallGraphProvider = getDifferentialCallGraphProvider(); + if (differentialCallGraphProvider != null) { + return differentialCallGraphProvider.getTreeSet(); + } + return new DifferentialWeightedTreeSet<>(); + } + + /** + * Get the differential weighted tree provider + * + * @param monitor + * the monitor, can be null + * @return the differential weighted provider or null + */ + public @Nullable DifferentialWeightedTreeProvider getDiffProvider(@Nullable IProgressMonitor monitor) { + if (fTraceCallGraphRegistry.isEmpty()) { + InstrumentedCallStackAnalysis callGraphModule; + ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); + Collection traceSet = TmfTraceManager.getTraceSet(trace); + for (ITmfTrace traceMember : traceSet) { + Iterable modules = TmfTraceUtils.getAnalysisModulesOfClass(traceMember, InstrumentedCallStackAnalysis.class); + for (InstrumentedCallStackAnalysis module : modules) { + if (module.getId().equals(fcallStackAnalysisMap.get(traceMember.getTraceTypeId()))) { + callGraphModule = module; + callGraphModule.schedule(); + fTraceCallGraphRegistry.put(String.valueOf(traceMember.getName()), callGraphModule); + callGraphModule.waitForCompletion(); + break; + } + } + } + refreshDiffCG(monitor); + } + return getDifferentialCallGraphProvider(); + + } + + /** + * mergeCG merge two aggregated called functions + * + * @param cg1 + * first aggregated called function + * @param cg2 + * second aggregated called function + * @return AggregatedCalledFunction the resulting aggregated called function + */ + public AggregatedCalledFunction mergeCG(AggregatedCalledFunction cg1, AggregatedCalledFunction cg2) { + AggregatedCalledFunction merged = cg1.copyOf(); + merged.meanData(cg2); + /// As the merge function in Weighted tree adds the values og two trees, + /// we need to divide them by 2. + return merged; + + } + + private static Collection getLeafElements(CallGraph weightedTree) { + Collection elements = weightedTree.getElements(); + List leafGroups = new ArrayList<>(); + for (ICallStackElement group : elements) { + leafGroups.addAll(getLeafElement(group)); + } + return leafGroups; + + } + + private static List getLeafElement(ICallStackElement group) { + if (group.isLeaf()) { + return Collections.singletonList(group); + } + List leafGroups = new ArrayList<>(); + group.getChildrenElements().forEach(g -> leafGroups.addAll(getLeafElement(g))); + return leafGroups; + } + + private static void recurseAddElementData(ICallStackElement element, String group, CallGraph callGraph, WeightedTreeSet newTreeSet) { + + // Add the current level of trees to the new tree set + for (AggregatedCallSite tree : callGraph.getCallingContextTree(element)) { + newTreeSet.addWeightedTree(group, tree.copyOf()); + } + + // Recursively add the next level of elements + ICallStackElement treeEl = element; + Collection children = treeEl.getChildren(); + for (ITree child : children) { + if (child instanceof ICallStackElement) { + recurseAddElementData((ICallStackElement) child, group, callGraph, newTreeSet); + } + } + } + + @Override + protected boolean executeAnalysis(IProgressMonitor monitor) throws TmfAnalysisException { + return true; + } + + @Override + public boolean waitForCompletion() { + return true; + + } + + @Override + protected void canceling() { + + } + + /** + * @param signal + * TmfComparisonFilteringUpdatedSignal raised when filtering + * parameter are changed + * + */ + @TmfSignalHandler + public void selectionRangeUpdated(TmfComparisonFilteringUpdatedSignal signal) { + // tuning start and end times + fStartA = TmfTimestamp.BIG_BANG.equals(signal.getBeginTimeA()) ? fStartA : signal.getBeginTimeA(); + fEndA = TmfTimestamp.BIG_CRUNCH.equals(signal.getEndTimeA()) ? fEndA : signal.getEndTimeA(); + fStartB = TmfTimestamp.BIG_BANG.equals(signal.getBeginTimeB()) ? fStartB : signal.getBeginTimeB(); + fEndB = TmfTimestamp.BIG_CRUNCH.equals(signal.getEndTimeB()) ? fEndB : signal.getEndTimeB(); + // tuning fStatistic + String statistic = signal.getStatistic(); + fStatistic = (statistic == null) ? fStatistic : statistic; + // tuning fTraceList + List traceListA = signal.getTraceListA(); + if (traceListA != null) { + for (String name : traceListA) { + if (fTraceListA.contains(name)) { + fTraceListA.remove(name); + } else { + fTraceListA.add(name); + } + } + } + List traceListB = signal.getTraceListB(); + if (traceListB != null) { + for (String name : traceListB) { + if (fTraceListB.contains(name)) { + fTraceListB.remove(name); + } else { + fTraceListB.add(name); + } + } + } + if (!fTraceCallGraphRegistry.isEmpty()) { + try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MakeDiffCallGraph")) { //$NON-NLS-1$ + synchronized (this) { + if (fDiffJob != null) { + fDiffJob.join(); + } + fDiffJob = new Job("Make differential Callgraph") { //$NON-NLS-1$ + @Override + protected IStatus run(@Nullable IProgressMonitor monitor) { + refreshDiffCG(monitor); + if (monitor != null) { + monitor.done(); + } + return Status.OK_STATUS; + } + }; + fDiffJob.schedule(); + } + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + + } + + @Override + public boolean canExecute(ITmfTrace trace) { + return (trace instanceof TmfExperiment); + + } + + @Override + public void dispose() { + super.dispose(); + TmfSignalManager.deregister(this); + } + + /** + * @return the differentialCallGraphProvider + */ + private @Nullable DifferentialCallGraphProvider getDifferentialCallGraphProvider() { + return fDifferentialCallGraphProvider; + } + + /** + * @param differentialCallGraphProvider + * the differentialCallGraphProvider to set + */ + private void setDifferentialCallGraphProvider(@Nullable DifferentialCallGraphProvider differentialCallGraphProvider) { + fDifferentialCallGraphProvider = Objects.requireNonNull(differentialCallGraphProvider); + } + +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/Messages.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/Messages.java new file mode 100644 index 000000000..39d85c825 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/Messages.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; + +import org.apache.commons.lang3.StringUtils; +//import org.apache.commons.lang3.StringUtils; +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.osgi.util.NLS; + +/** + * Messages for Syscall latency analysis. + */ +public class Messages extends NLS { + + private static final String BUNDLE_NAME = "org.eclipse.tracecompass.internal.analysis.os.linux.core.latency.messages"; //$NON-NLS-1$ + + /** Execution Duration aspect name */ + public static @Nullable String SegmentAspectName_Duration; + + /** Execution Duration aspect help text */ + public static @Nullable String SegmentAspectHelpText_Duration; + + /** Execution SelfTime aspect help text */ + public static @Nullable String SegmentAspectHelpText_SelfTime; + + /** Execution SelfTime aspect name */ + public static @Nullable String SegmentAspectName_SelfTime; + + /** Execution CpuTime aspect help text */ + public static @Nullable String SegmentAspectHelpText_CpuTime; + + /** Execution CpuTime aspect name */ + public static @Nullable String SegmentAspectName_CpuTime; + + + + + static { + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } + + /** + * Helper method to expose externalized strings as non-null objects. + */ + static String getMessage(@Nullable String msg) { + if (msg == null) { + return StringUtils.EMPTY; + } + return msg; + } +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java new file mode 100644 index 000000000..97d9dcd60 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java @@ -0,0 +1,246 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tracecompass.analysis.profiling.core.base.ICallStackSymbol; +import org.eclipse.tracecompass.analysis.profiling.core.callgraph.ICallGraphProvider2; +import org.eclipse.tracecompass.analysis.profiling.core.tree.ITree; +import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeSet; +import org.eclipse.tracecompass.analysis.profiling.core.tree.WeightedTree; +//import org.eclipse.tracecompass.incubator.analysis.core.concepts.ICallStackSymbol; +//import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.ITree; +//import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider; +//import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeSet; +//import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTree; +//import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTreeUtils; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTree; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeSet; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.WeightedTreeUtils; +import org.eclipse.tracecompass.internal.analysis.profiling.core.callgraph2.AggregatedCalledFunction; +//import org.eclipse.tracecompass.incubator.callstack.core.callgraph.ICallGraphProvider; +//import org.eclipse.tracecompass.incubator.internal.callstack.core.instrumented.callgraph.AggregatedCalledFunction; +import org.eclipse.tracecompass.tmf.core.util.Pair; + +import com.google.common.collect.ImmutableList; + +/** + * Utility methods to operate on {@link WeightedTree} objects + * + * @author Fateme Faraji Daneshgar + */ +@SuppressWarnings("restriction") +public final class ParametricWeightedTreeUtils { + + private ParametricWeightedTreeUtils() { + // Nothing to do + } + + /** + * Does the differential between 2 weighted trees, ie what happened in tree2 + * differently than in tree1. The base weight come from the second tree and + * the differential value will show the difference with the first tree. + * + * @param + * The type of element in the tree + * @param first + * The tree that will be differentiated. + * @param second + * The tree to use as the base + * @param statisticType + * it determine the statistic (duration or self time) that flame graph will represent + * @return The differential weighted tree + */ + public static <@NonNull T> Collection> diffTrees(Collection> first, Collection> second, @Nullable String statisticType) { + List> diffTrees = new ArrayList<>(); + double nullDiff = Double.NaN; + + for (WeightedTree base : second) { + T object = base.getObject(); + // Find the equivalent tree in the first collection + WeightedTree other = findObject(first, object); + double diffWeight; + DifferentialWeightedTree<@NonNull T> diffTree; + if (statisticType == null) { + diffWeight = other == null ? nullDiff : (double) (base.getWeight() - other.getWeight()) / other.getWeight(); + diffTree = new DifferentialWeightedTree<>(base, object, base.getWeight(), diffWeight); + + } else { + long baseWeight; + long otherWeight; + if (base instanceof AggregatedCalledFunction) { + baseWeight = ((AggregatedCalledFunction) base).getWeight(statisticType); + otherWeight = other == null ? 0 : ((AggregatedCalledFunction) other).getWeight(statisticType); + + } else { + baseWeight = base.getWeight(); + otherWeight = other == null ? 0 : other.getWeight(); + } + diffWeight = other == null ? nullDiff : (double) (baseWeight - otherWeight) / otherWeight; + diffTree = new DifferentialWeightedTree<>(base, object, base.getWeight(), diffWeight); + + } + diffTrees.add(diffTree); + + // Make the differential of the children + for (WeightedTree childTree : diffTrees(other == null ? Collections.emptyList() : other.getChildren(), base.getChildren(), statisticType)) { + diffTree.addChild(childTree); + } + } + return diffTrees; + } + + /** + * Does the differential between 2 weighted tree sets, ie for each + * comparable elements, what happened in tree set 2 differently than in tree + * set 1. The base weight come from the second tree set and the differential + * value will show the difference with the first tree. + *

+ * Calling this method assumes the tree sets are comparable. It is the + * caller's responsibility to make sure the parameters make sense. If the 2 + * tree sets come from different {@link IWeightedTreeProvider}, they should + * be of similar types, otherwise, the comparison may not make sense. + *

+ *

+ * The elements of each tree set are paired as follows: + *

+ *

+ * 1- If there is only one element in each tree, they will be paired. + *

+ *

+ * 2- If the same elements are present in both tree sets, they will be + * paired, all other elements are ignored + *

+ *

+ * 3- If no elements are paired, they will be paired by name (and + * hierarchical names, if it applies). Unmatched elements will be ignored. + *

+ *

+ * If elements are not paired at this point, it will return + * null + *

+ * + * @param provider + * The base provider of one of the trees, it will be used by the + * differential weighted tree provider to display the metrics and + * titles, etc.. It could be the provider of the second tree set, + * as it serves as the base values. + * @param first + * The first treeset to compare to + * @param second + * The second treeset to compare. + * @return A differential weighted tree provider wrapping the resulting tree + * set, or null if the 2 treesets have no elements in + * common + */ + public static @Nullable DifferentialWeightedTreeProvider diffTreeSets(ICallGraphProvider2 provider, + IWeightedTreeSet> first, + IWeightedTreeSet> second) { + Collection> pairedElements = pairElementsFromTrees(first, second); + if (pairedElements.isEmpty()) { + return null; + } + DifferentialWeightedTreeSet treeSet = new DifferentialWeightedTreeSet<>(); + for (Pair<@NonNull ?, @NonNull ?> pair : pairedElements) { + Collection> trees1 = first.getTreesFor(pair.getFirst()); + Collection> trees2 = second.getTreesFor(pair.getSecond()); + Collection> diffTrees = WeightedTreeUtils.diffTrees(trees1, trees2); + for (DifferentialWeightedTree tree : diffTrees) { + treeSet.addWeightedTree(pair.getFirst(), tree); + } + } + + return new DifferentialWeightedTreeProvider(provider, treeSet); + } + + private static <@NonNull N> Collection> pairElementsFromTrees(IWeightedTreeSet> first, IWeightedTreeSet> second) { + Collection<@NonNull ?> elements1 = first.getElements(); + Collection<@NonNull ?> elements2 = second.getElements(); + // If there is only one element and it is not a tree, pair it + if (elements1.size() == 1 && elements2.size() == 1) { + @NonNull + Object element1 = elements1.iterator().next(); + @NonNull + Object element2 = elements2.iterator().next(); + if (!(element1 instanceof ITree) && !(element2 instanceof ITree)) { + return ImmutableList.of(new Pair(element1, element2)); + } + } + + // Try to find equal elements in both trees + Collection> pairedElements = pairEqualElements(elements1, elements2); + if (!pairedElements.isEmpty()) { + return pairedElements; + } + + // Compare ITree elements by names + pairedElements = pairSameNameElements(elements1, elements2); + return pairedElements; + } + + private static Collection> pairEqualElements(Collection<@NonNull ?> elements1, Collection<@NonNull ?> elements2) { + List> pairedElements = new ArrayList<>(); + for (@NonNull + Object element1 : elements1) { + for (@NonNull + Object element2 : elements2) { + if (element1.equals(element2)) { + pairedElements.add(new Pair<>(element1, element1)); + if (element1 instanceof ITree && element2 instanceof ITree) { + pairedElements.addAll(pairEqualElements(((ITree) element1).getChildren(), ((ITree) element2).getChildren())); + } + break; + } + } + } + return pairedElements; + } + + private static Collection> pairSameNameElements(Collection<@NonNull ?> elements1, Collection elements2) { + List> pairedElements = new ArrayList<>(); + for (@NonNull + Object element1 : elements1) { + if (!(element1 instanceof ITree)) { + continue; + } + for (@NonNull + Object element2 : elements2) { + if (!(element2 instanceof ITree)) { + continue; + } + if (((ITree) element1).getName().equals(((ITree) element2).getName())) { + pairedElements.add(new Pair<>(element1, element2)); + pairedElements.addAll(pairSameNameElements(((ITree) element1).getChildren(), ((ITree) element2).getChildren())); + break; + } + } + } + return pairedElements; + } + + private static @Nullable <@NonNull T> WeightedTree findObject(Collection> tree, @NonNull T object) { + for (WeightedTree other : tree) { + if (other.getObject().equals(object)) { + return other; + } + } + return null; + } + +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfCheckboxChangedSignal.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfCheckboxChangedSignal.java new file mode 100644 index 000000000..1881f1e5f --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfCheckboxChangedSignal.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; + + +import java.util.List; + +import org.eclipse.tracecompass.tmf.core.signal.TmfSignal; + +/** + * TmfCheckboxChangedSignal for handling check box change events + * + * * @author Fateme Faraji Daneshgar + */ +public class TmfCheckboxChangedSignal extends TmfSignal { + + private List fTraceList; + + /** + * @param source + * the source class of signal + * @param traceList + * the list of traces remains checked in the check box + */ + public TmfCheckboxChangedSignal(Object source, List traceList) { + super(source); + fTraceList = traceList; + } + + /** + * @return the list of traces remains checked in the check box + */ + public List getTraceList() { + return fTraceList; + } + + + +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfComparisonFilteringUpdatedSignal.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfComparisonFilteringUpdatedSignal.java new file mode 100644 index 000000000..39cfd6c6a --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfComparisonFilteringUpdatedSignal.java @@ -0,0 +1,155 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; + +import java.util.List; + +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignal; +import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; +import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; + + +/** + * + */ +public class TmfComparisonFilteringUpdatedSignal extends TmfSignal { + + private final ITmfTimestamp fBeginTimeA; + private final ITmfTimestamp fEndTimeA; + private final ITmfTimestamp fBeginTimeB; + private final ITmfTimestamp fEndTimeB; + private @Nullable String fStatistic; + private @Nullable List fTraceListA; + private @Nullable List fTraceListB; + + /** + * @param source + * the class that has generated the signal + * @param beginA + * the start time in event density chartA + * @param endA + * the end time in event density chartA + * @param beginB + * the start time in event density chartB + * @param endB + * the end time in event density chartA + * @param statistic + * the statistic that will be represented in the flame graph + * @param traceListA + * the list of traces in group A + * @param traceListB + * the list of traces in group B + */ + public TmfComparisonFilteringUpdatedSignal(Object source, ITmfTimestamp beginA, ITmfTimestamp endA, ITmfTimestamp beginB, ITmfTimestamp endB, @Nullable String statistic, @Nullable List traceListA, @Nullable List traceListB) { + super(source); + fBeginTimeA = beginA; + fEndTimeA = endA; + fBeginTimeB = beginB; + fEndTimeB = endB; + fStatistic = statistic; + fTraceListA = traceListA; + fTraceListB = traceListB; + } + + /** + * @param source + * the class that has generated the signal + + * @param statistic + * the statistic that will be represented in the flame graph + * @param traceListA + * the list of traces in group A + * @param traceListB + * the list of traces in group B + */ + public TmfComparisonFilteringUpdatedSignal(Object source, @Nullable String statistic, @Nullable List traceListA, @Nullable List traceListB) { + this(source, TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH, TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH, statistic, traceListA, traceListB); + } + + /** + * @return The begin timestamp of selection in GroupA + */ + public ITmfTimestamp getBeginTimeA() { + return fBeginTimeA; + } + + /** + * @return The end timestamp of selection in GroupA + */ + public ITmfTimestamp getEndTimeA() { + return fEndTimeA; + } + + /** + * @return The begin timestamp of selection in GroupB + */ + public ITmfTimestamp getBeginTimeB() { + return fBeginTimeB; + } + + /** + * @return The end timestamp of selection in GroupB + */ + public ITmfTimestamp getEndTimeB() { + return fEndTimeB; + } + + /** + * @return the type of statistic that will be represented in flame graph + */ + public @Nullable String getStatistic() { + return fStatistic; + } + + /** + * @return the list of traces in groupA + */ + public @Nullable List getTraceListA() { + return fTraceListA; + } + + /** + * @return the list of traces in groupB + */ + public @Nullable List getTraceListB() { + return fTraceListB; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); //$NON-NLS-1$ + if (!TmfTimestamp.BIG_BANG.equals(fBeginTimeA)) { + sb.append(fBeginTimeA.toString()); + if (!fBeginTimeA.equals(fEndTimeA)) { + sb.append('-'); + sb.append(fEndTimeA.toString()); + } + } + if (!TmfTimestamp.BIG_BANG.equals(fBeginTimeB)) { + sb.append(fBeginTimeB.toString()); + if (!fBeginTimeB.equals(fEndTimeB)) { + sb.append('-'); + sb.append(fEndTimeB.toString()); + } + } + if (fStatistic != null) { + sb.append(fStatistic); + } + + sb.append("]"); //$NON-NLS-1$ + return sb.toString(); + } + +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/messages.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/messages.properties new file mode 100644 index 000000000..437f34be2 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/messages.properties @@ -0,0 +1,23 @@ +############################################################################### +# Copyright (c) 2015 Ericsson +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +SegmentAspectName_Duration = Duration + +SegmentAspectHelpText_Duration = Duration of an execution + +SegmentAspectName_SelfTime = SelfTime + +SegmentAspectHelpText_SelfTime = SelfTime of an execution + +SegmentAspectName_CpuTime = CpuTime + +SegmentAspectHelpText_CpufTime = CpuTime of an execution + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/package-info.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/package-info.java new file mode 100644 index 000000000..3fc4aa5f5 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/package-info.java @@ -0,0 +1,13 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +@org.eclipse.jdt.annotation.NonNullByDefault +package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.classpath b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.classpath new file mode 100644 index 000000000..b8d064f66 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.classpath @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.gitignore b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.gitignore new file mode 100644 index 000000000..750e145aa --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.gitignore @@ -0,0 +1 @@ +screenshots/ diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project new file mode 100644 index 000000000..45667e207 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project @@ -0,0 +1,34 @@ + + + org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..99f26c020 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 000000000..5a0ad22d2 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..bb4dd23d9 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,428 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes=f +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=error +org.eclipse.jdt.core.compiler.problem.deadCode=error +org.eclipse.jdt.core.compiler.problem.deprecation=error +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=error +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=error +org.eclipse.jdt.core.compiler.problem.finalParameterBound=error +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=error +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning +org.eclipse.jdt.core.compiler.problem.nullReference=error +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error +org.eclipse.jdt.core.compiler.problem.parameterAssignment=error +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error +org.eclipse.jdt.core.compiler.problem.potentialNullReference=error +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.rawTypeReference=error +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=error +org.eclipse.jdt.core.compiler.problem.unusedLocal=error +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error +org.eclipse.jdt.core.compiler.source=1.8 +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=250 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 000000000..dbbef8b06 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,60 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_tmf-test-style +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.overrideannotation=true +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=false +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=false +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.pde.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.pde.prefs new file mode 100644 index 000000000..c367d4bd0 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.pde.prefs @@ -0,0 +1,32 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=0 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=0 +compilers.p.build.src.includes=0 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=1 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=2 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF new file mode 100644 index 000000000..ec7a03798 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF @@ -0,0 +1,19 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-Vendor: %Bundle-Vendor +Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-Localization: plugin +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Require-Bundle: org.eclipse.core.resources, + org.eclipse.core.runtime, + org.eclipse.swtbot.eclipse.finder, + org.eclipse.swtbot.junit4_x, + org.eclipse.ui, + org.eclipse.ui.ide, + org.eclipse.ui.views, + org.junit, + org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional +Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/about.html b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/about.html new file mode 100644 index 000000000..164f781a8 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/build.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/build.properties new file mode 100644 index 000000000..fc2472710 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/build.properties @@ -0,0 +1,17 @@ +############################################################################### +# Copyright (c) 2022 École Polytechnique de Montréal +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.properties diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/plugin.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/plugin.properties new file mode 100644 index 000000000..096c865e8 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/plugin.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2022 École Polytechnique de Montréal +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +Bundle-Vendor = Eclipse Trace Compass Incubator +Bundle-Name = Trace Compass ExecutionComparision UI Plug-in (Incubator) + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/swtbot-test-plugin.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/swtbot-test-plugin.properties new file mode 100644 index 000000000..338038b93 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/swtbot-test-plugin.properties @@ -0,0 +1 @@ +# This file tells the Maven build to use the settings for SWTBot test plugins diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.classpath b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.classpath new file mode 100644 index 000000000..1d57be56a --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.classpath @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.gitignore b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.gitignore new file mode 100644 index 000000000..ae3c17260 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.gitignore @@ -0,0 +1 @@ +/bin/ diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.project new file mode 100644 index 000000000..e845fa270 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.project @@ -0,0 +1,34 @@ + + + org.eclipse.tracecompass.incubator.executioncomparision.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.api.tools.apiAnalysisBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.pde.api.tools.apiAnalysisNature + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/.api_filters b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/.api_filters new file mode 100644 index 000000000..f301ddc4b --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/.api_filters @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.resources.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 000000000..99f26c020 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/=UTF-8 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.runtime.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.runtime.prefs new file mode 100644 index 000000000..5a0ad22d2 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.runtime.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +line.separator=\n diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.core.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 000000000..de3c0a04e --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,465 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.builder.annotationPath.allLocations=disabled +org.eclipse.jdt.core.codeComplete.argumentPrefixes= +org.eclipse.jdt.core.codeComplete.argumentSuffixes= +org.eclipse.jdt.core.codeComplete.fieldPrefixes=f +org.eclipse.jdt.core.codeComplete.fieldSuffixes= +org.eclipse.jdt.core.codeComplete.localPrefixes= +org.eclipse.jdt.core.codeComplete.localSuffixes= +org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= +org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotatedTypeArgumentToUnannotated=info +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=error +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error +org.eclipse.jdt.core.compiler.problem.fallthroughCase=error +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=error +org.eclipse.jdt.core.compiler.problem.finalParameterBound=error +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error +org.eclipse.jdt.core.compiler.problem.forbiddenReference=error +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.localVariableHiding=error +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=warning +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error +org.eclipse.jdt.core.compiler.problem.parameterAssignment=error +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error +org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.suppressWarningsNotFullyAnalysed=info +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=error +org.eclipse.jdt.core.compiler.problem.unusedLabel=error +org.eclipse.jdt.core.compiler.problem.unusedLocal=error +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=error +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=80 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_lines_in_comments=true +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=250 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.ui.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 000000000..232a3fd76 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,60 @@ +eclipse.preferences.version=1 +editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true +formatter_profile=_tmf-style +formatter_settings_version=12 +org.eclipse.jdt.ui.exception.name=e +org.eclipse.jdt.ui.gettersetter.use.is=true +org.eclipse.jdt.ui.keywordthis=false +org.eclipse.jdt.ui.overrideannotation=true +sp_cleanup.add_default_serial_version_id=true +sp_cleanup.add_generated_serial_version_id=false +sp_cleanup.add_missing_annotations=false +sp_cleanup.add_missing_deprecated_annotations=true +sp_cleanup.add_missing_methods=false +sp_cleanup.add_missing_nls_tags=false +sp_cleanup.add_missing_override_annotations=true +sp_cleanup.add_missing_override_annotations_interface_methods=true +sp_cleanup.add_serial_version_id=false +sp_cleanup.always_use_blocks=true +sp_cleanup.always_use_parentheses_in_expressions=false +sp_cleanup.always_use_this_for_non_static_field_access=false +sp_cleanup.always_use_this_for_non_static_method_access=false +sp_cleanup.convert_to_enhanced_for_loop=false +sp_cleanup.correct_indentation=false +sp_cleanup.format_source_code=false +sp_cleanup.format_source_code_changes_only=false +sp_cleanup.make_local_variable_final=false +sp_cleanup.make_parameters_final=false +sp_cleanup.make_private_fields_final=true +sp_cleanup.make_type_abstract_if_missing_method=false +sp_cleanup.make_variable_declarations_final=false +sp_cleanup.never_use_blocks=false +sp_cleanup.never_use_parentheses_in_expressions=true +sp_cleanup.on_save_use_additional_actions=true +sp_cleanup.organize_imports=false +sp_cleanup.qualify_static_field_accesses_with_declaring_class=false +sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true +sp_cleanup.qualify_static_member_accesses_with_declaring_class=false +sp_cleanup.qualify_static_method_accesses_with_declaring_class=false +sp_cleanup.remove_private_constructors=true +sp_cleanup.remove_trailing_whitespaces=true +sp_cleanup.remove_trailing_whitespaces_all=true +sp_cleanup.remove_trailing_whitespaces_ignore_empty=false +sp_cleanup.remove_unnecessary_casts=false +sp_cleanup.remove_unnecessary_nls_tags=false +sp_cleanup.remove_unused_imports=false +sp_cleanup.remove_unused_local_variables=false +sp_cleanup.remove_unused_private_fields=true +sp_cleanup.remove_unused_private_members=false +sp_cleanup.remove_unused_private_methods=true +sp_cleanup.remove_unused_private_types=true +sp_cleanup.sort_members=false +sp_cleanup.sort_members_all=false +sp_cleanup.use_blocks=true +sp_cleanup.use_blocks_only_for_return_and_throw=false +sp_cleanup.use_parentheses_in_expressions=false +sp_cleanup.use_this_for_non_static_field_access=false +sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true +sp_cleanup.use_this_for_non_static_method_access=false +sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.api.tools.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.api.tools.prefs new file mode 100644 index 000000000..3c9b07acf --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.api.tools.prefs @@ -0,0 +1,99 @@ +ANNOTATION_ELEMENT_TYPE_ADDED_METHOD_WITHOUT_DEFAULT_VALUE=Error +ANNOTATION_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_FIELD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_METHOD=Error +ANNOTATION_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_API_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_REEXPORTED_TYPE=Error +API_COMPONENT_ELEMENT_TYPE_REMOVED_TYPE=Error +API_USE_SCAN_FIELD_SEVERITY=Error +API_USE_SCAN_METHOD_SEVERITY=Error +API_USE_SCAN_TYPE_SEVERITY=Error +CLASS_ELEMENT_TYPE_ADDED_FIELD=Ignore +CLASS_ELEMENT_TYPE_ADDED_METHOD=Error +CLASS_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +CLASS_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CLASS_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +CLASS_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +CLASS_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +CLASS_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +CLASS_ELEMENT_TYPE_REMOVED_CONSTRUCTOR=Error +CLASS_ELEMENT_TYPE_REMOVED_FIELD=Error +CLASS_ELEMENT_TYPE_REMOVED_METHOD=Error +CLASS_ELEMENT_TYPE_REMOVED_SUPERCLASS=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +CLASS_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +CONSTRUCTOR_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +CONSTRUCTOR_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +ENUM_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +ENUM_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +ENUM_ELEMENT_TYPE_REMOVED_ENUM_CONSTANT=Error +ENUM_ELEMENT_TYPE_REMOVED_FIELD=Error +ENUM_ELEMENT_TYPE_REMOVED_METHOD=Error +ENUM_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +FIELD_ELEMENT_TYPE_ADDED_VALUE=Error +FIELD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +FIELD_ELEMENT_TYPE_CHANGED_FINAL_TO_NON_FINAL_STATIC_CONSTANT=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +FIELD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +FIELD_ELEMENT_TYPE_CHANGED_TYPE=Error +FIELD_ELEMENT_TYPE_CHANGED_VALUE=Error +FIELD_ELEMENT_TYPE_REMOVED_TYPE_ARGUMENT=Error +FIELD_ELEMENT_TYPE_REMOVED_VALUE=Error +ILLEGAL_EXTEND=Warning +ILLEGAL_IMPLEMENT=Warning +ILLEGAL_INSTANTIATE=Warning +ILLEGAL_OVERRIDE=Warning +ILLEGAL_REFERENCE=Warning +INTERFACE_ELEMENT_TYPE_ADDED_DEFAULT_METHOD=Ignore +INTERFACE_ELEMENT_TYPE_ADDED_FIELD=Error +INTERFACE_ELEMENT_TYPE_ADDED_METHOD=Error +INTERFACE_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +INTERFACE_ELEMENT_TYPE_ADDED_SUPER_INTERFACE_WITH_METHODS=Error +INTERFACE_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +INTERFACE_ELEMENT_TYPE_CHANGED_CONTRACTED_SUPERINTERFACES_SET=Error +INTERFACE_ELEMENT_TYPE_CHANGED_TYPE_CONVERSION=Error +INTERFACE_ELEMENT_TYPE_REMOVED_FIELD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_METHOD=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_MEMBER=Error +INTERFACE_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +INVALID_JAVADOC_TAG=Warning +INVALID_REFERENCE_IN_SYSTEM_LIBRARIES=Warning +LEAK_EXTEND=Warning +LEAK_FIELD_DECL=Warning +LEAK_IMPLEMENT=Warning +LEAK_METHOD_PARAM=Warning +LEAK_METHOD_RETURN_TYPE=Warning +METHOD_ELEMENT_TYPE_ADDED_RESTRICTIONS=Error +METHOD_ELEMENT_TYPE_ADDED_TYPE_PARAMETER=Error +METHOD_ELEMENT_TYPE_CHANGED_DECREASE_ACCESS=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_ABSTRACT_TO_ABSTRACT=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_FINAL_TO_FINAL=Error +METHOD_ELEMENT_TYPE_CHANGED_NON_STATIC_TO_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_STATIC_TO_NON_STATIC=Error +METHOD_ELEMENT_TYPE_CHANGED_VARARGS_TO_ARRAY=Error +METHOD_ELEMENT_TYPE_REMOVED_ANNOTATION_DEFAULT_VALUE=Error +METHOD_ELEMENT_TYPE_REMOVED_TYPE_PARAMETER=Error +MISSING_EE_DESCRIPTIONS=Ignore +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_ADDED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_CHANGED_INTERFACE_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_CLASS_BOUND=Error +TYPE_PARAMETER_ELEMENT_TYPE_REMOVED_INTERFACE_BOUND=Error +UNUSED_PROBLEM_FILTERS=Warning +automatically_removed_unused_problem_filters=false +eclipse.preferences.version=1 +incompatible_api_component_version=Error +incompatible_api_component_version_include_major_without_breaking_change=Disabled +incompatible_api_component_version_include_minor_without_api_change=Disabled +invalid_since_tag_version=Error +malformed_since_tag=Error +missing_since_tag=Error +report_api_breakage_when_major_version_incremented=Disabled +report_resolution_errors_api_component=Warning diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.prefs new file mode 100644 index 000000000..01d624df1 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.prefs @@ -0,0 +1,32 @@ +compilers.f.unresolved-features=1 +compilers.f.unresolved-plugins=1 +compilers.incompatible-environment=1 +compilers.p.build=1 +compilers.p.build.bin.includes=0 +compilers.p.build.encodings=2 +compilers.p.build.java.compiler=2 +compilers.p.build.java.compliance=1 +compilers.p.build.missing.output=2 +compilers.p.build.output.library=1 +compilers.p.build.source.library=0 +compilers.p.build.src.includes=0 +compilers.p.deprecated=1 +compilers.p.discouraged-class=1 +compilers.p.internal=1 +compilers.p.missing-packages=1 +compilers.p.missing-version-export-package=2 +compilers.p.missing-version-import-package=2 +compilers.p.missing-version-require-bundle=2 +compilers.p.no-required-att=0 +compilers.p.not-externalized-att=1 +compilers.p.unknown-attribute=1 +compilers.p.unknown-class=1 +compilers.p.unknown-element=1 +compilers.p.unknown-identifier=1 +compilers.p.unknown-resource=1 +compilers.p.unresolved-ex-points=0 +compilers.p.unresolved-import=0 +compilers.s.create-docs=false +compilers.s.doc-folder=doc +compilers.s.open-tags=1 +eclipse.preferences.version=1 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF new file mode 100644 index 000000000..49776719c --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF @@ -0,0 +1,26 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %Bundle-Name +Bundle-Vendor: %Bundle-Vendor +Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparision.ui;singleton:=true +Bundle-Version: 0.1.0.qualifier +Bundle-Localization: plugin +Bundle-Activator: org.eclipse.tracecompass.incubator.internal.executioncomparision.ui.Activator +Bundle-ActivationPolicy: lazy +Bundle-RequiredExecutionEnvironment: JavaSE-17 +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.tracecompass.common.core, + org.eclipse.tracecompass.tmf.core, + org.eclipse.tracecompass.tmf.ui, + org.eclipse.tracecompass.incubator.callstack.ui, + org.eclipse.tracecompass.incubator.callstack.core, + org.eclipse.tracecompass.incubator.analysis.core, + org.eclipse.tracecompass.incubator.executioncomparision.core, + org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional, + jakarta.validation.jakarta.validation-api, + org.eclipse.tracecompass.analysis.profiling.core +Export-Package: org.eclipse.tracecompass.incubator.internal.executioncomparision.ui;x-internal:=true +Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparision.ui +Import-Package: com.google.common.collect, + org.eclipse.swtchart diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/about.html b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/about.html new file mode 100644 index 000000000..164f781a8 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/about.html @@ -0,0 +1,36 @@ + + + + +About + + +

About This Content

+ +

November 30, 2017

+

License

+ +

+ The Eclipse Foundation makes available all content in this plug-in + ("Content"). Unless otherwise indicated below, the Content + is provided to you under the terms and conditions of the Eclipse + Public License Version 2.0 ("EPL"). A copy of the EPL is + available at http://www.eclipse.org/legal/epl-2.0. + For purposes of the EPL, "Program" will mean the Content. +

+ +

+ If you did not receive this Content directly from the Eclipse + Foundation, the Content is being redistributed by another party + ("Redistributor") and different terms and conditions may + apply to your use of any object code in the Content. Check the + Redistributor's license that was provided with the Content. If no such + license exists, contact the Redistributor. Unless otherwise indicated + below, the terms and conditions of the EPL still apply to any source + code in the Content and such source code may be obtained at http://www.eclipse.org. +

+ + + \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/build.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/build.properties new file mode 100644 index 000000000..21645b6d6 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/build.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2022 École Polytechnique de Montréal +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + about.html,\ + plugin.properties,\ + plugin.xml diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.properties new file mode 100644 index 000000000..096c865e8 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2022 École Polytechnique de Montréal +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +Bundle-Vendor = Eclipse Trace Compass Incubator +Bundle-Name = Trace Compass ExecutionComparision UI Plug-in (Incubator) + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml new file mode 100644 index 000000000..932fd1a01 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Activator.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Activator.java new file mode 100644 index 000000000..450f40d6c --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Activator.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; + +import java.util.Objects; + +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin { + + /** The plugin ID */ + public static final String PLUGIN_ID = "org.eclipse.tracecompass.incubator.executioncomparision.ui"; //$NON-NLS-1$ + + // The shared instance + private static @Nullable Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + @Override + public void start(@Nullable BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + @Override + public void stop(@Nullable BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return Objects.requireNonNull(plugin); + } + +} + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java new file mode 100644 index 000000000..db9709c36 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java @@ -0,0 +1,1315 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.Semaphore; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.function.BiFunction; +import java.util.logging.Level; +import java.util.logging.Logger; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.SubMonitor; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.GroupMarker; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.PaintEvent; +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.tracecompass.analysis.profiling.core.callgraph.ICallGraphProvider; +import org.eclipse.tracecompass.common.core.NonNullUtils; +import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.FlowScopeLog; +import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.FlowScopeLogBuilder; +import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.ScopeLog; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; +import org.eclipse.tracecompass.incubator.internal.callstack.ui.flamegraph.DataProviderActionUtils; +import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.DifferentialSeqCallGraphAnalysis; +import org.eclipse.tracecompass.internal.analysis.profiling.core.flamegraph.DataProviderUtils; +import org.eclipse.tracecompass.internal.analysis.profiling.core.flamegraph.FlameGraphDataProvider; +import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TmfFilterAppliedSignal; +import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TraceCompassFilter; +import org.eclipse.tracecompass.internal.provisional.tmf.ui.widgets.timegraph.BaseDataProviderTimeGraphPresentationProvider; +import org.eclipse.tracecompass.internal.tmf.core.model.filters.FetchParametersUtils; +import org.eclipse.tracecompass.statesystem.core.StateSystemUtils; +import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule; +import org.eclipse.tracecompass.tmf.core.dataprovider.DataProviderParameterUtils; +import org.eclipse.tracecompass.tmf.core.model.CoreFilterProperty; +import org.eclipse.tracecompass.tmf.core.model.IOutputElement; +import org.eclipse.tracecompass.tmf.core.model.filters.SelectionTimeQueryFilter; +import org.eclipse.tracecompass.tmf.core.model.timegraph.ITimeGraphDataProvider; +import org.eclipse.tracecompass.tmf.core.model.timegraph.ITimeGraphRowModel; +import org.eclipse.tracecompass.tmf.core.model.timegraph.ITimeGraphState; +import org.eclipse.tracecompass.tmf.core.model.timegraph.TimeGraphEntryModel; +import org.eclipse.tracecompass.tmf.core.model.timegraph.TimeGraphModel; +import org.eclipse.tracecompass.tmf.core.model.timegraph.TimeGraphState; +import org.eclipse.tracecompass.tmf.core.model.tree.TmfTreeModel; +import org.eclipse.tracecompass.tmf.core.response.ITmfResponse; +import org.eclipse.tracecompass.tmf.core.response.TmfModelResponse; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; +import org.eclipse.tracecompass.tmf.core.signal.TmfTraceClosedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal; +import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; +import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; +import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager; +import org.eclipse.tracecompass.tmf.core.trace.TmfTraceUtils; +import org.eclipse.tracecompass.tmf.ui.TmfUiRefreshHandler; +import org.eclipse.tracecompass.tmf.ui.editors.ITmfTraceEditor; +import org.eclipse.tracecompass.tmf.ui.symbols.TmfSymbolProviderUpdatedSignal; +import org.eclipse.tracecompass.tmf.ui.views.SaveImageUtil; +import org.eclipse.tracecompass.tmf.ui.views.TmfView; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.TimeGraphViewer; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeEvent; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.ITimeGraphEntry; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.NamedTimeEvent; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.NullTimeEvent; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeEvent; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeGraphEntry; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.model.TimeGraphEntry.Sampling; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.TimeGraphControl; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IWorkbenchActionConstants; +import org.eclipse.ui.IWorkbenchPartSite; +import org.eclipse.ui.progress.IWorkbenchSiteProgressService; + +import com.google.common.collect.HashMultimap; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Multimap; + +/** + * the flame graph part of the differential flame graph. + * + * @author Fateme Faraji Daneshgar + * + */ +@SuppressWarnings("restriction") +public class DifferentialFlameGraphView extends TmfView { + + /** + * ID of the view + */ + public static final String ID = DifferentialFlameGraphView.class.getPackage().getName() + ".diffflamegraphView"; //$NON-NLS-1$ + private static final int DEFAULT_BUFFER_SIZE = 3; + /** + * the Logger that is used in multipleDensityView class + */ + protected static final Logger LOGGER = Logger.getLogger(DifferentialFlameGraphView.class.getName()); + + private @Nullable DifferentialWeightedTreeProvider fDataProvider; + private @Nullable ITimeGraphDataProvider fdataProviderGroup = null; + + private @Nullable TimeGraphViewer fTimeGraphViewer; + + private @Nullable BaseDataProviderTimeGraphPresentationProvider fPresentationProvider; + + private @Nullable ITmfTrace fTrace = null; + + private final MenuManager fEventMenuManager = new MenuManager(); + /** + * A plain old semaphore is used since different threads will be competing + * for the same resource. + */ + private final Semaphore fLock = new Semaphore(1); + + private final AtomicInteger fDirty = new AtomicInteger(); + + /** The trace to build thread hash map */ + private final Map fBuildJobMap = new HashMap<>(); + private final Map, Map> fEntries = new HashMap<>(); + + /** + * Set of visible entries to zoom on. + */ + private Set fVisibleEntries = Collections.emptySet(); + + private long fEndTime = Long.MIN_VALUE; + + /** The trace to entry list hash map */ + private final Map> fEntryListMap = new HashMap<>(); + + private int fDisplayWidth; + private @Nullable ZoomThread fZoomThread; + private final Object fZoomThreadResultLock = new Object(); + private Semaphore fBuildEntryLock = new Semaphore(1); + + /** + * Constructor + */ + public DifferentialFlameGraphView() { + this(ID); + + } + + /** + * Constructor with ID + * + * @param id + * The ID of the view + */ + protected DifferentialFlameGraphView(String id) { + super(id); + } + + @Override + public void createPartControl(@Nullable Composite parent) { + super.createPartControl(parent); + fDisplayWidth = Display.getDefault().getBounds().width; + fTimeGraphViewer = new TimeGraphViewer(parent, SWT.NONE); + fPresentationProvider = new BaseDataProviderTimeGraphPresentationProvider(); + getTimeGraphViewer().setTimeGraphProvider(fPresentationProvider); + getTimeGraphViewer().setTimeFormat(TimeFormat.NUMBER); + IEditorPart editor = getSite().getPage().getActiveEditor(); + ITmfTrace trace = null; + if (editor instanceof ITmfTraceEditor) { + trace = ((ITmfTraceEditor) editor).getTrace(); + } else { + // Get the active trace, the editor might be opened on a script + trace = TmfTraceManager.getInstance().getActiveTrace(); + } + if (trace != null) { + traceSelected(new TmfTraceSelectedSignal(this, trace)); + } + TmfSignalManager.register(this); + getSite().setSelectionProvider(getTimeGraphViewer().getSelectionProvider()); + createTimeEventContextMenu(); + getTimeGraphViewer().getTimeGraphControl().addMouseListener(new MouseAdapter() { + @Override + public void mouseDoubleClick(@Nullable MouseEvent e) { + TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); + ISelection selection = timeGraphControl.getSelection(); + if (selection instanceof IStructuredSelection) { + for (Object object : ((IStructuredSelection) selection).toList()) { + if (object instanceof TimeEvent) { + TimeEvent event = (TimeEvent) object; + long startTime = event.getTime(); + long endTime = startTime + event.getDuration(); + getTimeGraphViewer().setStartFinishTime(startTime, endTime); + break; + } + } + } + } + }); + getTimeGraphViewer().addRangeListener(event -> startZoomThread(event.getStartTime(), event.getEndTime(), false)); + TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); + timeGraphControl.addPaintListener(new PaintListener() { + + /** + * This paint control allows the virtual time graph refresh to occur + * on paint events instead of just scrolling the time axis or + * zooming. To avoid refreshing the model on every paint event, we + * use a TmfUiRefreshHandler to coalesce requests and only execute + * the last one, we also check if the entries have changed to avoid + * useless model refresh. + * + * @param e + * paint event on the visible area + */ + @Override + public void paintControl(@Nullable PaintEvent e) { + TmfUiRefreshHandler.getInstance().queueUpdate(this, () -> { + if (timeGraphControl.isDisposed()) { + return; + } + Set newSet = getVisibleItems(DEFAULT_BUFFER_SIZE); + if (!fVisibleEntries.equals(newSet)) { + /* + * Start a zoom thread if the set of visible entries has + * changed. We do not use lists as the order is not + * important. We cannot use the start index / size of + * the visible entries as we can collapse / reorder + * events. + */ + fVisibleEntries = newSet; + startZoomThread(getTimeGraphViewer().getTime0(), getTimeGraphViewer().getTime1(), false); + } + }); + } + }); + + } + + /** + * Get the time graph viewer + * + * @return the time graph viewer + */ + public TimeGraphViewer getTimeGraphViewer() { + Objects.requireNonNull(fTimeGraphViewer); + return fTimeGraphViewer; + } + + /** + * Handler for the trace selected signal + * + * @param signal + * The incoming signal + */ + @TmfSignalHandler + public void traceSelected(final TmfTraceSelectedSignal signal) { + try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "DifferentialFlameGraphView::traceSelected")) { //$NON-NLS-1$ + ITmfTrace trace = signal.getTrace(); + + fTrace = trace; + if (trace == null) { + return; + } + // If entries for this trace are already available, just zoom on + // them, + // otherwise, rebuild + List list = fEntryListMap.get(trace); + if (list == null) { + refresh(); + Display.getDefault().asyncExec(() -> buildFlameGraph(trace, null, null)); + + } else { + // Reset end time + long endTime = Long.MIN_VALUE; + for (TimeGraphEntry entry : list) { + endTime = Math.max(endTime, entry.getEndTime()); + } + setEndTime(endTime); + refresh(); + startZoomThread(0, endTime, false); + } + } + } + + /** + * Get the callgraph modules used to build the view + * + * @return The call graph provider modules + */ + protected Iterable getCallgraphModules() { + ITmfTrace trace = fTrace; + if (trace == null) { + return Collections.emptyList(); + } + String analysisId = NonNullUtils.nullToEmptyString(getViewSite().getSecondaryId()); + Iterable modules = TmfTraceUtils.getAnalysisModulesOfClass(trace, ICallGraphProvider.class); + return StreamSupport.stream(modules.spliterator(), false) + .filter(m -> { + if (m instanceof IAnalysisModule) { + return ((IAnalysisModule) m).getId().equals(analysisId); + } + return true; + }) + .collect(Collectors.toSet()); + } + + private class BuildRunnable { + private final ITmfTrace fBuildTrace; + private final ITmfTrace fParentTrace; + private final FlowScopeLog fScope; + private final Map fParameters; + + public BuildRunnable(final ITmfTrace trace, final ITmfTrace parentTrace, @Nullable ITmfTimestamp selStart, @Nullable ITmfTimestamp selEnd, final FlowScopeLog log) { + fBuildTrace = trace; + fParentTrace = parentTrace; + fScope = log; + if (selStart != null && selEnd != null) { + fParameters = ImmutableMap.of(FlameGraphDataProvider.SELECTION_RANGE_KEY, ImmutableList.of(selStart.toNanos(), selEnd.toNanos())); + } else { + fParameters = Collections.emptyMap(); + } + } + + public void run(IProgressMonitor monitor) { + try (FlowScopeLog log = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:BuildThread", "trace", fBuildTrace.getName()).setParentScope(fScope).build()) { //$NON-NLS-1$ //$NON-NLS-2$ + buildEntryList(fBuildTrace, fParentTrace, fParameters, Objects.requireNonNull(monitor)); + synchronized (fBuildJobMap) { + fBuildJobMap.remove(fBuildTrace); + } + } + } + } + + private void buildEntryList(@Nullable ITmfTrace trace, ITmfTrace parentTrace, Map additionalParams, IProgressMonitor monitor) { + + if (trace != null) { + DifferentialWeightedTreeProvider dataProvider = getDataProvider(); + if (dataProvider == null) { + return; + } + fDataProvider = dataProvider; + setFdataProviderGroup(new FlameGraphDataProvider(trace, fDataProvider, FlameGraphDataProvider.ID + ':' + DifferentialSeqCallGraphAnalysis.ID)); + } + + BaseDataProviderTimeGraphPresentationProvider presentationProvider = fPresentationProvider; + if (presentationProvider != null) { + presentationProvider.addProvider(getFdataProviderGroup(), getTooltipResolver(getFdataProviderGroup())); + } + try { + fBuildEntryLock.acquire(); + boolean complete = false; + while (!complete && !monitor.isCanceled()) { + Map parameters = new HashMap<>(additionalParams); + parameters.put(DataProviderParameterUtils.REQUESTED_TIME_KEY, ImmutableList.of(0, Long.MAX_VALUE)); + TmfModelResponse> responseGroupA = getFdataProviderGroup().fetchTree(parameters, monitor); + + if (responseGroupA.getStatus() == ITmfResponse.Status.FAILED) { + Activator.getDefault().getLog().error(getClass().getSimpleName() + " Data Provider failed: " + responseGroupA.getStatusMessage()); //$NON-NLS-1$ + return; + } else if (responseGroupA.getStatus() == ITmfResponse.Status.CANCELLED) { + return; + } + + complete = responseGroupA.getStatus() == ITmfResponse.Status.COMPLETED; + TmfTreeModel groupAModel = responseGroupA.getModel(); + long endTimeN = Long.MIN_VALUE; + + if ((groupAModel != null)) { + Map entries; + synchronized (fEntries) { + entries = fEntries.computeIfAbsent(getFdataProviderGroup(), dp -> new HashMap<>()); + /* + * The provider may send entries unordered and parents + * may not exist when child is constructor, we'll + * re-unite families at the end + */ + List orphaned = new ArrayList<>(); + for (TimeGraphEntryModel entry : groupAModel.getEntries()) { + TimeGraphEntry uiEntry = entries.get(entry.getId()); + if (entry.getParentId() != -1) { + if (uiEntry == null) { + uiEntry = new TimeGraphEntry(entry); + TimeGraphEntry parent = entries.get(entry.getParentId()); + if (parent != null) { + parent.addChild(uiEntry); + } else { + orphaned.add(uiEntry); + } + entries.put(entry.getId(), uiEntry); + } else { + if (!monitor.isCanceled()) { + uiEntry.updateModel(entry); + } + } + } else { + endTimeN = Long.max(endTimeN, entry.getEndTime() + 1); + List lables = new ArrayList<>(); + lables.add("GroupB-GroupA"); //$NON-NLS-1$ + + TimeGraphEntryModel newEntry = new TimeGraphEntryModel(0, -1, lables, entry.getStartTime(), entry.getEndTime(), entry.hasRowModel()); + + if (uiEntry != null) { + if (!monitor.isCanceled()) { + uiEntry.updateModel(newEntry); + } + } else { + // Do not assume that parentless entries are + // trace entries + uiEntry = new ParentEntry(newEntry, getFdataProviderGroup()); + entries.put(entry.getId(), uiEntry); + addToEntryList(parentTrace, Collections.singletonList(uiEntry)); + + } + } + } + setEndTime(endTimeN); + // Find missing parents + for (TimeGraphEntry orphanedEntry : orphaned) { + TimeGraphEntry parent = entries.get(orphanedEntry.getEntryModel().getParentId()); + if (parent != null) { + parent.addChild(orphanedEntry); + } + } + } + long start = 0; + final long resolutionN = Long.max(1, (endTimeN - start) / getDisplayWidth()); + + if (!monitor.isCanceled()) { + zoomEntries(ImmutableList.copyOf(entries.values()), start, endTimeN, resolutionN, monitor); + } + + } + + if (monitor.isCanceled()) { + resetEntries(trace); + return; + } + + if (parentTrace.equals(getTrace())) { + refresh(); + } + monitor.worked(1); + + if (!complete && !monitor.isCanceled()) { + try { + Thread.sleep(100); + + } catch (InterruptedException e) { + Activator.getDefault().getLog().error("Failed to wait for data provider", e); //$NON-NLS-1$ + } + } + + } /// while + } // try + catch (InterruptedException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } finally { + fBuildEntryLock.release(); + } + + } + + private static BiFunction> getTooltipResolver(ITimeGraphDataProvider provider) { + return (event, time) -> { + return getTooltip(event, time, provider, false); + }; + + } + + private static Map getTooltip(ITimeEvent event, Long time, ITimeGraphDataProvider provider, boolean getActions) { + ITimeGraphEntry entry = event.getEntry(); + + if (!(entry instanceof TimeGraphEntry)) { + return Collections.emptyMap(); + } + long entryId = ((TimeGraphEntry) entry).getEntryModel().getId(); + IOutputElement element = null; + if (event instanceof TimeEvent) { + element = ((TimeEvent) event).getModel(); + } + Map parameters = getFetchTooltipParameters(time, entryId, element); + if (getActions) { + parameters.put(FlameGraphDataProvider.TOOLTIP_ACTION_KEY, true); + } + TmfModelResponse> response = provider.fetchTooltip(parameters, new NullProgressMonitor()); + Map tooltip = response.getModel(); + return (tooltip == null) ? Collections.emptyMap() : tooltip; + } + + private static Map getFetchTooltipParameters(long time, long item, @Nullable IOutputElement element) { + @NonNull + Map parameters = new HashMap<>(); + parameters.put(DataProviderParameterUtils.REQUESTED_TIME_KEY, Collections.singletonList(time)); + parameters.put(DataProviderParameterUtils.REQUESTED_ITEMS_KEY, Collections.singletonList(item)); + if (element != null) { + parameters.put(DataProviderParameterUtils.REQUESTED_ELEMENT_KEY, element); + } + return parameters; + } + + /** + * Zoom thread + * + * @since 1.1 + */ + protected class ZoomThread extends Thread { + private final long fZoomStartTime; + private final long fZoomEndTime; + private final long fResolution; + private int fScopeId = -1; + private final IProgressMonitor fMonitor; + private Collection fCurrentEntries; + private boolean fForce; + + /** + * Constructor + * + * @param entries + * The entries to zoom on + * @param startTime + * the start time + * @param endTime + * the end time + * @param resolution + * the resolution + * @param force + * Whether to force the zoom of all entries or only those + * that have not the same sampling + */ + public ZoomThread(Collection entries, long startTime, long endTime, long resolution, boolean force) { + super(DifferentialFlameGraphView.this.getName() + " zoom"); //$NON-NLS-1$ + fZoomStartTime = startTime; + fZoomEndTime = endTime; + fResolution = resolution; + fCurrentEntries = entries; + fMonitor = new NullProgressMonitor(); + fForce = force; + } + + /** + * @return the zoom start time + */ + public long getZoomStartTime() { + return fZoomStartTime; + } + + /** + * @return the zoom end time + */ + public long getZoomEndTime() { + return fZoomEndTime; + } + + /** + * @return the resolution + */ + public long getResolution() { + return fResolution; + } + + /** + * @return the monitor + */ + public IProgressMonitor getMonitor() { + return fMonitor; + } + + /** + * Cancel the zoom thread + */ + public void cancel() { + fMonitor.setCanceled(true); + } + + @Override + public final void run() { + try (FlowScopeLog log = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:ZoomThread", "start", fZoomStartTime, "end", fZoomEndTime).setCategoryAndId(getViewId(), fScopeId).build()) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + if (fCurrentEntries.isEmpty()) { + // No rows to zoom on + return; + } + Sampling sampling = new Sampling(getZoomStartTime(), getZoomEndTime(), getResolution()); + Iterable incorrectSample = fForce ? fCurrentEntries : fCurrentEntries.stream().filter(entry -> !sampling.equals(entry.getSampling())).toList(); + Objects.requireNonNull(incorrectSample); + zoomEntries(incorrectSample, getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor()); + } finally { + + if (fDirty.decrementAndGet() < 0) { + Activator.getDefault().getLog().error("Dirty underflow", new Throwable()); //$NON-NLS-1$ + } + } + } + + /** + * Set the ID of the calling flow scope. This data will allow to + * determine the causality between the zoom thread and its caller if + * tracing is enabled. + * + * @param scopeId + * The ID of the calling flow scope + * @since 3.0 + */ + public void setScopeId(int scopeId) { + fScopeId = scopeId; + } + } + + /** + * Start or restart the zoom thread. + * + * @param startTime + * the zoom start time + * @param endTime + * the zoom end time + * @param force + * Whether to force the fetch of all rows, or only those that + * don't have the same range + */ + protected final void startZoomThread(long startTime, long endTime, boolean force) { + ITmfTrace trace = getTrace(); + if (trace == null) { + return; + } + + fDirty.incrementAndGet(); + try (FlowScopeLog log = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:ZoomThreadCreated").setCategory(getViewId()).build()) { //$NON-NLS-1$ + long clampedStartTime = Math.max(0, Math.min(startTime, getEndTime())); + long clampedEndTime = Math.min(getEndTime(), Math.max(endTime, 0)); + // Ignore if end time < start time, data has not been set correctly + // [yet] + if (clampedEndTime < clampedStartTime) { + return; + } + ZoomThread zoomThread = fZoomThread; + if (zoomThread != null) { + zoomThread.cancel(); + } + int timeSpace = getTimeGraphViewer().getTimeSpace(); + if (timeSpace > 0) { + long resolution = Long.max(1, (clampedEndTime - clampedStartTime) / timeSpace); + zoomThread = new ZoomThread(getVisibleItems(DEFAULT_BUFFER_SIZE), clampedStartTime, clampedEndTime, resolution, force); + } else { + zoomThread = null; + } + fZoomThread = zoomThread; + if (zoomThread != null) { + zoomThread.setScopeId(log.getId()); + /* + * Don't start a new thread right away if results are being + * applied from an old ZoomThread. Otherwise, the old results + * might overwrite the new results if it finishes after. + */ + synchronized (fZoomThreadResultLock) { + zoomThread.start(); + // zoomThread decrements, so we increment here + fDirty.incrementAndGet(); + } + } + } finally { + if (fDirty.decrementAndGet() < 0) { + Activator.getDefault().getLog().error("Dirty underflow", new Throwable()); //$NON-NLS-1$ + } + } + } + + private Set getVisibleItems(int buffer) { + + TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); + if (timeGraphControl.isDisposed()) { + return Collections.emptySet(); + } + + int start = Integer.max(0, getTimeGraphViewer().getTopIndex() - buffer); + int end = Integer.min(getTimeGraphViewer().getExpandedElementCount() - 1, + getTimeGraphViewer().getTopIndex() + timeGraphControl.countPerPage() + buffer); + + Set visible = new HashSet<>(end - start + 1); + for (int i = start; i <= end; i++) { + /* + * Use the getExpandedElement by index to avoid creating a copy of + * all the the elements. + */ + TimeGraphEntry element = (TimeGraphEntry) timeGraphControl.getExpandedElement(i); + if (element != null) { + visible.add(element); + } + } + return visible; + } + + private void zoomEntries(Iterable normalEntries, long zoomStartTime, long zoomEndTime, long resolution, IProgressMonitor monitor) { + if ((resolution < 0)) { + // StateSystemUtils.getTimes would throw an illegal argument + // exception. + return; + } + + long start = Long.min(zoomStartTime, zoomEndTime); + long end = Long.max(zoomStartTime, zoomEndTime); + List times = StateSystemUtils.getTimes(start, end, resolution); + Sampling sampling = new Sampling(start, end, resolution); + + Multimap, Long> providersToModelIds = filterGroupEntries(normalEntries, zoomStartTime, zoomEndTime); + SubMonitor subMonitor = SubMonitor.convert(monitor, getClass().getSimpleName() + "#zoomEntries", providersToModelIds.size()); //$NON-NLS-1$ + + Entry, Collection> entry = providersToModelIds.asMap().entrySet().iterator().next(); + ITimeGraphDataProvider dataProvider = Objects.requireNonNull(entry.getKey()); + SelectionTimeQueryFilter filter = new SelectionTimeQueryFilter(times, entry.getValue()); + Map parameters = FetchParametersUtils.selectionTimeQueryToMap(filter); + Multimap regexesMap = getRegexes(); + if (!regexesMap.isEmpty()) { + parameters.put(DataProviderParameterUtils.REGEX_MAP_FILTERS_KEY, Objects.requireNonNull(regexesMap.asMap())); + } + TmfModelResponse response = dataProvider.fetchRowModel(parameters, monitor); + TimeGraphModel model = response.getModel(); + if ((model != null) && (fEntries.get(dataProvider)) != null) { + System.out.println( + "zommEntries: Current Thread Name: " + + Thread.currentThread().getName()); + + zoomEntries(fEntries.get(dataProvider), model.getRows(), response.getStatus() == ITmfResponse.Status.COMPLETED, sampling); + + } + subMonitor.worked(1); + redraw(); + } + + /** + * This method build the multimap of regexes by property that will be used + * to filter the timegraph states + * + * Override this method to add other regexes with their properties. The data + * provider should handle everything after. + * + * @return The multimap of regexes by property + */ + private Multimap getRegexes() { + Multimap regexes = HashMultimap.create(); + + ITmfTrace trace = getTrace(); + if (trace == null) { + return regexes; + } + TraceCompassFilter globalFilter = TraceCompassFilter.getFilterForTrace(trace); + if (globalFilter == null) { + return regexes; + } + regexes.putAll(CoreFilterProperty.DIMMED, globalFilter.getRegexes()); + + return regexes; + } + + private void zoomEntries(Map map, List model, boolean completed, Sampling sampling) { + boolean isZoomThread = false; // Thread.currentThread() instanceof + // ZoomThread; + for (ITimeGraphRowModel rowModel : model) { + TimeGraphEntry entry = map.get(rowModel.getEntryID()); + + if (entry != null) { + List events = createTimeEvents(entry, rowModel.getStates()); + if (isZoomThread) { + synchronized (fZoomThreadResultLock) { + Display.getDefault().asyncExec(() -> { + entry.setZoomedEventList(events); + if (completed) { + entry.setSampling(sampling); + } + }); + } + } else { + + entry.setEventList(events); + } + } + } + } + + /** + * Create {@link ITimeEvent}s for an entry from the list of + * {@link ITimeGraphState}s, filling in the gaps. + * + * @param entry + * the {@link TimeGraphEntry} on which we are working + * @param values + * the list of {@link ITimeGraphState}s from the + * {@link ITimeGraphDataProvider}. + * @return a contiguous List of {@link ITimeEvent}s + */ + private List createTimeEvents(TimeGraphEntry entry, List values) { + List events = new ArrayList<>(values.size()); + ITimeEvent prev = null; + for (ITimeGraphState state : values) { + ITimeEvent event = createTimeEvent(entry, state); + if (prev != null) { + long prevEnd = prev.getTime() + prev.getDuration(); + if (prevEnd < event.getTime()) { + // fill in the gap. + TimeEvent timeEvent = new TimeEvent(entry, prevEnd, event.getTime() - prevEnd); + events.add(timeEvent); + } + } + prev = event; + events.add(event); + } + return events; + } + + /** + * Create a {@link TimeEvent} for a {@link TimeGraphEntry} and a + * {@link TimeGraphState} + * + * @param entry + * {@link TimeGraphEntry} for which we create a state + * @param state + * {@link ITimeGraphState} from the data provider + * @return a new {@link TimeEvent} for these arguments + */ + protected TimeEvent createTimeEvent(TimeGraphEntry entry, ITimeGraphState state) { + String label = state.getLabel(); + if (state.getValue() == Integer.MIN_VALUE && label == null && state.getStyle() == null) { + return new NullTimeEvent(entry, state.getStartTime(), state.getDuration()); + } + if (label != null) { + return new NamedTimeEvent(entry, label, state); + } + return new TimeEvent(entry, state); + } + + /** + * Filter the entries to return only the Non Null {@link TimeGraphEntry} + * which intersect the time range. + * + * @param visible + * the input list of visible entries + * @param zoomStartTime + * the leftmost time bound of the view + * @param zoomEndTime + * the rightmost time bound of the view + * @return A Multimap of data providers to their visible entries' model IDs. + */ + private static Multimap, Long> filterGroupEntries(Iterable visible, + long zoomStartTime, long zoomEndTime) { + Multimap, Long> providersToModelIds = HashMultimap.create(); + for (TimeGraphEntry entry : visible) { + if (zoomStartTime <= entry.getEndTime() && zoomEndTime >= entry.getStartTime() && entry.hasTimeEvents()) { + ITimeGraphDataProvider provider = getProvider(entry); + providersToModelIds.put(provider, entry.getEntryModel().getId()); + } + } + return providersToModelIds; + } + + /** + * Get the {@link ITimeGraphDataProvider} from a {@link TimeGraphEntry}'s + * parent. + * + * @param entry + * queried {@link TimeGraphEntry}. + * @return the {@link ITimeGraphDataProvider} + * @since 3.3 + */ + public static ITimeGraphDataProvider getProvider(ITimeGraphEntry entry) { + ITimeGraphEntry parent = entry; + while (parent != null) { + if (parent instanceof ParentEntry) { + return ((ParentEntry) parent).getProvider(); + } + parent = parent.getParent(); + } + throw new IllegalStateException(entry + " should have a TraceEntry parent"); //$NON-NLS-1$ + } + + /** + * Get the trace associated with this view + * + * @return The trace + */ + protected @Nullable ITmfTrace getTrace() { + return fTrace; + } + + private void refresh() { + try (FlowScopeLog parentLogger = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:RefreshRequested").setCategory(getViewId()).build()) { //$NON-NLS-1$ + final boolean isZoomThread = Thread.currentThread() instanceof ZoomThread; + TmfUiRefreshHandler.getInstance().queueUpdate(this, () -> { + try (FlowScopeLog log = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:Refresh").setParentScope(parentLogger).build()) { //$NON-NLS-1$ + fDirty.incrementAndGet(); + if (getTimeGraphViewer().getControl().isDisposed()) { + return; + } + List entries; + synchronized (fEntryListMap) { + entries = fEntryListMap.get(getTrace()); + if (entries == null) { + entries = new CopyOnWriteArrayList<>(); + } + } + + boolean inputChanged = entries != getTimeGraphViewer().getInput(); + if (inputChanged) { + getTimeGraphViewer().setInput(entries); + } else { + getTimeGraphViewer().refresh(); + } + + long startBound = 0; + long endBound = getEndTime(); + endBound = (endBound == Long.MIN_VALUE ? SWT.DEFAULT : endBound); + getTimeGraphViewer().setTimeBounds(startBound, endBound); + + if (inputChanged && !isZoomThread) { + getTimeGraphViewer().resetStartFinishTime(); + } + + } finally { + if (fDirty.decrementAndGet() < 0) { + Activator.getDefault().getLog().error("Dirty underflow", new Throwable()); //$NON-NLS-1$ + } + } + }); + } + } + + private void redraw() { + + try (FlowScopeLog flowParent = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:RedrawRequested").setCategory(getViewId()).build()) { //$NON-NLS-1$ + Display.getDefault().asyncExec(() -> { + try (FlowScopeLog log = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:Redraw").setParentScope(flowParent).build()) { //$NON-NLS-1$ + if (getTimeGraphViewer().getControl().isDisposed()) { + return; + } + getTimeGraphViewer().getControl().redraw(); + getTimeGraphViewer().getControl().update(); + } + }); + } + } + + private int getDisplayWidth() { + int displayWidth = fDisplayWidth; + return displayWidth <= 0 ? 1 : displayWidth; + } + + /** + * A class for parent entries that contain a link to the data provider + * + * @author Geneviève Bastien + */ + private static class ParentEntry extends TimeGraphEntry { + private final ITimeGraphDataProvider fProvider; + + /** + * Constructor + * + * @param model + * trace level model + * @param provider + * reference to the provider for this trace and view + */ + public ParentEntry(TimeGraphEntryModel model, + ITimeGraphDataProvider provider) { + super(model); + fProvider = provider; + } + + /** + * Getter for the data provider for this {@link ParentEntry} + * + * @return this entry's {@link ITimeGraphDataProvider} + */ + public ITimeGraphDataProvider getProvider() { + return fProvider; + } + } + + private synchronized void setEndTime(long endTime) { + fEndTime = endTime; + } + + private synchronized long getEndTime() { + return fEndTime; + } + + /** + * Adds a list of entries to a trace's entry list + * + * @param trace + * the trace + * @param list + * the list of time graph entries to add + */ + private void addToEntryList(ITmfTrace trace, List list) { + synchronized (fEntryListMap) { + List entryList = fEntryListMap.get(trace); + if (entryList == null) { + fEntryListMap.put(trace, new CopyOnWriteArrayList<>(list)); + } else { + for (TimeGraphEntry entry : list) { + if (!entryList.contains(entry)) { + entryList.add(entry); + } + } + } + } + } + + private void resetEntries(ITmfTrace trace) { + synchronized (fEntries) { + synchronized (fEntryListMap) { + // Remove the entries from the entry list map and from the + // fEntries cache + List entries = fEntryListMap.remove(trace); + if (entries == null) { + return; + } + for (TimeGraphEntry entry : entries) { + if (entry instanceof ParentEntry) { + fEntries.remove(((ParentEntry) entry).getProvider()); + } + } + refresh(); + } + } + } + + /** + * Get the necessary data for the flame graph and display it + * + * @param viewTrace + * the trace + * @param selStart + * The selection start timestamp or null to show all + * data + * @param selEnd + * The selection end timestamp or null to show all + * data + */ + public void buildFlameGraph(ITmfTrace viewTrace, @Nullable ITmfTimestamp selStart, @Nullable ITmfTimestamp selEnd) { + /* + * Note for synchronization: + * + * Acquire the lock at entry. then we have 4 places to release it + * + * 1- if the lock failed + * + * 2- if the data is null and we have no UI to update + * + * 3- when the job starts running and can thus be canceled + */ + try (FlowScopeLog log = new FlowScopeLogBuilder(LOGGER, Level.FINE, "DifferentialFlameGraphView:Building").setCategory(getViewId()).build()) { //$NON-NLS-1$ + try { + fLock.acquire(); + } catch (InterruptedException e) { + Activator.getDefault().getLog().error(e.getMessage(), e); + fLock.release(); + } + + // Run the build jobs through the site progress service if available + IWorkbenchSiteProgressService service = null; + IWorkbenchPartSite site = getSite(); + if (site != null) { + service = Objects.requireNonNull(site.getService(IWorkbenchSiteProgressService.class)); + } + + // Cancel previous build job for this trace + Job buildJob = fBuildJobMap.remove(viewTrace); + if (buildJob != null) { + buildJob.cancel(); + } + resetEntries(viewTrace); + // Build job will decrement + + buildJob = new Job(getTitle() + Messages.FlameGraphView_RetrievingData) { + @Override + protected IStatus run(@Nullable IProgressMonitor monitor) { + Objects.requireNonNull(monitor); + new BuildRunnable(viewTrace, viewTrace, selStart, selEnd, log).run(monitor); + monitor.done(); + return Status.OK_STATUS; + } + }; + fBuildJobMap.put(viewTrace, buildJob); + if (service != null) { + service.schedule(buildJob); + } else { + buildJob.schedule(); + } + fLock.release(); + } + } + + /** + * Await the next refresh + * + * @return Whether the view is ready with new data + * + * @throws InterruptedException + * something took too long + */ + public boolean isDirty() throws InterruptedException { + /* + * wait for the semaphore to be available, then release it immediately + * and verify dirtiness + */ + fLock.acquire(); + fLock.release(); + return (fDirty.get() != 0); + } + + /** + * Set the current trace of this view. This should be called only for + * testing purposes, otherwise, the normal + * {@link #traceSelected(TmfTraceSelectedSignal)} should be used. + * + * @param trace + * The trace to set + */ + public void setTrace(ITmfTrace trace) { + fTrace = trace; + } + + /** + * Trace is closed: clear the data structures and the view + * + * @param signal + * the signal received + */ + @TmfSignalHandler + public void traceClosed(final TmfTraceClosedSignal signal) { + if (signal.getTrace() == fTrace) { + getTimeGraphViewer().setInput(null); + } + } + + @Override + public void setFocus() { + getTimeGraphViewer().setFocus(); + } + + // ------------------------------------------------------------------------ + // Helper methods + // ------------------------------------------------------------------------ + + private void createTimeEventContextMenu() { + fEventMenuManager.setRemoveAllWhenShown(true); + TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); + final Menu timeEventMenu = fEventMenuManager.createContextMenu(timeGraphControl); + + timeGraphControl.addTimeGraphEntryMenuListener(event -> { + /* + * The TimeGraphControl will call the TimeGraphEntryMenuListener + * before the TimeEventMenuListener. We need to clear the menu for + * the case the selection was done on the namespace where the time + * event listener below won't be called afterwards. + */ + timeGraphControl.setMenu(null); + event.doit = false; + }); + timeGraphControl.addTimeEventMenuListener(event -> { + Menu menu = timeEventMenu; + if (event.data instanceof TimeEvent && !(event.data instanceof NullTimeEvent)) { + timeGraphControl.setMenu(menu); + return; + } + timeGraphControl.setMenu(null); + event.doit = false; + }); + + fEventMenuManager.addMenuListener(manager -> { + fillTimeEventContextMenu(fEventMenuManager); + fEventMenuManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); + }); + getSite().registerContextMenu(fEventMenuManager, getTimeGraphViewer().getSelectionProvider()); + } + + /** + * Fill context menu + * + * @param menuManager + * a menuManager to fill + */ + protected void fillTimeEventContextMenu(IMenuManager menuManager) { + ISelection selection = getSite().getSelectionProvider().getSelection(); + if (selection instanceof IStructuredSelection) { + for (Object object : ((IStructuredSelection) selection).toList()) { + if (object instanceof ITimeEvent) { + ITimeEvent event = (ITimeEvent) object; + ITimeGraphDataProvider provider = getProvider(Objects.requireNonNull(event.getEntry())); + Map tooltip = getTooltip(event, event.getTime(), provider, true); + for (Entry entry : tooltip.entrySet()) { + String tooltipKey = Objects.requireNonNull((entry.getKey())); + if (tooltipKey.startsWith(DataProviderUtils.ACTION_PREFIX)) { + // It's an action, add it to the menu + menuManager.add(new Action(tooltipKey.substring(DataProviderUtils.ACTION_PREFIX.length())) { + @Override + public void run() { + DataProviderActionUtils.executeAction(entry.getValue()); + + } + }); + } + } + } + } + } + } + + // -------------------------------- + // Sorting related methods + // -------------------------------- + + /** + * Symbol map provider updated + * + * @param signal + * the signal + */ + @TmfSignalHandler + public void symbolMapUpdated(TmfSymbolProviderUpdatedSignal signal) { + if (signal.getSource() != this) { + startZoomThread(getTimeGraphViewer().getTime0(), getTimeGraphViewer().getTime1(), true); + } + } + + @Override + protected @Nullable IAction createSaveAction() { + return SaveImageUtil.createSaveAction(getName(), this::getTimeGraphViewer); + } + + /** + * Cancel and restart the zoom thread. + */ + public void restartZoomThread() { + ZoomThread zoomThread = fZoomThread; + if (zoomThread != null) { + // Make sure that the zoom thread is not a restart (resume of the + // previous) + zoomThread.cancel(); + fZoomThread = null; + } + startZoomThread(getTimeGraphViewer().getTime0(), getTimeGraphViewer().getTime1(), true); + } + + /** + * Set or remove the global regex filter value + * + * @param signal + * the signal carrying the regex value + */ + @TmfSignalHandler + public void regexFilterApplied(TmfFilterAppliedSignal signal) { + // Restart the zoom thread to apply the new filter + Display.getDefault().asyncExec(this::restartZoomThread); + } + + /** + * Listen to see if one of the view's analysis is restarted + * + * @param signal + * The analysis started signal + * @return The data provider or null + */ + private static @Nullable DifferentialWeightedTreeProvider getDataProvider() { + ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); + if (trace != null) { + DifferentialSeqCallGraphAnalysis analysis = (DifferentialSeqCallGraphAnalysis) trace.getAnalysisModule("org.eclipse.tracecompass.incubator.executioncomparision.diffcallgraph"); //$NON-NLS-1$ + if (analysis != null) { + return analysis.getDiffProvider(null); + } + } + return null; + } + + private ITimeGraphDataProvider getFdataProviderGroup() { + Objects.requireNonNull(fdataProviderGroup); + return fdataProviderGroup; + } + + private void setFdataProviderGroup(@Nullable ITimeGraphDataProvider fdataProviderGroup) { + this.fdataProviderGroup = fdataProviderGroup; + } +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java new file mode 100644 index 000000000..9294822f5 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2015, 2020 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; + +import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.osgi.util.NLS; + +/** + * @author Marc-Andre Laperle + * @since 4.1 + */ +@NonNullByDefault({}) +public class Messages extends NLS { + private static final String BUNDLE_NAME = "org.eclipse.tracecompass.incubator.internal.executioncomparision.ui.messages"; //$NON-NLS-1$ + + + /** + * The label of GroupA + */ + public static String AbstractMultipleDensityView_GroupA; + + + /** + *The label of GroupB + */ + public static String AbstractMultipleDensityView_GroupB; + + + /** + *The Duration statistics + */ + public static String AbstractMultipleDensityView_Duration; + + + /** + * The selfTime statistic + */ + public static String AbstractMultipleDensityView_SelfTime; + + + /** + *The title of execution comparison view + */ + public static String AbstractMultipleDensityView_title; + + + /** + * Label for the count axis of the density chart. + */ + public static String ExecutionComparisionDurationViewer_TimeAxisLabel; + + /** + * Label for the time axis of the density chart. + */ + public static String ExecutionComparisionSelfTimeViewer_TimeAxisLabel; + + /** The action name for grouping */ + public static String FlameGraphView_GroupByName; + /** The action tooltip for selecting between Duration and SelfTime */ + public static String FlameGraphView_StatisticTooltip; + /** + * Execution of the callGraph Analysis + */ + public static String FlameGraphView_RetrievingData; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java new file mode 100644 index 000000000..cee58d4f5 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java @@ -0,0 +1,642 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.logging.Level; + +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.ActionContributionItem; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IMenuCreator; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.FocusListener; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.PaintEvent; +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Sash; +import org.eclipse.swt.widgets.Text; +import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.ScopeLog; +import org.eclipse.tracecompass.incubator.internal.callstack.ui.Activator; +import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.TmfCheckboxChangedSignal; +import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.TmfComparisonFilteringUpdatedSignal; +import org.eclipse.tracecompass.internal.tmf.ui.viewers.eventdensity.EventDensityTreeViewer; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; +import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; +import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; +import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; +import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; +import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; +import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager; +import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentInfo; +import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentSignal; +import org.eclipse.tracecompass.tmf.ui.viewers.ILegendImageProvider2; +import org.eclipse.tracecompass.tmf.ui.viewers.TmfTimeViewer; +import org.eclipse.tracecompass.tmf.ui.viewers.TmfViewer; +import org.eclipse.tracecompass.tmf.ui.viewers.tree.AbstractSelectTreeViewer2; +import org.eclipse.tracecompass.tmf.ui.viewers.tree.ICheckboxTreeViewerListener; +import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeViewerEntry; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.TmfXYChartViewer; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.XYChartLegendImageProvider; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfCommonXAxisChartViewer; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfFilteredXYChartViewer; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfXYChartSettings; +import org.eclipse.tracecompass.tmf.ui.views.ManyEntriesSelectedDialogPreCheckedListener; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.dialogs.TriStateFilteredCheckboxTree; +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.IWorkbenchPartSite; +import org.eclipse.ui.contexts.IContextActivation; +import org.eclipse.ui.contexts.IContextService; + +/** + * + */ +@SuppressWarnings("restriction") +public class MultipleDensityView extends DifferentialFlameGraphView implements ICheckboxTreeViewerListener { + + /** + * the id of the view + */ + public static final String id = "org.eclipse.tracecompass.incubator.internal.entexecutioncomparison.ui.execComparison"; //$NON-NLS-1$ + private static final int[] DEFAULT_WEIGHTS = new int[] { 4, 6 }; + private static final int[] DEFAULT_WEIGHTS_FILTERING_VIEW = new int[] { 495, 10, 495 }; + private static final int[] DEFAULT_WEIGHTS_FILTERING_H = new int[] { 3, 9 }; + private static final int[] DEFAULT_WEIGHTS_LABELS = new int[] { 1, 9 }; + + /** + * Default zoom range + * + * @since 4.1 + */ + private static final String STATISTIC_ICON_PATH = "icons/etool16/group_by.gif"; //$NON-NLS-1$ + @SuppressWarnings("null") + private static final ImageDescriptor STATISTIC_BY_ICON = Activator.getDefault().getImageDescripterFromPath(STATISTIC_ICON_PATH); + + private @Nullable TmfXYChartViewer fChartViewerA; + /** A composite that allows us to add margins */ + private @Nullable SashForm fXYViewerContainerA; + private @Nullable TmfViewer fTmfViewerA; + private @Nullable SashForm fSashFormLeftChildA; + private @Nullable SashForm fSashFormLeftChildB; + private @Nullable IContextService fContextService; + private @Nullable Action fConfigureStatisticAction; + private List fActiveContexts = new ArrayList<>(); + + private @Nullable TmfXYChartViewer fChartViewerB; + /** A composite that allows us to add margins */ + private @Nullable SashForm fXYViewerContainerB; + private @Nullable TmfViewer fTmfViewerB; + private List fTraceListA = new ArrayList<>(); + private List fTraceListB = new ArrayList<>(); + + /** + * the title of the view + */ + @SuppressWarnings("null") + public static final String VIEW_TITLE = Messages.AbstractMultipleDensityView_title; + private ITmfTimestamp fStartTimeA = TmfTimestamp.BIG_BANG; + private ITmfTimestamp fStartTimeB = TmfTimestamp.BIG_BANG; + private ITmfTimestamp fEndTimeA = TmfTimestamp.BIG_CRUNCH; + private ITmfTimestamp fEndTimeB = TmfTimestamp.BIG_CRUNCH; + private String fStatistic = "duration"; //$NON-NLS-1$ + + private @Nullable Listener fSashDragListener; + private static final String TMF_VIEW_UI_CONTEXT = "org.eclipse.tracecompass.tmf.ui.view.context"; //$NON-NLS-1$ + + // SashForm fsashForm; + + /** + * Constructs a segment store density view + */ + public MultipleDensityView() { + super(); + } + + /** + * Used to keep the density charts in sync with Duration chart. + */ + @Override + public void createPartControl(@Nullable Composite parent) { + TmfSignalManager.register(this); + + final SashForm sashForm = new SashForm(parent, SWT.VERTICAL); + // fsashForm = sashForm; + + SashForm sashFormFiltering = new SashForm(sashForm, SWT.HORIZONTAL); + + SashForm sashFormGroupA = new SashForm(sashFormFiltering, SWT.VERTICAL); + + SashForm distance = new SashForm(sashFormFiltering, SWT.NONE); + distance.pack(); + + SashForm sashFormGroupB = new SashForm(sashFormFiltering, SWT.VERTICAL); + + Text labelGroupA = new Text(sashFormGroupA, SWT.BORDER | SWT.CENTER); + labelGroupA.setText(Messages.AbstractMultipleDensityView_GroupA); + + Text labelGroupB = new Text(sashFormGroupB, SWT.BORDER | SWT.CENTER); + labelGroupB.setText(Messages.AbstractMultipleDensityView_GroupB); + + SashForm densityA = new SashForm(sashFormGroupA, SWT.HORIZONTAL); + SashForm densityB = new SashForm(sashFormGroupB, SWT.HORIZONTAL); + + sashFormGroupA.setWeights(DEFAULT_WEIGHTS_LABELS); + sashFormGroupB.setWeights(DEFAULT_WEIGHTS_LABELS); + + setSashFormLeftChildA(new SashForm(densityA, SWT.None)); + + setTmfViewerA(createLeftChildViewer(getSashFormLeftChildA())); + SashForm xYViewerContainerA = new SashForm(densityA, SWT.None); + fXYViewerContainerA = xYViewerContainerA; + xYViewerContainerA.setLayout(GridLayoutFactory.fillDefaults().create()); + + TmfXYChartViewer chartViewerA = createChartViewer(xYViewerContainerA); + setChartViewerA(chartViewerA); + + chartViewerA.getControl().addPaintListener(new PaintListener() { + @Override + public void paintControl(@Nullable PaintEvent e) { + // Sashes in a SashForm are being created on layout so add the + // drag listener here + Listener sashDragListener = fSashDragListener; + if (sashDragListener == null) { + for (Control control : getSashFormLeftChildA().getChildren()) { + if (control instanceof Sash) { + sashDragListener = event -> TmfSignalManager.dispatchSignal(new TmfTimeViewAlignmentSignal(getSashFormLeftChildA(), getTimeViewAlignmentInfo(chartViewerA, getSashFormLeftChildA()))); + fSashDragListener = sashDragListener; + control.removePaintListener(this); + control.addListener(SWT.Selection, sashDragListener); + // There should be only one sash + break; + } + + } + } + } + }); + + IStatusLineManager statusLineManager = getViewSite().getActionBars().getStatusLineManager(); + chartViewerA.setStatusLineManager(statusLineManager); + coupleSelectViewer(getTmfViewerA(), chartViewerA); + ((AbstractSelectTreeViewer2) getTmfViewerA()).addTreeListener(this); + + IWorkbenchPartSite site = getSite(); + setContextService(site.getWorkbenchWindow().getService(IContextService.class)); + + setSashFormLeftChildB(new SashForm(densityB, SWT.VERTICAL)); + setTmfViewerB(createLeftChildViewer(getSashFormLeftChildB())); + SashForm xYViewerContainerB = new SashForm(densityB, SWT.VERTICAL); + fXYViewerContainerB = xYViewerContainerB; + xYViewerContainerB.setLayout(GridLayoutFactory.fillDefaults().create()); + + TmfXYChartViewer chartViewerB = createChartViewer(xYViewerContainerB); + setChartViewerB(chartViewerB); + + chartViewerB.getControl().addPaintListener(new PaintListener() { + @Override + public void paintControl(@Nullable PaintEvent e) { + // Sashes in a SashForm are being created on layout so add the + // drag listener here + if (fSashDragListener == null) { + for (Control control : getSashFormLeftChildB().getChildren()) { + if (control instanceof Sash) { + Objects.requireNonNull(getSashFormLeftChildB()); + fSashDragListener = event -> TmfSignalManager.dispatchSignal(new TmfTimeViewAlignmentSignal(getSashFormLeftChildB(), getTimeViewAlignmentInfo(chartViewerB, getSashFormLeftChildB()))); + control.removePaintListener(this); + control.addListener(SWT.Selection, fSashDragListener); + // There should be only one sash + break; + } + + } + } + } + }); + + chartViewerB.setStatusLineManager(statusLineManager); + coupleSelectViewer(getTmfViewerB(), chartViewerB); + ((AbstractSelectTreeViewer2) getTmfViewerB()).addTreeListener(this); + + contributeToActionBars(); + + densityA.setWeights(DEFAULT_WEIGHTS_FILTERING_H); + densityB.setWeights(DEFAULT_WEIGHTS_FILTERING_H); + + sashFormFiltering.setWeights(DEFAULT_WEIGHTS_FILTERING_VIEW); + + super.createPartControl(sashForm); + + sashForm.setWeights(DEFAULT_WEIGHTS); + ITmfTrace activetrace = TmfTraceManager.getInstance().getActiveTrace(); + if (activetrace != null) { + buildDifferetialFlameGraph(); + + } + + } + + /** + * /** Return the time alignment information + * + * @param chartViewer + * the event distribution viewer + * @param sashFormLeftChild + * the check box viewer + * @return the time alignment information + */ + public TmfTimeViewAlignmentInfo getTimeViewAlignmentInfo(TmfXYChartViewer chartViewer, SashForm sashFormLeftChild) { + return new TmfTimeViewAlignmentInfo(chartViewer.getControl().getShell(), sashFormLeftChild.toDisplay(0, 0), getTimeAxisOffset(chartViewer, sashFormLeftChild)); + } + + private static int getTimeAxisOffset(TmfXYChartViewer chartViewer, SashForm sashFormLeftChild) { + return sashFormLeftChild.getChildren()[0].getSize().x + sashFormLeftChild.getSashWidth() + chartViewer.getPointAreaOffset(); + } + + @Override + @TmfSignalHandler + public void traceSelected(final TmfTraceSelectedSignal signal) { + super.traceSelected(signal); + if (getTmfViewerA() instanceof TmfTimeViewer) { + ((TmfTimeViewer) getTmfViewerA()).traceSelected(signal); + } + getChartViewerA().traceSelected(signal); + + if (getTmfViewerB() instanceof TmfTimeViewer) { + ((TmfTimeViewer) getTmfViewerB()).traceSelected(signal); + } + getChartViewerB().traceSelected(signal); + ITmfTrace trace = signal.getTrace(); + fStartTimeA = trace.getStartTime(); + fEndTimeA = trace.getEndTime(); + fStartTimeB = trace.getStartTime(); + fEndTimeB = trace.getEndTime(); + + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, fStatistic, fTraceListA, fTraceListB); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + buildDifferetialFlameGraph(); + } + + private Action createStatisticAction(String name) { + return new Action(name, IAction.AS_RADIO_BUTTON) { + @Override + public void run() { + ITmfTrace trace = getTrace(); + if (trace == null) { + return; + } + fStatistic = name; + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStatistic, null, null); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + + buildDifferetialFlameGraph(); + } + }; + } + + /** + * @param signal + * the trace open signal + */ + @TmfSignalHandler + public void traceOpened(TmfTraceOpenedSignal signal) { + getChartViewerA().traceOpened(signal); + getChartViewerB().traceOpened(signal); + } + + private void buildDifferetialFlameGraph() { + + ITmfTrace activetrace = TmfTraceManager.getInstance().getActiveTrace(); + if (activetrace != null) { + Display.getDefault().asyncExec(() -> buildFlameGraph(activetrace, null, null)); + + } + } + + /** + * create left child viewer for event density chart + * + * @param parent + * composite + * @return left chart viewer + */ + public TmfViewer createLeftChildViewer(Composite parent) { + EventDensityTreeViewer histogramTreeViewer = new EventDensityTreeViewer(parent); + ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); + if (trace != null) { + histogramTreeViewer.traceSelected(new TmfTraceSelectedSignal(this, trace)); + } + return histogramTreeViewer; + } + + private TmfXYChartViewer createChartViewer(Composite parent) { + MultipleEventDensityViewer chartViewer = new MultipleEventDensityViewer(parent, new TmfXYChartSettings(null, null, null, 1)); + chartViewer.setSendTimeAlignSignals(true); + chartViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + chartViewer.getControl().addMouseListener(new MouseAdapter() { + @Override + public void mouseDoubleClick(@Nullable MouseEvent e) { + super.mouseDoubleClick(e); + resetStartFinishTime(true, chartViewer); + } + }); + chartViewer.getControl().addFocusListener(new FocusListener() { + @Override + public void focusLost(@Nullable FocusEvent e) { + deactivateContextService(); + } + + @Override + public void focusGained(@Nullable FocusEvent e) { + activateContextService(); + } + }); + + return chartViewer; + } + + /** + * Reset the start and end times. + * + * @param notify + * if true, notify the registered listeners + * @param chart + * determines which chart to reset start and end times + */ + public void resetStartFinishTime(boolean notify, TmfXYChartViewer chart) { + TmfWindowRangeUpdatedSignal signal = new TmfWindowRangeUpdatedSignal(this, TmfTimeRange.ETERNITY, getTrace()); + if (notify) { + broadcast(signal); + + } else { + chart.windowRangeUpdated(signal); + chart.selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, TmfTimestamp.fromNanos(chart.getWindowStartTime()), TmfTimestamp.fromNanos(chart.getWindowEndTime()))); + } + } + + private void deactivateContextService() { + getContextService().deactivateContexts(fActiveContexts); + fActiveContexts.clear(); + } + + private void activateContextService() { + if (fActiveContexts.isEmpty()) { + IContextActivation activateContext = getContextService().activateContext(TMF_VIEW_UI_CONTEXT); + Objects.requireNonNull(activateContext); + fActiveContexts.add(activateContext); + } + } + + private static void coupleSelectViewer(TmfViewer tree, TmfXYChartViewer chart) { + if (tree instanceof AbstractSelectTreeViewer2 && chart instanceof TmfFilteredXYChartViewer) { + ILegendImageProvider2 legendImageProvider = new XYChartLegendImageProvider((TmfCommonXAxisChartViewer) chart); + AbstractSelectTreeViewer2 selectTree = (AbstractSelectTreeViewer2) tree; + selectTree.addTreeListener((TmfFilteredXYChartViewer) chart); + selectTree.setLegendImageProvider(legendImageProvider); + TriStateFilteredCheckboxTree checkboxTree = selectTree.getTriStateFilteredCheckboxTree(); + checkboxTree.addPreCheckStateListener(new ManyEntriesSelectedDialogPreCheckedListener(checkboxTree)); + } + } + + /** + * @param signal + * TmfSelectionRangeUpdatedSignal signal raised when time ranges + * are updated + */ + @TmfSignalHandler + public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { + try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MultiDensityView::SelectionRangeUpdated")) { //$NON-NLS-1$ + Object source = signal.getSource(); + if (source == getChartViewerA()) { + fStartTimeA = TmfTimestamp.fromNanos(getChartViewerA().getSelectionBeginTime()); + fEndTimeA = TmfTimestamp.fromNanos(getChartViewerA().getSelectionEndTime()); + } else if (source == getChartViewerB()) { + fStartTimeB = TmfTimestamp.fromNanos(getChartViewerB().getSelectionBeginTime()); + fEndTimeB = TmfTimestamp.fromNanos(getChartViewerB().getSelectionEndTime()); + } + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, null, null, null); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + + buildDifferetialFlameGraph(); + } + } + + /** + * @return fStatistic (Duration or Selftime) which will be represented in + * the flame graph + */ + public String getStatisticType() { + return fStatistic; + + } + + private Action getAggregateByAction() { + Action configureStatisticAction = fConfigureStatisticAction; + if (configureStatisticAction == null) { + configureStatisticAction = new Action(Messages.FlameGraphView_GroupByName, IAction.AS_DROP_DOWN_MENU) { + }; + fConfigureStatisticAction = configureStatisticAction; + configureStatisticAction.setToolTipText(Messages.FlameGraphView_StatisticTooltip); + configureStatisticAction.setImageDescriptor(STATISTIC_BY_ICON); + configureStatisticAction.setMenuCreator(new IMenuCreator() { + @Nullable + Menu menu = null; + + @Override + public void dispose() { + if (menu != null) { + menu.dispose(); + menu = null; + } + } + + @Override + public @Nullable Menu getMenu(@Nullable Control parent) { + if (menu != null) { + menu.dispose(); + } + menu = new Menu(parent); + Action statisticActionDur = createStatisticAction(Objects.requireNonNull(Messages.AbstractMultipleDensityView_Duration)); + new ActionContributionItem(statisticActionDur).fill(menu, -1); + + Action statisticActionSelf = createStatisticAction(Objects.requireNonNull(Messages.AbstractMultipleDensityView_SelfTime)); + new ActionContributionItem(statisticActionSelf).fill(menu, -1); + return menu; + } + + @Override + public @Nullable Menu getMenu(@Nullable Menu parent) { + return null; + } + }); + } + Action configureStatisticAction3 = Objects.requireNonNull(fConfigureStatisticAction); + return configureStatisticAction3; + } + + private void contributeToActionBars() { + IActionBars bars = getViewSite().getActionBars(); + IToolBarManager toolBarManager = Objects.requireNonNull(bars.getToolBarManager()); + fillLocalToolBar(toolBarManager); + } + + private void fillLocalToolBar(IToolBarManager manager) { + manager.add(getAggregateByAction()); + } + + /** + * @param signal + * the TmfCheckboxChangedSignal signal + */ + @TmfSignalHandler + public void CheckBoxUpdated(TmfCheckboxChangedSignal signal) { + try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MultiDensityView::CheckBoxUpdated")) {//$NON-NLS-1$ + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = null; + + if (signal.getSource() == getChartViewerA()) { + for (String name : signal.getTraceList()) { + if (fTraceListA.contains(name)) { + fTraceListA.remove(name); + } else { + fTraceListA.add(name); + } + } + rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, null, fTraceListA, null); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + + } + + if (signal.getSource() == getChartViewerB()) { + for (String name : signal.getTraceList()) { + if (fTraceListB.contains(name)) { + fTraceListB.remove(name); + } else { + fTraceListB.add(name); + } + } + rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, null, null, fTraceListB); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + + } + buildDifferetialFlameGraph(); + } + } + + @SuppressWarnings("null") + @Override + public void handleCheckStateChangedEvent(@Nullable Collection entries) { + // do nothing + } + + @Override + public void dispose() { + super.dispose(); + TmfSignalManager.deregister(this); + + getChartViewerA().dispose(); + getTmfViewerA().dispose(); + getChartViewerB().dispose(); + getTmfViewerB().dispose(); + + if (fXYViewerContainerA != null) { + fXYViewerContainerA.dispose(); + } + if (fXYViewerContainerB != null) { + fXYViewerContainerB.dispose(); + } + + } + + private TmfXYChartViewer getChartViewerA() { + Objects.requireNonNull(fChartViewerA); + return fChartViewerA; + } + + private void setChartViewerA(@Nullable TmfXYChartViewer chartViewerA) { + fChartViewerA = chartViewerA; + } + + private TmfXYChartViewer getChartViewerB() { + Objects.requireNonNull(fChartViewerB); + return fChartViewerB; + } + + private void setChartViewerB(@Nullable TmfXYChartViewer chartViewerB) { + fChartViewerB = chartViewerB; + } + + private SashForm getSashFormLeftChildA() { + Objects.requireNonNull(fSashFormLeftChildA); + return fSashFormLeftChildA; + } + + private void setSashFormLeftChildA(@Nullable SashForm sashFormLeftChildA) { + fSashFormLeftChildA = sashFormLeftChildA; + } + + private SashForm getSashFormLeftChildB() { + Objects.requireNonNull(fSashFormLeftChildB); + return fSashFormLeftChildB; + } + + private void setSashFormLeftChildB(@Nullable SashForm sashFormLeftChildB) { + fSashFormLeftChildB = sashFormLeftChildB; + } + + private TmfViewer getTmfViewerA() { + Objects.requireNonNull(fTmfViewerA); + return fTmfViewerA; + } + + private void setTmfViewerA(@Nullable TmfViewer tmfViewerA) { + fTmfViewerA = tmfViewerA; + } + + private TmfViewer getTmfViewerB() { + Objects.requireNonNull(fTmfViewerB); + return fTmfViewerB; + } + + private void setTmfViewerB(@Nullable TmfViewer tmfViewerB) { + fTmfViewerB = tmfViewerB; + } + + private IContextService getContextService() { + Objects.requireNonNull(fContextService); + return fContextService; + } + + private void setContextService(@Nullable IContextService contextService) { + fContextService = contextService; + } + +} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java new file mode 100644 index 000000000..484e02eac --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright (c) 2023 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.TmfCheckboxChangedSignal; +import org.eclipse.tracecompass.internal.tmf.ui.viewers.eventdensity.EventDensityViewer; +import org.eclipse.tracecompass.tmf.core.model.tree.TmfTreeDataModel; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; +import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; +import org.eclipse.tracecompass.tmf.core.trace.TmfTraceContext; +import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager; +import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeViewerEntry; +import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfGenericTreeEntry; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfXYChartSettings; + +/** + * + */ +public class MultipleEventDensityViewer extends EventDensityViewer { + + /** + * @param parent + * Composite + * @param settings + * ChartSetting + */ + public MultipleEventDensityViewer(Composite parent, TmfXYChartSettings settings) { + super(parent, settings); + } + + @Override + @TmfSignalHandler + public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { + if (signal == null) { + return; + } + final ITmfTrace trace = getTrace(); + if (trace != null) { + TmfTraceContext ctx = TmfTraceManager.getInstance().getTraceContext(trace); + long selectedTime = ctx.getSelectionRange().getStartTime().toNanos(); + long selectedEndTime = ctx.getSelectionRange().getEndTime().toNanos(); + setSelectionRange(selectedTime, selectedEndTime); + } + + } + + @Override + public void handleCheckStateChangedEvent(Collection entries) { + super.handleCheckStateChangedEvent(entries); + List traceNames = new ArrayList<>(); + for (ITmfTreeViewerEntry entry : entries) { + if (entry instanceof TmfGenericTreeEntry) { + TmfGenericTreeEntry genericEntry = (TmfGenericTreeEntry) entry; + String name = genericEntry.getModel().getName(); + traceNames.add(name); + } + } + TmfSignalManager.dispatchSignal(new TmfCheckboxChangedSignal(this, traceNames)); + } + + + +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties new file mode 100644 index 000000000..abee19e76 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties @@ -0,0 +1,23 @@ +############################################################################### +# Copyright (c) 2015, 2020 Ericsson +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0/ +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +ExecutionComparisionDurationViewer_TimeAxisLabel=Duration +ExecutionComparisionSelfTimeViewer_TimeAxisLabel=SelfTime + + +AbstractMultipleDensityView_GroupA=GroupA +AbstractMultipleDensityView_GroupB=GroupB +AbstractMultipleDensityView_Duration=Duration +AbstractMultipleDensityView_SelfTime=Self Time +AbstractMultipleDensityView_title=Execution Comparison +FlameGraphView_RetrievingData=Retrieving Flame Graph Data +FlameGraphView_GroupByName=Group by descriptor +FlameGraphView_StatisticTooltip=Select the statistic to represent diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/package-info.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/package-info.java new file mode 100644 index 000000000..0c9856c94 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/package-info.java @@ -0,0 +1,15 @@ +/******************************************************************************* + * Copyright (c) 2022 École Polytechnique de Montréal + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +@org.eclipse.jdt.annotation.NonNullByDefault +package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision/.project new file mode 100644 index 000000000..ea9a73000 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision/.project @@ -0,0 +1,17 @@ + + + org.eclipse.tracecompass.incubator.executioncomparision + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/build.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision/build.properties new file mode 100644 index 000000000..de40c6279 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision/build.properties @@ -0,0 +1,13 @@ +############################################################################### +# Copyright (c) 2022 École Polytechnique de Montréal +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +bin.includes = feature.xml,\ + feature.properties diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.properties new file mode 100644 index 000000000..f9f49a686 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.properties @@ -0,0 +1,18 @@ +############################################################################### +# Copyright (c) 2022 École Polytechnique de Montréal +# +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Eclipse Public License 2.0 +# which accompanies this distribution, and is available at +# https://www.eclipse.org/legal/epl-2.0 +# +# SPDX-License-Identifier: EPL-2.0 +############################################################################### + +featureName=Trace Compass ExecutionComparision (Incubation) + +description= + +featureProvider=Eclipse Trace Compass Incubator + +copyright=[Update copyright] diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.xml new file mode 100644 index 000000000..ea19102a8 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.xml @@ -0,0 +1,43 @@ + + + + + %description + + + + %copyright + + + + %license + + + + + + + + + diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AbstractCalledFunction.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AbstractCalledFunction.java deleted file mode 100644 index 35850e692..000000000 --- a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AbstractCalledFunction.java +++ /dev/null @@ -1,185 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2016 Ericsson - * - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License 2.0 which - * accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -package org.eclipse.tracecompass.incubator.internal.callstack.core.instrumented.callgraph; - -import java.util.Comparator; -import java.util.Objects; - -import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tracecompass.common.core.NonNullUtils; -import org.eclipse.tracecompass.incubator.analysis.core.model.IHostModel; -import org.eclipse.tracecompass.incubator.callstack.core.callgraph.SymbolAspect; -import org.eclipse.tracecompass.incubator.callstack.core.instrumented.ICalledFunction; -import org.eclipse.tracecompass.segmentstore.core.ISegment; -import org.eclipse.tracecompass.segmentstore.core.SegmentComparators; - -import com.google.common.collect.Ordering; - -/** - * Called Functuon common class, defines the start, end, depth, parent and - * children. Does not define the symbol - * - * @author Matthew Khouzam - * @author Sonia Farrah - */ -abstract class AbstractCalledFunction implements ICalledFunction { - - static final Comparator COMPARATOR; - static { - /* - * requireNonNull() has to be called separately, or else it breaks the - * type inference. - */ - Comparator comp = Ordering.from(SegmentComparators.INTERVAL_START_COMPARATOR).compound(SegmentComparators.INTERVAL_END_COMPARATOR); - COMPARATOR = Objects.requireNonNull(comp); - } - - /** - * Serial Version UID - */ - private static final long serialVersionUID = 7992199223906717340L; - - protected final long fStart; - protected final long fEnd; - private final @Nullable ICalledFunction fParent; - protected long fSelfTime = 0; - private final int fProcessId; - private final int fThreadId; - - private final transient IHostModel fModel; - private transient long fCpuTime = Long.MIN_VALUE; - - public AbstractCalledFunction(long start, long end, int processId, int threadId, @Nullable ICalledFunction parent, IHostModel model) { - if (start > end) { - throw new IllegalArgumentException(Messages.TimeError + "[" + start + "," + end + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - fStart = start; - fEnd = end; - fParent = parent; - // It'll be modified once we add a child to it - fSelfTime = fEnd - fStart; - fProcessId = processId; - fThreadId = threadId; - if (parent instanceof AbstractCalledFunction) { - ((AbstractCalledFunction) parent).addChild(this); - } - fModel = model; - } - - @Override - public long getStart() { - return fStart; - } - - @Override - public long getEnd() { - return fEnd; - } - - @Override - public @Nullable ICalledFunction getParent() { - return fParent; - } - - @Override - public String getName() { - return NonNullUtils.nullToEmptyString(SymbolAspect.SYMBOL_ASPECT.resolve(this)); - } - - /** - * Add the child to the segment's children, and subtract the child's - * duration to the duration of the segment so we can calculate its self - * time. - * - * @param child - * The child to add to the segment's children - */ - protected void addChild(ICalledFunction child) { - if (child.getParent() != this) { - throw new IllegalArgumentException("Child parent not the same as child being added to."); //$NON-NLS-1$ - } - substractChildDuration(child.getEnd() - child.getStart()); - } - - /** - * Subtract the child's duration to the duration of the segment. - * - * @param childDuration - * The child's duration - */ - private void substractChildDuration(long childDuration) { - fSelfTime -= childDuration; - } - - @Override - public long getSelfTime() { - return fSelfTime; - } - - @Override - public long getCpuTime() { - long cpuTime = fCpuTime; - if (cpuTime == Long.MIN_VALUE) { - cpuTime = fModel.getCpuTime(fThreadId, fStart, fEnd); - fCpuTime = cpuTime; - } - return cpuTime; - } - - @Override - public int getProcessId() { - return fProcessId; - } - - @Override - public int getThreadId() { - return fThreadId; - } - - @Override - public int compareTo(@Nullable ISegment o) { - if (o == null) { - throw new IllegalArgumentException(); - } - return COMPARATOR.compare(this, o); - } - - @Override - public String toString() { - return '[' + String.valueOf(fStart) + ", " + String.valueOf(fEnd) + ']' + " Duration: " + getLength() + ", Self Time: " + fSelfTime; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ - } - - @Override - public int hashCode() { - return Objects.hash(fEnd, fParent, fSelfTime, fStart, getSymbol()); - } - - @Override - public boolean equals(@Nullable Object obj) { - if (this == obj) { - return true; - } - if (obj == null) { - return false; - } - if (getClass() != obj.getClass()) { - return false; - } - AbstractCalledFunction other = (AbstractCalledFunction) obj; - return (fEnd == other.fEnd && - fSelfTime == other.fSelfTime && - fStart == other.fStart && - Objects.equals(fParent, other.getParent()) && - Objects.equals(getSymbol(), other.getSymbol())); - } - -} \ No newline at end of file diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AggregatedCalledFunction.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AggregatedCalledFunction.java deleted file mode 100644 index e9d1d540f..000000000 --- a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AggregatedCalledFunction.java +++ /dev/null @@ -1,345 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2016 Ericsson - * - * All rights reserved. This program and the accompanying materials are made - * available under the terms of the Eclipse Public License 2.0 which - * accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -package org.eclipse.tracecompass.incubator.internal.callstack.core.instrumented.callgraph; - -import java.util.Collection; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Map.Entry; - -import org.eclipse.jdt.annotation.NonNull; -import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tracecompass.analysis.os.linux.core.model.ProcessStatus; -import org.eclipse.tracecompass.analysis.timing.core.statistics.IStatistics; -import org.eclipse.tracecompass.incubator.analysis.core.concepts.AggregatedCallSite; -import org.eclipse.tracecompass.incubator.analysis.core.concepts.ICallStackSymbol; -import org.eclipse.tracecompass.incubator.analysis.core.concepts.ProcessStatusInterval; -import org.eclipse.tracecompass.incubator.analysis.core.model.IHostModel; -import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTree; - -import com.google.common.collect.ImmutableList; -import com.google.common.collect.ImmutableMap; - -/** - * This class represents a function call in a certain level in the call stack. - * It's used to build an aggregation segment tree (aggregated by depth and - * callers). Per example,the two calls to the function A() in the call graph - * below will be combined into one node in the generated tree: - * - *
- *   (Depth=0)      main              main
- *               ↓↑  ↓↑   ↓↑    =>   ↓↑   ↓↑
- *   (Depth=1)  A()  B()  A()       A()   B()
- * 
- * - * @author Sonia Farrah - * - */ -public class AggregatedCalledFunction extends AggregatedCallSite { - - // ------------------------------------------------------------------------ - // Attributes - // ------------------------------------------------------------------------ - - private final AggregatedCalledFunctionStatistics fStatistics; - private long fDuration = 0; - private long fSelfTime = 0; - private long fCpuTime = IHostModel.TIME_UNKNOWN; - private int fProcessId; - private Map fProcessStatuses = new HashMap<>(); - - /** - * Constructor, parent is not null - * - * @param symbol - * The symbol of the function - */ - public AggregatedCalledFunction(ICallStackSymbol symbol) { - super(symbol, 0); - fStatistics = new AggregatedCalledFunctionStatistics(); - fProcessId = -1; - } - - /** - * copy constructor - * - * @param toCopy Object to copy - */ - public AggregatedCalledFunction(AggregatedCalledFunction toCopy) { - super(toCopy); - fStatistics = new AggregatedCalledFunctionStatistics(); - fStatistics.merge(toCopy.fStatistics); - fProcessId = toCopy.fProcessId; - fDuration = toCopy.fDuration; - fSelfTime = toCopy.fSelfTime; - fCpuTime = toCopy.fCpuTime; - mergeProcessStatuses(toCopy); - } - - @Override - public long getWeight() { - return fDuration; - } - - @Override - public AggregatedCalledFunction copyOf() { - return new AggregatedCalledFunction(this); - } - - @Override - protected void mergeData(@NonNull WeightedTree other) { - if (!(other instanceof AggregatedCalledFunction)) { - return; - } - AggregatedCalledFunction otherFct = (AggregatedCalledFunction) other; - - addToDuration(otherFct.getDuration()); - addToSelfTime(otherFct.getSelfTime()); - addToCpuTime(otherFct.getCpuTime()); - getFunctionStatistics().merge(otherFct.getFunctionStatistics(), true); - mergeProcessStatuses(otherFct); - } - - private void mergeProcessStatuses(AggregatedCalledFunction other) { - Map processStatuses = other.fProcessStatuses; - for (Entry entry : processStatuses.entrySet()) { - AggregatedThreadStatus status = fProcessStatuses.get(entry.getKey()); - if (status == null) { - status = new AggregatedThreadStatus(entry.getKey()); - } - status.merge(entry.getValue()); - fProcessStatuses.put(entry.getKey(), status); - } - } - - @Override - public Map> getStatistics() { - ImmutableMap.Builder> builder = new ImmutableMap.Builder<>(); - builder.put(String.valueOf(Messages.CallGraphStats_Duration), getFunctionStatistics().getDurationStatistics()); - builder.put(String.valueOf(Messages.CallGraphStats_SelfTime), getFunctionStatistics().getSelfTimeStatistics()); - builder.put(String.valueOf(Messages.CallGraphStats_CpuTime), getFunctionStatistics().getCpuTimesStatistics()); - return builder.build(); - } - - /** - * Add a new callee into the Callees list. If the function exists in the - * callees list, the new callee's duration will be added to its duration and - * it'll combine their callees. - * - * @param child - * The callee to add to this function - * @param aggregatedChild - * The aggregated data of the callee - */ - public synchronized void addChild(AbstractCalledFunction child, AggregatedCalledFunction aggregatedChild) { - // Update the child's statistics with itself - fSelfTime -= aggregatedChild.getDuration(); - aggregatedChild.addFunctionCall(child); - super.addChild(aggregatedChild); - } - - /** - * Adds a function call to this aggregated called function data. The called - * function must have the same symbol as this aggregate data and its - * statistics will be added to this one. This should be a function at the - * same level as this one. - * - * @param function - * The function that was called - */ - public synchronized void addFunctionCall(AbstractCalledFunction function) { - // FIXME: Aren't the statistics enough? Do we really need duration, self - // time and cpu time here? - addToDuration(function.getLength()); - addToSelfTime(function.getSelfTime()); - addToCpuTime(function.getCpuTime()); - fProcessId = function.getProcessId(); - getFunctionStatistics().update(function); - } - - /** - * Modify the function's duration - * - * @param duration - * The amount to increment the duration by - */ - private void addToDuration(long duration) { - fDuration += duration; - } - - // /** - // * Merge the callees of two functions. - // * - // * @param firstNode - // * The first parent secondNode The second parent - // */ - // private static void mergeChildren(AggregatedCalledFunction firstNode, - // AggregatedCalledFunction secondNode) { - // for (Map.Entry FunctionEntry : - // secondNode.fChildren.entrySet()) { - // Object childSymbol = Objects.requireNonNull(FunctionEntry.getKey()); - // AggregatedCalledFunction secondNodeChild = - // Objects.requireNonNull(FunctionEntry.getValue()); - // AggregatedCalledFunction aggregatedCalledFunction = - // firstNode.fChildren.get(childSymbol); - // if (aggregatedCalledFunction == null) { - // firstNode.fChildren.put(secondNodeChild.getSymbol(), secondNodeChild); - // } else { - // // combine children - // AggregatedCalledFunction firstNodeChild = aggregatedCalledFunction; - // merge(firstNodeChild, secondNodeChild, true); - // firstNode.fChildren.replace(firstNodeChild.getSymbol(), firstNodeChild); - // } - // } - // } - // - // /** - // * Merge two functions, add durations, self times, increment the calls, - // * update statistics and merge children. - // * - // * @param destination - // * the node to merge to - // * @param source - // * the node to merge - // */ - // private static void merge(AggregatedCalledFunction destination, - // AggregatedCalledFunction source, boolean isGroup) { - // long sourceDuration = source.getDuration(); - // long sourceSelfTime = source.getSelfTime(); - // destination.addToDuration(sourceDuration); - // destination.addToSelfTime(sourceSelfTime); - // destination.addToCpuTime(source.getCpuTime()); - // destination.getFunctionStatistics().merge(source.getFunctionStatistics(), - // isGroup); - // // merge the children callees. - // mergeChildren(destination, source); - // } - - private void addToCpuTime(long cpuTime) { - if (cpuTime != IHostModel.TIME_UNKNOWN) { - if (fCpuTime < 0) { - fCpuTime = 0; - } - fCpuTime += cpuTime; - } - } - - /** - * The function's duration - * - * @return The duration of the function - */ - public long getDuration() { - return fDuration; - } - - /** - * The number of calls of a function - * - * @return The number of calls of a function - */ - public long getNbCalls() { - return fStatistics.getDurationStatistics().getNbElements(); - } - - /** - * The self time of an aggregated function - * - * @return The self time - */ - public long getSelfTime() { - return fSelfTime; - } - - /** - * Add to the self time of an aggregated function - * - * @param selfTime - * The amount of self time to add - */ - private void addToSelfTime(long selfTime) { - fSelfTime += selfTime; - } - - /** - * The CPU time of an aggregated function - * - * @return The CPU time, or {@link IHostModel#TIME_UNKNOWN} if the CPU time - * is not known - */ - public long getCpuTime() { - return fCpuTime; - } - - /** - * The process ID of the trace application. - * - * @return The process Id - */ - public int getProcessId() { - return fProcessId; - } - - /** - * Add a process status interval tot his called function - * - * @param interval - * The process status interval - */ - public void addKernelStatus(ProcessStatusInterval interval) { - ProcessStatus processStatus = interval.getProcessStatus(); - AggregatedThreadStatus status = fProcessStatuses.get(processStatus); - if (status == null) { - status = new AggregatedThreadStatus(processStatus); - fProcessStatuses.put(processStatus, status); - } - status.update(interval); - } - - @Override - public @NonNull Collection<@NonNull WeightedTree<@NonNull ICallStackSymbol>> getExtraDataTrees(int index) { - if (index == 0) { - return ImmutableList.copyOf(fProcessStatuses.values()); - } - return Collections.emptyList(); - } - - @Override - public @Nullable IStatistics getStatistics(int metricIndex) { - if (metricIndex < 0) { - return getFunctionStatistics().getDurationStatistics(); - } - if (metricIndex == CallGraphAnalysis.SELF_TIME_METRIC_INDEX) { - return getFunctionStatistics().getSelfTimeStatistics(); - } - if (metricIndex == CallGraphAnalysis.CPU_TIME_METRIC_INDEX) { - return getFunctionStatistics().getCpuTimesStatistics(); - } - return null; - } - - /** - * The function's statistics - * - * @return The function's statistics - */ - public AggregatedCalledFunctionStatistics getFunctionStatistics() { - return fStatistics; - } - - @Override - public String toString() { - return "Aggregate Function: " + getObject() + ", Duration: " + getDuration() + ", Self Time: " + fSelfTime + " on " + getNbCalls() + " calls"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ - } - -} From 7a887888bf4455f9d447169899ea45d1e54e0960 Mon Sep 17 00:00:00 2001 From: Fariba Daneshgar Date: Thu, 11 Jan 2024 12:58:06 -0500 Subject: [PATCH 2/5] execution comparison:textual time range selection Adding the option of textual input of dates and query to build the differential flame graph. Making work with mainline TODO: * move grouping to hamburger menu * add progress bar * instrument code (pretty good) * add tests * Make a registry for tracetype->callstack ID * remove hard disk operations from UI thread (in progress) * Add way to select the entire trace easily Signed-off-by: Fariba Daneshgar --- .../DifferentialSeqCallGraphAnalysis.java | 41 +- .../core/ParametricWeightedTreeUtils.java | 8 - .../ui/DifferentialFlameGraphView.java | 4 +- .../executioncomparision/ui/Messages.java | 9 - .../ui/MultipleDensityView.java | 440 ++++++++++++++++-- .../ui/MultipleEventDensityViewer.java | 3 +- .../ui/messages.properties | 3 - 7 files changed, 433 insertions(+), 75 deletions(-) diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java index ddc9353d0..1eac27fcb 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java @@ -106,13 +106,6 @@ public void refreshDiffCG(@Nullable IProgressMonitor monitor) { try (ScopeLog sl = new ScopeLog(LOGGER, Level.CONFIG, "DifferentialSequenceCGA::refresh()")) { //$NON-NLS-1$ Collection> originalTree = new ArrayList<>(); Collection> diffTree = new ArrayList<>(); - /* - * if (fEndA == null || fStartA == null) { fEndA = - * TmfTimestamp.BIG_CRUNCH; } if (fStartA == null) { fStartA = - * TmfTimestamp.BIG_BANG; } if (fEndB == null) { fEndB = - * TmfTimestamp.BIG_CRUNCH; } if (fStartB == null) { fStartB = - * TmfTimestamp.BIG_BANG; } - */ WeightedTreeSet callGraphA = mergeCallGraph(fStartA, fEndA, fTraceListA); Collection<@NonNull ?> processes = callGraphA.getTreesForNamed(MERGE); for (Object process : processes) { @@ -126,11 +119,7 @@ public void refreshDiffCG(@Nullable IProgressMonitor monitor) { } Collection> trees; - if (diffTree.isEmpty()) { - trees = ParametricWeightedTreeUtils.diffTrees(diffTree, originalTree, fStatistic); - } else { trees = ParametricWeightedTreeUtils.diffTrees(originalTree, diffTree, fStatistic); - } IWeightedTreeProvider instrumentedCallStackAnalysis = Iterables.get(fTraceCallGraphRegistry.values(), 0); setDifferentialCallGraphProvider(new DifferentialCallGraphProvider(instrumentedCallStackAnalysis, trees)); @@ -192,7 +181,7 @@ public IWeightedTreeSet getDiffProvider(@Nullable IProgressMonitor monitor) { + public @Nullable DifferentialWeightedTreeProvider getDiffProvider(@Nullable IProgressMonitor monitor) { if (fTraceCallGraphRegistry.isEmpty()) { InstrumentedCallStackAnalysis callGraphModule; ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); @@ -209,8 +198,9 @@ public IWeightedTreeSet traceListA = signal.getTraceListA(); if (traceListA != null) { - for (String name : traceListA) { - if (fTraceListA.contains(name)) { - fTraceListA.remove(name); - } else { - fTraceListA.add(name); - } + fTraceListA.clear(); + for (String name : signal.getTraceListA()) { + fTraceListA.add(name); + } + } List traceListB = signal.getTraceListB(); if (traceListB != null) { - for (String name : traceListB) { - if (fTraceListB.contains(name)) { - fTraceListB.remove(name); - } else { - fTraceListB.add(name); - } + fTraceListB.clear(); + for (String name : signal.getTraceListB()) { + fTraceListB.add(name); + } + } if (!fTraceCallGraphRegistry.isEmpty()) { try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MakeDiffCallGraph")) { //$NON-NLS-1$ @@ -370,8 +358,9 @@ public void dispose() { * @param differentialCallGraphProvider * the differentialCallGraphProvider to set */ - private void setDifferentialCallGraphProvider(@Nullable DifferentialCallGraphProvider differentialCallGraphProvider) { + private void setDifferentialCallGraphProvider(DifferentialCallGraphProvider differentialCallGraphProvider) { fDifferentialCallGraphProvider = Objects.requireNonNull(differentialCallGraphProvider); + } } diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java index 97d9dcd60..0f4c4c9c8 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java @@ -23,19 +23,11 @@ import org.eclipse.tracecompass.analysis.profiling.core.tree.ITree; import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeSet; import org.eclipse.tracecompass.analysis.profiling.core.tree.WeightedTree; -//import org.eclipse.tracecompass.incubator.analysis.core.concepts.ICallStackSymbol; -//import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.ITree; -//import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeProvider; -//import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.IWeightedTreeSet; -//import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTree; -//import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTreeUtils; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTree; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeSet; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.WeightedTreeUtils; import org.eclipse.tracecompass.internal.analysis.profiling.core.callgraph2.AggregatedCalledFunction; -//import org.eclipse.tracecompass.incubator.callstack.core.callgraph.ICallGraphProvider; -//import org.eclipse.tracecompass.incubator.internal.callstack.core.instrumented.callgraph.AggregatedCalledFunction; import org.eclipse.tracecompass.tmf.core.util.Pair; import com.google.common.collect.ImmutableList; diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java index db9709c36..30aa6f7d8 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java @@ -482,8 +482,8 @@ private void buildEntryList(@Nullable ITmfTrace trace, ITmfTrace parentTrace, Ma } } - } /// while - } // try + } + } catch (InterruptedException e1) { // TODO Auto-generated catch block e1.printStackTrace(); diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java index 9294822f5..87fe81382 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java @@ -53,15 +53,6 @@ public class Messages extends NLS { public static String AbstractMultipleDensityView_title; - /** - * Label for the count axis of the density chart. - */ - public static String ExecutionComparisionDurationViewer_TimeAxisLabel; - - /** - * Label for the time axis of the density chart. - */ - public static String ExecutionComparisionSelfTimeViewer_TimeAxisLabel; /** The action name for grouping */ public static String FlameGraphView_GroupByName; diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java index cee58d4f5..739e589dc 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java @@ -11,12 +11,19 @@ package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; +import java.text.ParseException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Objects; import java.util.logging.Level; +import javax.swing.JFormattedTextField; +import javax.swing.JLabel; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import javax.swing.ScrollPaneConstants; + import org.eclipse.jdt.annotation.Nullable; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.ActionContributionItem; @@ -27,6 +34,7 @@ import org.eclipse.jface.layout.GridLayoutFactory; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.SWT; +import org.eclipse.swt.awt.SWT_AWT; import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusListener; @@ -34,10 +42,17 @@ import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.layout.RowLayout; +import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Sash; @@ -56,6 +71,7 @@ import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; +import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestampFormat; import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager; import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentInfo; @@ -88,10 +104,11 @@ public class MultipleDensityView extends DifferentialFlameGraphView implements I * the id of the view */ public static final String id = "org.eclipse.tracecompass.incubator.internal.entexecutioncomparison.ui.execComparison"; //$NON-NLS-1$ - private static final int[] DEFAULT_WEIGHTS = new int[] { 4, 6 }; + private static final int[] DEFAULT_WEIGHTS = new int[] { 40, 15, 5, 40 }; private static final int[] DEFAULT_WEIGHTS_FILTERING_VIEW = new int[] { 495, 10, 495 }; private static final int[] DEFAULT_WEIGHTS_FILTERING_H = new int[] { 3, 9 }; - private static final int[] DEFAULT_WEIGHTS_LABELS = new int[] { 1, 9 }; + private static final int[] DEFAULT_WEIGHTS_LABELS = new int[] { 1, 7, 2 }; + private static final int[] DEFAULT_WEIGHTS_TimeInterval = new int[] { 250, 375, 375 }; /** * Default zoom range @@ -129,7 +146,14 @@ public class MultipleDensityView extends DifferentialFlameGraphView implements I private ITmfTimestamp fEndTimeA = TmfTimestamp.BIG_CRUNCH; private ITmfTimestamp fEndTimeB = TmfTimestamp.BIG_CRUNCH; private String fStatistic = "duration"; //$NON-NLS-1$ - + private JFormattedTextField ftextAFrom; + private JFormattedTextField ftextBFrom; + private JFormattedTextField ftextATo; + private JFormattedTextField ftextBTo; + private JTextArea ftextQuery; + private char queryPartSplitter = '&'; + + private TmfTimestampFormat fFormat = new TmfTimestampFormat("yyyy-MM-dd HH:mm:ss.SSS.SSS.SSS"); private @Nullable Listener fSashDragListener; private static final String TMF_VIEW_UI_CONTEXT = "org.eclipse.tracecompass.tmf.ui.view.context"; //$NON-NLS-1$ @@ -150,10 +174,12 @@ public void createPartControl(@Nullable Composite parent) { TmfSignalManager.register(this); final SashForm sashForm = new SashForm(parent, SWT.VERTICAL); - // fsashForm = sashForm; - + //// Main organization of the view SashForm sashFormFiltering = new SashForm(sashForm, SWT.HORIZONTAL); + SashForm sashFormQuery = new SashForm(sashForm, SWT.HORIZONTAL); + SashForm sashFormDoneButton = new SashForm(sashForm, SWT.HORIZONTAL); + ///// Organizing sashFormFiltering SashForm sashFormGroupA = new SashForm(sashFormFiltering, SWT.VERTICAL); SashForm distance = new SashForm(sashFormFiltering, SWT.NONE); @@ -167,9 +193,226 @@ public void createPartControl(@Nullable Composite parent) { Text labelGroupB = new Text(sashFormGroupB, SWT.BORDER | SWT.CENTER); labelGroupB.setText(Messages.AbstractMultipleDensityView_GroupB); + /////// density charts SashForm densityA = new SashForm(sashFormGroupA, SWT.HORIZONTAL); SashForm densityB = new SashForm(sashFormGroupB, SWT.HORIZONTAL); + ///////// Time inputs + SashForm timeInputA = new SashForm(sashFormGroupA, SWT.HORIZONTAL); + SashForm timeInputB = new SashForm(sashFormGroupB, SWT.HORIZONTAL); + + //// Group A time Intervals + Composite timelableA = new Composite(timeInputA, SWT.NONE); + Composite timelableAFrom = new Composite(timeInputA, SWT.EMBEDDED); + Composite timelableATo = new Composite(timeInputA, SWT.EMBEDDED); + + timeInputA.setWeights(DEFAULT_WEIGHTS_TimeInterval); + + RowLayout rowLayout = new RowLayout(); + + timelableA.setLayout(rowLayout); + timelableAFrom.setLayout(rowLayout); + timelableATo.setLayout(rowLayout); + + // LabelA + Label labelA = new Label(timelableA, SWT.NONE); + labelA.setText("Time IntervalA "); //$NON-NLS-1$ + + /// LableAfrom + java.awt.Frame frameAFrom = SWT_AWT.new_Frame(timelableAFrom); + java.awt.Panel panelAFrom = new java.awt.Panel(); + frameAFrom.add(panelAFrom); + + JLabel labelAFrom = new JLabel(); + labelAFrom.setText("From: "); //$NON-NLS-1$ + + JFormattedTextField textAFrom = new JFormattedTextField(fFormat); + textAFrom.addFocusListener(new java.awt.event.FocusListener() { + public String oldVal = null; + + @Override + public void focusGained(java.awt.event.FocusEvent e) { + // TODO Auto-generated method stub + oldVal = textAFrom.getText(); + System.out.println("I was there: Gain"); + + } + + @Override + public void focusLost(java.awt.event.FocusEvent e) { + // TODO Auto-generated method stub + if (!oldVal.equals(textAFrom.getText())) { + long newTime = 0; + try { + newTime = fFormat.parseValue(textAFrom.getText()); + } catch (ParseException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fStartTimeA = fromTime; + + TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace()); + broadcast(signal); + System.out.println("I was there: Lost,change"); + + // } + System.out.println("I was there: Lost"); + System.out.println("I was there: Lost" + newTime); + + } + } + }); + panelAFrom.add(labelAFrom); + panelAFrom.add(textAFrom); + ftextAFrom = textAFrom; + + //// LableATo + java.awt.Frame frameATo = SWT_AWT.new_Frame(timelableATo); + java.awt.Panel panelATo = new java.awt.Panel(); + frameATo.add(panelATo); + + JLabel labelATo = new JLabel(); + labelATo.setText("To: "); //$NON-NLS-1$ + JFormattedTextField textATo = new JFormattedTextField(fFormat); + textATo.addFocusListener(new java.awt.event.FocusListener() { + public String oldVal = null; + + @Override + public void focusGained(java.awt.event.FocusEvent e) { + // TODO Auto-generated method stub + oldVal = textATo.getText(); + System.out.println("I was there: Gain"); + + } + + @Override + public void focusLost(java.awt.event.FocusEvent e) { + // TODO Auto-generated method stub + if (!oldVal.equals(textATo.getText())) { + long newTime = 0; + try { + newTime = fFormat.parseValue(textATo.getText()); + } catch (ParseException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fEndTimeA = fromTime; + + TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace()); + broadcast(signal); + } + } + }); + + panelATo.add(labelATo); + panelATo.add(textATo); + ftextATo = textATo; + + //// Group B time Intervals + Composite timelableB = new Composite(timeInputB, SWT.NONE); + Composite timelableBFrom = new Composite(timeInputB, SWT.EMBEDDED); + Composite timelableBTo = new Composite(timeInputB, SWT.EMBEDDED); + + timeInputB.setWeights(DEFAULT_WEIGHTS_TimeInterval); + + timelableB.setLayout(rowLayout); + timelableBFrom.setLayout(rowLayout); + timelableBTo.setLayout(rowLayout); + + // LabelA + Label labelB = new Label(timelableB, SWT.NONE); + labelB.setText("Time IntervalB "); //$NON-NLS-1$ + + + /// LableBFrom + java.awt.Frame frameBFrom = SWT_AWT.new_Frame(timelableBFrom); + java.awt.Panel panelBFrom = new java.awt.Panel(); + frameBFrom.add(panelBFrom); + + JLabel labelBFrom = new JLabel(); + labelBFrom.setText("From: "); //$NON-NLS-1$ + JFormattedTextField textBFrom = new JFormattedTextField(fFormat); + textBFrom.addFocusListener(new java.awt.event.FocusListener() { + public String oldVal = null; + + @Override + public void focusGained(java.awt.event.FocusEvent e) { + // TODO Auto-generated method stub + oldVal = textBFrom.getText(); + System.out.println("I was there: Gain"); + + } + + @Override + public void focusLost(java.awt.event.FocusEvent e) { + // TODO Auto-generated method stub + if (!oldVal.equals(textBFrom.getText())) { + long newTime = 0; + try { + newTime = fFormat.parseValue(textBFrom.getText()); + } catch (ParseException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fStartTimeB = fromTime; + + TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace()); + broadcast(signal); + + } + } + }); + + panelBFrom.add(labelBFrom); + panelBFrom.add(textBFrom); + ftextBFrom = textBFrom; + + //// LableBTo + java.awt.Frame frameBTo = SWT_AWT.new_Frame(timelableBTo); + java.awt.Panel panelBTo = new java.awt.Panel(); + frameBTo.add(panelBTo); + + JLabel labelBTo = new JLabel(); + labelBTo.setText("To: "); //$NON-NLS-1$ + JFormattedTextField textBTo = new JFormattedTextField(fFormat); + textBTo.addFocusListener(new java.awt.event.FocusListener() { + public String oldVal = null; + + @Override + public void focusGained(java.awt.event.FocusEvent e) { + // TODO Auto-generated method stub + oldVal = textBTo.getText(); + System.out.println("I was there: Gain"); + + } + + @Override + public void focusLost(java.awt.event.FocusEvent e) { + // TODO Auto-generated method stub + if (!oldVal.equals(textBTo.getText())) { + long newTime = 0; + try { + newTime = fFormat.parseValue(textBTo.getText()); + } catch (ParseException e1) { + // TODO Auto-generated catch block + e1.printStackTrace(); + } + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fEndTimeB = fromTime; + + TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace()); + broadcast(signal); + } + } + }); + + panelBTo.add(labelBTo); + panelBTo.add(textBTo); + ftextBTo = textBTo; + sashFormGroupA.setWeights(DEFAULT_WEIGHTS_LABELS); sashFormGroupB.setWeights(DEFAULT_WEIGHTS_LABELS); @@ -229,17 +472,17 @@ public void paintControl(@Nullable PaintEvent e) { // drag listener here if (fSashDragListener == null) { for (Control control : getSashFormLeftChildB().getChildren()) { - if (control instanceof Sash) { - Objects.requireNonNull(getSashFormLeftChildB()); - fSashDragListener = event -> TmfSignalManager.dispatchSignal(new TmfTimeViewAlignmentSignal(getSashFormLeftChildB(), getTimeViewAlignmentInfo(chartViewerB, getSashFormLeftChildB()))); - control.removePaintListener(this); - control.addListener(SWT.Selection, fSashDragListener); - // There should be only one sash - break; - } + Objects.requireNonNull(getSashFormLeftChildB()); + fSashDragListener = event -> TmfSignalManager.dispatchSignal(new TmfTimeViewAlignmentSignal(getSashFormLeftChildB(), getTimeViewAlignmentInfo(chartViewerB, getSashFormLeftChildB()))); + control.removePaintListener(this); + control.addListener(SWT.Selection, fSashDragListener); + // There should be only one sash + break; } + } + } }); @@ -254,9 +497,64 @@ public void paintControl(@Nullable PaintEvent e) { sashFormFiltering.setWeights(DEFAULT_WEIGHTS_FILTERING_VIEW); - super.createPartControl(sashForm); + ///// Organizing sashFormQuery + + + Composite querylable = new Composite(sashFormQuery, SWT.NONE); + Composite queryText = new Composite(sashFormQuery, SWT.EMBEDDED); + + sashFormQuery.setWeights(new int[] { 5, 95 }); + + querylable.setLayout(rowLayout); + queryText.setLayout(new FillLayout()); + + + // Label + Label labelQuery = new Label(querylable, SWT.NONE); + labelQuery.setText("Query"); //$NON-NLS-1$ + + // Text + + java.awt.Frame frameQuery = SWT_AWT.new_Frame(queryText); + java.awt.Panel panelQuery = new java.awt.Panel(); + frameQuery.add(panelQuery); + + JTextArea textQuery = new JTextArea(); + panelQuery.add(textQuery); + + JScrollPane scroll = new JScrollPane (textQuery, + ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); + + frameQuery.add(scroll); + ftextQuery = textQuery; + + //// Organizing sashFormDoneButton + Composite doneButton = new Composite(sashFormDoneButton, SWT.NONE); + doneButton.setLayout(new GridLayout(1, false)); + + final Button button = new Button(doneButton, SWT.PUSH); + button.setText("Differential Flamegraph"); //$NON-NLS-1$ + button.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, true)); + + button.addSelectionListener(new SelectionListener() { + + @Override + public void widgetSelected(@Nullable SelectionEvent event) { + parseQuery(ftextQuery.getText()); + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, fStatistic, fTraceListA, fTraceListB); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + buildDifferetialFlameGraph(); + + } + + @Override + public void widgetDefaultSelected(@Nullable SelectionEvent event) { + } + }); + super.createPartControl(sashForm); sashForm.setWeights(DEFAULT_WEIGHTS); + ITmfTrace activetrace = TmfTraceManager.getInstance().getActiveTrace(); if (activetrace != null) { buildDifferetialFlameGraph(); @@ -301,8 +599,14 @@ public void traceSelected(final TmfTraceSelectedSignal signal) { fStartTimeB = trace.getStartTime(); fEndTimeB = trace.getEndTime(); + ftextAFrom.setText(fStartTimeA.toString(fFormat)); + ftextBFrom.setText(fStartTimeB.toString(fFormat)); + ftextATo.setText(fEndTimeA.toString(fFormat)); + ftextBTo.setText(fEndTimeB.toString(fFormat)); + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, fStatistic, fTraceListA, fTraceListB); TmfSignalManager.dispatchSignal(rangUpdateSignal); + ftextQuery.setText(makeQuery()); buildDifferetialFlameGraph(); } @@ -317,7 +621,7 @@ public void run() { fStatistic = name; TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStatistic, null, null); TmfSignalManager.dispatchSignal(rangUpdateSignal); - + ftextQuery.setText(makeQuery()); buildDifferetialFlameGraph(); } }; @@ -439,13 +743,19 @@ public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { if (source == getChartViewerA()) { fStartTimeA = TmfTimestamp.fromNanos(getChartViewerA().getSelectionBeginTime()); fEndTimeA = TmfTimestamp.fromNanos(getChartViewerA().getSelectionEndTime()); + ftextAFrom.setText(fStartTimeA.toString(fFormat)); + ftextATo.setText(fEndTimeA.toString(fFormat)); + } else if (source == getChartViewerB()) { fStartTimeB = TmfTimestamp.fromNanos(getChartViewerB().getSelectionBeginTime()); fEndTimeB = TmfTimestamp.fromNanos(getChartViewerB().getSelectionEndTime()); + ftextBFrom.setText(fStartTimeB.toString(fFormat)); + ftextBTo.setText(fEndTimeB.toString(fFormat)); + } TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, null, null, null); TmfSignalManager.dispatchSignal(rangUpdateSignal); - + ftextQuery.setText(makeQuery()); buildDifferetialFlameGraph(); } } @@ -523,32 +833,31 @@ public void CheckBoxUpdated(TmfCheckboxChangedSignal signal) { TmfComparisonFilteringUpdatedSignal rangUpdateSignal = null; if (signal.getSource() == getChartViewerA()) { + fTraceListA.clear(); for (String name : signal.getTraceList()) { - if (fTraceListA.contains(name)) { - fTraceListA.remove(name); - } else { - fTraceListA.add(name); - } + fTraceListA.add(name); + } + rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, null, fTraceListA, null); TmfSignalManager.dispatchSignal(rangUpdateSignal); } if (signal.getSource() == getChartViewerB()) { + fTraceListB.clear(); for (String name : signal.getTraceList()) { - if (fTraceListB.contains(name)) { - fTraceListB.remove(name); - } else { - fTraceListB.add(name); - } + fTraceListB.add(name); } + rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, null, null, fTraceListB); TmfSignalManager.dispatchSignal(rangUpdateSignal); } + ftextQuery.setText(makeQuery()); buildDifferetialFlameGraph(); } + } @SuppressWarnings("null") @@ -639,4 +948,83 @@ private void setContextService(@Nullable IContextService contextService) { fContextService = contextService; } + private String makeQuery() { + String query = ""; //$NON-NLS-1$ + /// Query PartA + query = query.concat("Trace(s): ");//$NON-NLS-1$ + query = query.concat(System.lineSeparator()); + for (String trace : fTraceListA) { + query = query.concat(trace); + query = query.concat(","); //$NON-NLS-1$ + } + query = query.concat("\nFrom:\n "); //$NON-NLS-1$ + query = query.concat(fStartTimeA.toString(fFormat)); + + query = query.concat("\nTo: \n"); //$NON-NLS-1$ + query = query.concat(fEndTimeA.toString(fFormat)); + + query = query.concat("\nCompared to:\n "); //$NON-NLS-1$ + + /// Query PartB + query = query.concat("Trace(s): \n"); //$NON-NLS-1$ + for (String trace : fTraceListB) { + query = query.concat(trace); + query = query.concat(","); //$NON-NLS-1$ + } + query = query.concat("\nFrom:\n "); //$NON-NLS-1$ + query = query.concat(fStartTimeB.toString(fFormat)); + + query = query.concat("\nTo:\n "); //$NON-NLS-1$ + query = query.concat(fEndTimeB.toString(fFormat)); + //// Query Sttistic Part + query = query.concat("\nStatistic: \n"); //$NON-NLS-1$ + query = query.concat(fStatistic); + + return query; + } + + void parseQuery(String query) { + try { + String[] parts = query.split(System.lineSeparator()); + //// Part A + // traceListA + fTraceListA.clear(); + String[] traces = parts[1].split(","); //$NON-NLS-1$ + for (String trace : traces) { + fTraceListA.add(trace); + } + // Times + try { + fStartTimeA = TmfTimestamp.fromNanos(fFormat.parseValue(parts[3])); + ftextAFrom.setText(parts[3]); + fEndTimeA = TmfTimestamp.fromNanos(fFormat.parseValue(parts[5])); + ftextATo.setText(parts[5]); + fStartTimeB = TmfTimestamp.fromNanos(fFormat.parseValue(parts[10])); + ftextBFrom.setText(parts[10]); + fEndTimeB = TmfTimestamp.fromNanos(fFormat.parseValue(parts[12])); + ftextBTo.setText(parts[12]); + + } catch (ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + // traceListB + fTraceListB.clear(); + traces = parts[8].split(","); + for (String trace : traces) { + fTraceListB.add(trace); + } + ////Statistic + fStatistic = parts[14]; + } + catch(ArrayIndexOutOfBoundsException ex){ + System.out.println("query format is incorrect "+ex.toString()); + + } + + + } + + + } \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java index 484e02eac..fb19a4adf 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java @@ -44,12 +44,13 @@ public MultipleEventDensityViewer(Composite parent, TmfXYChartSettings settings) super(parent, settings); } - @Override + @Override @TmfSignalHandler public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { if (signal == null) { return; } + final ITmfTrace trace = getTrace(); if (trace != null) { TmfTraceContext ctx = TmfTraceManager.getInstance().getTraceContext(trace); diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties index abee19e76..c8f4ec61d 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties @@ -9,9 +9,6 @@ # SPDX-License-Identifier: EPL-2.0 ############################################################################### -ExecutionComparisionDurationViewer_TimeAxisLabel=Duration -ExecutionComparisionSelfTimeViewer_TimeAxisLabel=SelfTime - AbstractMultipleDensityView_GroupA=GroupA AbstractMultipleDensityView_GroupB=GroupB From e8dccee3d689ea4073654d4907cd9a486deb4fe2 Mon Sep 17 00:00:00 2001 From: Fariba Daneshgar Date: Fri, 9 Feb 2024 11:12:56 -0500 Subject: [PATCH 3/5] execution comparison:initial commit Differential flame graph view is updated to be able to show and hide Query part by demand. grouping are added to hamburger menu Dependencies to incubator for callstack and weighted tree packages are reslved changing in time ranges or in query reflect in graphical treeview and density charts Adding the reset Button to select entire trace (back to initial state) TODO * Add progress bar * instrument code(pretty good) * add test * make a registry for traceTYpe->callstack ID Signed-off-by: fariba --- .../core/DifferentialCallGraphProvider.java | 11 +- .../core/DifferentialFlamePalette.java | 4 +- .../DifferentialSeqCallGraphAnalysis.java | 35 +- .../core/ParametricWeightedTreeUtils.java | 2 +- .../META-INF/MANIFEST.MF | 2 - .../plugin.xml | 2 +- .../ui/DifferentialFlameGraphView.java | 113 +-- ...View.java => ExecutionComparisonView.java} | 768 +++++++++++------- .../executioncomparision/ui/Messages.java | 57 +- .../ui/MultipleEventDensityViewer.java | 62 +- .../ui/messages.properties | 35 +- 11 files changed, 652 insertions(+), 439 deletions(-) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/{MultipleDensityView.java => ExecutionComparisonView.java} (55%) diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialCallGraphProvider.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialCallGraphProvider.java index 2c5c437f1..3f0a8356f 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialCallGraphProvider.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialCallGraphProvider.java @@ -13,19 +13,20 @@ import java.util.Collection; -import org.eclipse.tracecompass.analysis.profiling.core.base.ICallStackElement; -import org.eclipse.tracecompass.analysis.profiling.core.base.ICallStackSymbol; -import org.eclipse.tracecompass.analysis.profiling.core.base.IDataPalette; import org.eclipse.tracecompass.analysis.profiling.core.callgraph.AggregatedCallSite; import org.eclipse.tracecompass.analysis.profiling.core.callgraph.ICallGraphProvider2; +import org.eclipse.tracecompass.analysis.profiling.core.base.ICallStackSymbol; +import org.eclipse.tracecompass.analysis.profiling.core.base.IDataPalette; import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeProvider; import org.eclipse.tracecompass.analysis.profiling.core.tree.WeightedTree; +import org.eclipse.tracecompass.analysis.profiling.core.base.ICallStackElement; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTree; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeSet; /** - * + * DifferentialCallGraphProvider which provide a callgraphProvider. Inherited from DifferentialWeightedTreeProvider + * to edit naming and color ICallGraphProviderpalette to provide a differential flame graph * @author Fateme Faraji Daneshgar */ public class DifferentialCallGraphProvider extends DifferentialWeightedTreeProvider { @@ -86,4 +87,4 @@ public String toDisplayString(DifferentialWeightedTree tree) { } -} +} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialFlamePalette.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialFlamePalette.java index 971abe230..46193c0db 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialFlamePalette.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialFlamePalette.java @@ -86,7 +86,7 @@ private static String generateBlue(int i) { StyleProperties.BACKGROUND_COLOR, WHITE_COLOR, StyleProperties.OPACITY, 1, StyleProperties.BORDER_STYLE, StyleProperties.BorderStyle.SOLID))); - // Add Blue tenses for Shorter duration + // Add Blue color palette for Shorter duration for (i = MIN_HUE; i <= MAX_HUE; i++) { j = (i-50)>0 ? i-50:0; String blueKey = generateBlue(i); @@ -96,7 +96,7 @@ private static String generateBlue(int i) { StyleProperties.OPACITY, 1, StyleProperties.BORDER_STYLE, StyleProperties.BorderStyle.SOLID))); } - // Add Red tenses for Longer duration + // Add Red color palette for Longer duration for (i = MIN_HUE; i <= MAX_HUE; i++) { String redKey = generateRed(i); builder.put(redKey, new OutputElementStyle(null, ImmutableMap.of( diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java index 1eac27fcb..bd7c4ee84 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/DifferentialSeqCallGraphAnalysis.java @@ -93,7 +93,7 @@ public DifferentialSeqCallGraphAnalysis() { super(); // TODO: Make a way to register tracetype->callstack IDs. fcallStackAnalysisMap.put("org.eclipse.tracecompass.incubator.traceevent.core.trace", "org.eclipse.tracecompass.incubator.traceevent.analysis.callstack"); //$NON-NLS-1$ //$NON-NLS-2$ - fcallStackAnalysisMap.put("org.eclipse.linuxtools.lttng2.ust.tracetype", "org.eclipse.tracecompass.incubator.callstack.core.lttng.ust"); //$NON-NLS-1$ //$NON-NLS-2$ + fcallStackAnalysisMap.put("org.eclipse.linuxtools.lttng2.ust.tracetype", "org.eclipse.tracecompass.lttng2.ust.core.analysis.callstack"); //$NON-NLS-1$ //$NON-NLS-2$ } /** @@ -119,7 +119,7 @@ public void refreshDiffCG(@Nullable IProgressMonitor monitor) { } Collection> trees; - trees = ParametricWeightedTreeUtils.diffTrees(originalTree, diffTree, fStatistic); + trees = ParametricWeightedTreeUtils.diffTrees(originalTree, diffTree, fStatistic); IWeightedTreeProvider instrumentedCallStackAnalysis = Iterables.get(fTraceCallGraphRegistry.values(), 0); setDifferentialCallGraphProvider(new DifferentialCallGraphProvider(instrumentedCallStackAnalysis, trees)); @@ -147,7 +147,18 @@ public WeightedTreeSet mergeCallGraph(ITmfTimestamp st for (String traceName : traceList) { ICallGraphProvider2 instrumentedCallStackAnalysis = fTraceCallGraphRegistry.get(traceName); if (instrumentedCallStackAnalysis != null) { - cGList.add(instrumentedCallStackAnalysis.getCallGraph(start, end)); + ITmfTrace trace = getTrace(traceName); + ITmfTimestamp traceStart = start; + ITmfTimestamp traceEnd = end; + + if (traceStart.getValue()< trace.getStartTime().getValue()) { + traceStart = trace.getStartTime(); + } + if (traceEnd.getValue()> trace.getEndTime().getValue()) { + traceEnd = trace.getEndTime(); + } + cGList.add(instrumentedCallStackAnalysis.getCallGraph(traceStart, traceEnd)); + } } @@ -314,7 +325,7 @@ public void selectionRangeUpdated(TmfComparisonFilteringUpdatedSignal signal) { try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MakeDiffCallGraph")) { //$NON-NLS-1$ synchronized (this) { if (fDiffJob != null) { - fDiffJob.join(); + fDiffJob.cancel(); } fDiffJob = new Job("Make differential Callgraph") { //$NON-NLS-1$ @Override @@ -328,11 +339,8 @@ protected IStatus run(@Nullable IProgressMonitor monitor) { }; fDiffJob.schedule(); } - } catch (InterruptedException e) { - Thread.currentThread().interrupt(); } } - } @Override @@ -360,7 +368,16 @@ public void dispose() { */ private void setDifferentialCallGraphProvider(DifferentialCallGraphProvider differentialCallGraphProvider) { fDifferentialCallGraphProvider = Objects.requireNonNull(differentialCallGraphProvider); - + } + private static ITmfTrace getTrace(String traceName) { + ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); + Collection traceSet = TmfTraceManager.getTraceSet(trace); + for (ITmfTrace traceMember : traceSet) { + if (traceMember.getName().equals(traceName)) { + return traceMember; + } + } + return null; } -} +} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java index 0f4c4c9c8..c7f3e306b 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java @@ -235,4 +235,4 @@ private ParametricWeightedTreeUtils() { return null; } -} +} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF index 49776719c..47c4afb30 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF @@ -13,8 +13,6 @@ Require-Bundle: org.eclipse.ui, org.eclipse.tracecompass.common.core, org.eclipse.tracecompass.tmf.core, org.eclipse.tracecompass.tmf.ui, - org.eclipse.tracecompass.incubator.callstack.ui, - org.eclipse.tracecompass.incubator.callstack.core, org.eclipse.tracecompass.incubator.analysis.core, org.eclipse.tracecompass.incubator.executioncomparision.core, org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional, diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml index 932fd1a01..d9b16626b 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml @@ -6,7 +6,7 @@ diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java index 30aa6f7d8..071c482e3 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java @@ -38,11 +38,7 @@ import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.GroupMarker; import org.eclipse.jface.action.IAction; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.MenuManager; import org.eclipse.jface.viewers.ISelection; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.swt.SWT; @@ -52,17 +48,14 @@ import org.eclipse.swt.events.PaintListener; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.tracecompass.analysis.profiling.core.callgraph.ICallGraphProvider; +import org.eclipse.tracecompass.analysis.profiling.core.callgraph.ICallGraphProvider2; import org.eclipse.tracecompass.common.core.NonNullUtils; import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.FlowScopeLog; import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.FlowScopeLogBuilder; import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.ScopeLog; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; -import org.eclipse.tracecompass.incubator.internal.callstack.ui.flamegraph.DataProviderActionUtils; -import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.DifferentialSeqCallGraphAnalysis; -import org.eclipse.tracecompass.internal.analysis.profiling.core.flamegraph.DataProviderUtils; import org.eclipse.tracecompass.internal.analysis.profiling.core.flamegraph.FlameGraphDataProvider; +import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.DifferentialSeqCallGraphAnalysis; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TmfFilterAppliedSignal; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TraceCompassFilter; import org.eclipse.tracecompass.internal.provisional.tmf.ui.widgets.timegraph.BaseDataProviderTimeGraphPresentationProvider; @@ -106,7 +99,6 @@ import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.TimeGraphControl; import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.widgets.Utils.TimeFormat; import org.eclipse.ui.IEditorPart; -import org.eclipse.ui.IWorkbenchActionConstants; import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.ui.progress.IWorkbenchSiteProgressService; @@ -116,7 +108,7 @@ import com.google.common.collect.Multimap; /** - * the flame graph part of the differential flame graph. + * the differential flame graph used in execution comparison view. Its mostly based on FlameGraphView * * @author Fateme Faraji Daneshgar * @@ -143,7 +135,6 @@ public class DifferentialFlameGraphView extends TmfView { private @Nullable ITmfTrace fTrace = null; - private final MenuManager fEventMenuManager = new MenuManager(); /** * A plain old semaphore is used since different threads will be competing * for the same resource. @@ -210,7 +201,6 @@ public void createPartControl(@Nullable Composite parent) { } TmfSignalManager.register(this); getSite().setSelectionProvider(getTimeGraphViewer().getSelectionProvider()); - createTimeEventContextMenu(); getTimeGraphViewer().getTimeGraphControl().addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(@Nullable MouseEvent e) { @@ -319,13 +309,13 @@ public void traceSelected(final TmfTraceSelectedSignal signal) { * * @return The call graph provider modules */ - protected Iterable getCallgraphModules() { + protected Iterable getCallgraphModules() { ITmfTrace trace = fTrace; if (trace == null) { return Collections.emptyList(); } String analysisId = NonNullUtils.nullToEmptyString(getViewSite().getSecondaryId()); - Iterable modules = TmfTraceUtils.getAnalysisModulesOfClass(trace, ICallGraphProvider.class); + Iterable modules = TmfTraceUtils.getAnalysisModulesOfClass(trace, ICallGraphProvider2.class); return StreamSupport.stream(modules.spliterator(), false) .filter(m -> { if (m instanceof IAnalysisModule) { @@ -464,6 +454,9 @@ private void buildEntryList(@Nullable ITmfTrace trace, ITmfTrace parentTrace, Ma } if (monitor.isCanceled()) { + if (trace==null) { + return; + } resetEntries(trace); return; } @@ -733,7 +726,10 @@ private void zoomEntries(Iterable normalEntries, long zoomStartT List times = StateSystemUtils.getTimes(start, end, resolution); Sampling sampling = new Sampling(start, end, resolution); + Multimap, Long> providersToModelIds = filterGroupEntries(normalEntries, zoomStartTime, zoomEndTime); + if (providersToModelIds!=null) { + SubMonitor subMonitor = SubMonitor.convert(monitor, getClass().getSimpleName() + "#zoomEntries", providersToModelIds.size()); //$NON-NLS-1$ Entry, Collection> entry = providersToModelIds.asMap().entrySet().iterator().next(); @@ -746,16 +742,14 @@ private void zoomEntries(Iterable normalEntries, long zoomStartT } TmfModelResponse response = dataProvider.fetchRowModel(parameters, monitor); TimeGraphModel model = response.getModel(); - if ((model != null) && (fEntries.get(dataProvider)) != null) { - System.out.println( - "zommEntries: Current Thread Name: " - + Thread.currentThread().getName()); - - zoomEntries(fEntries.get(dataProvider), model.getRows(), response.getStatus() == ITmfResponse.Status.COMPLETED, sampling); + Map entries = fEntries.get(dataProvider); + if ((model != null) && (entries) != null) { + zoomEntries(entries, model.getRows(), response.getStatus() == ITmfResponse.Status.COMPLETED, sampling); } subMonitor.worked(1); redraw(); + } } /** @@ -767,6 +761,7 @@ private void zoomEntries(Iterable normalEntries, long zoomStartT * * @return The multimap of regexes by property */ + @SuppressWarnings("null") private Multimap getRegexes() { Multimap regexes = HashMultimap.create(); @@ -784,8 +779,7 @@ private Multimap getRegexes() { } private void zoomEntries(Map map, List model, boolean completed, Sampling sampling) { - boolean isZoomThread = false; // Thread.currentThread() instanceof - // ZoomThread; + boolean isZoomThread = false; for (ITimeGraphRowModel rowModel : model) { TimeGraphEntry entry = map.get(rowModel.getEntryID()); @@ -871,7 +865,7 @@ protected TimeEvent createTimeEvent(TimeGraphEntry entry, ITimeGraphState state) * the rightmost time bound of the view * @return A Multimap of data providers to their visible entries' model IDs. */ - private static Multimap, Long> filterGroupEntries(Iterable visible, + private static @Nullable Multimap, Long> filterGroupEntries(Iterable visible, long zoomStartTime, long zoomEndTime) { Multimap, Long> providersToModelIds = HashMultimap.create(); for (TimeGraphEntry entry : visible) { @@ -1169,75 +1163,6 @@ public void traceClosed(final TmfTraceClosedSignal signal) { public void setFocus() { getTimeGraphViewer().setFocus(); } - - // ------------------------------------------------------------------------ - // Helper methods - // ------------------------------------------------------------------------ - - private void createTimeEventContextMenu() { - fEventMenuManager.setRemoveAllWhenShown(true); - TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); - final Menu timeEventMenu = fEventMenuManager.createContextMenu(timeGraphControl); - - timeGraphControl.addTimeGraphEntryMenuListener(event -> { - /* - * The TimeGraphControl will call the TimeGraphEntryMenuListener - * before the TimeEventMenuListener. We need to clear the menu for - * the case the selection was done on the namespace where the time - * event listener below won't be called afterwards. - */ - timeGraphControl.setMenu(null); - event.doit = false; - }); - timeGraphControl.addTimeEventMenuListener(event -> { - Menu menu = timeEventMenu; - if (event.data instanceof TimeEvent && !(event.data instanceof NullTimeEvent)) { - timeGraphControl.setMenu(menu); - return; - } - timeGraphControl.setMenu(null); - event.doit = false; - }); - - fEventMenuManager.addMenuListener(manager -> { - fillTimeEventContextMenu(fEventMenuManager); - fEventMenuManager.add(new GroupMarker(IWorkbenchActionConstants.MB_ADDITIONS)); - }); - getSite().registerContextMenu(fEventMenuManager, getTimeGraphViewer().getSelectionProvider()); - } - - /** - * Fill context menu - * - * @param menuManager - * a menuManager to fill - */ - protected void fillTimeEventContextMenu(IMenuManager menuManager) { - ISelection selection = getSite().getSelectionProvider().getSelection(); - if (selection instanceof IStructuredSelection) { - for (Object object : ((IStructuredSelection) selection).toList()) { - if (object instanceof ITimeEvent) { - ITimeEvent event = (ITimeEvent) object; - ITimeGraphDataProvider provider = getProvider(Objects.requireNonNull(event.getEntry())); - Map tooltip = getTooltip(event, event.getTime(), provider, true); - for (Entry entry : tooltip.entrySet()) { - String tooltipKey = Objects.requireNonNull((entry.getKey())); - if (tooltipKey.startsWith(DataProviderUtils.ACTION_PREFIX)) { - // It's an action, add it to the menu - menuManager.add(new Action(tooltipKey.substring(DataProviderUtils.ACTION_PREFIX.length())) { - @Override - public void run() { - DataProviderActionUtils.executeAction(entry.getValue()); - - } - }); - } - } - } - } - } - } - // -------------------------------- // Sorting related methods // -------------------------------- @@ -1312,4 +1237,4 @@ private ITimeGraphDataProvider getFdataProviderGroup() { private void setFdataProviderGroup(@Nullable ITimeGraphDataProvider fdataProviderGroup) { this.fdataProviderGroup = fdataProviderGroup; } -} +} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/ExecutionComparisonView.java similarity index 55% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/ExecutionComparisonView.java index 739e589dc..c810fd6d5 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleDensityView.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/ExecutionComparisonView.java @@ -20,31 +20,27 @@ import javax.swing.JFormattedTextField; import javax.swing.JLabel; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import javax.swing.ScrollPaneConstants; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.ActionContributionItem; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IMenuCreator; +import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.IStatusLineManager; -import org.eclipse.jface.action.IToolBarManager; +import org.eclipse.jface.action.Separator; import org.eclipse.jface.layout.GridLayoutFactory; -import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.swt.SWT; import org.eclipse.swt.awt.SWT_AWT; import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.events.ExpandEvent; +import org.eclipse.swt.events.ExpandListener; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusListener; import org.eclipse.swt.events.MouseAdapter; import org.eclipse.swt.events.MouseEvent; import org.eclipse.swt.events.PaintEvent; import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.events.SelectionEvent; -import org.eclipse.swt.events.SelectionListener; -import org.eclipse.swt.layout.FillLayout; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.layout.RowLayout; @@ -52,13 +48,15 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.ExpandBar; +import org.eclipse.swt.widgets.ExpandItem; +import org.eclipse.swt.widgets.Group; import org.eclipse.swt.widgets.Listener; import org.eclipse.swt.widgets.Menu; import org.eclipse.swt.widgets.Sash; import org.eclipse.swt.widgets.Text; import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.ScopeLog; -import org.eclipse.tracecompass.incubator.internal.callstack.ui.Activator; import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.TmfCheckboxChangedSignal; import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.TmfComparisonFilteringUpdatedSignal; import org.eclipse.tracecompass.internal.tmf.ui.viewers.eventdensity.EventDensityTreeViewer; @@ -89,38 +87,32 @@ import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfXYChartSettings; import org.eclipse.tracecompass.tmf.ui.views.ManyEntriesSelectedDialogPreCheckedListener; import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.dialogs.TriStateFilteredCheckboxTree; -import org.eclipse.ui.IActionBars; import org.eclipse.ui.IWorkbenchPartSite; import org.eclipse.ui.contexts.IContextActivation; import org.eclipse.ui.contexts.IContextService; /** + * ExecutionComparisonView allows to compare two groups of traces (parts of traces) * + * @author Fateme Faraji Daneshgar */ @SuppressWarnings("restriction") -public class MultipleDensityView extends DifferentialFlameGraphView implements ICheckboxTreeViewerListener { +public class ExecutionComparisonView extends DifferentialFlameGraphView implements ICheckboxTreeViewerListener { /** * the id of the view */ public static final String id = "org.eclipse.tracecompass.incubator.internal.entexecutioncomparison.ui.execComparison"; //$NON-NLS-1$ - private static final int[] DEFAULT_WEIGHTS = new int[] { 40, 15, 5, 40 }; - private static final int[] DEFAULT_WEIGHTS_FILTERING_VIEW = new int[] { 495, 10, 495 }; - private static final int[] DEFAULT_WEIGHTS_FILTERING_H = new int[] { 3, 9 }; - private static final int[] DEFAULT_WEIGHTS_LABELS = new int[] { 1, 7, 2 }; - private static final int[] DEFAULT_WEIGHTS_TimeInterval = new int[] { 250, 375, 375 }; - /** - * Default zoom range - * - * @since 4.1 + * Default weights for organizing the view */ - private static final String STATISTIC_ICON_PATH = "icons/etool16/group_by.gif"; //$NON-NLS-1$ - @SuppressWarnings("null") - private static final ImageDescriptor STATISTIC_BY_ICON = Activator.getDefault().getImageDescripterFromPath(STATISTIC_ICON_PATH); + private static final int[] DEFAULT_WEIGHTS_ShowQuery = new int[] { 450, 290, 260 }; + private static final int[] DEFAULT_WEIGHTS_HideQuery = new int[] { 450, 100, 450 }; + private static final int[] DEFAULT_WEIGHTS_FILTERING_H = new int[] { 3, 9 }; + private static final int[] DEFAULT_WEIGHTS_TimeInterval = new int[] { 240, 380, 380 }; + /** A composite that allows us to add margins for part A */ private @Nullable TmfXYChartViewer fChartViewerA; - /** A composite that allows us to add margins */ private @Nullable SashForm fXYViewerContainerA; private @Nullable TmfViewer fTmfViewerA; private @Nullable SashForm fSashFormLeftChildA; @@ -129,77 +121,90 @@ public class MultipleDensityView extends DifferentialFlameGraphView implements I private @Nullable Action fConfigureStatisticAction; private List fActiveContexts = new ArrayList<>(); + /** A composite that allows us to add margins for part B */ private @Nullable TmfXYChartViewer fChartViewerB; - /** A composite that allows us to add margins */ private @Nullable SashForm fXYViewerContainerB; private @Nullable TmfViewer fTmfViewerB; private List fTraceListA = new ArrayList<>(); private List fTraceListB = new ArrayList<>(); + private String fTraceStr = "Trace(s): ";//$NON-NLS-1$ + private String fStatisticStr = "Statistic: ";//$NON-NLS-1$ /** * the title of the view */ @SuppressWarnings("null") - public static final String VIEW_TITLE = Messages.AbstractMultipleDensityView_title; + public static final String VIEW_TITLE = Messages.MultipleDensityView_title; private ITmfTimestamp fStartTimeA = TmfTimestamp.BIG_BANG; private ITmfTimestamp fStartTimeB = TmfTimestamp.BIG_BANG; private ITmfTimestamp fEndTimeA = TmfTimestamp.BIG_CRUNCH; private ITmfTimestamp fEndTimeB = TmfTimestamp.BIG_CRUNCH; private String fStatistic = "duration"; //$NON-NLS-1$ - private JFormattedTextField ftextAFrom; - private JFormattedTextField ftextBFrom; - private JFormattedTextField ftextATo; - private JFormattedTextField ftextBTo; - private JTextArea ftextQuery; - private char queryPartSplitter = '&'; - - private TmfTimestampFormat fFormat = new TmfTimestampFormat("yyyy-MM-dd HH:mm:ss.SSS.SSS.SSS"); + private JFormattedTextField ftextAFrom = new JFormattedTextField(); + private JFormattedTextField ftextBFrom = new JFormattedTextField(); + private JFormattedTextField ftextATo = new JFormattedTextField(); + private JFormattedTextField ftextBTo = new JFormattedTextField(); + private @Nullable Text ftextQuery; + private TmfTimestampFormat fFormat = new TmfTimestampFormat("yyyy-MM-dd HH:mm:ss.SSS.SSS.SSS"); //$NON-NLS-1$ private @Nullable Listener fSashDragListener; + private SashForm fsashForm; private static final String TMF_VIEW_UI_CONTEXT = "org.eclipse.tracecompass.tmf.ui.view.context"; //$NON-NLS-1$ - // SashForm fsashForm; - /** - * Constructs a segment store density view + * Constructs two density charts for selecting the desired traces and time + * ranges in order to comparison */ - public MultipleDensityView() { + public ExecutionComparisonView() { super(); } - /** - * Used to keep the density charts in sync with Duration chart. - */ @Override public void createPartControl(@Nullable Composite parent) { TmfSignalManager.register(this); final SashForm sashForm = new SashForm(parent, SWT.VERTICAL); - //// Main organization of the view - SashForm sashFormFiltering = new SashForm(sashForm, SWT.HORIZONTAL); - SashForm sashFormQuery = new SashForm(sashForm, SWT.HORIZONTAL); - SashForm sashFormDoneButton = new SashForm(sashForm, SWT.HORIZONTAL); - - ///// Organizing sashFormFiltering - SashForm sashFormGroupA = new SashForm(sashFormFiltering, SWT.VERTICAL); - - SashForm distance = new SashForm(sashFormFiltering, SWT.NONE); - distance.pack(); - - SashForm sashFormGroupB = new SashForm(sashFormFiltering, SWT.VERTICAL); - - Text labelGroupA = new Text(sashFormGroupA, SWT.BORDER | SWT.CENTER); - labelGroupA.setText(Messages.AbstractMultipleDensityView_GroupA); - - Text labelGroupB = new Text(sashFormGroupB, SWT.BORDER | SWT.CENTER); - labelGroupB.setText(Messages.AbstractMultipleDensityView_GroupB); - - /////// density charts - SashForm densityA = new SashForm(sashFormGroupA, SWT.HORIZONTAL); - SashForm densityB = new SashForm(sashFormGroupB, SWT.HORIZONTAL); - - ///////// Time inputs - SashForm timeInputA = new SashForm(sashFormGroupA, SWT.HORIZONTAL); - SashForm timeInputB = new SashForm(sashFormGroupB, SWT.HORIZONTAL); + fsashForm = sashForm; + sashForm.setLayout(new GridLayout(1, false)); + sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + //// Main organization of the view. there are three main parts in the + //// view:filtering, query and differential flame graph + Composite sashFormFiltering = new Composite(sashForm, SWT.HORIZONTAL); + GridLayout layout = new GridLayout(2, false); + layout.marginHeight = layout.marginWidth = 0; + sashFormFiltering.setLayout(layout); + sashFormFiltering.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + ////GroupA + Group groupA = new Group(sashFormFiltering, SWT.NULL); + groupA.setText(Messages.MultipleDensityView_GroupA); + GridLayout gridLayoutG = new GridLayout(); + gridLayoutG.numColumns = 1; + groupA.setLayout(gridLayoutG); + GridData gridDataG = new GridData(GridData.FILL_BOTH); + gridDataG.horizontalSpan = 1; + groupA.setLayoutData(gridDataG); + + + SashForm densityA = new SashForm(groupA, SWT.NULL); + GridData data = new GridData(SWT.FILL, SWT.TOP, true, false); + data.heightHint = 200; + densityA.setLayoutData(data); + + SashForm timeInputA = new SashForm(groupA, SWT.NULL); + timeInputA.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + + ////GroupB + Group groupB = new Group(sashFormFiltering, SWT.NULL); + groupB.setText(Messages.MultipleDensityView_GroupB); + groupB.setLayout(gridLayoutG); + groupB.setLayoutData(gridDataG); + + SashForm densityB = new SashForm(groupB, SWT.NULL); + densityB.setLayoutData(data); + + SashForm timeInputB = new SashForm(groupB, SWT.NULL); + timeInputB.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); //// Group A time Intervals Composite timelableA = new Composite(timeInputA, SWT.NONE); @@ -209,14 +214,43 @@ public void createPartControl(@Nullable Composite parent) { timeInputA.setWeights(DEFAULT_WEIGHTS_TimeInterval); RowLayout rowLayout = new RowLayout(); + GridLayout gridLayout = new GridLayout(); + gridLayout.numColumns = 2; - timelableA.setLayout(rowLayout); + timelableA.setLayout(gridLayout); timelableAFrom.setLayout(rowLayout); timelableATo.setLayout(rowLayout); - // LabelA - Label labelA = new Label(timelableA, SWT.NONE); - labelA.setText("Time IntervalA "); //$NON-NLS-1$ + // ButtonA + Button resetButtonA = new Button(timelableA, SWT.PUSH); + resetButtonA.setText("Reset Time IntervalA"); //$NON-NLS-1$ + resetButtonA.addListener(SWT.Selection, new Listener() + { + @Override + public void handleEvent(@Nullable Event event) { + ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); + + if (trace != null) { + //Reset tree viewer checked items. all items should be checked + List TreeCheckedElements = ((MultipleEventDensityViewer) getChartViewerA()).getWholeCheckedItems(); + setCheckedElements(getChartViewerA(),getTmfViewerA(),TreeCheckedElements,false); + + //Reset start time and end time and relating objects + fStartTimeA = trace.getStartTime(); + fEndTimeA = trace.getEndTime(); + ftextAFrom.setText(fStartTimeA.toString(fFormat)); + ftextATo.setText(fEndTimeA.toString(fFormat)); + if(ftextQuery!=null) { + ftextQuery.setText(makeQuery()); + } + + //dispatch signal to rebuild differential flame graph + TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerA(), fStartTimeA, fEndTimeA, getTrace())); + //Reset the selection blue lines in density chart viewer + getChartViewerA().refreshMouseSelectionProvider(); + } + } + }); /// LableAfrom java.awt.Frame frameAFrom = SWT_AWT.new_Frame(timelableAFrom); @@ -224,42 +258,37 @@ public void createPartControl(@Nullable Composite parent) { frameAFrom.add(panelAFrom); JLabel labelAFrom = new JLabel(); - labelAFrom.setText("From: "); //$NON-NLS-1$ + labelAFrom.setText(Messages.MultipleDensityView_From); JFormattedTextField textAFrom = new JFormattedTextField(fFormat); textAFrom.addFocusListener(new java.awt.event.FocusListener() { - public String oldVal = null; + public String oldVal = ""; //$NON-NLS-1$ @Override - public void focusGained(java.awt.event.FocusEvent e) { - // TODO Auto-generated method stub - oldVal = textAFrom.getText(); - System.out.println("I was there: Gain"); - + public void focusGained( java.awt.event.@Nullable FocusEvent e) { + String aFrom = textAFrom.getText(); + if (aFrom!=null) { + oldVal = aFrom; + } } @Override - public void focusLost(java.awt.event.FocusEvent e) { - // TODO Auto-generated method stub + public void focusLost(java.awt.event.@Nullable FocusEvent e) { if (!oldVal.equals(textAFrom.getText())) { long newTime = 0; try { newTime = fFormat.parseValue(textAFrom.getText()); + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fStartTimeA = fromTime; + textAFrom.setText(fStartTimeA.toString(fFormat)); + + TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(getChartViewerA(), fStartTimeA, fEndTimeA, getTrace()); + TmfSignalManager.dispatchSignal(signal); + } catch (ParseException e1) { - // TODO Auto-generated catch block + textAFrom.setText(oldVal); e1.printStackTrace(); } - ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); - fStartTimeA = fromTime; - - TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace()); - broadcast(signal); - System.out.println("I was there: Lost,change"); - - // } - System.out.println("I was there: Lost"); - System.out.println("I was there: Lost" + newTime); - } } }); @@ -273,28 +302,33 @@ public void focusLost(java.awt.event.FocusEvent e) { frameATo.add(panelATo); JLabel labelATo = new JLabel(); - labelATo.setText("To: "); //$NON-NLS-1$ + labelATo.setText(Messages.MultipleDensityView_To); JFormattedTextField textATo = new JFormattedTextField(fFormat); textATo.addFocusListener(new java.awt.event.FocusListener() { - public String oldVal = null; + public String oldVal = ""; //$NON-NLS-1$ @Override - public void focusGained(java.awt.event.FocusEvent e) { - // TODO Auto-generated method stub - oldVal = textATo.getText(); - System.out.println("I was there: Gain"); - + public void focusGained(java.awt.event.@Nullable FocusEvent e) { + String aTo = textATo.getText(); + if (aTo!=null) { + oldVal = aTo; + } } @Override - public void focusLost(java.awt.event.FocusEvent e) { - // TODO Auto-generated method stub + public void focusLost( java.awt.event.@Nullable FocusEvent e) { if (!oldVal.equals(textATo.getText())) { long newTime = 0; try { newTime = fFormat.parseValue(textATo.getText()); + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fEndTimeA = fromTime; + textATo.setText(fEndTimeA.toString(fFormat)); + + TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerA(), fStartTimeA, fEndTimeA, getTrace())); + } catch (ParseException e1) { - // TODO Auto-generated catch block + textATo.setText(oldVal); e1.printStackTrace(); } ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); @@ -311,19 +345,46 @@ public void focusLost(java.awt.event.FocusEvent e) { ftextATo = textATo; //// Group B time Intervals - Composite timelableB = new Composite(timeInputB, SWT.NONE); + Composite timelableB = new Composite(timeInputB, SWT.FILL); Composite timelableBFrom = new Composite(timeInputB, SWT.EMBEDDED); Composite timelableBTo = new Composite(timeInputB, SWT.EMBEDDED); timeInputB.setWeights(DEFAULT_WEIGHTS_TimeInterval); - timelableB.setLayout(rowLayout); + timelableB.setLayout(gridLayout); timelableBFrom.setLayout(rowLayout); timelableBTo.setLayout(rowLayout); - // LabelA - Label labelB = new Label(timelableB, SWT.NONE); - labelB.setText("Time IntervalB "); //$NON-NLS-1$ + // Button B + Button resetButtonB = new Button(timelableB, SWT.PUSH); + resetButtonB.setText("Reset Time IntervalB"); //$NON-NLS-1$ + resetButtonB.addListener(SWT.Selection, new Listener() + { + @Override + public void handleEvent(@Nullable Event event) { + ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); + + if (trace != null) { + //Reset tree viewer checked items. all items should be checked + List TreeCheckedElements = ((MultipleEventDensityViewer) getChartViewerB()).getWholeCheckedItems(); + setCheckedElements(getChartViewerB(),getTmfViewerB(),TreeCheckedElements,false); + + //Reset start time and end time and relating objects + fStartTimeB = trace.getStartTime(); + fEndTimeB = trace.getEndTime(); + ftextBFrom.setText(fStartTimeB.toString(fFormat)); + ftextBTo.setText(fEndTimeB.toString(fFormat)); + if(ftextQuery!=null) { + ftextQuery.setText(makeQuery()); + } + + //dispatch signal to rebuild differential flame graph + TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerB(), fStartTimeB, fEndTimeB, getTrace())); + //Reset the selection blue lines in density chart viewer + getChartViewerB().refreshMouseSelectionProvider(); + } + } + }); /// LableBFrom @@ -332,28 +393,31 @@ public void focusLost(java.awt.event.FocusEvent e) { frameBFrom.add(panelBFrom); JLabel labelBFrom = new JLabel(); - labelBFrom.setText("From: "); //$NON-NLS-1$ + labelBFrom.setText(Messages.MultipleDensityView_From); JFormattedTextField textBFrom = new JFormattedTextField(fFormat); textBFrom.addFocusListener(new java.awt.event.FocusListener() { - public String oldVal = null; + public String oldVal=""; //$NON-NLS-1$ @Override - public void focusGained(java.awt.event.FocusEvent e) { - // TODO Auto-generated method stub - oldVal = textBFrom.getText(); - System.out.println("I was there: Gain"); - + public void focusGained(java.awt.event.@Nullable FocusEvent e) { + String bFrom = textBFrom.getText(); + if (bFrom!=null) { + oldVal = bFrom; + } } @Override - public void focusLost(java.awt.event.FocusEvent e) { - // TODO Auto-generated method stub + public void focusLost(java.awt.event.@Nullable FocusEvent e) { if (!oldVal.equals(textBFrom.getText())) { long newTime = 0; try { newTime = fFormat.parseValue(textBFrom.getText()); + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fStartTimeB = fromTime; + textBFrom.setText(fStartTimeB.toString(fFormat)); + TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerB(), fStartTimeB, fEndTimeB, getTrace())); } catch (ParseException e1) { - // TODO Auto-generated catch block + textBFrom.setText(oldVal); e1.printStackTrace(); } ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); @@ -376,28 +440,30 @@ public void focusLost(java.awt.event.FocusEvent e) { frameBTo.add(panelBTo); JLabel labelBTo = new JLabel(); - labelBTo.setText("To: "); //$NON-NLS-1$ + labelBTo.setText(Messages.MultipleDensityView_To); JFormattedTextField textBTo = new JFormattedTextField(fFormat); textBTo.addFocusListener(new java.awt.event.FocusListener() { - public String oldVal = null; + public @Nullable String oldVal = null; + @SuppressWarnings("null") @Override public void focusGained(java.awt.event.FocusEvent e) { - // TODO Auto-generated method stub oldVal = textBTo.getText(); - System.out.println("I was there: Gain"); - } + @SuppressWarnings("null") @Override public void focusLost(java.awt.event.FocusEvent e) { - // TODO Auto-generated method stub if (!oldVal.equals(textBTo.getText())) { long newTime = 0; try { newTime = fFormat.parseValue(textBTo.getText()); + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fEndTimeB = fromTime; + textBTo.setText(fEndTimeB.toString(fFormat)); + TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerB(), fStartTimeB, fEndTimeB, getTrace())); } catch (ParseException e1) { - // TODO Auto-generated catch block + textBTo.setText(oldVal); e1.printStackTrace(); } ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); @@ -413,17 +479,16 @@ public void focusLost(java.awt.event.FocusEvent e) { panelBTo.add(textBTo); ftextBTo = textBTo; - sashFormGroupA.setWeights(DEFAULT_WEIGHTS_LABELS); - sashFormGroupB.setWeights(DEFAULT_WEIGHTS_LABELS); - setSashFormLeftChildA(new SashForm(densityA, SWT.None)); setTmfViewerA(createLeftChildViewer(getSashFormLeftChildA())); + SashForm xYViewerContainerA = new SashForm(densityA, SWT.None); fXYViewerContainerA = xYViewerContainerA; xYViewerContainerA.setLayout(GridLayoutFactory.fillDefaults().create()); TmfXYChartViewer chartViewerA = createChartViewer(xYViewerContainerA); + setChartViewerA(chartViewerA); chartViewerA.getControl().addPaintListener(new PaintListener() { @@ -480,9 +545,7 @@ public void paintControl(@Nullable PaintEvent e) { // There should be only one sash break; } - } - } }); @@ -490,77 +553,153 @@ public void paintControl(@Nullable PaintEvent e) { coupleSelectViewer(getTmfViewerB(), chartViewerB); ((AbstractSelectTreeViewer2) getTmfViewerB()).addTreeListener(this); - contributeToActionBars(); + IMenuManager menuManager = getViewSite().getActionBars().getMenuManager(); + + IAction AggregatedAction = fConfigureStatisticAction; + if (AggregatedAction == null) { + AggregatedAction = getAggregateByAction(); + fConfigureStatisticAction = (Action) AggregatedAction; + } + menuManager.add(new Separator()); + menuManager.add(AggregatedAction); + menuManager.add(new Separator()); densityA.setWeights(DEFAULT_WEIGHTS_FILTERING_H); densityB.setWeights(DEFAULT_WEIGHTS_FILTERING_H); - sashFormFiltering.setWeights(DEFAULT_WEIGHTS_FILTERING_VIEW); + Group groupQuery = new Group(sashForm, SWT.NULL); + groupQuery.setText(Messages.MultipleDensityView_QueryGroup); + gridLayoutG = new GridLayout(); + gridLayoutG.numColumns = 1; + groupQuery.setLayout(gridLayoutG); + gridDataG = new GridData(GridData.FILL_BOTH); + gridDataG.horizontalSpan = 1; + groupQuery.setLayoutData(gridDataG); ///// Organizing sashFormQuery + ExpandBar bar = new ExpandBar(groupQuery, SWT.NONE); + bar.setLayout(new GridLayout(1, false)); + GridData data2 = new GridData(); + data2.verticalAlignment = SWT.FILL; + data2.horizontalAlignment = SWT.FILL; + data2.grabExcessHorizontalSpace = true; + data2.grabExcessVerticalSpace = true; + data2.heightHint = 75; + data2.widthHint = 100; + bar.setLayoutData(data2); + + + Composite queryText = new Composite(bar, SWT.NONE); + queryText.setLayout(new GridLayout(1, false)); + queryText.setLayoutData(new GridData(SWT.FILL, SWT.FILL,true,true)); + // Text + Text text = new Text(queryText, SWT.MULTI | SWT.BORDER ); + data.verticalAlignment = SWT.FILL; + data.horizontalAlignment = SWT.FILL; + data.grabExcessHorizontalSpace = true; + data.grabExcessVerticalSpace = true; + data.heightHint = 75; + data.widthHint = 100; + text.setLayoutData(data); + ftextQuery = text; + text.addFocusListener(new FocusListener() { - Composite querylable = new Composite(sashFormQuery, SWT.NONE); - Composite queryText = new Composite(sashFormQuery, SWT.EMBEDDED); - - sashFormQuery.setWeights(new int[] { 5, 95 }); - - querylable.setLayout(rowLayout); - queryText.setLayout(new FillLayout()); - - - // Label - Label labelQuery = new Label(querylable, SWT.NONE); - labelQuery.setText("Query"); //$NON-NLS-1$ + @Override + public void focusGained(@Nullable FocusEvent e) { + // TODO Auto-generated method stub + } - // Text + @Override + public void focusLost(@Nullable FocusEvent e) { + String query = ftextQuery.getText(); + if (query==null) + { + return; + } + boolean parsed = parseQuery(query); + if (parsed) { + ///updating blue lines in density chats + getChartViewerA().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(getChartViewerA(), fStartTimeA, fEndTimeA, getTrace())); + getChartViewerB().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(getChartViewerB(), fStartTimeB, fEndTimeB, getTrace())); + getChartViewerA().refreshMouseSelectionProvider(); + getChartViewerB().refreshMouseSelectionProvider(); + + //updates checked elements in treeviewers + //treeViewerA + List TreeWholeElements = ((MultipleEventDensityViewer) getChartViewerA()).getWholeCheckedItems(); + List TreeCheckedElements = new ArrayList<>(); + + for (ITmfTreeViewerEntry trace:TreeWholeElements) { + if(fTraceListA.contains(trace.getName())) { + TreeCheckedElements.add(trace); + TreeCheckedElements.addAll(trace.getChildren()); + } + } - java.awt.Frame frameQuery = SWT_AWT.new_Frame(queryText); - java.awt.Panel panelQuery = new java.awt.Panel(); - frameQuery.add(panelQuery); + setCheckedElements(getChartViewerA(),getTmfViewerA(),TreeCheckedElements,true); + //TreeVierB + TreeWholeElements = ((MultipleEventDensityViewer) getChartViewerB()).getWholeCheckedItems(); + TreeCheckedElements = new ArrayList<>(); - JTextArea textQuery = new JTextArea(); - panelQuery.add(textQuery); + for (ITmfTreeViewerEntry trace:TreeWholeElements) { + if(fTraceListB.contains(trace.getName())) { + TreeCheckedElements.add(trace); + TreeCheckedElements.addAll(trace.getChildren()); + } + } - JScrollPane scroll = new JScrollPane (textQuery, - ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS); + setCheckedElements(getChartViewerB(),getTmfViewerB(),TreeCheckedElements,true); - frameQuery.add(scroll); - ftextQuery = textQuery; + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, fStatistic, fTraceListA, fTraceListB); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + buildDifferetialFlameGraph(); + } + } + }); - //// Organizing sashFormDoneButton - Composite doneButton = new Composite(sashFormDoneButton, SWT.NONE); - doneButton.setLayout(new GridLayout(1, false)); + ExpandItem item0 = new ExpandItem(bar, SWT.NONE,0); + item0.setText(Messages.MultipleDensityView_QueryExpandable); + item0.setHeight(150); - final Button button = new Button(doneButton, SWT.PUSH); - button.setText("Differential Flamegraph"); //$NON-NLS-1$ - button.setLayoutData(new GridData(SWT.CENTER, SWT.FILL, true, true)); + item0.setControl(queryText); + item0.setExpanded(false); - button.addSelectionListener(new SelectionListener() { + bar.setSpacing(5); + bar.addExpandListener(new ExpandListener() { @Override - public void widgetSelected(@Nullable SelectionEvent event) { - parseQuery(ftextQuery.getText()); - TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, fStatistic, fTraceListA, fTraceListB); - TmfSignalManager.dispatchSignal(rangUpdateSignal); - buildDifferetialFlameGraph(); + public void itemExpanded(@Nullable ExpandEvent e) { + Display.getCurrent().asyncExec(new Runnable() { + @Override + public void run() { + queryText.pack(true); + sashForm.setWeights(DEFAULT_WEIGHTS_ShowQuery); + } + }); } @Override - public void widgetDefaultSelected(@Nullable SelectionEvent event) { + public void itemCollapsed(@Nullable ExpandEvent e) { + Display.getCurrent().asyncExec(new Runnable() { + @Override + public void run() { + queryText.pack(true); + sashForm.setWeights(DEFAULT_WEIGHTS_HideQuery); + + } + }); } }); super.createPartControl(sashForm); - sashForm.setWeights(DEFAULT_WEIGHTS); + sashForm.setWeights(DEFAULT_WEIGHTS_HideQuery); ITmfTrace activetrace = TmfTraceManager.getInstance().getActiveTrace(); if (activetrace != null) { buildDifferetialFlameGraph(); - } - } /** @@ -592,6 +731,7 @@ public void traceSelected(final TmfTraceSelectedSignal signal) { if (getTmfViewerB() instanceof TmfTimeViewer) { ((TmfTimeViewer) getTmfViewerB()).traceSelected(signal); } + getChartViewerB().traceSelected(signal); ITmfTrace trace = signal.getTrace(); fStartTimeA = trace.getStartTime(); @@ -606,7 +746,9 @@ public void traceSelected(final TmfTraceSelectedSignal signal) { TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, fStatistic, fTraceListA, fTraceListB); TmfSignalManager.dispatchSignal(rangUpdateSignal); - ftextQuery.setText(makeQuery()); + if(ftextQuery!=null) { + ftextQuery.setText(makeQuery()); + } buildDifferetialFlameGraph(); } @@ -621,7 +763,9 @@ public void run() { fStatistic = name; TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStatistic, null, null); TmfSignalManager.dispatchSignal(rangUpdateSignal); - ftextQuery.setText(makeQuery()); + if (ftextQuery!=null) { + ftextQuery.setText(makeQuery()); + } buildDifferetialFlameGraph(); } }; @@ -635,6 +779,7 @@ public void run() { public void traceOpened(TmfTraceOpenedSignal signal) { getChartViewerA().traceOpened(signal); getChartViewerB().traceOpened(signal); + } private void buildDifferetialFlameGraph() { @@ -688,11 +833,27 @@ public void focusGained(@Nullable FocusEvent e) { return chartViewer; } + /** + * Set checked for the elements in TreeCheckedElements + * @param TreeCheckedElements + * the elements in tree that should be checked + */ + public void setCheckedElements(TmfXYChartViewer chart,TmfViewer tree,List TreeCheckedElements, Boolean queryUpdate) { + if (queryUpdate) { + ((MultipleEventDensityViewer) chart).UpdateCheckStateChangedEvent(TreeCheckedElements); + } + else { + ((MultipleEventDensityViewer) chart).handleCheckStateChangedEvent(TreeCheckedElements); + } + Object[] TreeCheckedElementsObj = new Object[TreeCheckedElements.size()]; + + TreeCheckedElements.toArray(TreeCheckedElementsObj); + ((AbstractSelectTreeViewer2) tree).getTriStateFilteredCheckboxTree().setCheckedElements(TreeCheckedElementsObj); + } + /** * Reset the start and end times. * - * @param notify - * if true, notify the registered listeners * @param chart * determines which chart to reset start and end times */ @@ -703,7 +864,9 @@ public void resetStartFinishTime(boolean notify, TmfXYChartViewer chart) { } else { chart.windowRangeUpdated(signal); - chart.selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, TmfTimestamp.fromNanos(chart.getWindowStartTime()), TmfTimestamp.fromNanos(chart.getWindowEndTime()))); + TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(chart, TmfTimestamp.fromNanos(chart.getWindowStartTime()), TmfTimestamp.fromNanos(chart.getWindowEndTime()))); + chart.refreshMouseSelectionProvider(); + } } @@ -741,21 +904,29 @@ public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MultiDensityView::SelectionRangeUpdated")) { //$NON-NLS-1$ Object source = signal.getSource(); if (source == getChartViewerA()) { - fStartTimeA = TmfTimestamp.fromNanos(getChartViewerA().getSelectionBeginTime()); - fEndTimeA = TmfTimestamp.fromNanos(getChartViewerA().getSelectionEndTime()); + fStartTimeA = signal.getBeginTime(); + fEndTimeA = signal.getEndTime(); ftextAFrom.setText(fStartTimeA.toString(fFormat)); ftextATo.setText(fEndTimeA.toString(fFormat)); } else if (source == getChartViewerB()) { - fStartTimeB = TmfTimestamp.fromNanos(getChartViewerB().getSelectionBeginTime()); - fEndTimeB = TmfTimestamp.fromNanos(getChartViewerB().getSelectionEndTime()); + fStartTimeB = signal.getBeginTime(); + fEndTimeB = signal.getEndTime(); ftextBFrom.setText(fStartTimeB.toString(fFormat)); ftextBTo.setText(fEndTimeB.toString(fFormat)); - } TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, null, null, null); TmfSignalManager.dispatchSignal(rangUpdateSignal); - ftextQuery.setText(makeQuery()); + Display.getDefault().syncExec(new Runnable() { + @Override + public void run() { + if(ftextQuery!=null) { + ftextQuery.setText(makeQuery()); + } + } + }); + getChartViewerA().refreshMouseSelectionProvider(); + getChartViewerB().refreshMouseSelectionProvider(); buildDifferetialFlameGraph(); } } @@ -770,57 +941,42 @@ public String getStatisticType() { } private Action getAggregateByAction() { - Action configureStatisticAction = fConfigureStatisticAction; - if (configureStatisticAction == null) { - configureStatisticAction = new Action(Messages.FlameGraphView_GroupByName, IAction.AS_DROP_DOWN_MENU) { - }; - fConfigureStatisticAction = configureStatisticAction; - configureStatisticAction.setToolTipText(Messages.FlameGraphView_StatisticTooltip); - configureStatisticAction.setImageDescriptor(STATISTIC_BY_ICON); - configureStatisticAction.setMenuCreator(new IMenuCreator() { - @Nullable - Menu menu = null; + Action configureStatisticAction = new Action(Messages.FlameGraphView_GroupByName, IAction.AS_DROP_DOWN_MENU) { + }; + configureStatisticAction.setToolTipText(Messages.FlameGraphView_StatisticTooltip); + configureStatisticAction.setMenuCreator(new IMenuCreator() { + @Nullable + Menu menu = null; - @Override - public void dispose() { - if (menu != null) { - menu.dispose(); - menu = null; - } + @Override + public void dispose() { + if (menu != null) { + menu.dispose(); + menu = null; } + } - @Override - public @Nullable Menu getMenu(@Nullable Control parent) { - if (menu != null) { - menu.dispose(); - } - menu = new Menu(parent); - Action statisticActionDur = createStatisticAction(Objects.requireNonNull(Messages.AbstractMultipleDensityView_Duration)); - new ActionContributionItem(statisticActionDur).fill(menu, -1); + @Override + public @Nullable Menu getMenu(@Nullable Control parent) { + return null; + } - Action statisticActionSelf = createStatisticAction(Objects.requireNonNull(Messages.AbstractMultipleDensityView_SelfTime)); - new ActionContributionItem(statisticActionSelf).fill(menu, -1); - return menu; - } + @Override + public @Nullable Menu getMenu(@Nullable Menu parent) { + menu = new Menu(parent); - @Override - public @Nullable Menu getMenu(@Nullable Menu parent) { - return null; - } - }); - } - Action configureStatisticAction3 = Objects.requireNonNull(fConfigureStatisticAction); - return configureStatisticAction3; - } + Action statisticActionDur = createStatisticAction(Objects.requireNonNull(Messages.MultipleDensityView_Duration)); + new ActionContributionItem(statisticActionDur).fill(menu, -1); - private void contributeToActionBars() { - IActionBars bars = getViewSite().getActionBars(); - IToolBarManager toolBarManager = Objects.requireNonNull(bars.getToolBarManager()); - fillLocalToolBar(toolBarManager); - } + Action statisticActionSelf = createStatisticAction(Objects.requireNonNull(Messages.MultipleDensityView_SelfTime)); + new ActionContributionItem(statisticActionSelf).fill(menu, -1); + return menu; - private void fillLocalToolBar(IToolBarManager manager) { - manager.add(getAggregateByAction()); + } + }); + + Action configureStatisticAction1 = Objects.requireNonNull(configureStatisticAction); + return configureStatisticAction1; } /** @@ -836,12 +992,10 @@ public void CheckBoxUpdated(TmfCheckboxChangedSignal signal) { fTraceListA.clear(); for (String name : signal.getTraceList()) { fTraceListA.add(name); - } rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, null, fTraceListA, null); TmfSignalManager.dispatchSignal(rangUpdateSignal); - } if (signal.getSource() == getChartViewerB()) { @@ -854,15 +1008,16 @@ public void CheckBoxUpdated(TmfCheckboxChangedSignal signal) { TmfSignalManager.dispatchSignal(rangUpdateSignal); } - ftextQuery.setText(makeQuery()); + if(ftextQuery!=null) { + ftextQuery.setText(makeQuery()); + } buildDifferetialFlameGraph(); } } - @SuppressWarnings("null") @Override - public void handleCheckStateChangedEvent(@Nullable Collection entries) { + public void handleCheckStateChangedEvent(@SuppressWarnings("null") @Nullable Collection entries) { // do nothing } @@ -882,7 +1037,18 @@ public void dispose() { if (fXYViewerContainerB != null) { fXYViewerContainerB.dispose(); } - + if (fContextService!=null) { + fContextService.dispose(); + } + if (fSashFormLeftChildA!=null) { + fSashFormLeftChildA.dispose(); + } + if (fSashFormLeftChildB!=null) { + fSashFormLeftChildB.dispose(); + } + if (fsashForm!=null) { + fsashForm.dispose(); + } } private TmfXYChartViewer getChartViewerA() { @@ -948,83 +1114,123 @@ private void setContextService(@Nullable IContextService contextService) { fContextService = contextService; } + @SuppressWarnings("null") private String makeQuery() { String query = ""; //$NON-NLS-1$ /// Query PartA - query = query.concat("Trace(s): ");//$NON-NLS-1$ - query = query.concat(System.lineSeparator()); + query = query.concat(fTraceStr); for (String trace : fTraceListA) { - query = query.concat(trace); - query = query.concat(","); //$NON-NLS-1$ + if (!trace.equals("Total")) { //$NON-NLS-1$ + query = query.concat(trace); + query = query.concat(","); //$NON-NLS-1$ + } } - query = query.concat("\nFrom:\n "); //$NON-NLS-1$ + query = query.concat(System.lineSeparator()); + + query = query.concat(Messages.MultipleDensityView_From); query = query.concat(fStartTimeA.toString(fFormat)); + query = query.concat(System.lineSeparator()); - query = query.concat("\nTo: \n"); //$NON-NLS-1$ + query = query.concat(Messages.MultipleDensityView_To); query = query.concat(fEndTimeA.toString(fFormat)); + query = query.concat(System.lineSeparator()); - query = query.concat("\nCompared to:\n "); //$NON-NLS-1$ + query = query.concat(Messages.MultipleDensityView_QueryCompare); + query = query.concat(System.lineSeparator()); /// Query PartB - query = query.concat("Trace(s): \n"); //$NON-NLS-1$ + query = query.concat(fTraceStr); for (String trace : fTraceListB) { - query = query.concat(trace); - query = query.concat(","); //$NON-NLS-1$ + if (!trace.equals("Total")) { //$NON-NLS-1$ + query = query.concat(trace); + query = query.concat(","); //$NON-NLS-1$ + } } - query = query.concat("\nFrom:\n "); //$NON-NLS-1$ + query = query.concat(System.lineSeparator()); + + query = query.concat(Messages.MultipleDensityView_From); query = query.concat(fStartTimeB.toString(fFormat)); + query = query.concat(System.lineSeparator()); - query = query.concat("\nTo:\n "); //$NON-NLS-1$ + query = query.concat(Messages.MultipleDensityView_To); query = query.concat(fEndTimeB.toString(fFormat)); - //// Query Sttistic Part - query = query.concat("\nStatistic: \n"); //$NON-NLS-1$ + query = query.concat(System.lineSeparator()); + + //// Query Statistic Part + query = query.concat(fStatisticStr); query = query.concat(fStatistic); return query; } - void parseQuery(String query) { - try { - String[] parts = query.split(System.lineSeparator()); - //// Part A - // traceListA - fTraceListA.clear(); - String[] traces = parts[1].split(","); //$NON-NLS-1$ - for (String trace : traces) { - fTraceListA.add(trace); - } - // Times + @SuppressWarnings("null") + boolean parseQuery(String query) { try { - fStartTimeA = TmfTimestamp.fromNanos(fFormat.parseValue(parts[3])); - ftextAFrom.setText(parts[3]); - fEndTimeA = TmfTimestamp.fromNanos(fFormat.parseValue(parts[5])); - ftextATo.setText(parts[5]); - fStartTimeB = TmfTimestamp.fromNanos(fFormat.parseValue(parts[10])); - ftextBFrom.setText(parts[10]); - fEndTimeB = TmfTimestamp.fromNanos(fFormat.parseValue(parts[12])); - ftextBTo.setText(parts[12]); + String[] parts = query.split(System.lineSeparator()); + // Times - } catch (ParseException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - // traceListB - fTraceListB.clear(); - traces = parts[8].split(","); - for (String trace : traces) { - fTraceListB.add(trace); - } - ////Statistic - fStatistic = parts[14]; - } - catch(ArrayIndexOutOfBoundsException ex){ - System.out.println("query format is incorrect "+ex.toString()); + if (parts[1].indexOf(Messages.MultipleDensityView_From) == -1) { + return false; + } + String fromStrA = parts[1].substring(parts[1].indexOf(Messages.MultipleDensityView_From) + Messages.MultipleDensityView_From.length(), parts[1].length()); + fStartTimeA = TmfTimestamp.fromNanos(fFormat.parseValue(fromStrA)); - } + if (parts[2].indexOf(Messages.MultipleDensityView_To) == -1) { + return false; + } + String toStrA = parts[2].substring(parts[2].indexOf(Messages.MultipleDensityView_To) + Messages.MultipleDensityView_To.length(), parts[2].length()); + fEndTimeA = TmfTimestamp.fromNanos(fFormat.parseValue(toStrA)); + if (parts[5].indexOf(Messages.MultipleDensityView_From) == -1) { + return false; + } + String fromStrB = parts[5].substring(parts[5].indexOf(Messages.MultipleDensityView_From) + Messages.MultipleDensityView_From.length(), parts[5].length()); + fStartTimeB = TmfTimestamp.fromNanos(fFormat.parseValue(fromStrB)); - } + if (parts[6].indexOf(Messages.MultipleDensityView_To) == -1) { + return false; + } + String toStrB = parts[6].substring(parts[6].indexOf(Messages.MultipleDensityView_To) + Messages.MultipleDensityView_To.length(), parts[6].length()); + fEndTimeB = TmfTimestamp.fromNanos(fFormat.parseValue(toStrB)); + // traceListA + fTraceListA.clear(); + if (parts[0].indexOf(fTraceStr) == -1) { + return false; + } + String traceStrtA = parts[0].substring(parts[0].indexOf(fTraceStr) + fTraceStr.length(), parts[0].length()); + String[] traces = traceStrtA.split(","); //$NON-NLS-1$ + + for (String trace : traces) { + fTraceListA.add(trace); + } + // traceListB + fTraceListB.clear(); + String traceStrtB = parts[4].substring(parts[4].indexOf(fTraceStr) + fTraceStr.length(), parts[4].length()); + String[] tracesB = traceStrtB.split(","); //$NON-NLS-1$ + + for (String trace : tracesB) { + fTraceListB.add(trace); + } + //// Statistic + fStatistic = parts[7].substring(parts[7].indexOf(fStatisticStr) + fStatisticStr.length(), parts[7].length()); + + //Set time range related objects + ftextAFrom.setText(fStartTimeA.toString(fFormat)); + ftextATo.setText(fEndTimeA.toString(fFormat)); + + ftextBFrom.setText(fStartTimeB.toString(fFormat)); + ftextBTo.setText(fEndTimeB.toString(fFormat)); + + + } catch (ParseException e) { + // TODO Auto-generated catch block + System.out.println("query format is incorrect " + e.toString()); //$NON-NLS-1$ + e.printStackTrace(); + return false; + } + return true; + } } \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java index 87fe81382..50d54e1cc 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2015, 2020 Ericsson + * Copyright (c) 2023 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -15,49 +15,72 @@ import org.eclipse.osgi.util.NLS; /** - * @author Marc-Andre Laperle - * @since 4.1 + * @author Fateme Faraji Daneshgar */ @NonNullByDefault({}) public class Messages extends NLS { private static final String BUNDLE_NAME = "org.eclipse.tracecompass.incubator.internal.executioncomparision.ui.messages"; //$NON-NLS-1$ - /** * The label of GroupA */ - public static String AbstractMultipleDensityView_GroupA; - + public static String MultipleDensityView_GroupA; /** - *The label of GroupB + * The label of GroupB */ - public static String AbstractMultipleDensityView_GroupB; + public static String MultipleDensityView_GroupB; + /** + * The label of Query Group + */ + public static String MultipleDensityView_QueryGroup; /** - *The Duration statistics + * The label of Query expandable item */ - public static String AbstractMultipleDensityView_Duration; + public static String MultipleDensityView_QueryExpandable; + /** + * The label for time range selection (from) + */ + public static String MultipleDensityView_From; /** - * The selfTime statistic + * The label for time range selection (to) */ - public static String AbstractMultipleDensityView_SelfTime; + public static String MultipleDensityView_To; + /** + * The label for "compare to" in query + */ + public static String MultipleDensityView_QueryCompare; /** - *The title of execution comparison view + * The Duration statistics */ - public static String AbstractMultipleDensityView_title; + public static String MultipleDensityView_Duration; + /** + * The selfTime statistic + */ + public static String MultipleDensityView_SelfTime; + /** + * The title of execution comparison view + */ + public static String MultipleDensityView_title; - /** The action name for grouping */ + /** + * The action name for grouping + */ public static String FlameGraphView_GroupByName; - /** The action tooltip for selecting between Duration and SelfTime */ + + /** + * The action tooltip for selecting between Duration and SelfTime + */ public static String FlameGraphView_StatisticTooltip; + /** * Execution of the callGraph Analysis */ @@ -70,4 +93,4 @@ public class Messages extends NLS { private Messages() { } -} +} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java index fb19a4adf..e4d5109bf 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/MultipleEventDensityViewer.java @@ -15,6 +15,7 @@ import java.util.Collection; import java.util.List; +import org.eclipse.jdt.annotation.Nullable; import org.eclipse.swt.widgets.Composite; import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.TmfCheckboxChangedSignal; import org.eclipse.tracecompass.internal.tmf.ui.viewers.eventdensity.EventDensityViewer; @@ -23,16 +24,19 @@ import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; -import org.eclipse.tracecompass.tmf.core.trace.TmfTraceContext; -import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager; import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeViewerEntry; import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfGenericTreeEntry; import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfXYChartSettings; /** - * + * MultipleEventDensityViewer extends EventDensityViewer to override handleCheckStateChangedEvent and reflect + * changes to differential flame graph + * @author Fateme Faraji Daneshgar + */ +@SuppressWarnings("restriction") public class MultipleEventDensityViewer extends EventDensityViewer { + List fWholeTraceList = new ArrayList<>(); /** * @param parent @@ -46,24 +50,31 @@ public MultipleEventDensityViewer(Composite parent, TmfXYChartSettings settings) @Override @TmfSignalHandler - public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { - if (signal == null) { + public void selectionRangeUpdated(@Nullable TmfSelectionRangeUpdatedSignal signal) { + if (signal == null) { return; } - + if (signal.getSource()==this) { final ITmfTrace trace = getTrace(); if (trace != null) { - TmfTraceContext ctx = TmfTraceManager.getInstance().getTraceContext(trace); - long selectedTime = ctx.getSelectionRange().getStartTime().toNanos(); - long selectedEndTime = ctx.getSelectionRange().getEndTime().toNanos(); + long selectedTime = signal.getBeginTime().toNanos(); + long selectedEndTime = signal.getEndTime().toNanos(); setSelectionRange(selectedTime, selectedEndTime); } - + } } + /** + * handles check state of tree viewer and keeps the list of whole trace list + * and dispatch TmfCheckboxChangedSignal signal to update the differential flame graph + * @param entries + * list of entries that should be checked + */ + @SuppressWarnings("unchecked") @Override public void handleCheckStateChangedEvent(Collection entries) { super.handleCheckStateChangedEvent(entries); + updateTraceList(entries); List traceNames = new ArrayList<>(); for (ITmfTreeViewerEntry entry : entries) { if (entry instanceof TmfGenericTreeEntry) { @@ -74,7 +85,36 @@ public void handleCheckStateChangedEvent(Collection entries } TmfSignalManager.dispatchSignal(new TmfCheckboxChangedSignal(this, traceNames)); } + /* + * Keeps fWholeTraceList updated to include all entries for experiment. it will be used when + * checkedboxtree is reset. + */ + private void updateTraceList(Collection entries) { + for(ITmfTreeViewerEntry entry:entries) { + if (!fWholeTraceList.contains(entry)) { + fWholeTraceList.add(entry); + } + } + + } + /** + * get WholeCheckedItems which is the checked item in the tree viewer + * @return + * fWholeTraceList list of checked Items in tree viewer + */ + public List getWholeCheckedItems(){ + return fWholeTraceList; + } + + /** + * just handles check state of the treeviewer, used in updating tree viewers with query updating + * @param entries + * list of entries that should be checked + */ + public void UpdateCheckStateChangedEvent(Collection entries) { + super.handleCheckStateChangedEvent(entries); + } -} +} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties index c8f4ec61d..0288f0d3d 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties @@ -1,20 +1,23 @@ ############################################################################### -# Copyright (c) 2015, 2020 Ericsson -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0/ -# -# SPDX-License-Identifier: EPL-2.0 + # Copyright (c) 2023 École Polytechnique de Montréal + # + # All rights reserved. This program and the accompanying materials are + # made available under the terms of the Eclipse Public License 2.0 which + # accompanies this distribution, and is available at + # https://www.eclipse.org/legal/epl-2.0/ + # + # SPDX-License-Identifier: EPL-2.0 ############################################################################### - - -AbstractMultipleDensityView_GroupA=GroupA -AbstractMultipleDensityView_GroupB=GroupB -AbstractMultipleDensityView_Duration=Duration -AbstractMultipleDensityView_SelfTime=Self Time -AbstractMultipleDensityView_title=Execution Comparison +MultipleDensityView_GroupA=GroupA +MultipleDensityView_GroupB=GroupB +MultipleDensityView_QueryGroup = Filtering Query +MultipleDensityView_QueryCompare=Compare to: +MultipleDensityView_From = From: +MultipleDensityView_To=To: +MultipleDensityView_Duration=Duration +MultipleDensityView_SelfTime=Self Time +MultipleDensityView_title=Execution Comparison FlameGraphView_RetrievingData=Retrieving Flame Graph Data -FlameGraphView_GroupByName=Group by descriptor +FlameGraphView_GroupByName=Group by Descriptor FlameGraphView_StatisticTooltip=Select the statistic to represent +MultipleDensityView_QueryExpandable=Get filtering query \ No newline at end of file From b46224f183a7ee452e35536c96dd4faef43c4f33 Mon Sep 17 00:00:00 2001 From: fariba Date: Wed, 1 May 2024 11:04:59 -0400 Subject: [PATCH 4/5] execution comparison: resolving issues changes required considering the changes in trace compass core( method getweigth(statistic type) from AggregatedCalledFunction is eliminated. mthode refreshMouseProver from Tmfxychartviewer ie eliminated) paramerticWeigthedTreeUtils is modified to use getSelfTime() and getweigth() instead of get weigth(Statistic type) ExecutionComparisonView and MultipleEventDensityViewer are changed to reflect time ranges selection in event density charts without using the method refreshMouseProvider(). Resolving Race condition Eliminating unnecessary dependencies and other issues Signed-off-by: fariba --- .../.project | 2 +- .../META-INF/MANIFEST.MF | 6 +- .../core/tests/ActivatorTest.java | 10 +- .../.project | 2 +- .../META-INF/MANIFEST.MF | 9 +- .../plugin.xml | 4 +- .../executioncomparision/core/Messages.java | 63 ----------- .../core/messages.properties | 23 ---- .../core/Activator.java | 6 +- .../core/DifferentialCallGraphProvider.java | 4 +- .../core/DifferentialFlamePalette.java | 4 +- .../DifferentialSeqCallGraphAnalysis.java | 37 ++++--- .../core/ParametricWeightedTreeUtils.java | 26 +++-- .../core/TmfCheckboxChangedSignal.java | 4 +- .../TmfComparisonFilteringUpdatedSignal.java | 4 +- .../core/package-info.java | 4 +- .../.project | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../.project | 2 +- .../META-INF/MANIFEST.MF | 13 ++- .../plugin.xml | 10 +- .../ui/Activator.java | 6 +- .../ui/DifferentialFlameGraphView.java | 8 +- .../ui/ExecutionComparisonView.java | 101 ++++++++---------- .../ui/Messages.java | 6 +- .../ui/MultipleEventDensityViewer.java | 35 ++++-- .../ui/messages.properties | 2 +- .../ui/package-info.java | 4 +- .../.project | 2 +- 29 files changed, 170 insertions(+), 231 deletions(-) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/{executioncomparision => executioncomparison}/core/tests/ActivatorTest.java (93%) delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/Messages.java delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/messages.properties rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/core/Activator.java (90%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/core/DifferentialCallGraphProvider.java (98%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/core/DifferentialFlamePalette.java (99%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/core/DifferentialSeqCallGraphAnalysis.java (94%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/core/ParametricWeightedTreeUtils.java (92%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/core/TmfCheckboxChangedSignal.java (94%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/core/TmfComparisonFilteringUpdatedSignal.java (98%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/core/package-info.java (88%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/ui/Activator.java (92%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/ui/DifferentialFlameGraphView.java (99%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/ui/ExecutionComparisonView.java (92%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/ui/Messages.java (94%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/ui/MultipleEventDensityViewer.java (79%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/ui/messages.properties (94%) rename analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/{executioncomparision => executioncomparison}/ui/package-info.java (89%) diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.project index 8d98e49e7..814fc7599 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.project +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.project @@ -1,6 +1,6 @@ - org.eclipse.tracecompass.incubator.executioncomparision.core.tests + org.eclipse.tracecompass.incubator.executioncomparison.core.tests diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF index 45b32e14c..af7ba2828 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF @@ -2,15 +2,15 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor -Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparision.core.tests +Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparison.core.tests Bundle-Version: 0.1.0.qualifier Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.resources, org.eclipse.tracecompass.common.core, - org.eclipse.tracecompass.incubator.executioncomparision.core, + org.eclipse.tracecompass.incubator.executioncomparison.core, org.junit, org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional -Export-Package: org.eclipse.tracecompass.incubator.executioncomparision.core.tests +Export-Package: org.eclipse.tracecompass.incubator.executioncomparison.core.tests Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparision.core.tests diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparision/core/tests/ActivatorTest.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparison/core/tests/ActivatorTest.java similarity index 93% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparision/core/tests/ActivatorTest.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparison/core/tests/ActivatorTest.java index c83b01e2f..cfd2bb50e 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparision/core/tests/ActivatorTest.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparison/core/tests/ActivatorTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2022 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -9,7 +9,7 @@ * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ -package org.eclipse.tracecompass.incubator.executioncomparision.core.tests; +package org.eclipse.tracecompass.incubator.executioncomparison.core.tests; import static org.junit.Assert.assertEquals; @@ -21,7 +21,7 @@ import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Plugin; import org.eclipse.tracecompass.common.core.TraceCompassActivator; -import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.Activator; +import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.Activator; import org.junit.Test; import org.osgi.framework.BundleContext; @@ -39,7 +39,7 @@ public class ActivatorTest extends Plugin { /** * The plug-in ID */ - public static final String PLUGIN_ID = "org.eclipse.tracecompass.incubator.executioncomparision.core.tests"; //$NON-NLS-1$ + public static final String PLUGIN_ID = "org.eclipse.tracecompass.incubator.executioncomparison.core.tests"; //$NON-NLS-1$ /** * The shared instance @@ -91,7 +91,7 @@ public void stop(BundleContext context) throws Exception { @Test public void testActivator() { TraceCompassActivator instance = Activator.getInstance(); - assertEquals("org.eclipse.tracecompass.incubator.executioncomparision.core", instance.getPluginId()); + assertEquals("org.eclipse.tracecompass.incubator.executioncomparison.core", instance.getPluginId()); } /** diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.project index 85f6c38ff..b69488183 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.project +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.project @@ -1,6 +1,6 @@ - org.eclipse.tracecompass.incubator.executioncomparision.core + org.eclipse.tracecompass.incubator.executioncomparison.core diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF index 39ac6b684..6ec21734e 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF @@ -2,10 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor -Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparision.core;singleton:=true +Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparison.core;singleton:=true Bundle-Version: 0.1.0.qualifier Bundle-Localization: plugin -Bundle-Activator: org.eclipse.tracecompass.incubator.internal.executioncomparision.core.Activator +Bundle-Activator: org.eclipse.tracecompass.incubator.internal.executioncomparison.core.Activator Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.eclipse.core.runtime, @@ -22,11 +22,10 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.tracecompass.lttng2.ust.core, org.eclipse.tracecompass.analysis.os.linux.core, org.eclipse.tracecompass.analysis.profiling.core, - org.eclipse.tracecompass.incubator.callstack.core, org.eclipse.tracecompass.incubator.traceevent.core, org.eclipse.jdt.annotation -Export-Package: org.eclipse.tracecompass.incubator.internal.executioncomparision.core;x-friends:="org.eclipse.tracecompass.incubator.executioncomparision.ui,org.eclipse.tracecompass.incubator.executioncomparision.core.tests" -Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparision.core +Export-Package: org.eclipse.tracecompass.incubator.internal.executioncomparison.core;x-friends:="org.eclipse.tracecompass.incubator.executioncomparison.core.tests,org.eclipse.tracecompass.incubator.executioncomparison.ui" +Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparison.core Import-Package: com.google.common.annotations, com.google.common.base, com.google.common.cache, diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml index 5661c2cb2..91e1c76fc 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml @@ -4,10 +4,10 @@ > originalTree = new ArrayList<>(); Collection> diffTree = new ArrayList<>(); - WeightedTreeSet callGraphA = mergeCallGraph(fStartA, fEndA, fTraceListA); + WeightedTreeSet callGraphA = mergeCallGraph(fStartA, fEndA, getTraceListA()); Collection<@NonNull ?> processes = callGraphA.getTreesForNamed(MERGE); for (Object process : processes) { originalTree.add((AggregatedCalledFunction) process); } - WeightedTreeSet callGraphB = mergeCallGraph(fStartB, fEndB, fTraceListB); + WeightedTreeSet callGraphB = mergeCallGraph(fStartB, fEndB, getTraceListB()); processes = callGraphB.getTreesForNamed(MERGE); for (Object process : processes) { diffTree.add((AggregatedCalledFunction) process); @@ -228,7 +228,7 @@ public IWeightedTreeSet traceListA = signal.getTraceListA(); if (traceListA != null) { - fTraceListA.clear(); - for (String name : signal.getTraceListA()) { - fTraceListA.add(name); - + List synchronizedListA = Collections.synchronizedList(fTraceListA); + synchronized (synchronizedListA) { + synchronizedListA.clear(); + for (String name : traceListA) { + synchronizedListA.add(name); + } } } List traceListB = signal.getTraceListB(); if (traceListB != null) { - fTraceListB.clear(); - for (String name : signal.getTraceListB()) { - fTraceListB.add(name); - + List synchronizedListB = Collections.synchronizedList(fTraceListB); + synchronizedListB.clear(); + for (String name : traceListB) { + synchronizedListB.add(name); } } @@ -379,5 +381,12 @@ private static ITmfTrace getTrace(String traceName) { } return null; } + private List getTraceListA() { + return new ArrayList<>(fTraceListA); + } + + private List getTraceListB() { + return new ArrayList<>(fTraceListB); + } } \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/ParametricWeightedTreeUtils.java similarity index 92% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/ParametricWeightedTreeUtils.java index c7f3e306b..1170e8bd1 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/ParametricWeightedTreeUtils.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/ParametricWeightedTreeUtils.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -9,7 +9,7 @@ * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ -package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; +package org.eclipse.tracecompass.incubator.internal.executioncomparison.core; import java.util.ArrayList; import java.util.Collection; @@ -74,11 +74,25 @@ private ParametricWeightedTreeUtils() { diffTree = new DifferentialWeightedTree<>(base, object, base.getWeight(), diffWeight); } else { - long baseWeight; - long otherWeight; + long baseWeight = 0; + long otherWeight = 0; if (base instanceof AggregatedCalledFunction) { - baseWeight = ((AggregatedCalledFunction) base).getWeight(statisticType); - otherWeight = other == null ? 0 : ((AggregatedCalledFunction) other).getWeight(statisticType); + switch(statisticType) { + case "Self Time": //$NON-NLS-1$ + { + baseWeight = ((AggregatedCalledFunction) base).getSelfTime(); + otherWeight = other == null ? 0 : ((AggregatedCalledFunction) other).getSelfTime(); + break; + } + case "Duration": //$NON-NLS-1$ + { + baseWeight = ((AggregatedCalledFunction) base).getWeight(); + otherWeight = other == null ? 0 : ((AggregatedCalledFunction) other).getWeight(); + break; + } + default: + break; + } } else { baseWeight = base.getWeight(); diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfCheckboxChangedSignal.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfCheckboxChangedSignal.java similarity index 94% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfCheckboxChangedSignal.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfCheckboxChangedSignal.java index 1881f1e5f..9ef5dbd39 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfCheckboxChangedSignal.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfCheckboxChangedSignal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -9,7 +9,7 @@ * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ -package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; +package org.eclipse.tracecompass.incubator.internal.executioncomparison.core; import java.util.List; diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfComparisonFilteringUpdatedSignal.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfComparisonFilteringUpdatedSignal.java similarity index 98% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfComparisonFilteringUpdatedSignal.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfComparisonFilteringUpdatedSignal.java index 39cfd6c6a..0b8490867 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/TmfComparisonFilteringUpdatedSignal.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfComparisonFilteringUpdatedSignal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -9,7 +9,7 @@ * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ -package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; +package org.eclipse.tracecompass.incubator.internal.executioncomparison.core; import java.util.List; diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/package-info.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/package-info.java similarity index 88% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/package-info.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/package-info.java index 3fc4aa5f5..3bdbb38a8 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/core/package-info.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/package-info.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -10,4 +10,4 @@ *******************************************************************************/ @org.eclipse.jdt.annotation.NonNullByDefault -package org.eclipse.tracecompass.incubator.internal.executioncomparision.core; +package org.eclipse.tracecompass.incubator.internal.executioncomparison.core; diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project index 45667e207..347f85c2d 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project @@ -1,6 +1,6 @@ - org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests + org.eclipse.tracecompass.incubator.executioncomparison.ui.swtbot.tests diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF index ec7a03798..06729d986 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor -Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests;singleton:=true +Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparison.ui.swtbot.tests;singleton:=true Bundle-Version: 0.1.0.qualifier Bundle-Localization: plugin Bundle-ActivationPolicy: lazy diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.project index e845fa270..836671b68 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.project +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.project @@ -1,6 +1,6 @@ - org.eclipse.tracecompass.incubator.executioncomparision.ui + org.eclipse.tracecompass.incubator.executioncomparison.ui diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF index 47c4afb30..9226d2920 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF @@ -2,10 +2,10 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %Bundle-Name Bundle-Vendor: %Bundle-Vendor -Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparision.ui;singleton:=true +Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparison.ui;singleton:=true Bundle-Version: 0.1.0.qualifier Bundle-Localization: plugin -Bundle-Activator: org.eclipse.tracecompass.incubator.internal.executioncomparision.ui.Activator +Bundle-Activator: org.eclipse.tracecompass.incubator.internal.executioncomparison.ui.Activator Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-17 Require-Bundle: org.eclipse.ui, @@ -14,11 +14,10 @@ Require-Bundle: org.eclipse.ui, org.eclipse.tracecompass.tmf.core, org.eclipse.tracecompass.tmf.ui, org.eclipse.tracecompass.incubator.analysis.core, - org.eclipse.tracecompass.incubator.executioncomparision.core, - org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional, - jakarta.validation.jakarta.validation-api, - org.eclipse.tracecompass.analysis.profiling.core -Export-Package: org.eclipse.tracecompass.incubator.internal.executioncomparision.ui;x-internal:=true + org.eclipse.tracecompass.incubator.executioncomparison.core, + org.eclipse.tracecompass.analysis.profiling.core, + org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional +Export-Package: org.eclipse.tracecompass.incubator.internal.executioncomparison.ui;x-internal:=true Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparision.ui Import-Package: com.google.common.collect, org.eclipse.swtchart diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml index d9b16626b..15bf1c4dd 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml @@ -6,9 +6,9 @@ @@ -17,9 +17,9 @@ + id="org.eclipse.tracecompass.incubator.internal.executioncomparison.ui.execComparison"> + class="org.eclipse.tracecompass.incubator.internal.executioncomparison.core.DifferentialSeqCallGraphAnalysis"> diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Activator.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Activator.java similarity index 92% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Activator.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Activator.java index 450f40d6c..24f683972 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/Activator.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Activator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -9,7 +9,7 @@ * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ -package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; +package org.eclipse.tracecompass.incubator.internal.executioncomparison.ui; import java.util.Objects; @@ -23,7 +23,7 @@ public class Activator extends AbstractUIPlugin { /** The plugin ID */ - public static final String PLUGIN_ID = "org.eclipse.tracecompass.incubator.executioncomparision.ui"; //$NON-NLS-1$ + public static final String PLUGIN_ID = "org.eclipse.tracecompass.incubator.executioncomparison.ui"; //$NON-NLS-1$ // The shared instance private static @Nullable Activator plugin; diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/DifferentialFlameGraphView.java similarity index 99% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/DifferentialFlameGraphView.java index 071c482e3..10266e625 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/DifferentialFlameGraphView.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/DifferentialFlameGraphView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -9,7 +9,7 @@ * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ -package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; +package org.eclipse.tracecompass.incubator.internal.executioncomparison.ui; import java.util.ArrayList; import java.util.Collection; @@ -54,8 +54,8 @@ import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.FlowScopeLogBuilder; import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.ScopeLog; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; +import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.DifferentialSeqCallGraphAnalysis; import org.eclipse.tracecompass.internal.analysis.profiling.core.flamegraph.FlameGraphDataProvider; -import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.DifferentialSeqCallGraphAnalysis; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TmfFilterAppliedSignal; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TraceCompassFilter; import org.eclipse.tracecompass.internal.provisional.tmf.ui.widgets.timegraph.BaseDataProviderTimeGraphPresentationProvider; @@ -1221,7 +1221,7 @@ public void regexFilterApplied(TmfFilterAppliedSignal signal) { private static @Nullable DifferentialWeightedTreeProvider getDataProvider() { ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); if (trace != null) { - DifferentialSeqCallGraphAnalysis analysis = (DifferentialSeqCallGraphAnalysis) trace.getAnalysisModule("org.eclipse.tracecompass.incubator.executioncomparision.diffcallgraph"); //$NON-NLS-1$ + DifferentialSeqCallGraphAnalysis analysis = (DifferentialSeqCallGraphAnalysis) trace.getAnalysisModule("org.eclipse.tracecompass.incubator.executioncomparison.diffcallgraph"); //$NON-NLS-1$ if (analysis != null) { return analysis.getDiffProvider(null); } diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/ExecutionComparisonView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java similarity index 92% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/ExecutionComparisonView.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java index c810fd6d5..8bbf28bd5 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/ExecutionComparisonView.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2023 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -9,7 +9,7 @@ * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ -package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; +package org.eclipse.tracecompass.incubator.internal.executioncomparison.ui; import java.text.ParseException; import java.util.ArrayList; @@ -57,8 +57,8 @@ import org.eclipse.swt.widgets.Sash; import org.eclipse.swt.widgets.Text; import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.ScopeLog; -import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.TmfCheckboxChangedSignal; -import org.eclipse.tracecompass.incubator.internal.executioncomparision.core.TmfComparisonFilteringUpdatedSignal; +import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.TmfCheckboxChangedSignal; +import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.TmfComparisonFilteringUpdatedSignal; import org.eclipse.tracecompass.internal.tmf.ui.viewers.eventdensity.EventDensityTreeViewer; import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; @@ -102,7 +102,7 @@ public class ExecutionComparisonView extends DifferentialFlameGraphView implemen /** * the id of the view */ - public static final String id = "org.eclipse.tracecompass.incubator.internal.entexecutioncomparison.ui.execComparison"; //$NON-NLS-1$ + public static final String id = "org.eclipse.tracecompass.incubator.internal.executioncomparison.ui.execComparison"; //$NON-NLS-1$ /** * Default weights for organizing the view */ @@ -139,7 +139,7 @@ public class ExecutionComparisonView extends DifferentialFlameGraphView implemen private ITmfTimestamp fStartTimeB = TmfTimestamp.BIG_BANG; private ITmfTimestamp fEndTimeA = TmfTimestamp.BIG_CRUNCH; private ITmfTimestamp fEndTimeB = TmfTimestamp.BIG_CRUNCH; - private String fStatistic = "duration"; //$NON-NLS-1$ + private String fStatistic = Messages.MultipleDensityView_Duration; private JFormattedTextField ftextAFrom = new JFormattedTextField(); private JFormattedTextField ftextBFrom = new JFormattedTextField(); private JFormattedTextField ftextATo = new JFormattedTextField(); @@ -246,8 +246,6 @@ public void handleEvent(@Nullable Event event) { //dispatch signal to rebuild differential flame graph TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerA(), fStartTimeA, fEndTimeA, getTrace())); - //Reset the selection blue lines in density chart viewer - getChartViewerA().refreshMouseSelectionProvider(); } } }); @@ -282,8 +280,8 @@ public void focusLost(java.awt.event.@Nullable FocusEvent e) { fStartTimeA = fromTime; textAFrom.setText(fStartTimeA.toString(fFormat)); - TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(getChartViewerA(), fStartTimeA, fEndTimeA, getTrace()); - TmfSignalManager.dispatchSignal(signal); + updateSelectedRange(); + getChartViewerA().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); } catch (ParseException e1) { textAFrom.setText(oldVal); @@ -325,17 +323,13 @@ public void focusLost( java.awt.event.@Nullable FocusEvent e) { fEndTimeA = fromTime; textATo.setText(fEndTimeA.toString(fFormat)); - TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerA(), fStartTimeA, fEndTimeA, getTrace())); + updateSelectedRange(); + getChartViewerA().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); } catch (ParseException e1) { textATo.setText(oldVal); e1.printStackTrace(); } - ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); - fEndTimeA = fromTime; - - TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace()); - broadcast(signal); } } }); @@ -380,8 +374,6 @@ public void handleEvent(@Nullable Event event) { //dispatch signal to rebuild differential flame graph TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerB(), fStartTimeB, fEndTimeB, getTrace())); - //Reset the selection blue lines in density chart viewer - getChartViewerB().refreshMouseSelectionProvider(); } } }); @@ -415,16 +407,14 @@ public void focusLost(java.awt.event.@Nullable FocusEvent e) { ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); fStartTimeB = fromTime; textBFrom.setText(fStartTimeB.toString(fFormat)); - TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerB(), fStartTimeB, fEndTimeB, getTrace())); + + updateSelectedRange(); + getChartViewerB().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeB, fEndTimeB, getTrace())); + } catch (ParseException e1) { textBFrom.setText(oldVal); e1.printStackTrace(); } - ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); - fStartTimeB = fromTime; - - TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace()); - broadcast(signal); } } @@ -461,16 +451,13 @@ public void focusLost(java.awt.event.FocusEvent e) { ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); fEndTimeB = fromTime; textBTo.setText(fEndTimeB.toString(fFormat)); - TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerB(), fStartTimeB, fEndTimeB, getTrace())); + updateSelectedRange(); + getChartViewerB().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); + } catch (ParseException e1) { textBTo.setText(oldVal); e1.printStackTrace(); } - ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); - fEndTimeB = fromTime; - - TmfSelectionRangeUpdatedSignal signal = new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace()); - broadcast(signal); } } }); @@ -620,10 +607,8 @@ public void focusLost(@Nullable FocusEvent e) { boolean parsed = parseQuery(query); if (parsed) { ///updating blue lines in density chats - getChartViewerA().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(getChartViewerA(), fStartTimeA, fEndTimeA, getTrace())); - getChartViewerB().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(getChartViewerB(), fStartTimeB, fEndTimeB, getTrace())); - getChartViewerA().refreshMouseSelectionProvider(); - getChartViewerB().refreshMouseSelectionProvider(); + getChartViewerA().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); + getChartViewerB().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeB, fEndTimeB, getTrace())); //updates checked elements in treeviewers //treeViewerA @@ -761,6 +746,7 @@ public void run() { return; } fStatistic = name; + System.out.println(name+"\n"); TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStatistic, null, null); TmfSignalManager.dispatchSignal(rangUpdateSignal); if (ftextQuery!=null) { @@ -858,15 +844,10 @@ public void setCheckedElements(TmfXYChartViewer chart,TmfViewer tree,List builder.setSelection(new TmfTimeRange(selectedTime, selectedEndTime))); + + } + super.selectionRangeUpdated(signal); } + if (signal.getSource()==this) { + final ITmfTrace trace = getTrace(); + if (trace != null) { + long selectedTime = signal.getBeginTime().toNanos(); + long selectedEndTime = signal.getEndTime().toNanos(); + setSelectionRange(selectedTime, selectedEndTime); + } + } } /** * handles check state of tree viewer and keeps the list of whole trace list diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties similarity index 94% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties index 0288f0d3d..1f655408f 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/messages.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties @@ -1,5 +1,5 @@ ############################################################################### - # Copyright (c) 2023 École Polytechnique de Montréal + # Copyright (c) 2024 École Polytechnique de Montréal # # All rights reserved. This program and the accompanying materials are # made available under the terms of the Eclipse Public License 2.0 which diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/package-info.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/package-info.java similarity index 89% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/package-info.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/package-info.java index 0c9856c94..6d35069a7 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparision/ui/package-info.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/package-info.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2022 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -10,6 +10,6 @@ *******************************************************************************/ @org.eclipse.jdt.annotation.NonNullByDefault -package org.eclipse.tracecompass.incubator.internal.executioncomparision.ui; +package org.eclipse.tracecompass.incubator.internal.executioncomparison.ui; diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision/.project index ea9a73000..a6d6ab7eb 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/.project +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparision/.project @@ -1,6 +1,6 @@ - org.eclipse.tracecompass.incubator.executioncomparision + org.eclipse.tracecompass.incubator.executioncomparison From bdabdbd538fa495537eda4e866bff421bc50c335 Mon Sep 17 00:00:00 2001 From: Vlad Arama Date: Fri, 31 May 2024 11:35:22 -0400 Subject: [PATCH 5/5] execution-comparison: improve code This commit fixes various types of formatting issues and code warnings coming from `Eclipse` and `SonarLint`. The code is also refactored in various places to reduce the complexity of certain methods. In addition, it also fixes a bug where the time range panel (from and to) is broken when initially launching TC. Finally, it adds clearer labels for the Y-Axis (Event Count instead of Y Axis). Signed-off-by: Vlad Arama --- .../plugin.properties | 13 - .../plugin.xml | 25 - .../core/ParametricWeightedTreeUtils.java | 252 ---- .../.classpath | 15 - .../.gitignore | 1 - .../.project | 34 - .../.settings/org.eclipse.jdt.core.prefs | 428 ------ .../.settings/org.eclipse.jdt.ui.prefs | 60 - .../.settings/org.eclipse.pde.prefs | 32 - .../META-INF/MANIFEST.MF | 19 - .../build.properties | 17 - .../swtbot-test-plugin.properties | 1 - .../org.eclipse.core.resources.prefs | 2 - .../.settings/org.eclipse.core.runtime.prefs | 2 - .../about.html | 36 - .../plugin.xml | 33 - .../ui/ExecutionComparisonView.java | 1225 --------------- .../ui/MultipleEventDensityViewer.java | 135 -- .../ui/messages.properties | 23 - .../executioncomparison/ui/package-info.java | 15 - .../.classpath | 0 .../.gitignore | 0 .../.project | 0 .../org.eclipse.core.resources.prefs | 0 .../.settings/org.eclipse.core.runtime.prefs | 0 .../.settings/org.eclipse.jdt.core.prefs | 0 .../.settings/org.eclipse.jdt.ui.prefs | 0 .../.settings/org.eclipse.pde.prefs | 0 .../META-INF/MANIFEST.MF | 4 +- .../about.html | 0 .../build.properties | 2 +- .../plugin.properties | 4 +- .../core/tests/ActivatorTest.java | 3 +- .../.classpath | 0 .../.gitignore | 0 .../.project | 0 .../org.eclipse.core.resources.prefs | 0 .../.settings/org.eclipse.core.runtime.prefs | 0 .../.settings/org.eclipse.jdt.core.prefs | 0 .../.settings/org.eclipse.jdt.ui.prefs | 0 .../.settings/org.eclipse.pde.api.tools.prefs | 0 .../.settings/org.eclipse.pde.prefs | 0 .../META-INF/MANIFEST.MF | 2 +- .../about.html | 0 .../build.properties | 2 +- .../plugin.properties | 5 +- .../plugin.xml | 23 + .../executioncomparison/core/Activator.java | 9 +- .../core/DifferentialCallGraphProvider.java | 26 +- .../core/DifferentialFlamePalette.java | 28 +- .../DifferentialSeqCallGraphAnalysis.java | 279 ++-- .../core/TmfCheckboxChangedSignal.java | 17 +- .../TmfComparisonFilteringUpdatedSignal.java | 62 +- .../core/package-info.java | 9 +- .../.classpath | 0 .../.gitignore | 0 .../.project | 0 .../.settings/.api_filters | 0 .../org.eclipse.core.resources.prefs | 0 .../.settings/org.eclipse.core.runtime.prefs | 0 .../.settings/org.eclipse.jdt.core.prefs | 0 .../.settings/org.eclipse.jdt.ui.prefs | 0 .../.settings/org.eclipse.pde.api.tools.prefs | 0 .../.settings/org.eclipse.pde.prefs | 0 .../META-INF/MANIFEST.MF | 4 +- .../about.html | 0 .../build.properties | 2 +- .../plugin.properties | 4 +- .../plugin.xml | 26 + .../executioncomparison/ui/Activator.java | 14 +- .../ui/DifferentialFlameGraphView.java | 652 ++++---- .../ui/ExecutionComparisonView.java | 1318 +++++++++++++++++ .../executioncomparison/ui/Messages.java | 74 +- .../ui/MultipleEventDensityViewer.java | 161 ++ .../ui/messages.properties | 31 + .../.project | 0 .../build.properties | 2 +- .../feature.properties | 4 +- .../feature.xml | 27 +- analyses/pom.xml | 4 + .../weighted/diff/WeightedTreeUtilsTest.java | 6 +- .../weighted/tree/diff/WeightedTreeUtils.java | 89 +- .../callgraph/AbstractCalledFunction.java | 185 +++ .../callgraph/AggregatedCalledFunction.java | 345 +++++ .../category.xml | 3 + 85 files changed, 2828 insertions(+), 2966 deletions(-) delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/plugin.properties delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/ParametricWeightedTreeUtils.java delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.classpath delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.gitignore delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.pde.prefs delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/build.properties delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/swtbot-test-plugin.properties delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.resources.prefs delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.runtime.prefs delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/about.html delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/MultipleEventDensityViewer.java delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties delete mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/package-info.java rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/.classpath (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/.gitignore (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/.project (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/.settings/org.eclipse.core.resources.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/.settings/org.eclipse.core.runtime.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/.settings/org.eclipse.jdt.core.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/.settings/org.eclipse.jdt.ui.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/.settings/org.eclipse.pde.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/META-INF/MANIFEST.MF (89%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/about.html (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/build.properties (91%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/plugin.properties (78%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core.tests => org.eclipse.tracecompass.incubator.executioncomparison.core.tests}/src/org/eclipse/tracecompass/incubator/executioncomparison/core/tests/ActivatorTest.java (98%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/.classpath (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/.gitignore (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/.project (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/.settings/org.eclipse.core.resources.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/.settings/org.eclipse.core.runtime.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/.settings/org.eclipse.jdt.core.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/.settings/org.eclipse.jdt.ui.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/.settings/org.eclipse.pde.api.tools.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/.settings/org.eclipse.pde.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/META-INF/MANIFEST.MF (97%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/about.html (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/build.properties (91%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.core}/plugin.properties (79%) create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/plugin.xml rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/Activator.java (87%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialCallGraphProvider.java (84%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialFlamePalette.java (93%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialSeqCallGraphAnalysis.java (67%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfCheckboxChangedSignal.java (76%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfComparisonFilteringUpdatedSignal.java (68%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.core => org.eclipse.tracecompass.incubator.executioncomparison.core}/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/package-info.java (61%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/.classpath (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/.gitignore (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/.project (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/.settings/.api_filters (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests => org.eclipse.tracecompass.incubator.executioncomparison.ui}/.settings/org.eclipse.core.resources.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests => org.eclipse.tracecompass.incubator.executioncomparison.ui}/.settings/org.eclipse.core.runtime.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/.settings/org.eclipse.jdt.core.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/.settings/org.eclipse.jdt.ui.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/.settings/org.eclipse.pde.api.tools.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/.settings/org.eclipse.pde.prefs (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/META-INF/MANIFEST.MF (94%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests => org.eclipse.tracecompass.incubator.executioncomparison.ui}/about.html (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/build.properties (91%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests => org.eclipse.tracecompass.incubator.executioncomparison.ui}/plugin.properties (79%) create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/plugin.xml rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Activator.java (83%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/DifferentialFlameGraphView.java (67%) create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision.ui => org.eclipse.tracecompass.incubator.executioncomparison.ui}/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Messages.java (50%) create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/MultipleEventDensityViewer.java create mode 100644 analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision => org.eclipse.tracecompass.incubator.executioncomparison}/.project (100%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision => org.eclipse.tracecompass.incubator.executioncomparison}/build.properties (90%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision => org.eclipse.tracecompass.incubator.executioncomparison}/feature.properties (82%) rename analyses/{org.eclipse.tracecompass.incubator.executioncomparision => org.eclipse.tracecompass.incubator.executioncomparison}/feature.xml (57%) create mode 100644 callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AbstractCalledFunction.java create mode 100644 callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AggregatedCalledFunction.java diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/plugin.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/plugin.properties deleted file mode 100644 index b310b75e9..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/plugin.properties +++ /dev/null @@ -1,13 +0,0 @@ -############################################################################### -# Copyright (c) 2022 École Polytechnique de Montréal -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0 -# -# SPDX-License-Identifier: EPL-2.0 -############################################################################### - -Bundle-Vendor = Eclipse Trace Compass Incubator -Bundle-Name = Trace Compass Incubator ExecutionComparision Core Tests Plug-in diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml deleted file mode 100644 index 91e1c76fc..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/ParametricWeightedTreeUtils.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/ParametricWeightedTreeUtils.java deleted file mode 100644 index 1170e8bd1..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/ParametricWeightedTreeUtils.java +++ /dev/null @@ -1,252 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal - * - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License 2.0 which - * accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -package org.eclipse.tracecompass.incubator.internal.executioncomparison.core; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.List; - -import org.eclipse.jdt.annotation.NonNull; -import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.tracecompass.analysis.profiling.core.base.ICallStackSymbol; -import org.eclipse.tracecompass.analysis.profiling.core.callgraph.ICallGraphProvider2; -import org.eclipse.tracecompass.analysis.profiling.core.tree.ITree; -import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeSet; -import org.eclipse.tracecompass.analysis.profiling.core.tree.WeightedTree; -import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTree; -import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; -import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeSet; -import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.WeightedTreeUtils; -import org.eclipse.tracecompass.internal.analysis.profiling.core.callgraph2.AggregatedCalledFunction; -import org.eclipse.tracecompass.tmf.core.util.Pair; - -import com.google.common.collect.ImmutableList; - -/** - * Utility methods to operate on {@link WeightedTree} objects - * - * @author Fateme Faraji Daneshgar - */ -@SuppressWarnings("restriction") -public final class ParametricWeightedTreeUtils { - - private ParametricWeightedTreeUtils() { - // Nothing to do - } - - /** - * Does the differential between 2 weighted trees, ie what happened in tree2 - * differently than in tree1. The base weight come from the second tree and - * the differential value will show the difference with the first tree. - * - * @param - * The type of element in the tree - * @param first - * The tree that will be differentiated. - * @param second - * The tree to use as the base - * @param statisticType - * it determine the statistic (duration or self time) that flame graph will represent - * @return The differential weighted tree - */ - public static <@NonNull T> Collection> diffTrees(Collection> first, Collection> second, @Nullable String statisticType) { - List> diffTrees = new ArrayList<>(); - double nullDiff = Double.NaN; - - for (WeightedTree base : second) { - T object = base.getObject(); - // Find the equivalent tree in the first collection - WeightedTree other = findObject(first, object); - double diffWeight; - DifferentialWeightedTree<@NonNull T> diffTree; - if (statisticType == null) { - diffWeight = other == null ? nullDiff : (double) (base.getWeight() - other.getWeight()) / other.getWeight(); - diffTree = new DifferentialWeightedTree<>(base, object, base.getWeight(), diffWeight); - - } else { - long baseWeight = 0; - long otherWeight = 0; - if (base instanceof AggregatedCalledFunction) { - switch(statisticType) { - case "Self Time": //$NON-NLS-1$ - { - baseWeight = ((AggregatedCalledFunction) base).getSelfTime(); - otherWeight = other == null ? 0 : ((AggregatedCalledFunction) other).getSelfTime(); - break; - } - case "Duration": //$NON-NLS-1$ - { - baseWeight = ((AggregatedCalledFunction) base).getWeight(); - otherWeight = other == null ? 0 : ((AggregatedCalledFunction) other).getWeight(); - break; - } - default: - break; - } - - } else { - baseWeight = base.getWeight(); - otherWeight = other == null ? 0 : other.getWeight(); - } - diffWeight = other == null ? nullDiff : (double) (baseWeight - otherWeight) / otherWeight; - diffTree = new DifferentialWeightedTree<>(base, object, base.getWeight(), diffWeight); - - } - diffTrees.add(diffTree); - - // Make the differential of the children - for (WeightedTree childTree : diffTrees(other == null ? Collections.emptyList() : other.getChildren(), base.getChildren(), statisticType)) { - diffTree.addChild(childTree); - } - } - return diffTrees; - } - - /** - * Does the differential between 2 weighted tree sets, ie for each - * comparable elements, what happened in tree set 2 differently than in tree - * set 1. The base weight come from the second tree set and the differential - * value will show the difference with the first tree. - *

- * Calling this method assumes the tree sets are comparable. It is the - * caller's responsibility to make sure the parameters make sense. If the 2 - * tree sets come from different {@link IWeightedTreeProvider}, they should - * be of similar types, otherwise, the comparison may not make sense. - *

- *

- * The elements of each tree set are paired as follows: - *

- *

- * 1- If there is only one element in each tree, they will be paired. - *

- *

- * 2- If the same elements are present in both tree sets, they will be - * paired, all other elements are ignored - *

- *

- * 3- If no elements are paired, they will be paired by name (and - * hierarchical names, if it applies). Unmatched elements will be ignored. - *

- *

- * If elements are not paired at this point, it will return - * null - *

- * - * @param provider - * The base provider of one of the trees, it will be used by the - * differential weighted tree provider to display the metrics and - * titles, etc.. It could be the provider of the second tree set, - * as it serves as the base values. - * @param first - * The first treeset to compare to - * @param second - * The second treeset to compare. - * @return A differential weighted tree provider wrapping the resulting tree - * set, or null if the 2 treesets have no elements in - * common - */ - public static @Nullable DifferentialWeightedTreeProvider diffTreeSets(ICallGraphProvider2 provider, - IWeightedTreeSet> first, - IWeightedTreeSet> second) { - Collection> pairedElements = pairElementsFromTrees(first, second); - if (pairedElements.isEmpty()) { - return null; - } - DifferentialWeightedTreeSet treeSet = new DifferentialWeightedTreeSet<>(); - for (Pair<@NonNull ?, @NonNull ?> pair : pairedElements) { - Collection> trees1 = first.getTreesFor(pair.getFirst()); - Collection> trees2 = second.getTreesFor(pair.getSecond()); - Collection> diffTrees = WeightedTreeUtils.diffTrees(trees1, trees2); - for (DifferentialWeightedTree tree : diffTrees) { - treeSet.addWeightedTree(pair.getFirst(), tree); - } - } - - return new DifferentialWeightedTreeProvider(provider, treeSet); - } - - private static <@NonNull N> Collection> pairElementsFromTrees(IWeightedTreeSet> first, IWeightedTreeSet> second) { - Collection<@NonNull ?> elements1 = first.getElements(); - Collection<@NonNull ?> elements2 = second.getElements(); - // If there is only one element and it is not a tree, pair it - if (elements1.size() == 1 && elements2.size() == 1) { - @NonNull - Object element1 = elements1.iterator().next(); - @NonNull - Object element2 = elements2.iterator().next(); - if (!(element1 instanceof ITree) && !(element2 instanceof ITree)) { - return ImmutableList.of(new Pair(element1, element2)); - } - } - - // Try to find equal elements in both trees - Collection> pairedElements = pairEqualElements(elements1, elements2); - if (!pairedElements.isEmpty()) { - return pairedElements; - } - - // Compare ITree elements by names - pairedElements = pairSameNameElements(elements1, elements2); - return pairedElements; - } - - private static Collection> pairEqualElements(Collection<@NonNull ?> elements1, Collection<@NonNull ?> elements2) { - List> pairedElements = new ArrayList<>(); - for (@NonNull - Object element1 : elements1) { - for (@NonNull - Object element2 : elements2) { - if (element1.equals(element2)) { - pairedElements.add(new Pair<>(element1, element1)); - if (element1 instanceof ITree && element2 instanceof ITree) { - pairedElements.addAll(pairEqualElements(((ITree) element1).getChildren(), ((ITree) element2).getChildren())); - } - break; - } - } - } - return pairedElements; - } - - private static Collection> pairSameNameElements(Collection<@NonNull ?> elements1, Collection elements2) { - List> pairedElements = new ArrayList<>(); - for (@NonNull - Object element1 : elements1) { - if (!(element1 instanceof ITree)) { - continue; - } - for (@NonNull - Object element2 : elements2) { - if (!(element2 instanceof ITree)) { - continue; - } - if (((ITree) element1).getName().equals(((ITree) element2).getName())) { - pairedElements.add(new Pair<>(element1, element2)); - pairedElements.addAll(pairSameNameElements(((ITree) element1).getChildren(), ((ITree) element2).getChildren())); - break; - } - } - } - return pairedElements; - } - - private static @Nullable <@NonNull T> WeightedTree findObject(Collection> tree, @NonNull T object) { - for (WeightedTree other : tree) { - if (other.getObject().equals(object)) { - return other; - } - } - return null; - } - -} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.classpath b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.classpath deleted file mode 100644 index b8d064f66..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.classpath +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.gitignore b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.gitignore deleted file mode 100644 index 750e145aa..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.gitignore +++ /dev/null @@ -1 +0,0 @@ -screenshots/ diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project deleted file mode 100644 index 347f85c2d..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.project +++ /dev/null @@ -1,34 +0,0 @@ - - - org.eclipse.tracecompass.incubator.executioncomparison.ui.swtbot.tests - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.pde.api.tools.apiAnalysisBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - org.eclipse.pde.api.tools.apiAnalysisNature - - diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index bb4dd23d9..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,428 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.codeComplete.argumentPrefixes= -org.eclipse.jdt.core.codeComplete.argumentSuffixes= -org.eclipse.jdt.core.codeComplete.fieldPrefixes=f -org.eclipse.jdt.core.codeComplete.fieldSuffixes= -org.eclipse.jdt.core.codeComplete.localPrefixes= -org.eclipse.jdt.core.codeComplete.localSuffixes= -org.eclipse.jdt.core.codeComplete.staticFieldPrefixes= -org.eclipse.jdt.core.codeComplete.staticFieldSuffixes= -org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes= -org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes= -org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=enabled -org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore -org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull -org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault -org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable -org.eclipse.jdt.core.compiler.annotation.nullanalysis=enabled -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.doc.comment.support=enabled -org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=error -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.autoboxing=ignore -org.eclipse.jdt.core.compiler.problem.comparingIdentical=error -org.eclipse.jdt.core.compiler.problem.deadCode=error -org.eclipse.jdt.core.compiler.problem.deprecation=error -org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled -org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled -org.eclipse.jdt.core.compiler.problem.discouragedReference=warning -org.eclipse.jdt.core.compiler.problem.emptyStatement=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=error -org.eclipse.jdt.core.compiler.problem.fallthroughCase=error -org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled -org.eclipse.jdt.core.compiler.problem.fieldHiding=error -org.eclipse.jdt.core.compiler.problem.finalParameterBound=error -org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=error -org.eclipse.jdt.core.compiler.problem.forbiddenReference=error -org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=error -org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled -org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=error -org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=error -org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=error -org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning -org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled -org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=protected -org.eclipse.jdt.core.compiler.problem.localVariableHiding=error -org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=error -org.eclipse.jdt.core.compiler.problem.missingDefaultCase=error -org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=error -org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=enabled -org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error -org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags -org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled -org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error -org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled -org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error -org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=error -org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error -org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=error -org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore -org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning -org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=warning -org.eclipse.jdt.core.compiler.problem.nullReference=error -org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error -org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning -org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error -org.eclipse.jdt.core.compiler.problem.parameterAssignment=error -org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=error -org.eclipse.jdt.core.compiler.problem.potentialNullReference=error -org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning -org.eclipse.jdt.core.compiler.problem.rawTypeReference=error -org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning -org.eclipse.jdt.core.compiler.problem.redundantNullCheck=error -org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=warning -org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=error -org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore -org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=error -org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled -org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error -org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled -org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled -org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=enabled -org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore -org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error -org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=disabled -org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=error -org.eclipse.jdt.core.compiler.problem.unclosedCloseable=error -org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore -org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=error -org.eclipse.jdt.core.compiler.problem.unnecessaryElse=error -org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=error -org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=disabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=disabled -org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled -org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedImport=error -org.eclipse.jdt.core.compiler.problem.unusedLabel=error -org.eclipse.jdt.core.compiler.problem.unusedLocal=error -org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled -org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled -org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=error -org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore -org.eclipse.jdt.core.compiler.problem.unusedWarningToken=error -org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error -org.eclipse.jdt.core.compiler.source=1.8 -org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 -org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 -org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 -org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true -org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true -org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off -org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.join_lines_in_comments=true -org.eclipse.jdt.core.formatter.join_wrapped_lines=false -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=250 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines -org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=space -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_on_off_tags=false -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true -org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true -org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true -org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true -org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index dbbef8b06..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,60 +0,0 @@ -eclipse.preferences.version=1 -editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true -formatter_profile=_tmf-test-style -formatter_settings_version=12 -org.eclipse.jdt.ui.exception.name=e -org.eclipse.jdt.ui.gettersetter.use.is=true -org.eclipse.jdt.ui.keywordthis=false -org.eclipse.jdt.ui.overrideannotation=true -sp_cleanup.add_default_serial_version_id=true -sp_cleanup.add_generated_serial_version_id=false -sp_cleanup.add_missing_annotations=false -sp_cleanup.add_missing_deprecated_annotations=true -sp_cleanup.add_missing_methods=false -sp_cleanup.add_missing_nls_tags=false -sp_cleanup.add_missing_override_annotations=true -sp_cleanup.add_missing_override_annotations_interface_methods=true -sp_cleanup.add_serial_version_id=false -sp_cleanup.always_use_blocks=true -sp_cleanup.always_use_parentheses_in_expressions=false -sp_cleanup.always_use_this_for_non_static_field_access=false -sp_cleanup.always_use_this_for_non_static_method_access=false -sp_cleanup.convert_to_enhanced_for_loop=false -sp_cleanup.correct_indentation=false -sp_cleanup.format_source_code=false -sp_cleanup.format_source_code_changes_only=false -sp_cleanup.make_local_variable_final=false -sp_cleanup.make_parameters_final=false -sp_cleanup.make_private_fields_final=true -sp_cleanup.make_type_abstract_if_missing_method=false -sp_cleanup.make_variable_declarations_final=false -sp_cleanup.never_use_blocks=false -sp_cleanup.never_use_parentheses_in_expressions=true -sp_cleanup.on_save_use_additional_actions=true -sp_cleanup.organize_imports=false -sp_cleanup.qualify_static_field_accesses_with_declaring_class=false -sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true -sp_cleanup.qualify_static_member_accesses_with_declaring_class=false -sp_cleanup.qualify_static_method_accesses_with_declaring_class=false -sp_cleanup.remove_private_constructors=true -sp_cleanup.remove_trailing_whitespaces=true -sp_cleanup.remove_trailing_whitespaces_all=true -sp_cleanup.remove_trailing_whitespaces_ignore_empty=false -sp_cleanup.remove_unnecessary_casts=false -sp_cleanup.remove_unnecessary_nls_tags=false -sp_cleanup.remove_unused_imports=false -sp_cleanup.remove_unused_local_variables=false -sp_cleanup.remove_unused_private_fields=true -sp_cleanup.remove_unused_private_members=false -sp_cleanup.remove_unused_private_methods=true -sp_cleanup.remove_unused_private_types=true -sp_cleanup.sort_members=false -sp_cleanup.sort_members_all=false -sp_cleanup.use_blocks=true -sp_cleanup.use_blocks_only_for_return_and_throw=false -sp_cleanup.use_parentheses_in_expressions=false -sp_cleanup.use_this_for_non_static_field_access=false -sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true -sp_cleanup.use_this_for_non_static_method_access=false -sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.pde.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.pde.prefs deleted file mode 100644 index c367d4bd0..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.pde.prefs +++ /dev/null @@ -1,32 +0,0 @@ -compilers.f.unresolved-features=1 -compilers.f.unresolved-plugins=1 -compilers.incompatible-environment=1 -compilers.p.build=1 -compilers.p.build.bin.includes=0 -compilers.p.build.encodings=2 -compilers.p.build.java.compiler=2 -compilers.p.build.java.compliance=1 -compilers.p.build.missing.output=2 -compilers.p.build.output.library=1 -compilers.p.build.source.library=0 -compilers.p.build.src.includes=0 -compilers.p.deprecated=1 -compilers.p.discouraged-class=1 -compilers.p.internal=1 -compilers.p.missing-packages=1 -compilers.p.missing-version-export-package=2 -compilers.p.missing-version-import-package=2 -compilers.p.missing-version-require-bundle=2 -compilers.p.no-required-att=0 -compilers.p.not-externalized-att=2 -compilers.p.unknown-attribute=1 -compilers.p.unknown-class=1 -compilers.p.unknown-element=1 -compilers.p.unknown-identifier=1 -compilers.p.unknown-resource=1 -compilers.p.unresolved-ex-points=0 -compilers.p.unresolved-import=0 -compilers.s.create-docs=false -compilers.s.doc-folder=doc -compilers.s.open-tags=1 -eclipse.preferences.version=1 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF deleted file mode 100644 index 06729d986..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/META-INF/MANIFEST.MF +++ /dev/null @@ -1,19 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: %Bundle-Name -Bundle-Vendor: %Bundle-Vendor -Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparison.ui.swtbot.tests;singleton:=true -Bundle-Version: 0.1.0.qualifier -Bundle-Localization: plugin -Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Require-Bundle: org.eclipse.core.resources, - org.eclipse.core.runtime, - org.eclipse.swtbot.eclipse.finder, - org.eclipse.swtbot.junit4_x, - org.eclipse.ui, - org.eclipse.ui.ide, - org.eclipse.ui.views, - org.junit, - org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional -Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/build.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/build.properties deleted file mode 100644 index fc2472710..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/build.properties +++ /dev/null @@ -1,17 +0,0 @@ -############################################################################### -# Copyright (c) 2022 École Polytechnique de Montréal -# -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Eclipse Public License 2.0 -# which accompanies this distribution, and is available at -# https://www.eclipse.org/legal/epl-2.0 -# -# SPDX-License-Identifier: EPL-2.0 -############################################################################### - -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - about.html,\ - plugin.properties diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/swtbot-test-plugin.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/swtbot-test-plugin.properties deleted file mode 100644 index 338038b93..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/swtbot-test-plugin.properties +++ /dev/null @@ -1 +0,0 @@ -# This file tells the Maven build to use the settings for SWTBot test plugins diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.resources.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 99f26c020..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -encoding/=UTF-8 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.runtime.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.runtime.prefs deleted file mode 100644 index 5a0ad22d2..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.core.runtime.prefs +++ /dev/null @@ -1,2 +0,0 @@ -eclipse.preferences.version=1 -line.separator=\n diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/about.html b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/about.html deleted file mode 100644 index 164f781a8..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/about.html +++ /dev/null @@ -1,36 +0,0 @@ - - - - -About - - -

About This Content

- -

November 30, 2017

-

License

- -

- The Eclipse Foundation makes available all content in this plug-in - ("Content"). Unless otherwise indicated below, the Content - is provided to you under the terms and conditions of the Eclipse - Public License Version 2.0 ("EPL"). A copy of the EPL is - available at http://www.eclipse.org/legal/epl-2.0. - For purposes of the EPL, "Program" will mean the Content. -

- -

- If you did not receive this Content directly from the Eclipse - Foundation, the Content is being redistributed by another party - ("Redistributor") and different terms and conditions may - apply to your use of any object code in the Content. Check the - Redistributor's license that was provided with the Content. If no such - license exists, contact the Redistributor. Unless otherwise indicated - below, the terms and conditions of the EPL still apply to any source - code in the Content and such source code may be obtained at http://www.eclipse.org. -

- - - \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml deleted file mode 100644 index 15bf1c4dd..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java deleted file mode 100644 index 8bbf28bd5..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java +++ /dev/null @@ -1,1225 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal - * - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License 2.0 which - * accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -package org.eclipse.tracecompass.incubator.internal.executioncomparison.ui; - -import java.text.ParseException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.Objects; -import java.util.logging.Level; - -import javax.swing.JFormattedTextField; -import javax.swing.JLabel; - -import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.jface.action.Action; -import org.eclipse.jface.action.ActionContributionItem; -import org.eclipse.jface.action.IAction; -import org.eclipse.jface.action.IMenuCreator; -import org.eclipse.jface.action.IMenuManager; -import org.eclipse.jface.action.IStatusLineManager; -import org.eclipse.jface.action.Separator; -import org.eclipse.jface.layout.GridLayoutFactory; -import org.eclipse.swt.SWT; -import org.eclipse.swt.awt.SWT_AWT; -import org.eclipse.swt.custom.SashForm; -import org.eclipse.swt.events.ExpandEvent; -import org.eclipse.swt.events.ExpandListener; -import org.eclipse.swt.events.FocusEvent; -import org.eclipse.swt.events.FocusListener; -import org.eclipse.swt.events.MouseAdapter; -import org.eclipse.swt.events.MouseEvent; -import org.eclipse.swt.events.PaintEvent; -import org.eclipse.swt.events.PaintListener; -import org.eclipse.swt.layout.GridData; -import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.layout.RowLayout; -import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.swt.widgets.Control; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Event; -import org.eclipse.swt.widgets.ExpandBar; -import org.eclipse.swt.widgets.ExpandItem; -import org.eclipse.swt.widgets.Group; -import org.eclipse.swt.widgets.Listener; -import org.eclipse.swt.widgets.Menu; -import org.eclipse.swt.widgets.Sash; -import org.eclipse.swt.widgets.Text; -import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.ScopeLog; -import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.TmfCheckboxChangedSignal; -import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.TmfComparisonFilteringUpdatedSignal; -import org.eclipse.tracecompass.internal.tmf.ui.viewers.eventdensity.EventDensityTreeViewer; -import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; -import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; -import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; -import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal; -import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; -import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; -import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; -import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; -import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestampFormat; -import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; -import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager; -import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentInfo; -import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentSignal; -import org.eclipse.tracecompass.tmf.ui.viewers.ILegendImageProvider2; -import org.eclipse.tracecompass.tmf.ui.viewers.TmfTimeViewer; -import org.eclipse.tracecompass.tmf.ui.viewers.TmfViewer; -import org.eclipse.tracecompass.tmf.ui.viewers.tree.AbstractSelectTreeViewer2; -import org.eclipse.tracecompass.tmf.ui.viewers.tree.ICheckboxTreeViewerListener; -import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeViewerEntry; -import org.eclipse.tracecompass.tmf.ui.viewers.xychart.TmfXYChartViewer; -import org.eclipse.tracecompass.tmf.ui.viewers.xychart.XYChartLegendImageProvider; -import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfCommonXAxisChartViewer; -import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfFilteredXYChartViewer; -import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfXYChartSettings; -import org.eclipse.tracecompass.tmf.ui.views.ManyEntriesSelectedDialogPreCheckedListener; -import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.dialogs.TriStateFilteredCheckboxTree; -import org.eclipse.ui.IWorkbenchPartSite; -import org.eclipse.ui.contexts.IContextActivation; -import org.eclipse.ui.contexts.IContextService; - -/** - * ExecutionComparisonView allows to compare two groups of traces (parts of traces) - * - * @author Fateme Faraji Daneshgar - */ -@SuppressWarnings("restriction") -public class ExecutionComparisonView extends DifferentialFlameGraphView implements ICheckboxTreeViewerListener { - - /** - * the id of the view - */ - public static final String id = "org.eclipse.tracecompass.incubator.internal.executioncomparison.ui.execComparison"; //$NON-NLS-1$ - /** - * Default weights for organizing the view - */ - private static final int[] DEFAULT_WEIGHTS_ShowQuery = new int[] { 450, 290, 260 }; - private static final int[] DEFAULT_WEIGHTS_HideQuery = new int[] { 450, 100, 450 }; - private static final int[] DEFAULT_WEIGHTS_FILTERING_H = new int[] { 3, 9 }; - private static final int[] DEFAULT_WEIGHTS_TimeInterval = new int[] { 240, 380, 380 }; - - /** A composite that allows us to add margins for part A */ - private @Nullable TmfXYChartViewer fChartViewerA; - private @Nullable SashForm fXYViewerContainerA; - private @Nullable TmfViewer fTmfViewerA; - private @Nullable SashForm fSashFormLeftChildA; - private @Nullable SashForm fSashFormLeftChildB; - private @Nullable IContextService fContextService; - private @Nullable Action fConfigureStatisticAction; - private List fActiveContexts = new ArrayList<>(); - - /** A composite that allows us to add margins for part B */ - private @Nullable TmfXYChartViewer fChartViewerB; - private @Nullable SashForm fXYViewerContainerB; - private @Nullable TmfViewer fTmfViewerB; - private List fTraceListA = new ArrayList<>(); - private List fTraceListB = new ArrayList<>(); - private String fTraceStr = "Trace(s): ";//$NON-NLS-1$ - private String fStatisticStr = "Statistic: ";//$NON-NLS-1$ - - /** - * the title of the view - */ - @SuppressWarnings("null") - public static final String VIEW_TITLE = Messages.MultipleDensityView_title; - private ITmfTimestamp fStartTimeA = TmfTimestamp.BIG_BANG; - private ITmfTimestamp fStartTimeB = TmfTimestamp.BIG_BANG; - private ITmfTimestamp fEndTimeA = TmfTimestamp.BIG_CRUNCH; - private ITmfTimestamp fEndTimeB = TmfTimestamp.BIG_CRUNCH; - private String fStatistic = Messages.MultipleDensityView_Duration; - private JFormattedTextField ftextAFrom = new JFormattedTextField(); - private JFormattedTextField ftextBFrom = new JFormattedTextField(); - private JFormattedTextField ftextATo = new JFormattedTextField(); - private JFormattedTextField ftextBTo = new JFormattedTextField(); - private @Nullable Text ftextQuery; - private TmfTimestampFormat fFormat = new TmfTimestampFormat("yyyy-MM-dd HH:mm:ss.SSS.SSS.SSS"); //$NON-NLS-1$ - private @Nullable Listener fSashDragListener; - private SashForm fsashForm; - private static final String TMF_VIEW_UI_CONTEXT = "org.eclipse.tracecompass.tmf.ui.view.context"; //$NON-NLS-1$ - - /** - * Constructs two density charts for selecting the desired traces and time - * ranges in order to comparison - */ - public ExecutionComparisonView() { - super(); - } - - @Override - public void createPartControl(@Nullable Composite parent) { - TmfSignalManager.register(this); - - final SashForm sashForm = new SashForm(parent, SWT.VERTICAL); - fsashForm = sashForm; - sashForm.setLayout(new GridLayout(1, false)); - sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - - //// Main organization of the view. there are three main parts in the - //// view:filtering, query and differential flame graph - Composite sashFormFiltering = new Composite(sashForm, SWT.HORIZONTAL); - GridLayout layout = new GridLayout(2, false); - layout.marginHeight = layout.marginWidth = 0; - sashFormFiltering.setLayout(layout); - sashFormFiltering.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - - ////GroupA - Group groupA = new Group(sashFormFiltering, SWT.NULL); - groupA.setText(Messages.MultipleDensityView_GroupA); - GridLayout gridLayoutG = new GridLayout(); - gridLayoutG.numColumns = 1; - groupA.setLayout(gridLayoutG); - GridData gridDataG = new GridData(GridData.FILL_BOTH); - gridDataG.horizontalSpan = 1; - groupA.setLayoutData(gridDataG); - - - SashForm densityA = new SashForm(groupA, SWT.NULL); - GridData data = new GridData(SWT.FILL, SWT.TOP, true, false); - data.heightHint = 200; - densityA.setLayoutData(data); - - SashForm timeInputA = new SashForm(groupA, SWT.NULL); - timeInputA.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - ////GroupB - Group groupB = new Group(sashFormFiltering, SWT.NULL); - groupB.setText(Messages.MultipleDensityView_GroupB); - groupB.setLayout(gridLayoutG); - groupB.setLayoutData(gridDataG); - - SashForm densityB = new SashForm(groupB, SWT.NULL); - densityB.setLayoutData(data); - - SashForm timeInputB = new SashForm(groupB, SWT.NULL); - timeInputB.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); - - //// Group A time Intervals - Composite timelableA = new Composite(timeInputA, SWT.NONE); - Composite timelableAFrom = new Composite(timeInputA, SWT.EMBEDDED); - Composite timelableATo = new Composite(timeInputA, SWT.EMBEDDED); - - timeInputA.setWeights(DEFAULT_WEIGHTS_TimeInterval); - - RowLayout rowLayout = new RowLayout(); - GridLayout gridLayout = new GridLayout(); - gridLayout.numColumns = 2; - - timelableA.setLayout(gridLayout); - timelableAFrom.setLayout(rowLayout); - timelableATo.setLayout(rowLayout); - - // ButtonA - Button resetButtonA = new Button(timelableA, SWT.PUSH); - resetButtonA.setText("Reset Time IntervalA"); //$NON-NLS-1$ - resetButtonA.addListener(SWT.Selection, new Listener() - { - @Override - public void handleEvent(@Nullable Event event) { - ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); - - if (trace != null) { - //Reset tree viewer checked items. all items should be checked - List TreeCheckedElements = ((MultipleEventDensityViewer) getChartViewerA()).getWholeCheckedItems(); - setCheckedElements(getChartViewerA(),getTmfViewerA(),TreeCheckedElements,false); - - //Reset start time and end time and relating objects - fStartTimeA = trace.getStartTime(); - fEndTimeA = trace.getEndTime(); - ftextAFrom.setText(fStartTimeA.toString(fFormat)); - ftextATo.setText(fEndTimeA.toString(fFormat)); - if(ftextQuery!=null) { - ftextQuery.setText(makeQuery()); - } - - //dispatch signal to rebuild differential flame graph - TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerA(), fStartTimeA, fEndTimeA, getTrace())); - } - } - }); - - /// LableAfrom - java.awt.Frame frameAFrom = SWT_AWT.new_Frame(timelableAFrom); - java.awt.Panel panelAFrom = new java.awt.Panel(); - frameAFrom.add(panelAFrom); - - JLabel labelAFrom = new JLabel(); - labelAFrom.setText(Messages.MultipleDensityView_From); - - JFormattedTextField textAFrom = new JFormattedTextField(fFormat); - textAFrom.addFocusListener(new java.awt.event.FocusListener() { - public String oldVal = ""; //$NON-NLS-1$ - - @Override - public void focusGained( java.awt.event.@Nullable FocusEvent e) { - String aFrom = textAFrom.getText(); - if (aFrom!=null) { - oldVal = aFrom; - } - } - - @Override - public void focusLost(java.awt.event.@Nullable FocusEvent e) { - if (!oldVal.equals(textAFrom.getText())) { - long newTime = 0; - try { - newTime = fFormat.parseValue(textAFrom.getText()); - ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); - fStartTimeA = fromTime; - textAFrom.setText(fStartTimeA.toString(fFormat)); - - updateSelectedRange(); - getChartViewerA().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); - - } catch (ParseException e1) { - textAFrom.setText(oldVal); - e1.printStackTrace(); - } - } - } - }); - panelAFrom.add(labelAFrom); - panelAFrom.add(textAFrom); - ftextAFrom = textAFrom; - - //// LableATo - java.awt.Frame frameATo = SWT_AWT.new_Frame(timelableATo); - java.awt.Panel panelATo = new java.awt.Panel(); - frameATo.add(panelATo); - - JLabel labelATo = new JLabel(); - labelATo.setText(Messages.MultipleDensityView_To); - JFormattedTextField textATo = new JFormattedTextField(fFormat); - textATo.addFocusListener(new java.awt.event.FocusListener() { - public String oldVal = ""; //$NON-NLS-1$ - - @Override - public void focusGained(java.awt.event.@Nullable FocusEvent e) { - String aTo = textATo.getText(); - if (aTo!=null) { - oldVal = aTo; - } - } - - @Override - public void focusLost( java.awt.event.@Nullable FocusEvent e) { - if (!oldVal.equals(textATo.getText())) { - long newTime = 0; - try { - newTime = fFormat.parseValue(textATo.getText()); - ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); - fEndTimeA = fromTime; - textATo.setText(fEndTimeA.toString(fFormat)); - - updateSelectedRange(); - getChartViewerA().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); - - } catch (ParseException e1) { - textATo.setText(oldVal); - e1.printStackTrace(); - } - } - } - }); - - panelATo.add(labelATo); - panelATo.add(textATo); - ftextATo = textATo; - - //// Group B time Intervals - Composite timelableB = new Composite(timeInputB, SWT.FILL); - Composite timelableBFrom = new Composite(timeInputB, SWT.EMBEDDED); - Composite timelableBTo = new Composite(timeInputB, SWT.EMBEDDED); - - timeInputB.setWeights(DEFAULT_WEIGHTS_TimeInterval); - - timelableB.setLayout(gridLayout); - timelableBFrom.setLayout(rowLayout); - timelableBTo.setLayout(rowLayout); - - // Button B - Button resetButtonB = new Button(timelableB, SWT.PUSH); - resetButtonB.setText("Reset Time IntervalB"); //$NON-NLS-1$ - resetButtonB.addListener(SWT.Selection, new Listener() - { - @Override - public void handleEvent(@Nullable Event event) { - ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); - - if (trace != null) { - //Reset tree viewer checked items. all items should be checked - List TreeCheckedElements = ((MultipleEventDensityViewer) getChartViewerB()).getWholeCheckedItems(); - setCheckedElements(getChartViewerB(),getTmfViewerB(),TreeCheckedElements,false); - - //Reset start time and end time and relating objects - fStartTimeB = trace.getStartTime(); - fEndTimeB = trace.getEndTime(); - ftextBFrom.setText(fStartTimeB.toString(fFormat)); - ftextBTo.setText(fEndTimeB.toString(fFormat)); - if(ftextQuery!=null) { - ftextQuery.setText(makeQuery()); - } - - //dispatch signal to rebuild differential flame graph - TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(getChartViewerB(), fStartTimeB, fEndTimeB, getTrace())); - } - } - }); - - - /// LableBFrom - java.awt.Frame frameBFrom = SWT_AWT.new_Frame(timelableBFrom); - java.awt.Panel panelBFrom = new java.awt.Panel(); - frameBFrom.add(panelBFrom); - - JLabel labelBFrom = new JLabel(); - labelBFrom.setText(Messages.MultipleDensityView_From); - JFormattedTextField textBFrom = new JFormattedTextField(fFormat); - textBFrom.addFocusListener(new java.awt.event.FocusListener() { - public String oldVal=""; //$NON-NLS-1$ - - @Override - public void focusGained(java.awt.event.@Nullable FocusEvent e) { - String bFrom = textBFrom.getText(); - if (bFrom!=null) { - oldVal = bFrom; - } - } - - @Override - public void focusLost(java.awt.event.@Nullable FocusEvent e) { - if (!oldVal.equals(textBFrom.getText())) { - long newTime = 0; - try { - newTime = fFormat.parseValue(textBFrom.getText()); - ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); - fStartTimeB = fromTime; - textBFrom.setText(fStartTimeB.toString(fFormat)); - - updateSelectedRange(); - getChartViewerB().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeB, fEndTimeB, getTrace())); - - } catch (ParseException e1) { - textBFrom.setText(oldVal); - e1.printStackTrace(); - } - - } - } - }); - - panelBFrom.add(labelBFrom); - panelBFrom.add(textBFrom); - ftextBFrom = textBFrom; - - //// LableBTo - java.awt.Frame frameBTo = SWT_AWT.new_Frame(timelableBTo); - java.awt.Panel panelBTo = new java.awt.Panel(); - frameBTo.add(panelBTo); - - JLabel labelBTo = new JLabel(); - labelBTo.setText(Messages.MultipleDensityView_To); - JFormattedTextField textBTo = new JFormattedTextField(fFormat); - textBTo.addFocusListener(new java.awt.event.FocusListener() { - public @Nullable String oldVal = null; - - @SuppressWarnings("null") - @Override - public void focusGained(java.awt.event.FocusEvent e) { - oldVal = textBTo.getText(); - } - - @SuppressWarnings("null") - @Override - public void focusLost(java.awt.event.FocusEvent e) { - if (!oldVal.equals(textBTo.getText())) { - long newTime = 0; - try { - newTime = fFormat.parseValue(textBTo.getText()); - ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); - fEndTimeB = fromTime; - textBTo.setText(fEndTimeB.toString(fFormat)); - updateSelectedRange(); - getChartViewerB().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); - - } catch (ParseException e1) { - textBTo.setText(oldVal); - e1.printStackTrace(); - } - } - } - }); - - panelBTo.add(labelBTo); - panelBTo.add(textBTo); - ftextBTo = textBTo; - - setSashFormLeftChildA(new SashForm(densityA, SWT.None)); - - setTmfViewerA(createLeftChildViewer(getSashFormLeftChildA())); - - SashForm xYViewerContainerA = new SashForm(densityA, SWT.None); - fXYViewerContainerA = xYViewerContainerA; - xYViewerContainerA.setLayout(GridLayoutFactory.fillDefaults().create()); - - TmfXYChartViewer chartViewerA = createChartViewer(xYViewerContainerA); - - setChartViewerA(chartViewerA); - - chartViewerA.getControl().addPaintListener(new PaintListener() { - @Override - public void paintControl(@Nullable PaintEvent e) { - // Sashes in a SashForm are being created on layout so add the - // drag listener here - Listener sashDragListener = fSashDragListener; - if (sashDragListener == null) { - for (Control control : getSashFormLeftChildA().getChildren()) { - if (control instanceof Sash) { - sashDragListener = event -> TmfSignalManager.dispatchSignal(new TmfTimeViewAlignmentSignal(getSashFormLeftChildA(), getTimeViewAlignmentInfo(chartViewerA, getSashFormLeftChildA()))); - fSashDragListener = sashDragListener; - control.removePaintListener(this); - control.addListener(SWT.Selection, sashDragListener); - // There should be only one sash - break; - } - - } - } - } - }); - - IStatusLineManager statusLineManager = getViewSite().getActionBars().getStatusLineManager(); - chartViewerA.setStatusLineManager(statusLineManager); - coupleSelectViewer(getTmfViewerA(), chartViewerA); - ((AbstractSelectTreeViewer2) getTmfViewerA()).addTreeListener(this); - - IWorkbenchPartSite site = getSite(); - setContextService(site.getWorkbenchWindow().getService(IContextService.class)); - - setSashFormLeftChildB(new SashForm(densityB, SWT.VERTICAL)); - setTmfViewerB(createLeftChildViewer(getSashFormLeftChildB())); - SashForm xYViewerContainerB = new SashForm(densityB, SWT.VERTICAL); - fXYViewerContainerB = xYViewerContainerB; - xYViewerContainerB.setLayout(GridLayoutFactory.fillDefaults().create()); - - TmfXYChartViewer chartViewerB = createChartViewer(xYViewerContainerB); - setChartViewerB(chartViewerB); - - chartViewerB.getControl().addPaintListener(new PaintListener() { - @Override - public void paintControl(@Nullable PaintEvent e) { - // Sashes in a SashForm are being created on layout so add the - // drag listener here - if (fSashDragListener == null) { - for (Control control : getSashFormLeftChildB().getChildren()) { - Objects.requireNonNull(getSashFormLeftChildB()); - - fSashDragListener = event -> TmfSignalManager.dispatchSignal(new TmfTimeViewAlignmentSignal(getSashFormLeftChildB(), getTimeViewAlignmentInfo(chartViewerB, getSashFormLeftChildB()))); - control.removePaintListener(this); - control.addListener(SWT.Selection, fSashDragListener); - // There should be only one sash - break; - } - } - } - }); - - chartViewerB.setStatusLineManager(statusLineManager); - coupleSelectViewer(getTmfViewerB(), chartViewerB); - ((AbstractSelectTreeViewer2) getTmfViewerB()).addTreeListener(this); - - IMenuManager menuManager = getViewSite().getActionBars().getMenuManager(); - - IAction AggregatedAction = fConfigureStatisticAction; - if (AggregatedAction == null) { - AggregatedAction = getAggregateByAction(); - fConfigureStatisticAction = (Action) AggregatedAction; - } - menuManager.add(new Separator()); - menuManager.add(AggregatedAction); - menuManager.add(new Separator()); - - densityA.setWeights(DEFAULT_WEIGHTS_FILTERING_H); - densityB.setWeights(DEFAULT_WEIGHTS_FILTERING_H); - - Group groupQuery = new Group(sashForm, SWT.NULL); - groupQuery.setText(Messages.MultipleDensityView_QueryGroup); - gridLayoutG = new GridLayout(); - gridLayoutG.numColumns = 1; - groupQuery.setLayout(gridLayoutG); - gridDataG = new GridData(GridData.FILL_BOTH); - gridDataG.horizontalSpan = 1; - groupQuery.setLayoutData(gridDataG); - - ///// Organizing sashFormQuery - ExpandBar bar = new ExpandBar(groupQuery, SWT.NONE); - bar.setLayout(new GridLayout(1, false)); - GridData data2 = new GridData(); - data2.verticalAlignment = SWT.FILL; - data2.horizontalAlignment = SWT.FILL; - data2.grabExcessHorizontalSpace = true; - data2.grabExcessVerticalSpace = true; - data2.heightHint = 75; - data2.widthHint = 100; - bar.setLayoutData(data2); - - - Composite queryText = new Composite(bar, SWT.NONE); - queryText.setLayout(new GridLayout(1, false)); - queryText.setLayoutData(new GridData(SWT.FILL, SWT.FILL,true,true)); - - // Text - Text text = new Text(queryText, SWT.MULTI | SWT.BORDER ); - data.verticalAlignment = SWT.FILL; - data.horizontalAlignment = SWT.FILL; - data.grabExcessHorizontalSpace = true; - data.grabExcessVerticalSpace = true; - data.heightHint = 75; - data.widthHint = 100; - text.setLayoutData(data); - ftextQuery = text; - text.addFocusListener(new FocusListener() { - - @Override - public void focusGained(@Nullable FocusEvent e) { - // TODO Auto-generated method stub - } - - @Override - public void focusLost(@Nullable FocusEvent e) { - String query = ftextQuery.getText(); - if (query==null) - { - return; - } - boolean parsed = parseQuery(query); - if (parsed) { - ///updating blue lines in density chats - getChartViewerA().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); - getChartViewerB().selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeB, fEndTimeB, getTrace())); - - //updates checked elements in treeviewers - //treeViewerA - List TreeWholeElements = ((MultipleEventDensityViewer) getChartViewerA()).getWholeCheckedItems(); - List TreeCheckedElements = new ArrayList<>(); - - for (ITmfTreeViewerEntry trace:TreeWholeElements) { - if(fTraceListA.contains(trace.getName())) { - TreeCheckedElements.add(trace); - TreeCheckedElements.addAll(trace.getChildren()); - } - } - - setCheckedElements(getChartViewerA(),getTmfViewerA(),TreeCheckedElements,true); - //TreeVierB - TreeWholeElements = ((MultipleEventDensityViewer) getChartViewerB()).getWholeCheckedItems(); - TreeCheckedElements = new ArrayList<>(); - - for (ITmfTreeViewerEntry trace:TreeWholeElements) { - if(fTraceListB.contains(trace.getName())) { - TreeCheckedElements.add(trace); - TreeCheckedElements.addAll(trace.getChildren()); - } - } - - setCheckedElements(getChartViewerB(),getTmfViewerB(),TreeCheckedElements,true); - - TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, fStatistic, fTraceListA, fTraceListB); - TmfSignalManager.dispatchSignal(rangUpdateSignal); - buildDifferetialFlameGraph(); - } - } - }); - - ExpandItem item0 = new ExpandItem(bar, SWT.NONE,0); - item0.setText(Messages.MultipleDensityView_QueryExpandable); - item0.setHeight(150); - - item0.setControl(queryText); - item0.setExpanded(false); - - bar.setSpacing(5); - bar.addExpandListener(new ExpandListener() { - - @Override - public void itemExpanded(@Nullable ExpandEvent e) { - Display.getCurrent().asyncExec(new Runnable() { - @Override - public void run() { - queryText.pack(true); - sashForm.setWeights(DEFAULT_WEIGHTS_ShowQuery); - - } - }); - } - - @Override - public void itemCollapsed(@Nullable ExpandEvent e) { - Display.getCurrent().asyncExec(new Runnable() { - @Override - public void run() { - queryText.pack(true); - sashForm.setWeights(DEFAULT_WEIGHTS_HideQuery); - - } - }); - } - }); - - super.createPartControl(sashForm); - sashForm.setWeights(DEFAULT_WEIGHTS_HideQuery); - - ITmfTrace activetrace = TmfTraceManager.getInstance().getActiveTrace(); - if (activetrace != null) { - buildDifferetialFlameGraph(); - } - } - - /** - * /** Return the time alignment information - * - * @param chartViewer - * the event distribution viewer - * @param sashFormLeftChild - * the check box viewer - * @return the time alignment information - */ - public TmfTimeViewAlignmentInfo getTimeViewAlignmentInfo(TmfXYChartViewer chartViewer, SashForm sashFormLeftChild) { - return new TmfTimeViewAlignmentInfo(chartViewer.getControl().getShell(), sashFormLeftChild.toDisplay(0, 0), getTimeAxisOffset(chartViewer, sashFormLeftChild)); - } - - private static int getTimeAxisOffset(TmfXYChartViewer chartViewer, SashForm sashFormLeftChild) { - return sashFormLeftChild.getChildren()[0].getSize().x + sashFormLeftChild.getSashWidth() + chartViewer.getPointAreaOffset(); - } - - @Override - @TmfSignalHandler - public void traceSelected(final TmfTraceSelectedSignal signal) { - super.traceSelected(signal); - if (getTmfViewerA() instanceof TmfTimeViewer) { - ((TmfTimeViewer) getTmfViewerA()).traceSelected(signal); - } - getChartViewerA().traceSelected(signal); - - if (getTmfViewerB() instanceof TmfTimeViewer) { - ((TmfTimeViewer) getTmfViewerB()).traceSelected(signal); - } - - getChartViewerB().traceSelected(signal); - ITmfTrace trace = signal.getTrace(); - fStartTimeA = trace.getStartTime(); - fEndTimeA = trace.getEndTime(); - fStartTimeB = trace.getStartTime(); - fEndTimeB = trace.getEndTime(); - - ftextAFrom.setText(fStartTimeA.toString(fFormat)); - ftextBFrom.setText(fStartTimeB.toString(fFormat)); - ftextATo.setText(fEndTimeA.toString(fFormat)); - ftextBTo.setText(fEndTimeB.toString(fFormat)); - - TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, fStatistic, fTraceListA, fTraceListB); - TmfSignalManager.dispatchSignal(rangUpdateSignal); - if(ftextQuery!=null) { - ftextQuery.setText(makeQuery()); - } - buildDifferetialFlameGraph(); - } - - private Action createStatisticAction(String name) { - return new Action(name, IAction.AS_RADIO_BUTTON) { - @Override - public void run() { - ITmfTrace trace = getTrace(); - if (trace == null) { - return; - } - fStatistic = name; - System.out.println(name+"\n"); - TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStatistic, null, null); - TmfSignalManager.dispatchSignal(rangUpdateSignal); - if (ftextQuery!=null) { - ftextQuery.setText(makeQuery()); - } - buildDifferetialFlameGraph(); - } - }; - } - - /** - * @param signal - * the trace open signal - */ - @TmfSignalHandler - public void traceOpened(TmfTraceOpenedSignal signal) { - getChartViewerA().traceOpened(signal); - getChartViewerB().traceOpened(signal); - - } - - private void buildDifferetialFlameGraph() { - - ITmfTrace activetrace = TmfTraceManager.getInstance().getActiveTrace(); - if (activetrace != null) { - Display.getDefault().asyncExec(() -> buildFlameGraph(activetrace, null, null)); - - } - } - - /** - * create left child viewer for event density chart - * - * @param parent - * composite - * @return left chart viewer - */ - public TmfViewer createLeftChildViewer(Composite parent) { - EventDensityTreeViewer histogramTreeViewer = new EventDensityTreeViewer(parent); - ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); - if (trace != null) { - histogramTreeViewer.traceSelected(new TmfTraceSelectedSignal(this, trace)); - } - return histogramTreeViewer; - } - - private TmfXYChartViewer createChartViewer(Composite parent) { - MultipleEventDensityViewer chartViewer = new MultipleEventDensityViewer(parent, new TmfXYChartSettings(null, null, null, 1)); - chartViewer.setSendTimeAlignSignals(true); - chartViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); - chartViewer.getControl().addMouseListener(new MouseAdapter() { - @Override - public void mouseDoubleClick(@Nullable MouseEvent e) { - super.mouseDoubleClick(e); - resetStartFinishTime(true, chartViewer); - } - }); - chartViewer.getControl().addFocusListener(new FocusListener() { - @Override - public void focusLost(@Nullable FocusEvent e) { - deactivateContextService(); - } - - @Override - public void focusGained(@Nullable FocusEvent e) { - activateContextService(); - } - }); - - return chartViewer; - } - - /** - * Set checked for the elements in TreeCheckedElements - * @param TreeCheckedElements - * the elements in tree that should be checked - */ - public void setCheckedElements(TmfXYChartViewer chart,TmfViewer tree,List TreeCheckedElements, Boolean queryUpdate) { - if (queryUpdate) { - ((MultipleEventDensityViewer) chart).UpdateCheckStateChangedEvent(TreeCheckedElements); - } - else { - ((MultipleEventDensityViewer) chart).handleCheckStateChangedEvent(TreeCheckedElements); - } - Object[] TreeCheckedElementsObj = new Object[TreeCheckedElements.size()]; - - TreeCheckedElements.toArray(TreeCheckedElementsObj); - ((AbstractSelectTreeViewer2) tree).getTriStateFilteredCheckboxTree().setCheckedElements(TreeCheckedElementsObj); - } - - /** - * Reset the start and end times. - * - * @param chart - * determines which chart to reset start and end times - */ - public void resetStartFinishTime(boolean notify, TmfXYChartViewer chart) { - if (notify) { - TmfWindowRangeUpdatedSignal signal = new TmfWindowRangeUpdatedSignal(this, TmfTimeRange.ETERNITY, getTrace()); - broadcast(signal); - - } - } - - private void deactivateContextService() { - getContextService().deactivateContexts(fActiveContexts); - fActiveContexts.clear(); - } - - private void activateContextService() { - if (fActiveContexts.isEmpty()) { - IContextActivation activateContext = getContextService().activateContext(TMF_VIEW_UI_CONTEXT); - Objects.requireNonNull(activateContext); - fActiveContexts.add(activateContext); - } - } - - private static void coupleSelectViewer(TmfViewer tree, TmfXYChartViewer chart) { - if (tree instanceof AbstractSelectTreeViewer2 && chart instanceof TmfFilteredXYChartViewer) { - ILegendImageProvider2 legendImageProvider = new XYChartLegendImageProvider((TmfCommonXAxisChartViewer) chart); - AbstractSelectTreeViewer2 selectTree = (AbstractSelectTreeViewer2) tree; - selectTree.addTreeListener((TmfFilteredXYChartViewer) chart); - selectTree.setLegendImageProvider(legendImageProvider); - TriStateFilteredCheckboxTree checkboxTree = selectTree.getTriStateFilteredCheckboxTree(); - checkboxTree.addPreCheckStateListener(new ManyEntriesSelectedDialogPreCheckedListener(checkboxTree)); - } - } - - - - /** - * @param signal - * TmfSelectionRangeUpdatedSignal signal raised when time ranges - * are updated - */ - @TmfSignalHandler - public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { - Object source = signal.getSource(); - if (source == getChartViewerA()) { - fStartTimeA = signal.getBeginTime(); - fEndTimeA = signal.getEndTime(); - ftextAFrom.setText(fStartTimeA.toString(fFormat)); - ftextATo.setText(fEndTimeA.toString(fFormat)); - - } else if (source == getChartViewerB()) { - fStartTimeB = signal.getBeginTime(); - fEndTimeB = signal.getEndTime(); - ftextBFrom.setText(fStartTimeB.toString(fFormat)); - ftextBTo.setText(fEndTimeB.toString(fFormat)); - } - updateSelectedRange(); - - } - - /** - * updates the filtering parameters and query and builds flamegraph - */ - public void updateSelectedRange(){ - try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MultiDensityView::SelectionRangeUpdated")) { //$NON-NLS-1$ - TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, null, null, null); - TmfSignalManager.dispatchSignal(rangUpdateSignal); - Display.getDefault().syncExec(new Runnable() { - @Override - public void run() { - if(ftextQuery!=null) { - ftextQuery.setText(makeQuery()); - } - } - }); - buildDifferetialFlameGraph(); - } - } - - /** - * @return fStatistic (Duration or Self time) which will be represented in - * the flame graph - */ - public String getStatisticType() { - return fStatistic; - - } - - private Action getAggregateByAction() { - Action configureStatisticAction = new Action(Messages.FlameGraphView_GroupByName, IAction.AS_DROP_DOWN_MENU) { - }; - configureStatisticAction.setToolTipText(Messages.FlameGraphView_StatisticTooltip); - configureStatisticAction.setMenuCreator(new IMenuCreator() { - @Nullable - Menu menu = null; - - @Override - public void dispose() { - if (menu != null) { - menu.dispose(); - menu = null; - } - } - - @Override - public @Nullable Menu getMenu(@Nullable Control parent) { - return null; - } - - @Override - public @Nullable Menu getMenu(@Nullable Menu parent) { - menu = new Menu(parent); - - Action statisticActionDur = createStatisticAction(Objects.requireNonNull(Messages.MultipleDensityView_Duration)); - new ActionContributionItem(statisticActionDur).fill(menu, -1); - - Action statisticActionSelf = createStatisticAction(Objects.requireNonNull(Messages.MultipleDensityView_SelfTime)); - new ActionContributionItem(statisticActionSelf).fill(menu, -1); - return menu; - - } - }); - - Action configureStatisticAction1 = Objects.requireNonNull(configureStatisticAction); - return configureStatisticAction1; - } - - /** - * @param signal - * the TmfCheckboxChangedSignal signal - */ - @TmfSignalHandler - public void CheckBoxUpdated(TmfCheckboxChangedSignal signal) { - try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MultiDensityView::CheckBoxUpdated")) {//$NON-NLS-1$ - TmfComparisonFilteringUpdatedSignal rangUpdateSignal = null; - - if (signal.getSource() == getChartViewerA()) { - fTraceListA.clear(); - for (String name : signal.getTraceList()) { - fTraceListA.add(name); - } - - rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, null, fTraceListA, null); - TmfSignalManager.dispatchSignal(rangUpdateSignal); - } - - if (signal.getSource() == getChartViewerB()) { - fTraceListB.clear(); - for (String name : signal.getTraceList()) { - fTraceListB.add(name); - } - - rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, null, null, fTraceListB); - TmfSignalManager.dispatchSignal(rangUpdateSignal); - - } - if(ftextQuery!=null) { - ftextQuery.setText(makeQuery()); - } - buildDifferetialFlameGraph(); - } - - } - - @Override - public void handleCheckStateChangedEvent(@SuppressWarnings("null") @Nullable Collection entries) { - // do nothing - } - - @Override - public void dispose() { - super.dispose(); - TmfSignalManager.deregister(this); - - getChartViewerA().dispose(); - getTmfViewerA().dispose(); - getChartViewerB().dispose(); - getTmfViewerB().dispose(); - - if (fXYViewerContainerA != null) { - fXYViewerContainerA.dispose(); - } - if (fXYViewerContainerB != null) { - fXYViewerContainerB.dispose(); - } - if (fContextService!=null) { - fContextService.dispose(); - } - if (fSashFormLeftChildA!=null) { - fSashFormLeftChildA.dispose(); - } - if (fSashFormLeftChildB!=null) { - fSashFormLeftChildB.dispose(); - } - if (fsashForm!=null) { - fsashForm.dispose(); - } - } - - private TmfXYChartViewer getChartViewerA() { - Objects.requireNonNull(fChartViewerA); - return fChartViewerA; - } - - private void setChartViewerA(@Nullable TmfXYChartViewer chartViewerA) { - fChartViewerA = chartViewerA; - } - - private TmfXYChartViewer getChartViewerB() { - Objects.requireNonNull(fChartViewerB); - return fChartViewerB; - } - - private void setChartViewerB(@Nullable TmfXYChartViewer chartViewerB) { - fChartViewerB = chartViewerB; - } - - private SashForm getSashFormLeftChildA() { - Objects.requireNonNull(fSashFormLeftChildA); - return fSashFormLeftChildA; - } - - private void setSashFormLeftChildA(@Nullable SashForm sashFormLeftChildA) { - fSashFormLeftChildA = sashFormLeftChildA; - } - - private SashForm getSashFormLeftChildB() { - Objects.requireNonNull(fSashFormLeftChildB); - return fSashFormLeftChildB; - } - - private void setSashFormLeftChildB(@Nullable SashForm sashFormLeftChildB) { - fSashFormLeftChildB = sashFormLeftChildB; - } - - private TmfViewer getTmfViewerA() { - Objects.requireNonNull(fTmfViewerA); - return fTmfViewerA; - } - - private void setTmfViewerA(@Nullable TmfViewer tmfViewerA) { - fTmfViewerA = tmfViewerA; - } - - private TmfViewer getTmfViewerB() { - Objects.requireNonNull(fTmfViewerB); - return fTmfViewerB; - } - - private void setTmfViewerB(@Nullable TmfViewer tmfViewerB) { - fTmfViewerB = tmfViewerB; - } - - private IContextService getContextService() { - Objects.requireNonNull(fContextService); - return fContextService; - } - - private void setContextService(@Nullable IContextService contextService) { - fContextService = contextService; - } - - @SuppressWarnings("null") - private String makeQuery() { - String query = ""; //$NON-NLS-1$ - /// Query PartA - query = query.concat(fTraceStr); - for (String trace : fTraceListA) { - if (!trace.equals("Total")) { //$NON-NLS-1$ - query = query.concat(trace); - query = query.concat(","); //$NON-NLS-1$ - } - } - query = query.concat(System.lineSeparator()); - - query = query.concat(Messages.MultipleDensityView_From); - query = query.concat(fStartTimeA.toString(fFormat)); - query = query.concat(System.lineSeparator()); - - query = query.concat(Messages.MultipleDensityView_To); - query = query.concat(fEndTimeA.toString(fFormat)); - query = query.concat(System.lineSeparator()); - - query = query.concat(Messages.MultipleDensityView_QueryCompare); - query = query.concat(System.lineSeparator()); - - /// Query PartB - query = query.concat(fTraceStr); - for (String trace : fTraceListB) { - if (!trace.equals("Total")) { //$NON-NLS-1$ - query = query.concat(trace); - query = query.concat(","); //$NON-NLS-1$ - } - } - query = query.concat(System.lineSeparator()); - - query = query.concat(Messages.MultipleDensityView_From); - query = query.concat(fStartTimeB.toString(fFormat)); - query = query.concat(System.lineSeparator()); - - query = query.concat(Messages.MultipleDensityView_To); - query = query.concat(fEndTimeB.toString(fFormat)); - query = query.concat(System.lineSeparator()); - - //// Query Statistic Part - query = query.concat(fStatisticStr); - query = query.concat(fStatistic); - - return query; - } - - @SuppressWarnings("null") - boolean parseQuery(String query) { - try { - String[] parts = query.split(System.lineSeparator()); - // Times - - if (parts[1].indexOf(Messages.MultipleDensityView_From) == -1) { - return false; - } - String fromStrA = parts[1].substring(parts[1].indexOf(Messages.MultipleDensityView_From) + Messages.MultipleDensityView_From.length(), parts[1].length()); - fStartTimeA = TmfTimestamp.fromNanos(fFormat.parseValue(fromStrA)); - - if (parts[2].indexOf(Messages.MultipleDensityView_To) == -1) { - return false; - } - String toStrA = parts[2].substring(parts[2].indexOf(Messages.MultipleDensityView_To) + Messages.MultipleDensityView_To.length(), parts[2].length()); - fEndTimeA = TmfTimestamp.fromNanos(fFormat.parseValue(toStrA)); - - if (parts[5].indexOf(Messages.MultipleDensityView_From) == -1) { - return false; - } - String fromStrB = parts[5].substring(parts[5].indexOf(Messages.MultipleDensityView_From) + Messages.MultipleDensityView_From.length(), parts[5].length()); - fStartTimeB = TmfTimestamp.fromNanos(fFormat.parseValue(fromStrB)); - - if (parts[6].indexOf(Messages.MultipleDensityView_To) == -1) { - return false; - } - String toStrB = parts[6].substring(parts[6].indexOf(Messages.MultipleDensityView_To) + Messages.MultipleDensityView_To.length(), parts[6].length()); - fEndTimeB = TmfTimestamp.fromNanos(fFormat.parseValue(toStrB)); - - // traceListA - fTraceListA.clear(); - - if (parts[0].indexOf(fTraceStr) == -1) { - return false; - } - String traceStrtA = parts[0].substring(parts[0].indexOf(fTraceStr) + fTraceStr.length(), parts[0].length()); - String[] traces = traceStrtA.split(","); //$NON-NLS-1$ - - for (String trace : traces) { - fTraceListA.add(trace); - } - - // traceListB - fTraceListB.clear(); - String traceStrtB = parts[4].substring(parts[4].indexOf(fTraceStr) + fTraceStr.length(), parts[4].length()); - String[] tracesB = traceStrtB.split(","); //$NON-NLS-1$ - - for (String trace : tracesB) { - fTraceListB.add(trace); - } - //// Statistic - fStatistic = parts[7].substring(parts[7].indexOf(fStatisticStr) + fStatisticStr.length(), parts[7].length()); - - //Set time range related objects - ftextAFrom.setText(fStartTimeA.toString(fFormat)); - ftextATo.setText(fEndTimeA.toString(fFormat)); - - ftextBFrom.setText(fStartTimeB.toString(fFormat)); - ftextBTo.setText(fEndTimeB.toString(fFormat)); - - - } catch (ParseException e) { - // TODO Auto-generated catch block - System.out.println("query format is incorrect " + e.toString()); //$NON-NLS-1$ - e.printStackTrace(); - return false; - } - return true; - } -} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/MultipleEventDensityViewer.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/MultipleEventDensityViewer.java deleted file mode 100644 index 83878cf99..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/MultipleEventDensityViewer.java +++ /dev/null @@ -1,135 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal - * - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License 2.0 which - * accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -package org.eclipse.tracecompass.incubator.internal.executioncomparison.ui; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.eclipse.jdt.annotation.Nullable; -import org.eclipse.swt.widgets.Composite; -import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.TmfCheckboxChangedSignal; -import org.eclipse.tracecompass.internal.tmf.ui.viewers.eventdensity.EventDensityViewer; -import org.eclipse.tracecompass.tmf.core.model.tree.TmfTreeDataModel; -import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; -import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; -import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; -import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; -import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; -import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; -import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager; -import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeViewerEntry; -import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfGenericTreeEntry; -import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfXYChartSettings; - -/** - * MultipleEventDensityViewer extends EventDensityViewer to override handleCheckStateChangedEvent and reflect - * changes to differential flame graph - * @author Fateme Faraji Daneshgar - - */ -@SuppressWarnings("restriction") -public class MultipleEventDensityViewer extends EventDensityViewer { - List fWholeTraceList = new ArrayList<>(); - - /** - * @param parent - * Composite - * @param settings - * ChartSetting - */ - public MultipleEventDensityViewer(Composite parent, TmfXYChartSettings settings) { - super(parent, settings); - } - - @Override - @TmfSignalHandler - public void selectionRangeUpdated(@Nullable TmfSelectionRangeUpdatedSignal signal) { - if (signal == null) { - return; - } - - if (!(signal.getSource() instanceof MultipleEventDensityViewer)) { - final ITmfTrace trace = getTrace(); - if (trace != null) { - ITmfTimestamp selectedTime = signal.getBeginTime(); - ITmfTimestamp selectedEndTime = signal.getEndTime(); - TmfTraceManager.getInstance().updateTraceContext(trace, - builder -> builder.setSelection(new TmfTimeRange(selectedTime, selectedEndTime))); - - } - super.selectionRangeUpdated(signal); - } - if (signal.getSource()==this) { - final ITmfTrace trace = getTrace(); - if (trace != null) { - long selectedTime = signal.getBeginTime().toNanos(); - long selectedEndTime = signal.getEndTime().toNanos(); - setSelectionRange(selectedTime, selectedEndTime); - } - } - } - /** - * handles check state of tree viewer and keeps the list of whole trace list - * and dispatch TmfCheckboxChangedSignal signal to update the differential flame graph - * @param entries - * list of entries that should be checked - */ - - @SuppressWarnings("unchecked") - @Override - public void handleCheckStateChangedEvent(Collection entries) { - super.handleCheckStateChangedEvent(entries); - updateTraceList(entries); - List traceNames = new ArrayList<>(); - for (ITmfTreeViewerEntry entry : entries) { - if (entry instanceof TmfGenericTreeEntry) { - TmfGenericTreeEntry genericEntry = (TmfGenericTreeEntry) entry; - String name = genericEntry.getModel().getName(); - traceNames.add(name); - } - } - TmfSignalManager.dispatchSignal(new TmfCheckboxChangedSignal(this, traceNames)); - } - /* - * Keeps fWholeTraceList updated to include all entries for experiment. it will be used when - * checkedboxtree is reset. - */ - private void updateTraceList(Collection entries) { - for(ITmfTreeViewerEntry entry:entries) { - if (!fWholeTraceList.contains(entry)) { - fWholeTraceList.add(entry); - } - } - - } - - - /** - * get WholeCheckedItems which is the checked item in the tree viewer - * @return - * fWholeTraceList list of checked Items in tree viewer - */ - public List getWholeCheckedItems(){ - return fWholeTraceList; - } - - /** - * just handles check state of the treeviewer, used in updating tree viewers with query updating - * @param entries - * list of entries that should be checked - */ - public void UpdateCheckStateChangedEvent(Collection entries) { - super.handleCheckStateChangedEvent(entries); - } - -} \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties deleted file mode 100644 index 1f655408f..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties +++ /dev/null @@ -1,23 +0,0 @@ -############################################################################### - # Copyright (c) 2024 École Polytechnique de Montréal - # - # All rights reserved. This program and the accompanying materials are - # made available under the terms of the Eclipse Public License 2.0 which - # accompanies this distribution, and is available at - # https://www.eclipse.org/legal/epl-2.0/ - # - # SPDX-License-Identifier: EPL-2.0 -############################################################################### -MultipleDensityView_GroupA=GroupA -MultipleDensityView_GroupB=GroupB -MultipleDensityView_QueryGroup = Filtering Query -MultipleDensityView_QueryCompare=Compare to: -MultipleDensityView_From = From: -MultipleDensityView_To=To: -MultipleDensityView_Duration=Duration -MultipleDensityView_SelfTime=Self Time -MultipleDensityView_title=Execution Comparison -FlameGraphView_RetrievingData=Retrieving Flame Graph Data -FlameGraphView_GroupByName=Group by Descriptor -FlameGraphView_StatisticTooltip=Select the statistic to represent -MultipleDensityView_QueryExpandable=Get filtering query \ No newline at end of file diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/package-info.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/package-info.java deleted file mode 100644 index 6d35069a7..000000000 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/package-info.java +++ /dev/null @@ -1,15 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal - * - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License 2.0 which - * accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ - * - * SPDX-License-Identifier: EPL-2.0 - *******************************************************************************/ - -@org.eclipse.jdt.annotation.NonNullByDefault -package org.eclipse.tracecompass.incubator.internal.executioncomparison.ui; - - diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.classpath b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.classpath similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.classpath rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.classpath diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.gitignore b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.gitignore similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.gitignore rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.gitignore diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.project similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.project rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.project diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.resources.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.resources.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.settings/org.eclipse.core.resources.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.runtime.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.settings/org.eclipse.core.runtime.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.core.runtime.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.settings/org.eclipse.core.runtime.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.core.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.core.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.settings/org.eclipse.jdt.core.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.ui.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.jdt.ui.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.settings/org.eclipse.jdt.ui.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.pde.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.settings/org.eclipse.pde.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/.settings/org.eclipse.pde.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/.settings/org.eclipse.pde.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/META-INF/MANIFEST.MF similarity index 89% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/META-INF/MANIFEST.MF index af7ba2828..afc19b062 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/META-INF/MANIFEST.MF +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/META-INF/MANIFEST.MF @@ -5,7 +5,7 @@ Bundle-Vendor: %Bundle-Vendor Bundle-SymbolicName: org.eclipse.tracecompass.incubator.executioncomparison.core.tests Bundle-Version: 0.1.0.qualifier Bundle-Localization: plugin -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.resources, org.eclipse.tracecompass.common.core, @@ -13,4 +13,4 @@ Require-Bundle: org.eclipse.core.runtime, org.junit, org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional Export-Package: org.eclipse.tracecompass.incubator.executioncomparison.core.tests -Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparision.core.tests +Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparison.core.tests diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/about.html b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/about.html similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/about.html rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/about.html diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/build.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/build.properties similarity index 91% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/build.properties rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/build.properties index fc2472710..2728cc2dd 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/build.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022 École Polytechnique de Montréal +# Copyright (c) 2024 École Polytechnique de Montréal # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/plugin.properties similarity index 78% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.properties rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/plugin.properties index 34e0fb51c..dc5ff561b 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/plugin.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/plugin.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022 École Polytechnique de Montréal +# Copyright (c) 2024 École Polytechnique de Montréal # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -10,4 +10,4 @@ ############################################################################### Bundle-Vendor = Eclipse Trace Compass Incubator -Bundle-Name = Trace Compass ExecutionComparision Core Plug-in (Incubator) +Bundle-Name = Trace Compass Incubator ExecutionComparison Core Tests Plug-in diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparison/core/tests/ActivatorTest.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparison/core/tests/ActivatorTest.java similarity index 98% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparison/core/tests/ActivatorTest.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparison/core/tests/ActivatorTest.java index cfd2bb50e..ff543e81c 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparison/core/tests/ActivatorTest.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core.tests/src/org/eclipse/tracecompass/incubator/executioncomparison/core/tests/ActivatorTest.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -119,4 +119,3 @@ public static IPath getAbsoluteFilePath(String relativePath) { } } - diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.classpath b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.classpath similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.classpath rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.classpath diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.gitignore b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.gitignore similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.gitignore rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.gitignore diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.project similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.project rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.project diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.resources.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.resources.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.core.resources.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.runtime.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.core.runtime.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.core.runtime.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.core.runtime.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.core.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.core.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.jdt.core.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.ui.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.jdt.ui.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.jdt.ui.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.api.tools.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.pde.api.tools.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.api.tools.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.pde.api.tools.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.pde.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/.settings/org.eclipse.pde.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/.settings/org.eclipse.pde.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/META-INF/MANIFEST.MF similarity index 97% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/META-INF/MANIFEST.MF index 6ec21734e..a568168a3 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/META-INF/MANIFEST.MF +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/META-INF/MANIFEST.MF @@ -7,7 +7,7 @@ Bundle-Version: 0.1.0.qualifier Bundle-Localization: plugin Bundle-Activator: org.eclipse.tracecompass.incubator.internal.executioncomparison.core.Activator Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.resources, org.eclipse.tracecompass.common.core, diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/about.html b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/about.html similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/about.html rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/about.html diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/build.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/build.properties similarity index 91% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/build.properties rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/build.properties index 21645b6d6..ae7c9d8b8 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/build.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022 École Polytechnique de Montréal +# Copyright (c) 2024 École Polytechnique de Montréal # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/plugin.properties similarity index 79% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.properties rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/plugin.properties index 096c865e8..03ba2b45e 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/plugin.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/plugin.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022 École Polytechnique de Montréal +# Copyright (c) 2024 École Polytechnique de Montréal # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -10,5 +10,4 @@ ############################################################################### Bundle-Vendor = Eclipse Trace Compass Incubator -Bundle-Name = Trace Compass ExecutionComparision UI Plug-in (Incubator) - +Bundle-Name = Trace Compass ExecutionComparison Core Plug-in (Incubator) diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/plugin.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/plugin.xml new file mode 100644 index 000000000..e52f920a2 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/plugin.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/Activator.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/Activator.java similarity index 87% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/Activator.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/Activator.java index 64c8a0bcc..fd383d292 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/Activator.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/Activator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -14,7 +14,9 @@ import org.eclipse.tracecompass.common.core.TraceCompassActivator; /** - * Activator + * Plug-in activator + * + * @author Fateme Faraji Daneshgar and Vlad Arama */ public class Activator extends TraceCompassActivator { @@ -39,11 +41,12 @@ public static TraceCompassActivator getInstance() { @Override protected void startActions() { + // Do nothing } @Override protected void stopActions() { + // Do nothing } } - diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialCallGraphProvider.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialCallGraphProvider.java similarity index 84% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialCallGraphProvider.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialCallGraphProvider.java index 4672a2541..375357921 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialCallGraphProvider.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialCallGraphProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -11,6 +11,7 @@ package org.eclipse.tracecompass.incubator.internal.executioncomparison.core; +import java.util.ArrayList; import java.util.Collection; import org.eclipse.tracecompass.analysis.profiling.core.callgraph.AggregatedCallSite; @@ -25,9 +26,10 @@ import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeSet; /** - * DifferentialCallGraphProvider which provide a callgraphProvider. Inherited from DifferentialWeightedTreeProvider - * to edit naming and color ICallGraphProviderpalette to provide a differential flame graph - * @author Fateme Faraji Daneshgar + * DifferentialCallGraphProvider provides a callgraphProvider. It is inherited + * from DifferentialWeightedTreeProvider to edit the naming and color. + * + * @author Fateme Faraji Daneshgar and Vlad Arama */ public class DifferentialCallGraphProvider extends DifferentialWeightedTreeProvider { @@ -39,7 +41,7 @@ public class DifferentialCallGraphProvider extends DifferentialWeightedTreeProvi * @param instrumentedCallStackAnalysis * the original tree * @param trees - * the other trees to compare + * the other trees to compare to */ public DifferentialCallGraphProvider(IWeightedTreeProvider instrumentedCallStackAnalysis, Collection> trees) { @@ -55,11 +57,10 @@ public DifferentialCallGraphProvider(IWeightedTreeProvider> originalTree, DifferentialWeightedTreeSet treeSet) { - super((IWeightedTreeProvider>)originalTree, treeSet); + super((IWeightedTreeProvider>) originalTree, treeSet); fOriginalTree = (ICallGraphProvider2) originalTree; } @@ -68,7 +69,6 @@ public IDataPalette getPalette() { return DifferentialFlamePalette.getInstance(); } - @SuppressWarnings("null") @Override public String toDisplayString(DifferentialWeightedTree tree) { double difference = tree.getDifference(); @@ -76,15 +76,13 @@ public String toDisplayString(DifferentialWeightedTree tree) { String label = ""; //$NON-NLS-1$ if (originalTree instanceof AggregatedCallSite) { label = fOriginalTree.toDisplayString((AggregatedCallSite) originalTree); - } - else { - label = String.valueOf(originalTree.getObject().resolve(null)); + } else { + label = String.valueOf(originalTree.getObject().resolve(new ArrayList<>())); } if (Double.isFinite(difference)) { - return String.format("(%#.02f %% ) %s", difference * 100, label); //$NON-NLS-1$ + return String.format("(%#+.02f %% ) %s", difference * 100, label); //$NON-NLS-1$ } return label; - } -} \ No newline at end of file +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialFlamePalette.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialFlamePalette.java similarity index 93% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialFlamePalette.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialFlamePalette.java index b1f8871a8..f5da804be 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialFlamePalette.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialFlamePalette.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -29,14 +29,15 @@ import com.google.common.collect.ImmutableMap; /** - * Class to manage the colors of the differential flame graph views + * Manages the colors of the differential flame graph view * - * @author Fateme Faraji Daneshgar + * @author Fateme Faraji Daneshgar and Vlad Arama */ public final class DifferentialFlamePalette implements IDataPalette { private static final String NAN = Objects.requireNonNull(Objects.toString(Double.NaN)); private static final String NO_DIFFERENCE = "NO-Difference"; //$NON-NLS-1$ + private static String generateRed(int i) { return "RED" + i; //$NON-NLS-1$ } @@ -55,11 +56,12 @@ private static String generateBlue(int i) { private static final String RED_COLOR = Objects.requireNonNull(X11ColorUtils.toHexColor(255, 0, 0)); private static final String WHITE_COLOR = Objects.requireNonNull(X11ColorUtils.toHexColor(255, 255, 255)); - private static final Map STYLES; // Map of styles with the parent private static final Map STYLE_MAP = Collections.synchronizedMap(new HashMap<>()); + private static @Nullable DifferentialFlamePalette fInstance = null; + static { IPaletteProvider palette = new RotatingPaletteProvider.Builder().setNbColors(NUM_COLORS).build(); int i = 0; @@ -72,7 +74,7 @@ private static String generateBlue(int i) { StyleProperties.BORDER_STYLE, StyleProperties.BorderStyle.SOLID))); i++; } - int j=0; + int j = 0; // Add dark red color for Nan builder.put(NAN, new OutputElementStyle(null, ImmutableMap.of( StyleProperties.STYLE_NAME, NAN, @@ -88,7 +90,7 @@ private static String generateBlue(int i) { StyleProperties.BORDER_STYLE, StyleProperties.BorderStyle.SOLID))); // Add Blue color palette for Shorter duration for (i = MIN_HUE; i <= MAX_HUE; i++) { - j = (i-50)>0 ? i-50:0; + j = (i - 50) > 0 ? i - 50 : 0; String blueKey = generateBlue(i); builder.put(blueKey, new OutputElementStyle(null, ImmutableMap.of( StyleProperties.STYLE_NAME, blueKey, @@ -109,9 +111,6 @@ private static String generateBlue(int i) { STYLE_MAP.putAll(STYLES); } - - private static @Nullable DifferentialFlamePalette fInstance = null; - private DifferentialFlamePalette() { // Do nothing } @@ -153,11 +152,11 @@ public OutputElementStyle getStyleFor(Object object) { if (object instanceof DifferentialWeightedTree) { DifferentialWeightedTree tree = (DifferentialWeightedTree) object; double difference = tree.getDifference(); - double step = MAX_HUE - MIN_HUE; + double step = (double) MAX_HUE - (double) MIN_HUE; if (Double.isNaN(difference)) { return STYLE_MAP.computeIfAbsent(NAN, OutputElementStyle::new); } - if ((difference <= 0.05) &&(difference >= -0.05)) { + if ((difference <= 0.05) && (difference >= -0.05)) { return STYLE_MAP.computeIfAbsent(NO_DIFFERENCE, OutputElementStyle::new); } if (difference < 0) { @@ -175,10 +174,13 @@ public OutputElementStyle getStyleFor(Object object) { } /** - * @param min the minimum threshold for coloring. + * Sets the minimum threshold for coloring + * + * @param min + * the minimum threshold for coloring. */ public static void setMinThreshold(double min) { fMinThreshold = Math.round(min); } -} \ No newline at end of file +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialSeqCallGraphAnalysis.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialSeqCallGraphAnalysis.java similarity index 67% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialSeqCallGraphAnalysis.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialSeqCallGraphAnalysis.java index c25fb115d..40e73283c 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialSeqCallGraphAnalysis.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/DifferentialSeqCallGraphAnalysis.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -17,12 +17,12 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Objects; import java.util.logging.Level; import java.util.logging.Logger; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.jdt.annotation.NonNull; @@ -35,17 +35,16 @@ import org.eclipse.tracecompass.analysis.profiling.core.instrumented.InstrumentedCallStackAnalysis; import org.eclipse.tracecompass.analysis.profiling.core.tree.ITree; import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeProvider; -import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeSet; import org.eclipse.tracecompass.analysis.profiling.core.tree.WeightedTree; import org.eclipse.tracecompass.analysis.profiling.core.tree.WeightedTreeSet; import org.eclipse.tracecompass.common.core.log.TraceCompassLog; import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.ScopeLog; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTree; import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; -import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeSet; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.WeightedTreeUtils; import org.eclipse.tracecompass.internal.analysis.profiling.core.callgraph2.AggregatedCalledFunction; +import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule; import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule; -import org.eclipse.tracecompass.tmf.core.exceptions.TmfAnalysisException; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; @@ -58,11 +57,10 @@ import com.google.common.collect.Iterables; /** - * build a differential call graph using the differentialWeightedTreeSet from + * Builds a differential call graph using the differentialWeightedTreeSet from * two sets of call graphs. * - * - * @author Fateme Faraji Daneshgar + * @author Fateme Faraji Daneshgar and Vlad Arama */ @SuppressWarnings("restriction") public class DifferentialSeqCallGraphAnalysis extends TmfAbstractAnalysisModule { @@ -72,11 +70,11 @@ public class DifferentialSeqCallGraphAnalysis extends TmfAbstractAnalysisModule */ public static final String ID = "org.eclipse.tracecompass.incubator.executioncomparison.diffcallgraph"; //$NON-NLS-1$ private static final Logger LOGGER = TraceCompassLog.getLogger(DifferentialSeqCallGraphAnalysis.class); - private static final String MERGE = "Merge"; //$NON-NLS-1$ - private @Nullable DifferentialCallGraphProvider fDifferentialCallGraphProvider; - private static Map fcallStackAnalysisMap = new HashMap<>(); + private static Map fCallStackAnalysisMap = new HashMap<>(); private static Map fTraceCallGraphRegistry = new HashMap<>(); + + private @Nullable DifferentialCallGraphProvider fDifferentialCallGraphProvider; private ITmfTimestamp fStartA = TmfTimestamp.BIG_BANG; private ITmfTimestamp fEndA = TmfTimestamp.BIG_CRUNCH; private ITmfTimestamp fStartB = TmfTimestamp.BIG_BANG; @@ -92,8 +90,8 @@ public class DifferentialSeqCallGraphAnalysis extends TmfAbstractAnalysisModule public DifferentialSeqCallGraphAnalysis() { super(); // TODO: Make a way to register tracetype->callstack IDs. - fcallStackAnalysisMap.put("org.eclipse.tracecompass.incubator.traceevent.core.trace", "org.eclipse.tracecompass.incubator.traceevent.analysis.callstack"); //$NON-NLS-1$ //$NON-NLS-2$ - fcallStackAnalysisMap.put("org.eclipse.linuxtools.lttng2.ust.tracetype", "org.eclipse.tracecompass.lttng2.ust.core.analysis.callstack"); //$NON-NLS-1$ //$NON-NLS-2$ + fCallStackAnalysisMap.put("org.eclipse.tracecompass.incubator.traceevent.core.trace", "org.eclipse.tracecompass.incubator.traceevent.analysis.callstack"); //$NON-NLS-1$ //$NON-NLS-2$ + fCallStackAnalysisMap.put("org.eclipse.linuxtools.lttng2.ust.tracetype", "org.eclipse.tracecompass.lttng2.ust.core.analysis.callstack"); //$NON-NLS-1$ //$NON-NLS-2$ } /** @@ -101,8 +99,9 @@ public DifferentialSeqCallGraphAnalysis() { * * @param monitor * the progress monitor + * @return the differential call graph provider */ - public void refreshDiffCG(@Nullable IProgressMonitor monitor) { + public DifferentialCallGraphProvider refreshDiffCG(@Nullable IProgressMonitor monitor) { try (ScopeLog sl = new ScopeLog(LOGGER, Level.CONFIG, "DifferentialSequenceCGA::refresh()")) { //$NON-NLS-1$ Collection> originalTree = new ArrayList<>(); Collection> diffTree = new ArrayList<>(); @@ -119,18 +118,19 @@ public void refreshDiffCG(@Nullable IProgressMonitor monitor) { } Collection> trees; - trees = ParametricWeightedTreeUtils.diffTrees(originalTree, diffTree, fStatistic); + trees = WeightedTreeUtils.diffTrees(originalTree, diffTree, fStatistic); IWeightedTreeProvider instrumentedCallStackAnalysis = Iterables.get(fTraceCallGraphRegistry.values(), 0); - setDifferentialCallGraphProvider(new DifferentialCallGraphProvider(instrumentedCallStackAnalysis, trees)); + fDifferentialCallGraphProvider = new DifferentialCallGraphProvider(instrumentedCallStackAnalysis, trees); + return fDifferentialCallGraphProvider; } } /** - * Merge callgraph + * Merges call graph * * @param start - * the start time + * the start time stamp * @param end * the end time stamp * @param traceList @@ -139,28 +139,11 @@ public void refreshDiffCG(@Nullable IProgressMonitor monitor) { * */ public WeightedTreeSet mergeCallGraph(ITmfTimestamp start, ITmfTimestamp end, List traceList) { - try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "DifferenentialSequenceCGA::MergeCallGraph")) { //$NON-NLS-1$ - List cGList = new ArrayList<>(); + try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "DifferentialSequenceCGA::MergeCallGraph")) { //$NON-NLS-1$ WeightedTreeSet newTreeSet = new WeightedTreeSet<>(); String mainGroup = MERGE; - for (String traceName : traceList) { - ICallGraphProvider2 instrumentedCallStackAnalysis = fTraceCallGraphRegistry.get(traceName); - if (instrumentedCallStackAnalysis != null) { - ITmfTrace trace = getTrace(traceName); - ITmfTimestamp traceStart = start; - ITmfTimestamp traceEnd = end; - - if (traceStart.getValue()< trace.getStartTime().getValue()) { - traceStart = trace.getStartTime(); - } - if (traceEnd.getValue()> trace.getEndTime().getValue()) { - traceEnd = trace.getEndTime(); - } - cGList.add(instrumentedCallStackAnalysis.getCallGraph(traceStart, traceEnd)); - - } - } + List cGList = addToCallGraph(start, end, traceList); for (CallGraph callGraph : cGList) { Collection elements = getLeafElements(callGraph); @@ -173,26 +156,48 @@ public WeightedTreeSet mergeCallGraph(ITmfTimestamp st } /** - * get CallGraph + * Helper function that adds the call graphs for the specified time range + * and trace list to the call graph list. * - * @return DifferentialCallGraph + * @param start + * the start time of the time range + * @param end + * the end time of the time range + * @param traceList + * the list of trace names + * @return the list of call graphs */ - public IWeightedTreeSet> getCallGraph() { - DifferentialCallGraphProvider differentialCallGraphProvider = getDifferentialCallGraphProvider(); - if (differentialCallGraphProvider != null) { - return differentialCallGraphProvider.getTreeSet(); + private static List addToCallGraph(ITmfTimestamp start, ITmfTimestamp end, List traceList) { + List cGList = new ArrayList<>(); + for (String traceName : traceList) { + ICallGraphProvider2 instrumentedCallStackAnalysis = fTraceCallGraphRegistry.get(traceName); + if (instrumentedCallStackAnalysis != null) { + ITmfTrace trace = getTrace(traceName); + if (trace != null) { + ITmfTimestamp traceStart = start; + ITmfTimestamp traceEnd = end; + + if (traceStart.getValue() < trace.getStartTime().getValue()) { + traceStart = trace.getStartTime(); + } + if (traceEnd.getValue() > trace.getEndTime().getValue()) { + traceEnd = trace.getEndTime(); + } + cGList.add(instrumentedCallStackAnalysis.getCallGraph(traceStart, traceEnd)); + } + } } - return new DifferentialWeightedTreeSet<>(); + return cGList; } /** - * Get the differential weighted tree provider + * Gets the differential weighted tree provider * * @param monitor - * the monitor, can be null + * the progress monitor, can be null * @return the differential weighted provider or null */ - public @Nullable DifferentialWeightedTreeProvider getDiffProvider(@Nullable IProgressMonitor monitor) { + public @Nullable DifferentialWeightedTreeProvider getDifferentialTreeProvider(IProgressMonitor monitor) { if (fTraceCallGraphRegistry.isEmpty()) { InstrumentedCallStackAnalysis callGraphModule; ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); @@ -200,11 +205,16 @@ public IWeightedTreeSet modules = TmfTraceUtils.getAnalysisModulesOfClass(traceMember, InstrumentedCallStackAnalysis.class); for (InstrumentedCallStackAnalysis module : modules) { - if (module.getId().equals(fcallStackAnalysisMap.get(traceMember.getTraceTypeId()))) { + if (module.getId().equals(fCallStackAnalysisMap.get(traceMember.getTraceTypeId()))) { callGraphModule = module; callGraphModule.schedule(); fTraceCallGraphRegistry.put(String.valueOf(traceMember.getName()), callGraphModule); - callGraphModule.waitForCompletion(); + while (!callGraphModule.waitForCompletion()) { + if (monitor.isCanceled()) { + callGraphModule.cancel(); + return null; + } + } break; } } @@ -212,25 +222,7 @@ public IWeightedTreeSet getLeafElement(ICallStackElement group) { } private static void recurseAddElementData(ICallStackElement element, String group, CallGraph callGraph, WeightedTreeSet newTreeSet) { - // Add the current level of trees to the new tree set for (AggregatedCallSite tree : callGraph.getCallingContextTree(element)) { newTreeSet.addWeightedTree(group, tree.copyOf()); @@ -271,22 +262,51 @@ private static void recurseAddElementData(ICallStackElement element, String grou } @Override - protected boolean executeAnalysis(IProgressMonitor monitor) throws TmfAnalysisException { + protected boolean executeAnalysis(IProgressMonitor monitor) { + synchronized (this) { + if (fDiffJob != null) { + fDiffJob.cancel(); + } + fDiffJob = new Job("Make differential Callgraph") { //$NON-NLS-1$ + @Override + protected IStatus run(@Nullable IProgressMonitor progressMonitor) { + refreshDiffCG(progressMonitor); + if (progressMonitor != null) { + progressMonitor.done(); + } + return Status.OK_STATUS; + } + }; + fDiffJob.schedule(); + } return true; } @Override public boolean waitForCompletion() { - return true; - + if (fDiffJob != null) { + try { + fDiffJob.join(); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + return false; + } + return true; + } + return false; } @Override protected void canceling() { - + if (fDiffJob != null) { + fDiffJob.cancel(); + } + super.cancel(); } /** + * Update the selection range + * * @param signal * TmfComparisonFilteringUpdatedSignal raised when filtering * parameter are changed @@ -305,82 +325,97 @@ public void selectionRangeUpdated(TmfComparisonFilteringUpdatedSignal signal) { // tuning fTraceList List traceListA = signal.getTraceListA(); if (traceListA != null) { - List synchronizedListA = Collections.synchronizedList(fTraceListA); - synchronized (synchronizedListA) { - synchronizedListA.clear(); - for (String name : traceListA) { - synchronizedListA.add(name); - } - } + synchronizedListAdd(traceListA, fTraceListA); } List traceListB = signal.getTraceListB(); if (traceListB != null) { - List synchronizedListB = Collections.synchronizedList(fTraceListB); - synchronizedListB.clear(); - for (String name : traceListB) { - synchronizedListB.add(name); - } + synchronizedListAdd(traceListB, fTraceListB); } if (!fTraceCallGraphRegistry.isEmpty()) { try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MakeDiffCallGraph")) { //$NON-NLS-1$ - synchronized (this) { - if (fDiffJob != null) { - fDiffJob.cancel(); - } - fDiffJob = new Job("Make differential Callgraph") { //$NON-NLS-1$ - @Override - protected IStatus run(@Nullable IProgressMonitor monitor) { - refreshDiffCG(monitor); - if (monitor != null) { - monitor.done(); - } - return Status.OK_STATUS; - } - }; - fDiffJob.schedule(); - } + IProgressMonitor monitor = new NullProgressMonitor(); + executeAnalysis(monitor); + } + } + } + + /** + * Helper function that adds all elements from the given traceList to the + * given fTraceList in a thread-safe manner. + * + * @param traceList + * the list of strings to be added + * @param fTraceList + * the list to which the strings will be added + * @return the synchronized list after adding the elements + */ + private static List synchronizedListAdd(List traceList, List fTraceList) { + List synchronizedList = Collections.synchronizedList(fTraceList); + synchronized (synchronizedList) { + synchronizedList.clear(); + for (String name : traceList) { + synchronizedList.add(name); } } + return synchronizedList; } @Override public boolean canExecute(ITmfTrace trace) { - return (trace instanceof TmfExperiment); - + if (trace instanceof TmfExperiment) { + for (ITmfTrace individualTrace : ((TmfExperiment) trace).getTraces()) { + Iterable modules = individualTrace.getAnalysisModules(); + for (IAnalysisModule module : modules) { + if (fCallStackAnalysisMap.containsValue(module.getId())) { + return true; + } + } + } + } + return false; } @Override public void dispose() { - super.dispose(); - TmfSignalManager.deregister(this); - } + try { + cancel(); + synchronized (this) { + if (fDiffJob != null) { + fDiffJob.cancel(); + fDiffJob = null; + } - /** - * @return the differentialCallGraphProvider - */ - private @Nullable DifferentialCallGraphProvider getDifferentialCallGraphProvider() { - return fDifferentialCallGraphProvider; - } + // Clear all data structures and fields + fTraceCallGraphRegistry.clear(); + fTraceListA.clear(); + fTraceListB.clear(); + fDifferentialCallGraphProvider = null; - /** - * @param differentialCallGraphProvider - * the differentialCallGraphProvider to set - */ - private void setDifferentialCallGraphProvider(DifferentialCallGraphProvider differentialCallGraphProvider) { - fDifferentialCallGraphProvider = Objects.requireNonNull(differentialCallGraphProvider); + fStartA = TmfTimestamp.BIG_BANG; + fEndA = TmfTimestamp.BIG_CRUNCH; + fStartB = TmfTimestamp.BIG_BANG; + fEndB = TmfTimestamp.BIG_CRUNCH; + } + TmfSignalManager.deregister(this); + + } finally { + super.dispose(); + } } - private static ITmfTrace getTrace(String traceName) { + + private static @Nullable ITmfTrace getTrace(String traceName) { ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); Collection traceSet = TmfTraceManager.getTraceSet(trace); for (ITmfTrace traceMember : traceSet) { if (traceMember.getName().equals(traceName)) { - return traceMember; - } + return traceMember; } + } return null; } + private List getTraceListA() { return new ArrayList<>(fTraceListA); } @@ -389,4 +424,4 @@ private List getTraceListB() { return new ArrayList<>(fTraceListB); } -} \ No newline at end of file +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfCheckboxChangedSignal.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfCheckboxChangedSignal.java similarity index 76% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfCheckboxChangedSignal.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfCheckboxChangedSignal.java index 9ef5dbd39..458cd55fe 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfCheckboxChangedSignal.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfCheckboxChangedSignal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -11,25 +11,26 @@ package org.eclipse.tracecompass.incubator.internal.executioncomparison.core; - import java.util.List; import org.eclipse.tracecompass.tmf.core.signal.TmfSignal; /** - * TmfCheckboxChangedSignal for handling check box change events + * Handles check-box change events * - * * @author Fateme Faraji Daneshgar + * * @author Fateme Faraji Daneshgar and Vlad Arama */ public class TmfCheckboxChangedSignal extends TmfSignal { private List fTraceList; /** + * Constructor + * * @param source - * the source class of signal + * the source class of signal * @param traceList - * the list of traces remains checked in the check box + * the list of traces remains checked in the check box */ public TmfCheckboxChangedSignal(Object source, List traceList) { super(source); @@ -37,12 +38,12 @@ public TmfCheckboxChangedSignal(Object source, List traceList) { } /** + * Getter for the trace list + * * @return the list of traces remains checked in the check box */ public List getTraceList() { return fTraceList; } - - } diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfComparisonFilteringUpdatedSignal.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfComparisonFilteringUpdatedSignal.java similarity index 68% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfComparisonFilteringUpdatedSignal.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfComparisonFilteringUpdatedSignal.java index 0b8490867..7754630f9 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfComparisonFilteringUpdatedSignal.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/TmfComparisonFilteringUpdatedSignal.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -18,9 +18,10 @@ import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; - /** + * Signal to notify that the comparison filtering has been updated. * + * @author Fateme Faraji Daneshgar and Vlad Arama */ public class TmfComparisonFilteringUpdatedSignal extends TmfSignal { @@ -33,22 +34,24 @@ public class TmfComparisonFilteringUpdatedSignal extends TmfSignal { private @Nullable List fTraceListB; /** + * Constructor + * * @param source - * the class that has generated the signal + * the class that has generated the signal * @param beginA - * the start time in event density chartA + * the start time in event density chartA * @param endA - * the end time in event density chartA + * the end time in event density chartA * @param beginB - * the start time in event density chartB + * the start time in event density chartB * @param endB - * the end time in event density chartA + * the end time in event density chartA * @param statistic - * the statistic that will be represented in the flame graph + * the statistic that will be represented in the flame graph * @param traceListA - * the list of traces in group A + * the list of traces in group A * @param traceListB - * the list of traces in group B + * the list of traces in group B */ public TmfComparisonFilteringUpdatedSignal(Object source, ITmfTimestamp beginA, ITmfTimestamp endA, ITmfTimestamp beginB, ITmfTimestamp endB, @Nullable String statistic, @Nullable List traceListA, @Nullable List traceListB) { super(source); @@ -62,64 +65,79 @@ public TmfComparisonFilteringUpdatedSignal(Object source, ITmfTimestamp beginA, } /** + * Constructor + * * @param source - * the class that has generated the signal - + * the class that has generated the signal * @param statistic - * the statistic that will be represented in the flame graph + * the statistic that will be represented in the flame graph * @param traceListA - * the list of traces in group A + * the list of traces in group A * @param traceListB - * the list of traces in group B + * the list of traces in group B */ public TmfComparisonFilteringUpdatedSignal(Object source, @Nullable String statistic, @Nullable List traceListA, @Nullable List traceListB) { this(source, TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH, TmfTimestamp.BIG_BANG, TmfTimestamp.BIG_CRUNCH, statistic, traceListA, traceListB); } /** - * @return The begin timestamp of selection in GroupA + * Get beginning of the timestamp in Group A + * + * @return The beginning of the timestamp of the selection in GroupA */ public ITmfTimestamp getBeginTimeA() { return fBeginTimeA; } /** - * @return The end timestamp of selection in GroupA + * Get the end of the timestamp in Group A + * + * @return The end of the timestamp of the selection in GroupA */ public ITmfTimestamp getEndTimeA() { return fEndTimeA; } /** - * @return The begin timestamp of selection in GroupB + * Get beginning of the timestamp in Group B + * + * @return The beginning of the timestamp of the selection in GroupB */ public ITmfTimestamp getBeginTimeB() { return fBeginTimeB; } /** - * @return The end timestamp of selection in GroupB + * Get the end of the timestamp in Group B + * + * @return The end of the timestamp of the selection in GroupB */ public ITmfTimestamp getEndTimeB() { return fEndTimeB; } /** - * @return the type of statistic that will be represented in flame graph + * Get the statistic type + * + * @return the type of statistic that will be represented in flame graph */ public @Nullable String getStatistic() { return fStatistic; } /** - * @return the list of traces in groupA + * Get the list of traces in Group A + * + * @return the list of traces in Group A */ public @Nullable List getTraceListA() { return fTraceListA; } /** - * @return the list of traces in groupB + * Get the list of traces in Group B + * + * @return the list of traces in Group B */ public @Nullable List getTraceListB() { return fTraceListB; diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/package-info.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/package-info.java similarity index 61% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/package-info.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/package-info.java index 3bdbb38a8..7501a1ca9 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/package-info.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.core/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/core/package-info.java @@ -1,10 +1,9 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * - * All rights reserved. This program and the accompanying materials are - * made available under the terms of the Eclipse Public License 2.0 which - * accompanies this distribution, and is available at - * https://www.eclipse.org/legal/epl-2.0/ + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 which accompanies + * this distribution, and is available at https://www.eclipse.org/legal/epl-2.0/ * * SPDX-License-Identifier: EPL-2.0 *******************************************************************************/ diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.classpath b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.classpath similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.classpath rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.classpath diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.gitignore b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.gitignore similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.gitignore rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.gitignore diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.project similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.project rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.project diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/.api_filters b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/.api_filters similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/.api_filters rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/.api_filters diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.core.resources.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.resources.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.core.resources.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.core.runtime.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/.settings/org.eclipse.core.runtime.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.core.runtime.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.core.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.jdt.core.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.core.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.jdt.core.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.ui.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.jdt.ui.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.jdt.ui.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.jdt.ui.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.api.tools.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.pde.api.tools.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.api.tools.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.pde.api.tools.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.prefs b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.pde.prefs similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/.settings/org.eclipse.pde.prefs rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/.settings/org.eclipse.pde.prefs diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/META-INF/MANIFEST.MF similarity index 94% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/META-INF/MANIFEST.MF index 9226d2920..58292a9f7 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/META-INF/MANIFEST.MF +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/META-INF/MANIFEST.MF @@ -7,7 +7,7 @@ Bundle-Version: 0.1.0.qualifier Bundle-Localization: plugin Bundle-Activator: org.eclipse.tracecompass.incubator.internal.executioncomparison.ui.Activator Bundle-ActivationPolicy: lazy -Bundle-RequiredExecutionEnvironment: JavaSE-17 +Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.tracecompass.common.core, @@ -18,6 +18,6 @@ Require-Bundle: org.eclipse.ui, org.eclipse.tracecompass.analysis.profiling.core, org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional Export-Package: org.eclipse.tracecompass.incubator.internal.executioncomparison.ui;x-internal:=true -Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparision.ui +Automatic-Module-Name: org.eclipse.tracecompass.incubator.executioncomparison.ui Import-Package: com.google.common.collect, org.eclipse.swtchart diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/about.html b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/about.html similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/about.html rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/about.html diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/build.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/build.properties similarity index 91% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/build.properties rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/build.properties index 21645b6d6..ae7c9d8b8 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/build.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022 École Polytechnique de Montréal +# Copyright (c) 2024 École Polytechnique de Montréal # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/plugin.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/plugin.properties similarity index 79% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/plugin.properties rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/plugin.properties index 096c865e8..e59d0ebc8 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui.swtbot.tests/plugin.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/plugin.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022 École Polytechnique de Montréal +# Copyright (c) 2024 École Polytechnique de Montréal # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -10,5 +10,5 @@ ############################################################################### Bundle-Vendor = Eclipse Trace Compass Incubator -Bundle-Name = Trace Compass ExecutionComparision UI Plug-in (Incubator) +Bundle-Name = Trace Compass ExecutionComparison UI Plug-in (Incubator) diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/plugin.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/plugin.xml new file mode 100644 index 000000000..87e1f4269 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/plugin.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Activator.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Activator.java similarity index 83% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Activator.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Activator.java index 24f683972..481940cdc 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Activator.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Activator.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -18,7 +18,7 @@ import org.osgi.framework.BundleContext; /** - * The activator class controls the plug-in life cycle + * Activator class to controls the plug-in life cycle */ public class Activator extends AbstractUIPlugin { @@ -32,17 +32,18 @@ public class Activator extends AbstractUIPlugin { * The constructor */ public Activator() { + // Do nothing } @Override public void start(@Nullable BundleContext context) throws Exception { super.start(context); - plugin = this; + setDefault(this); } @Override public void stop(@Nullable BundleContext context) throws Exception { - plugin = null; + setDefault(null); super.stop(context); } @@ -55,5 +56,8 @@ public static Activator getDefault() { return Objects.requireNonNull(plugin); } -} + private static void setDefault(@Nullable Activator activator) { + plugin = activator; + } +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/DifferentialFlameGraphView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/DifferentialFlameGraphView.java similarity index 67% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/DifferentialFlameGraphView.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/DifferentialFlameGraphView.java index 10266e625..49233b14f 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/DifferentialFlameGraphView.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/DifferentialFlameGraphView.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -56,6 +56,7 @@ import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.diff.DifferentialWeightedTreeProvider; import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.DifferentialSeqCallGraphAnalysis; import org.eclipse.tracecompass.internal.analysis.profiling.core.flamegraph.FlameGraphDataProvider; +import org.eclipse.tracecompass.internal.analysis.profiling.core.instrumented.FlameChartEntryModel; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TmfFilterAppliedSignal; import org.eclipse.tracecompass.internal.provisional.tmf.core.model.filters.TraceCompassFilter; import org.eclipse.tracecompass.internal.provisional.tmf.ui.widgets.timegraph.BaseDataProviderTimeGraphPresentationProvider; @@ -108,9 +109,11 @@ import com.google.common.collect.Multimap; /** - * the differential flame graph used in execution comparison view. Its mostly based on FlameGraphView + * The differential flame graph used in the execution comparison view. It is + * based on the flame graph view and is used to compare two different + * executions. * - * @author Fateme Faraji Daneshgar + * @author Fateme Faraji Daneshgar and Vlad Arama * */ @SuppressWarnings("restriction") @@ -121,13 +124,13 @@ public class DifferentialFlameGraphView extends TmfView { */ public static final String ID = DifferentialFlameGraphView.class.getPackage().getName() + ".diffflamegraphView"; //$NON-NLS-1$ private static final int DEFAULT_BUFFER_SIZE = 3; + private static final String DIRTY_UNDERFLOW = "Dirty underflow"; //$NON-NLS-1$ /** * the Logger that is used in multipleDensityView class */ protected static final Logger LOGGER = Logger.getLogger(DifferentialFlameGraphView.class.getName()); private @Nullable DifferentialWeightedTreeProvider fDataProvider; - private @Nullable ITimeGraphDataProvider fdataProviderGroup = null; private @Nullable TimeGraphViewer fTimeGraphViewer; @@ -184,43 +187,25 @@ protected DifferentialFlameGraphView(String id) { public void createPartControl(@Nullable Composite parent) { super.createPartControl(parent); fDisplayWidth = Display.getDefault().getBounds().width; - fTimeGraphViewer = new TimeGraphViewer(parent, SWT.NONE); + TimeGraphViewer timeGraphViewer = new TimeGraphViewer(parent, SWT.NONE); fPresentationProvider = new BaseDataProviderTimeGraphPresentationProvider(); - getTimeGraphViewer().setTimeGraphProvider(fPresentationProvider); - getTimeGraphViewer().setTimeFormat(TimeFormat.NUMBER); + timeGraphViewer.setTimeGraphProvider(fPresentationProvider); + timeGraphViewer.setTimeFormat(TimeFormat.NUMBER); IEditorPart editor = getSite().getPage().getActiveEditor(); - ITmfTrace trace = null; - if (editor instanceof ITmfTraceEditor) { - trace = ((ITmfTraceEditor) editor).getTrace(); - } else { - // Get the active trace, the editor might be opened on a script - trace = TmfTraceManager.getInstance().getActiveTrace(); - } + ITmfTrace trace = getCurrentTrace(editor); if (trace != null) { traceSelected(new TmfTraceSelectedSignal(this, trace)); } TmfSignalManager.register(this); - getSite().setSelectionProvider(getTimeGraphViewer().getSelectionProvider()); - getTimeGraphViewer().getTimeGraphControl().addMouseListener(new MouseAdapter() { + getSite().setSelectionProvider(timeGraphViewer.getSelectionProvider()); + timeGraphViewer.getTimeGraphControl().addMouseListener(new MouseAdapter() { @Override public void mouseDoubleClick(@Nullable MouseEvent e) { - TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); - ISelection selection = timeGraphControl.getSelection(); - if (selection instanceof IStructuredSelection) { - for (Object object : ((IStructuredSelection) selection).toList()) { - if (object instanceof TimeEvent) { - TimeEvent event = (TimeEvent) object; - long startTime = event.getTime(); - long endTime = startTime + event.getDuration(); - getTimeGraphViewer().setStartFinishTime(startTime, endTime); - break; - } - } - } + handleDoubleClick(timeGraphViewer); } }); - getTimeGraphViewer().addRangeListener(event -> startZoomThread(event.getStartTime(), event.getEndTime(), false)); - TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); + timeGraphViewer.addRangeListener(event -> startZoomThread(event.getStartTime(), event.getEndTime(), false, timeGraphViewer)); + TimeGraphControl timeGraphControl = timeGraphViewer.getTimeGraphControl(); timeGraphControl.addPaintListener(new PaintListener() { /** @@ -240,7 +225,7 @@ public void paintControl(@Nullable PaintEvent e) { if (timeGraphControl.isDisposed()) { return; } - Set newSet = getVisibleItems(DEFAULT_BUFFER_SIZE); + Set newSet = getVisibleItems(DEFAULT_BUFFER_SIZE, timeGraphViewer); if (!fVisibleEntries.equals(newSet)) { /* * Start a zoom thread if the set of visible entries has @@ -250,22 +235,38 @@ public void paintControl(@Nullable PaintEvent e) { * events. */ fVisibleEntries = newSet; - startZoomThread(getTimeGraphViewer().getTime0(), getTimeGraphViewer().getTime1(), false); + startZoomThread(timeGraphViewer.getTime0(), timeGraphViewer.getTime1(), false, timeGraphViewer); } }); } }); + fTimeGraphViewer = timeGraphViewer; + } + private static void handleDoubleClick(TimeGraphViewer timeGraphViewer) { + TimeGraphControl timeGraphControl = timeGraphViewer.getTimeGraphControl(); + ISelection selection = timeGraphControl.getSelection(); + if (selection instanceof IStructuredSelection structuredSelection) { + for (Object object : (structuredSelection).toList()) { + if (object instanceof TimeEvent event) { + long startTime = event.getTime(); + long endTime = startTime + event.getDuration(); + timeGraphViewer.setStartFinishTime(startTime, endTime); + break; + } + } + } } - /** - * Get the time graph viewer - * - * @return the time graph viewer - */ - public TimeGraphViewer getTimeGraphViewer() { - Objects.requireNonNull(fTimeGraphViewer); - return fTimeGraphViewer; + private static @Nullable ITmfTrace getCurrentTrace(@Nullable IEditorPart editor) { + ITmfTrace trace = null; + if (editor instanceof ITmfTraceEditor tmfTraceEditor) { + trace = tmfTraceEditor.getTrace(); + } else { + // Get the active trace, the editor might be opened on a script + trace = TmfTraceManager.getInstance().getActiveTrace(); + } + return trace; } /** @@ -283,9 +284,10 @@ public void traceSelected(final TmfTraceSelectedSignal signal) { if (trace == null) { return; } - // If entries for this trace are already available, just zoom on - // them, - // otherwise, rebuild + /* + * If entries for this trace are already available, just zoom on + * them, otherwise, rebuild + */ List list = fEntryListMap.get(trace); if (list == null) { refresh(); @@ -297,9 +299,11 @@ public void traceSelected(final TmfTraceSelectedSignal signal) { for (TimeGraphEntry entry : list) { endTime = Math.max(endTime, entry.getEndTime()); } - setEndTime(endTime); + fEndTime = endTime; refresh(); - startZoomThread(0, endTime, false); + if (fTimeGraphViewer != null) { + startZoomThread(0, endTime, false, fTimeGraphViewer); + } } } } @@ -318,8 +322,8 @@ protected Iterable getCallgraphModules() { Iterable modules = TmfTraceUtils.getAnalysisModulesOfClass(trace, ICallGraphProvider2.class); return StreamSupport.stream(modules.spliterator(), false) .filter(m -> { - if (m instanceof IAnalysisModule) { - return ((IAnalysisModule) m).getId().equals(analysisId); + if (m instanceof IAnalysisModule analysisModule) { + return analysisModule.getId().equals(analysisId); } return true; }) @@ -351,146 +355,190 @@ public void run(IProgressMonitor monitor) { } } } - } - private void buildEntryList(@Nullable ITmfTrace trace, ITmfTrace parentTrace, Map additionalParams, IProgressMonitor monitor) { + private void buildEntryList(@Nullable ITmfTrace trace, ITmfTrace parentTrace, Map additionalParams, IProgressMonitor monitor) { + + if (trace != null) { + DifferentialWeightedTreeProvider dataProvider = getDataProvider(monitor); + if (dataProvider == null) { + return; + } + fDataProvider = dataProvider; + ITimeGraphDataProvider<@NonNull FlameChartEntryModel> dataProviderGroup = new FlameGraphDataProvider<>(trace, fDataProvider, FlameGraphDataProvider.ID + ':' + DifferentialSeqCallGraphAnalysis.ID); + BaseDataProviderTimeGraphPresentationProvider presentationProvider = fPresentationProvider; + if (presentationProvider != null) { + presentationProvider.addProvider(dataProviderGroup, getTooltipResolver(dataProviderGroup)); + } + fetchAndBuildEntries(trace, parentTrace, additionalParams, monitor, dataProviderGroup); - if (trace != null) { - DifferentialWeightedTreeProvider dataProvider = getDataProvider(); - if (dataProvider == null) { - return; } - fDataProvider = dataProvider; - setFdataProviderGroup(new FlameGraphDataProvider(trace, fDataProvider, FlameGraphDataProvider.ID + ':' + DifferentialSeqCallGraphAnalysis.ID)); } - BaseDataProviderTimeGraphPresentationProvider presentationProvider = fPresentationProvider; - if (presentationProvider != null) { - presentationProvider.addProvider(getFdataProviderGroup(), getTooltipResolver(getFdataProviderGroup())); - } - try { - fBuildEntryLock.acquire(); - boolean complete = false; - while (!complete && !monitor.isCanceled()) { - Map parameters = new HashMap<>(additionalParams); - parameters.put(DataProviderParameterUtils.REQUESTED_TIME_KEY, ImmutableList.of(0, Long.MAX_VALUE)); - TmfModelResponse> responseGroupA = getFdataProviderGroup().fetchTree(parameters, monitor); - - if (responseGroupA.getStatus() == ITmfResponse.Status.FAILED) { - Activator.getDefault().getLog().error(getClass().getSimpleName() + " Data Provider failed: " + responseGroupA.getStatusMessage()); //$NON-NLS-1$ - return; - } else if (responseGroupA.getStatus() == ITmfResponse.Status.CANCELLED) { - return; - } + private void fetchAndBuildEntries(@Nullable ITmfTrace trace, ITmfTrace parentTrace, Map additionalParams, IProgressMonitor monitor, ITimeGraphDataProvider<@NonNull FlameChartEntryModel> dataProviderGroup) { + try { + fBuildEntryLock.acquire(); + boolean complete = false; + while (!complete && !monitor.isCanceled()) { + Map parameters = new HashMap<>(additionalParams); + parameters.put(DataProviderParameterUtils.REQUESTED_TIME_KEY, ImmutableList.of(0, Long.MAX_VALUE)); + TmfModelResponse> responseGroupA = dataProviderGroup.fetchTree(parameters, monitor); + + if (responseGroupA.getStatus() == ITmfResponse.Status.FAILED) { + Activator.getDefault().getLog().error(getClass().getSimpleName() + " Data Provider failed: " + responseGroupA.getStatusMessage()); //$NON-NLS-1$ + return; + } else if (responseGroupA.getStatus() == ITmfResponse.Status.CANCELLED) { + return; + } - complete = responseGroupA.getStatus() == ITmfResponse.Status.COMPLETED; - TmfTreeModel groupAModel = responseGroupA.getModel(); - long endTimeN = Long.MIN_VALUE; + complete = responseGroupA.getStatus() == ITmfResponse.Status.COMPLETED; + TmfTreeModel<@NonNull FlameChartEntryModel> groupAModel = responseGroupA.getModel(); + if ((groupAModel != null)) { + processAndDisplayEntries(groupAModel, parentTrace, monitor, dataProviderGroup); - if ((groupAModel != null)) { - Map entries; - synchronized (fEntries) { - entries = fEntries.computeIfAbsent(getFdataProviderGroup(), dp -> new HashMap<>()); - /* - * The provider may send entries unordered and parents - * may not exist when child is constructor, we'll - * re-unite families at the end - */ - List orphaned = new ArrayList<>(); - for (TimeGraphEntryModel entry : groupAModel.getEntries()) { - TimeGraphEntry uiEntry = entries.get(entry.getId()); - if (entry.getParentId() != -1) { - if (uiEntry == null) { - uiEntry = new TimeGraphEntry(entry); - TimeGraphEntry parent = entries.get(entry.getParentId()); - if (parent != null) { - parent.addChild(uiEntry); - } else { - orphaned.add(uiEntry); - } - entries.put(entry.getId(), uiEntry); - } else { - if (!monitor.isCanceled()) { - uiEntry.updateModel(entry); - } - } - } else { - endTimeN = Long.max(endTimeN, entry.getEndTime() + 1); - List lables = new ArrayList<>(); - lables.add("GroupB-GroupA"); //$NON-NLS-1$ - - TimeGraphEntryModel newEntry = new TimeGraphEntryModel(0, -1, lables, entry.getStartTime(), entry.getEndTime(), entry.hasRowModel()); - - if (uiEntry != null) { - if (!monitor.isCanceled()) { - uiEntry.updateModel(newEntry); - } - } else { - // Do not assume that parentless entries are - // trace entries - uiEntry = new ParentEntry(newEntry, getFdataProviderGroup()); - entries.put(entry.getId(), uiEntry); - addToEntryList(parentTrace, Collections.singletonList(uiEntry)); - - } - } - } - setEndTime(endTimeN); - // Find missing parents - for (TimeGraphEntry orphanedEntry : orphaned) { - TimeGraphEntry parent = entries.get(orphanedEntry.getEntryModel().getParentId()); - if (parent != null) { - parent.addChild(orphanedEntry); - } + } + + if (monitor.isCanceled()) { + if (trace == null) { + return; } + resetEntries(trace); + return; + } + + if (parentTrace.equals(getTrace())) { + refresh(); } - long start = 0; - final long resolutionN = Long.max(1, (endTimeN - start) / getDisplayWidth()); + monitor.worked(1); - if (!monitor.isCanceled()) { - zoomEntries(ImmutableList.copyOf(entries.values()), start, endTimeN, resolutionN, monitor); + if (!complete && !monitor.isCanceled()) { + waitForDataProvider(); } } + } catch (InterruptedException e1) { + Activator.getDefault().getLog().error(e1.getMessage()); + } finally { + fBuildEntryLock.release(); + } + } - if (monitor.isCanceled()) { - if (trace==null) { - return; + private void processAndDisplayEntries(TmfTreeModel<@NonNull FlameChartEntryModel> groupAModel, ITmfTrace parentTrace, IProgressMonitor monitor, ITimeGraphDataProvider<@NonNull FlameChartEntryModel> dataProviderGroup) { + Map entries; + synchronized (fEntries) { + entries = fEntries.computeIfAbsent(dataProviderGroup, dp -> new HashMap<>()); + /* + * The provider may send entries unordered and parents may not + * exist when child is constructor, we'll re-unite families at + * the end + */ + List orphaned = new ArrayList<>(); + for (TimeGraphEntryModel entry : groupAModel.getEntries()) { + if (entry.getParentId() != -1) { + updateOrCreateOrphanedEntry(entry, entries, orphaned, monitor); + } else { + updateOrCreateEntry(entry, entries, parentTrace, monitor, dataProviderGroup); } - resetEntries(trace); - return; } + findMissingParents(entries, orphaned); + } + long start = 0; + final long resolutionN = Long.max(1, (fEndTime - start) / getDisplayWidth()); + + if (!monitor.isCanceled()) { + zoomEntries(ImmutableList.copyOf(entries.values()), start, fEndTime, resolutionN, monitor); + } + } + + private void updateOrCreateOrphanedEntry(TimeGraphEntryModel entry, Map entries, List orphaned, IProgressMonitor monitor) { + TimeGraphEntry uiEntry = entries.get(entry.getId()); + if (uiEntry == null) { + uiEntry = new TimeGraphEntry(entry); + TimeGraphEntry parent = entries.get(entry.getParentId()); + if (parent != null) { + parent.addChild(uiEntry); + } else { + orphaned.add(uiEntry); + } + entries.put(entry.getId(), uiEntry); + } else { + if (!monitor.isCanceled()) { + uiEntry.updateModel(entry); + } + } + } + + private void updateOrCreateEntry(TimeGraphEntryModel entry, Map entries, ITmfTrace parentTrace, IProgressMonitor monitor, ITimeGraphDataProvider<@NonNull FlameChartEntryModel> dataProviderGroup) { + long endTimeN = fEndTime; + TimeGraphEntry uiEntry = entries.get(entry.getId()); + fEndTime = Long.max(endTimeN, entry.getEndTime() + 1); + List lables = new ArrayList<>(); + lables.add("GroupB-GroupA"); //$NON-NLS-1$ - if (parentTrace.equals(getTrace())) { - refresh(); + TimeGraphEntryModel newEntry = new TimeGraphEntryModel(0, -1, lables, entry.getStartTime(), entry.getEndTime(), entry.hasRowModel()); + + if (uiEntry != null) { + if (!monitor.isCanceled()) { + uiEntry.updateModel(newEntry); } - monitor.worked(1); + } else { + // Do not assume that parentless entries are trace entries + uiEntry = new ParentEntry(newEntry, dataProviderGroup); + entries.put(entry.getId(), uiEntry); + addToEntryList(parentTrace, Collections.singletonList(uiEntry)); - if (!complete && !monitor.isCanceled()) { - try { - Thread.sleep(100); + } + } - } catch (InterruptedException e) { - Activator.getDefault().getLog().error("Failed to wait for data provider", e); //$NON-NLS-1$ - } + private static void findMissingParents(Map entries, List orphaned) { + for (TimeGraphEntry orphanedEntry : orphaned) { + TimeGraphEntry parent = entries.get(orphanedEntry.getEntryModel().getParentId()); + if (parent != null) { + parent.addChild(orphanedEntry); } + } + } + private static void waitForDataProvider() throws InterruptedException { + try { + Thread.sleep(100); + + } catch (InterruptedException e) { + Activator.getDefault().getLog().error("Failed to wait for data provider", e); //$NON-NLS-1$ + throw e; } } - catch (InterruptedException e1) { - // TODO Auto-generated catch block - e1.printStackTrace(); - } finally { - fBuildEntryLock.release(); + + private int getDisplayWidth() { + int displayWidth = fDisplayWidth; + return displayWidth <= 0 ? 1 : displayWidth; } + /** + * Adds a list of entries to a trace's entry list + * + * @param trace + * the trace + * @param list + * the list of time graph entries to add + */ + private void addToEntryList(ITmfTrace trace, List list) { + synchronized (fEntryListMap) { + List entryList = fEntryListMap.get(trace); + if (entryList == null) { + fEntryListMap.put(trace, new CopyOnWriteArrayList<>(list)); + } else { + for (TimeGraphEntry entry : list) { + if (!entryList.contains(entry)) { + entryList.add(entry); + } + } + } + } + } } private static BiFunction> getTooltipResolver(ITimeGraphDataProvider provider) { - return (event, time) -> { - return getTooltip(event, time, provider, false); - }; - + return (event, time) -> getTooltip(event, time, provider, false); } private static Map getTooltip(ITimeEvent event, Long time, ITimeGraphDataProvider provider, boolean getActions) { @@ -501,8 +549,8 @@ private static Map getTooltip(ITimeEvent event, Long time, ITime } long entryId = ((TimeGraphEntry) entry).getEntryModel().getId(); IOutputElement element = null; - if (event instanceof TimeEvent) { - element = ((TimeEvent) event).getModel(); + if (event instanceof TimeEvent timeEvent) { + element = timeEvent.getModel(); } Map parameters = getFetchTooltipParameters(time, entryId, element); if (getActions) { @@ -525,10 +573,11 @@ private static Map getFetchTooltipParameters(long time, long ite } /** - * Zoom thread - * - * @since 1.1 + * The ZoomThread class is responsible for performing zoom operations on a + * collection of TimeGraphEntry objects. It is a thread that runs in the + * background and performs the zoom operation asynchronously. */ + protected class ZoomThread extends Thread { private final long fZoomStartTime; private final long fZoomEndTime; @@ -563,34 +612,6 @@ public ZoomThread(Collection entries, long startTime, long endTi fForce = force; } - /** - * @return the zoom start time - */ - public long getZoomStartTime() { - return fZoomStartTime; - } - - /** - * @return the zoom end time - */ - public long getZoomEndTime() { - return fZoomEndTime; - } - - /** - * @return the resolution - */ - public long getResolution() { - return fResolution; - } - - /** - * @return the monitor - */ - public IProgressMonitor getMonitor() { - return fMonitor; - } - /** * Cancel the zoom thread */ @@ -605,14 +626,14 @@ public final void run() { // No rows to zoom on return; } - Sampling sampling = new Sampling(getZoomStartTime(), getZoomEndTime(), getResolution()); + Sampling sampling = new Sampling(fZoomStartTime, fZoomEndTime, fResolution); Iterable incorrectSample = fForce ? fCurrentEntries : fCurrentEntries.stream().filter(entry -> !sampling.equals(entry.getSampling())).toList(); Objects.requireNonNull(incorrectSample); - zoomEntries(incorrectSample, getZoomStartTime(), getZoomEndTime(), getResolution(), getMonitor()); + zoomEntries(incorrectSample, fZoomStartTime, fZoomEndTime, fResolution, fMonitor); } finally { if (fDirty.decrementAndGet() < 0) { - Activator.getDefault().getLog().error("Dirty underflow", new Throwable()); //$NON-NLS-1$ + Activator.getDefault().getLog().error(DIRTY_UNDERFLOW, new Throwable()); } } } @@ -641,8 +662,10 @@ public void setScopeId(int scopeId) { * @param force * Whether to force the fetch of all rows, or only those that * don't have the same range + * @param timeGraphViewer + * The TimeGraphViewer */ - protected final void startZoomThread(long startTime, long endTime, boolean force) { + protected final void startZoomThread(long startTime, long endTime, boolean force, TimeGraphViewer timeGraphViewer) { ITmfTrace trace = getTrace(); if (trace == null) { return; @@ -650,8 +673,8 @@ protected final void startZoomThread(long startTime, long endTime, boolean force fDirty.incrementAndGet(); try (FlowScopeLog log = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:ZoomThreadCreated").setCategory(getViewId()).build()) { //$NON-NLS-1$ - long clampedStartTime = Math.max(0, Math.min(startTime, getEndTime())); - long clampedEndTime = Math.min(getEndTime(), Math.max(endTime, 0)); + long clampedStartTime = Math.max(0, Math.min(startTime, fEndTime)); + long clampedEndTime = Math.min(fEndTime, Math.max(endTime, 0)); // Ignore if end time < start time, data has not been set correctly // [yet] if (clampedEndTime < clampedStartTime) { @@ -661,10 +684,10 @@ protected final void startZoomThread(long startTime, long endTime, boolean force if (zoomThread != null) { zoomThread.cancel(); } - int timeSpace = getTimeGraphViewer().getTimeSpace(); + int timeSpace = timeGraphViewer.getTimeSpace(); if (timeSpace > 0) { long resolution = Long.max(1, (clampedEndTime - clampedStartTime) / timeSpace); - zoomThread = new ZoomThread(getVisibleItems(DEFAULT_BUFFER_SIZE), clampedStartTime, clampedEndTime, resolution, force); + zoomThread = new ZoomThread(getVisibleItems(DEFAULT_BUFFER_SIZE, timeGraphViewer), clampedStartTime, clampedEndTime, resolution, force); } else { zoomThread = null; } @@ -684,21 +707,20 @@ protected final void startZoomThread(long startTime, long endTime, boolean force } } finally { if (fDirty.decrementAndGet() < 0) { - Activator.getDefault().getLog().error("Dirty underflow", new Throwable()); //$NON-NLS-1$ + Activator.getDefault().getLog().error(DIRTY_UNDERFLOW, new Throwable()); } } } - private Set getVisibleItems(int buffer) { - - TimeGraphControl timeGraphControl = getTimeGraphViewer().getTimeGraphControl(); + private static Set getVisibleItems(int buffer, TimeGraphViewer timeGraphViewer) { + TimeGraphControl timeGraphControl = timeGraphViewer.getTimeGraphControl(); if (timeGraphControl.isDisposed()) { return Collections.emptySet(); } - int start = Integer.max(0, getTimeGraphViewer().getTopIndex() - buffer); - int end = Integer.min(getTimeGraphViewer().getExpandedElementCount() - 1, - getTimeGraphViewer().getTopIndex() + timeGraphControl.countPerPage() + buffer); + int start = Integer.max(0, timeGraphViewer.getTopIndex() - buffer); + int end = Integer.min(timeGraphViewer.getExpandedElementCount() - 1, + timeGraphViewer.getTopIndex() + timeGraphControl.countPerPage() + buffer); Set visible = new HashSet<>(end - start + 1); for (int i = start; i <= end; i++) { @@ -724,80 +746,64 @@ private void zoomEntries(Iterable normalEntries, long zoomStartT long start = Long.min(zoomStartTime, zoomEndTime); long end = Long.max(zoomStartTime, zoomEndTime); List times = StateSystemUtils.getTimes(start, end, resolution); - Sampling sampling = new Sampling(start, end, resolution); - Multimap, Long> providersToModelIds = filterGroupEntries(normalEntries, zoomStartTime, zoomEndTime); - if (providersToModelIds!=null) { + if (providersToModelIds != null) { - SubMonitor subMonitor = SubMonitor.convert(monitor, getClass().getSimpleName() + "#zoomEntries", providersToModelIds.size()); //$NON-NLS-1$ + SubMonitor subMonitor = SubMonitor.convert(monitor, getClass().getSimpleName() + "#zoomEntries", providersToModelIds.size()); //$NON-NLS-1$ - Entry, Collection> entry = providersToModelIds.asMap().entrySet().iterator().next(); - ITimeGraphDataProvider dataProvider = Objects.requireNonNull(entry.getKey()); - SelectionTimeQueryFilter filter = new SelectionTimeQueryFilter(times, entry.getValue()); - Map parameters = FetchParametersUtils.selectionTimeQueryToMap(filter); - Multimap regexesMap = getRegexes(); - if (!regexesMap.isEmpty()) { - parameters.put(DataProviderParameterUtils.REGEX_MAP_FILTERS_KEY, Objects.requireNonNull(regexesMap.asMap())); - } - TmfModelResponse response = dataProvider.fetchRowModel(parameters, monitor); - TimeGraphModel model = response.getModel(); - Map entries = fEntries.get(dataProvider); - if ((model != null) && (entries) != null) { - zoomEntries(entries, model.getRows(), response.getStatus() == ITmfResponse.Status.COMPLETED, sampling); + Entry, Collection> entry = providersToModelIds.asMap().entrySet().iterator().next(); + ITimeGraphDataProvider dataProvider = Objects.requireNonNull(entry.getKey()); + SelectionTimeQueryFilter filter = new SelectionTimeQueryFilter(times, entry.getValue()); + Map parameters = FetchParametersUtils.selectionTimeQueryToMap(filter); + Multimap regexesMap = getRegexes(); + if (regexesMap != null && !regexesMap.isEmpty()) { + parameters.put(DataProviderParameterUtils.REGEX_MAP_FILTERS_KEY, Objects.requireNonNull(regexesMap.asMap())); + } + TmfModelResponse response = dataProvider.fetchRowModel(parameters, monitor); + TimeGraphModel model = response.getModel(); + Map entries = fEntries.get(dataProvider); + if ((model != null) && (entries) != null) { + zoomEntries(entries, model.getRows()); - } - subMonitor.worked(1); - redraw(); + } + subMonitor.worked(1); + redraw(); } } /** - * This method build the multimap of regexes by property that will be used - * to filter the timegraph states + * Builds the multimap of regexes by the property that will be used to + * filter the timegraph states * * Override this method to add other regexes with their properties. The data * provider should handle everything after. * * @return The multimap of regexes by property */ - @SuppressWarnings("null") - private Multimap getRegexes() { + private @Nullable Multimap getRegexes() { Multimap regexes = HashMultimap.create(); - - ITmfTrace trace = getTrace(); - if (trace == null) { - return regexes; - } - TraceCompassFilter globalFilter = TraceCompassFilter.getFilterForTrace(trace); - if (globalFilter == null) { - return regexes; + if (regexes != null) { + ITmfTrace trace = getTrace(); + if (trace == null) { + return regexes; + } + TraceCompassFilter globalFilter = TraceCompassFilter.getFilterForTrace(trace); + if (globalFilter == null) { + return regexes; + } + regexes.putAll(CoreFilterProperty.DIMMED, globalFilter.getRegexes()); } - regexes.putAll(CoreFilterProperty.DIMMED, globalFilter.getRegexes()); - return regexes; } - private void zoomEntries(Map map, List model, boolean completed, Sampling sampling) { - boolean isZoomThread = false; + private void zoomEntries(Map map, List model) { for (ITimeGraphRowModel rowModel : model) { TimeGraphEntry entry = map.get(rowModel.getEntryID()); if (entry != null) { List events = createTimeEvents(entry, rowModel.getStates()); - if (isZoomThread) { - synchronized (fZoomThreadResultLock) { - Display.getDefault().asyncExec(() -> { - entry.setZoomedEventList(events); - if (completed) { - entry.setSampling(sampling); - } - }); - } - } else { - - entry.setEventList(events); - } + entry.setEventList(events); } } } @@ -884,13 +890,12 @@ protected TimeEvent createTimeEvent(TimeGraphEntry entry, ITimeGraphState state) * @param entry * queried {@link TimeGraphEntry}. * @return the {@link ITimeGraphDataProvider} - * @since 3.3 */ public static ITimeGraphDataProvider getProvider(ITimeGraphEntry entry) { ITimeGraphEntry parent = entry; while (parent != null) { - if (parent instanceof ParentEntry) { - return ((ParentEntry) parent).getProvider(); + if (parent instanceof ParentEntry parentEntry) { + return parentEntry.getProvider(); } parent = parent.getParent(); } @@ -912,7 +917,7 @@ private void refresh() { TmfUiRefreshHandler.getInstance().queueUpdate(this, () -> { try (FlowScopeLog log = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:Refresh").setParentScope(parentLogger).build()) { //$NON-NLS-1$ fDirty.incrementAndGet(); - if (getTimeGraphViewer().getControl().isDisposed()) { + if (fTimeGraphViewer != null && fTimeGraphViewer.getControl().isDisposed()) { return; } List entries; @@ -923,25 +928,30 @@ private void refresh() { } } - boolean inputChanged = entries != getTimeGraphViewer().getInput(); - if (inputChanged) { - getTimeGraphViewer().setInput(entries); - } else { - getTimeGraphViewer().refresh(); - } - - long startBound = 0; - long endBound = getEndTime(); - endBound = (endBound == Long.MIN_VALUE ? SWT.DEFAULT : endBound); - getTimeGraphViewer().setTimeBounds(startBound, endBound); + if (fTimeGraphViewer != null) { + boolean inputChanged = entries != fTimeGraphViewer.getInput(); + if (inputChanged && fTimeGraphViewer != null) { + fTimeGraphViewer.setInput(entries); + } else if (!inputChanged && fTimeGraphViewer != null) { + fTimeGraphViewer.refresh(); + } else { + return; + } + long startBound = 0; + long endBound = fEndTime; + endBound = (endBound == Long.MIN_VALUE ? SWT.DEFAULT : endBound); + if (fTimeGraphViewer != null) { + fTimeGraphViewer.setTimeBounds(startBound, endBound); + } - if (inputChanged && !isZoomThread) { - getTimeGraphViewer().resetStartFinishTime(); + if (inputChanged && !isZoomThread && fTimeGraphViewer != null) { + fTimeGraphViewer.resetStartFinishTime(); + } } } finally { if (fDirty.decrementAndGet() < 0) { - Activator.getDefault().getLog().error("Dirty underflow", new Throwable()); //$NON-NLS-1$ + Activator.getDefault().getLog().error(DIRTY_UNDERFLOW, new Throwable()); } } }); @@ -949,25 +959,23 @@ private void refresh() { } private void redraw() { - try (FlowScopeLog flowParent = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:RedrawRequested").setCategory(getViewId()).build()) { //$NON-NLS-1$ Display.getDefault().asyncExec(() -> { try (FlowScopeLog log = new FlowScopeLogBuilder(LOGGER, Level.FINE, "FlameGraphView:Redraw").setParentScope(flowParent).build()) { //$NON-NLS-1$ - if (getTimeGraphViewer().getControl().isDisposed()) { + if (fTimeGraphViewer != null && fTimeGraphViewer.getControl().isDisposed()) { return; } - getTimeGraphViewer().getControl().redraw(); - getTimeGraphViewer().getControl().update(); + if (fTimeGraphViewer != null) { + fTimeGraphViewer.getControl().redraw(); + if (fTimeGraphViewer != null) { + fTimeGraphViewer.getControl().update(); + } + } } }); } } - private int getDisplayWidth() { - int displayWidth = fDisplayWidth; - return displayWidth <= 0 ? 1 : displayWidth; - } - /** * A class for parent entries that contain a link to the data provider * @@ -1000,37 +1008,6 @@ public ITimeGraphDataProvider getProvider() { } } - private synchronized void setEndTime(long endTime) { - fEndTime = endTime; - } - - private synchronized long getEndTime() { - return fEndTime; - } - - /** - * Adds a list of entries to a trace's entry list - * - * @param trace - * the trace - * @param list - * the list of time graph entries to add - */ - private void addToEntryList(ITmfTrace trace, List list) { - synchronized (fEntryListMap) { - List entryList = fEntryListMap.get(trace); - if (entryList == null) { - fEntryListMap.put(trace, new CopyOnWriteArrayList<>(list)); - } else { - for (TimeGraphEntry entry : list) { - if (!entryList.contains(entry)) { - entryList.add(entry); - } - } - } - } - } - private void resetEntries(ITmfTrace trace) { synchronized (fEntries) { synchronized (fEntryListMap) { @@ -1041,8 +1018,8 @@ private void resetEntries(ITmfTrace trace) { return; } for (TimeGraphEntry entry : entries) { - if (entry instanceof ParentEntry) { - fEntries.remove(((ParentEntry) entry).getProvider()); + if (entry instanceof ParentEntry parentEntry) { + fEntries.remove((parentEntry).getProvider()); } } refresh(); @@ -1097,7 +1074,7 @@ public void buildFlameGraph(ITmfTrace viewTrace, @Nullable ITmfTimestamp selStar resetEntries(viewTrace); // Build job will decrement - buildJob = new Job(getTitle() + Messages.FlameGraphView_RetrievingData) { + buildJob = new Job(getTitle() + Messages.flameGraphViewRetrievingData) { @Override protected IStatus run(@Nullable IProgressMonitor monitor) { Objects.requireNonNull(monitor); @@ -1154,14 +1131,16 @@ public void setTrace(ITmfTrace trace) { */ @TmfSignalHandler public void traceClosed(final TmfTraceClosedSignal signal) { - if (signal.getTrace() == fTrace) { - getTimeGraphViewer().setInput(null); + if (signal.getTrace() == fTrace && fTimeGraphViewer != null) { + fTimeGraphViewer.setInput(null); } } @Override public void setFocus() { - getTimeGraphViewer().setFocus(); + if (fTimeGraphViewer != null) { + fTimeGraphViewer.setFocus(); + } } // -------------------------------- // Sorting related methods @@ -1175,14 +1154,18 @@ public void setFocus() { */ @TmfSignalHandler public void symbolMapUpdated(TmfSymbolProviderUpdatedSignal signal) { - if (signal.getSource() != this) { - startZoomThread(getTimeGraphViewer().getTime0(), getTimeGraphViewer().getTime1(), true); + if (signal.getSource() != this && fTimeGraphViewer != null) { + TimeGraphViewer timeGraphViewer = fTimeGraphViewer; + startZoomThread(timeGraphViewer.getTime0(), timeGraphViewer.getTime1(), true, timeGraphViewer); } } @Override protected @Nullable IAction createSaveAction() { - return SaveImageUtil.createSaveAction(getName(), this::getTimeGraphViewer); + if (fTimeGraphViewer != null) { + return SaveImageUtil.createSaveAction(getName(), () -> fTimeGraphViewer); + } + return null; } /** @@ -1196,7 +1179,10 @@ public void restartZoomThread() { zoomThread.cancel(); fZoomThread = null; } - startZoomThread(getTimeGraphViewer().getTime0(), getTimeGraphViewer().getTime1(), true); + if (fTimeGraphViewer != null) { + TimeGraphViewer timeGraphViewer = fTimeGraphViewer; + startZoomThread(timeGraphViewer.getTime0(), timeGraphViewer.getTime1(), true, timeGraphViewer); + } } /** @@ -1214,27 +1200,19 @@ public void regexFilterApplied(TmfFilterAppliedSignal signal) { /** * Listen to see if one of the view's analysis is restarted * - * @param signal - * The analysis started signal + * @param monitor + * The progress monitor * @return The data provider or null */ - private static @Nullable DifferentialWeightedTreeProvider getDataProvider() { + private static @Nullable DifferentialWeightedTreeProvider getDataProvider(IProgressMonitor monitor) { ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); if (trace != null) { DifferentialSeqCallGraphAnalysis analysis = (DifferentialSeqCallGraphAnalysis) trace.getAnalysisModule("org.eclipse.tracecompass.incubator.executioncomparison.diffcallgraph"); //$NON-NLS-1$ if (analysis != null) { - return analysis.getDiffProvider(null); + return analysis.getDifferentialTreeProvider(monitor); } } return null; } - private ITimeGraphDataProvider getFdataProviderGroup() { - Objects.requireNonNull(fdataProviderGroup); - return fdataProviderGroup; - } - - private void setFdataProviderGroup(@Nullable ITimeGraphDataProvider fdataProviderGroup) { - this.fdataProviderGroup = fdataProviderGroup; - } -} \ No newline at end of file +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java new file mode 100644 index 000000000..aa96074a4 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/ExecutionComparisonView.java @@ -0,0 +1,1318 @@ +/******************************************************************************* + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparison.ui; + +import java.awt.Color; +import java.text.ParseException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.logging.Level; + +import javax.swing.JFormattedTextField; +import javax.swing.JLabel; + +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.ActionContributionItem; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IMenuCreator; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.layout.GridLayoutFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.awt.SWT_AWT; +import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.events.ExpandEvent; +import org.eclipse.swt.events.ExpandListener; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.FocusListener; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.PaintEvent; +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.layout.RowLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.ExpandBar; +import org.eclipse.swt.widgets.ExpandItem; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Sash; +import org.eclipse.swt.widgets.Text; +import org.eclipse.tracecompass.common.core.log.TraceCompassLogUtils.ScopeLog; +import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.TmfCheckboxChangedSignal; +import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.TmfComparisonFilteringUpdatedSignal; +import org.eclipse.tracecompass.internal.tmf.ui.viewers.eventdensity.EventDensityTreeViewer; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; +import org.eclipse.tracecompass.tmf.core.signal.TmfTraceOpenedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfTraceSelectedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfWindowRangeUpdatedSignal; +import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; +import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; +import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp; +import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestampFormat; +import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; +import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager; +import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentInfo; +import org.eclipse.tracecompass.tmf.ui.signal.TmfTimeViewAlignmentSignal; +import org.eclipse.tracecompass.tmf.ui.viewers.ILegendImageProvider2; +import org.eclipse.tracecompass.tmf.ui.viewers.TmfTimeViewer; +import org.eclipse.tracecompass.tmf.ui.viewers.TmfViewer; +import org.eclipse.tracecompass.tmf.ui.viewers.tree.AbstractSelectTreeViewer2; +import org.eclipse.tracecompass.tmf.ui.viewers.tree.ICheckboxTreeViewerListener; +import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeViewerEntry; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.TmfXYChartViewer; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.XYChartLegendImageProvider; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfCommonXAxisChartViewer; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfFilteredXYChartViewer; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfXYChartSettings; +import org.eclipse.tracecompass.tmf.ui.views.ManyEntriesSelectedDialogPreCheckedListener; +import org.eclipse.tracecompass.tmf.ui.widgets.timegraph.dialogs.TriStateFilteredCheckboxTree; +import org.eclipse.ui.IWorkbenchPartSite; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.contexts.IContextActivation; +import org.eclipse.ui.contexts.IContextService; +import org.eclipse.ui.themes.ITheme; +import org.eclipse.ui.themes.IThemeManager; + +/** + * The ExecutionComparisonView allows to compare two groups of traces (parts of + * traces) + * + * @author Fateme Faraji Daneshgar and Vlad Arama + */ +@SuppressWarnings("restriction") +public class ExecutionComparisonView extends DifferentialFlameGraphView implements ICheckboxTreeViewerListener { + + /** + * the id of the view + */ + public static final String VIEW_ID = Objects.requireNonNull(Messages.multipleDensityViewId); + /** + * The title of the view + */ + public static final String VIEW_TITLE = Objects.requireNonNull(Messages.multipleDensityViewTitle); + private static final String DATA_SELECTION = Objects.requireNonNull(Messages.dataSelection); + private static final String BACKGROUND = Objects.requireNonNull(Messages.background); + private static final String FOREGROUND = Objects.requireNonNull(Messages.foreground); + private static final String TRACE_NAME = Objects.requireNonNull(Messages.traceName); + private static final String STATISTIC_NAME = Objects.requireNonNull(Messages.statisticName); + private static final String TMF_VIEW_UI_CONTEXT = Objects.requireNonNull(Messages.tmfViewUiContext); + private static final String Y_AXIS_LABEL = Objects.requireNonNull(Messages.yAxisLabel); + private String fStatistic = Objects.requireNonNull(Messages.multipleDensityViewDuration); + + /** + * Default weights for organizing the view + */ + private static final int[] DEFAULT_WEIGHTS_ShowQuery = new int[] { 450, 290, 260 }; + private static final int[] DEFAULT_WEIGHTS_HideQuery = new int[] { 450, 100, 450 }; + private static final int[] DEFAULT_WEIGHTS_FILTERING_H = new int[] { 3, 9 }; + private static final int[] DEFAULT_WEIGHTS_TimeInterval = new int[] { 240, 380, 380 }; + + /** A composite that allows us to add margins for part A and B */ + private @Nullable TmfXYChartViewer fChartViewerA; + private @Nullable TmfXYChartViewer fChartViewerB; + + private @Nullable SashForm fXYViewerContainerA; + private @Nullable SashForm fXYViewerContainerB; + + private @Nullable TmfViewer fTmfViewerA; + private @Nullable TmfViewer fTmfViewerB; + + private @Nullable SashForm fSashFormLeftChildA; + private @Nullable SashForm fSashFormLeftChildB; + + private List fTraceListA = new ArrayList<>(); + private List fTraceListB = new ArrayList<>(); + + private ITmfTimestamp fStartTimeA = TmfTimestamp.BIG_BANG; + private ITmfTimestamp fStartTimeB = TmfTimestamp.BIG_BANG; + private ITmfTimestamp fEndTimeA = TmfTimestamp.BIG_CRUNCH; + private ITmfTimestamp fEndTimeB = TmfTimestamp.BIG_CRUNCH; + private TmfTimestampFormat fFormat = new TmfTimestampFormat("yyyy-MM-dd HH:mm:ss.SSS.SSS.SSS"); //$NON-NLS-1$ + + private JFormattedTextField ftextAFrom = new JFormattedTextField(); + private JFormattedTextField ftextBFrom = new JFormattedTextField(); + private JFormattedTextField ftextATo = new JFormattedTextField(); + private JFormattedTextField ftextBTo = new JFormattedTextField(); + + private @Nullable IContextService fContextService; + private @Nullable Action fConfigureStatisticAction; + private @Nullable Text ftextQuery; + private @Nullable Listener fSashDragListener; + private @Nullable SashForm fsashForm = null; + private List fActiveContexts = new ArrayList<>(); + + /** + * Constructs two density charts for selecting the desired traces and time + * ranges in order to do the comparison + */ + public ExecutionComparisonView() { + super(); + } + + @Override + public void createPartControl(@Nullable Composite parent) { + TmfSignalManager.register(this); + + this.setContentDescription(DATA_SELECTION); + final SashForm sashForm = new SashForm(parent, SWT.VERTICAL); + fsashForm = sashForm; + sashForm.setLayout(new GridLayout(1, false)); + sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + /* + * Main organization of the view. There are three main parts in the + * view: Filtering, Query and Differential Flame Graph + */ + Composite sashFormFiltering = new Composite(sashForm, SWT.HORIZONTAL); + GridLayout layout = new GridLayout(2, false); + layout.marginHeight = layout.marginWidth = 0; + sashFormFiltering.setLayout(layout); + sashFormFiltering.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + // GroupA + Group groupA = new Group(sashFormFiltering, SWT.NULL); + GridLayout gridLayoutG = new GridLayout(); + GridData gridDataG = new GridData(GridData.FILL_BOTH); + SashForm densityA = new SashForm(groupA, SWT.NULL); + GridData data = new GridData(SWT.FILL, SWT.TOP, true, false); + SashForm timeInputA = new SashForm(groupA, SWT.NULL); + createGroups(groupA, gridLayoutG, gridDataG, densityA, data, timeInputA, true); + + // GroupB + Group groupB = new Group(sashFormFiltering, SWT.NULL); + SashForm densityB = new SashForm(groupB, SWT.NULL); + SashForm timeInputB = new SashForm(groupB, SWT.NULL); + createGroups(groupB, gridLayoutG, gridDataG, densityB, data, timeInputB, false); + + // Get the current theme + IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager(); + ITheme currentTheme = themeManager.getCurrentTheme(); + + // Get background color + RGB backgroundRGB = currentTheme.getColorRegistry().getRGB(BACKGROUND); + java.awt.Color backgroundColor; + if (backgroundRGB != null) { + backgroundColor = new java.awt.Color(backgroundRGB.red, backgroundRGB.green, backgroundRGB.blue); + } else { + org.eclipse.swt.graphics.Color swtColor = Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND); + backgroundColor = new java.awt.Color(swtColor.getRed(), swtColor.getGreen(), swtColor.getBlue()); + } + + // Get foreground color + RGB foregroundRGB = currentTheme.getColorRegistry().getRGB(FOREGROUND); + java.awt.Color foregroundColor; + if (foregroundRGB != null) { + foregroundColor = new java.awt.Color(foregroundRGB.red, foregroundRGB.green, foregroundRGB.blue); + } else { + org.eclipse.swt.graphics.Color swtColor = Display.getCurrent().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND); + foregroundColor = new java.awt.Color(swtColor.getRed(), swtColor.getGreen(), swtColor.getBlue()); + } + // Group A Time Intervals + Composite timelableA = new Composite(timeInputA, SWT.NONE); + Composite timelableAFrom = new Composite(timeInputA, SWT.EMBEDDED); + Composite timelableATo = new Composite(timeInputA, SWT.EMBEDDED); + + timeInputA.setWeights(DEFAULT_WEIGHTS_TimeInterval); + + RowLayout rowLayout = new RowLayout(); + GridLayout gridLayout = new GridLayout(); + gridLayout.numColumns = 2; + + timelableA.setLayout(gridLayout); + timelableAFrom.setLayout(rowLayout); + timelableATo.setLayout(rowLayout); + + SashForm sashFormLeftChildA = new SashForm(densityA, SWT.None); + fSashFormLeftChildA = sashFormLeftChildA; + + TmfViewer tmfViewerA = createLeftChildViewer(sashFormLeftChildA); + fTmfViewerA = tmfViewerA; + + SashForm xYViewerContainerA = new SashForm(densityA, SWT.None); + fXYViewerContainerA = xYViewerContainerA; + xYViewerContainerA.setLayout(GridLayoutFactory.fillDefaults().create()); + + TmfXYChartViewer chartViewerA = createChartViewer(xYViewerContainerA); + fChartViewerA = chartViewerA; + + // Reset Button A + Button resetButtonA = new Button(timelableA, SWT.PUSH); + createResetButtonA(resetButtonA, chartViewerA, tmfViewerA); + + // LabelFromA + java.awt.Frame frameAFrom = SWT_AWT.new_Frame(timelableAFrom); + + java.awt.Panel panelAFrom = new java.awt.Panel(); + JFormattedTextField textAFrom = new JFormattedTextField(fFormat); + if (frameAFrom != null) { + createLabelFromA(frameAFrom, panelAFrom, textAFrom, backgroundColor, foregroundColor, chartViewerA); + } + + // LabelToA + java.awt.Frame frameATo = SWT_AWT.new_Frame(timelableATo); + java.awt.Panel panelATo = new java.awt.Panel(); + JFormattedTextField textATo = new JFormattedTextField(fFormat); + if (frameATo != null) { + createLabelToA(frameATo, panelATo, textATo, backgroundColor, foregroundColor, chartViewerA); + } + + // Group B Time Intervals + Composite timelableB = new Composite(timeInputB, SWT.FILL); + Composite timelableBFrom = new Composite(timeInputB, SWT.EMBEDDED); + Composite timelableBTo = new Composite(timeInputB, SWT.EMBEDDED); + + timeInputB.setWeights(DEFAULT_WEIGHTS_TimeInterval); + + timelableB.setLayout(gridLayout); + timelableBFrom.setLayout(rowLayout); + timelableBTo.setLayout(rowLayout); + + SashForm sashFormLeftChildB = new SashForm(densityB, SWT.None); + fSashFormLeftChildB = sashFormLeftChildB; + + TmfViewer tmfViewerB = createLeftChildViewer(sashFormLeftChildB); + fTmfViewerB = tmfViewerB; + + SashForm xYViewerContainerB = new SashForm(densityB, SWT.VERTICAL); + fXYViewerContainerB = xYViewerContainerB; + xYViewerContainerB.setLayout(GridLayoutFactory.fillDefaults().create()); + + TmfXYChartViewer chartViewerB = createChartViewer(xYViewerContainerB); + fChartViewerB = chartViewerB; + + // Reset Button B + Button resetButtonB = new Button(timelableB, SWT.PUSH); + createResetButtonB(resetButtonB, chartViewerB, tmfViewerB); + + // LabelFromB + java.awt.Frame frameBFrom = SWT_AWT.new_Frame(timelableBFrom); + java.awt.Panel panelBFrom = new java.awt.Panel(); + JFormattedTextField textBFrom = new JFormattedTextField(fFormat); + if (frameBFrom != null) { + createLabelFromB(frameBFrom, panelBFrom, textBFrom, backgroundColor, foregroundColor, chartViewerB); + } + + // LableToB + java.awt.Frame frameBTo = SWT_AWT.new_Frame(timelableBTo); + java.awt.Panel panelBTo = new java.awt.Panel(); + JFormattedTextField textBTo = new JFormattedTextField(fFormat); + if (frameBTo != null) { + createLabelToB(frameBTo, panelBTo, textBTo, backgroundColor, foregroundColor, chartViewerB); + } + + createControlPaintListenerA(chartViewerA, sashFormLeftChildA); + + IStatusLineManager statusLineManager = getViewSite().getActionBars().getStatusLineManager(); + chartViewerA.setStatusLineManager(statusLineManager); + coupleSelectViewer(tmfViewerA, chartViewerA); + ((AbstractSelectTreeViewer2) tmfViewerA).addTreeListener(this); + + IWorkbenchPartSite site = getSite(); + fContextService = site.getWorkbenchWindow().getService(IContextService.class); + + createControlPaintListenerB(chartViewerB, sashFormLeftChildB); + + chartViewerB.setStatusLineManager(statusLineManager); + coupleSelectViewer(tmfViewerB, chartViewerB); + ((AbstractSelectTreeViewer2) tmfViewerB).addTreeListener(this); + + IMenuManager menuManager = getViewSite().getActionBars().getMenuManager(); + + IAction aggregatedAction = fConfigureStatisticAction; + if (aggregatedAction == null) { + aggregatedAction = getAggregateByAction(); + fConfigureStatisticAction = (Action) aggregatedAction; + } + menuManager.add(new Separator()); + menuManager.add(aggregatedAction); + menuManager.add(new Separator()); + + densityA.setWeights(DEFAULT_WEIGHTS_FILTERING_H); + densityB.setWeights(DEFAULT_WEIGHTS_FILTERING_H); + + Group groupQuery = new Group(sashForm, SWT.NULL); + groupQuery.setText(Messages.multipleDensityViewQueryGroup); + gridLayoutG = new GridLayout(); + gridLayoutG.numColumns = 1; + groupQuery.setLayout(gridLayoutG); + gridDataG = new GridData(GridData.FILL_BOTH); + gridDataG.horizontalSpan = 1; + groupQuery.setLayoutData(gridDataG); + + // Organizing sashFormQuery + ExpandBar bar = new ExpandBar(groupQuery, SWT.NONE); + bar.setLayout(new GridLayout(1, false)); + GridData data2 = new GridData(); + data2.verticalAlignment = SWT.FILL; + data2.horizontalAlignment = SWT.FILL; + data2.grabExcessHorizontalSpace = true; + data2.grabExcessVerticalSpace = true; + data2.heightHint = 75; + data2.widthHint = 100; + bar.setLayoutData(data2); + + Composite queryText = new Composite(bar, SWT.NONE); + queryText.setLayout(new GridLayout(1, false)); + queryText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + // Text + Text text = new Text(queryText, SWT.MULTI | SWT.BORDER); + data.verticalAlignment = SWT.FILL; + data.horizontalAlignment = SWT.FILL; + data.grabExcessHorizontalSpace = true; + data.grabExcessVerticalSpace = true; + data.heightHint = 75; + data.widthHint = 100; + text.setLayoutData(data); + ftextQuery = text; + addTextFocusListener(text, chartViewerA, chartViewerB, tmfViewerA, tmfViewerB); + + ExpandItem item0 = new ExpandItem(bar, SWT.NONE, 0); + item0.setText(Messages.multipleDensityViewQueryExpandable); + item0.setHeight(150); + + item0.setControl(queryText); + item0.setExpanded(false); + + bar.setSpacing(5); + createExpandBarListener(bar, queryText, sashForm); + + super.createPartControl(sashForm); + sashForm.setWeights(DEFAULT_WEIGHTS_HideQuery); + + ITmfTrace activetrace = TmfTraceManager.getInstance().getActiveTrace(); + if (activetrace != null) { + buildDifferentialFlameGraph(); + } + } + + private static void createGroups(Group group, GridLayout gridLayoutG, GridData gridDataG, SashForm density, GridData data, SashForm timeInput, boolean isA) { + if (isA) { + group.setText(Messages.multipleDensityViewGroupA); + } else { + group.setText(Messages.multipleDensityViewGroupB); + } + gridLayoutG.numColumns = 1; + group.setLayout(gridLayoutG); + gridDataG.horizontalSpan = 1; + group.setLayoutData(gridDataG); + data.heightHint = 200; + density.setLayoutData(data); + timeInput.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + } + + private void createResetButtonA(Button resetButton, TmfXYChartViewer chartViewerA, TmfViewer tmfViewerA) { + resetButton.setText("Reset Time IntervalA"); //$NON-NLS-1$ + resetButton.addListener(SWT.Selection, event -> { + ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); + if (trace != null) { + /* + * Resets tree viewer checked items. All items should be + * checked. + */ + List treeCheckedElements = ((MultipleEventDensityViewer) chartViewerA).getWholeCheckedItems(); + setCheckedElements(chartViewerA, tmfViewerA, treeCheckedElements, false); + + // Reset start time and end time and relating objects + fStartTimeA = trace.getStartTime(); + fEndTimeA = trace.getEndTime(); + ftextAFrom.setText(fStartTimeA.toString(fFormat)); + ftextATo.setText(fEndTimeA.toString(fFormat)); + if (ftextQuery != null) { + ftextQuery.setText(buildComparisonQuery()); + } + + // Dispatch signal to rebuild differential flame graph + TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(chartViewerA, fStartTimeA, fEndTimeA, getTrace())); + + } + }); + } + + private void createResetButtonB(Button resetButton, TmfXYChartViewer chartViewerB, TmfViewer tmfViewerB) { + resetButton.setText("Reset Time IntervalB"); //$NON-NLS-1$ + resetButton.addListener(SWT.Selection, event -> { + ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); + if (trace != null) { + /* + * Resets tree viewer checked items. All items should be checked + */ + List treeCheckedElements = ((MultipleEventDensityViewer) chartViewerB).getWholeCheckedItems(); + setCheckedElements(chartViewerB, tmfViewerB, treeCheckedElements, false); + + // Reset start time and end time and relating objects + fStartTimeB = trace.getStartTime(); + fEndTimeB = trace.getEndTime(); + ftextBFrom.setText(fStartTimeB.toString(fFormat)); + ftextBTo.setText(fEndTimeB.toString(fFormat)); + if (ftextQuery != null) { + ftextQuery.setText(buildComparisonQuery()); + } + + // Dispatch signal to rebuild differential flame graph + TmfSignalManager.dispatchSignal(new TmfSelectionRangeUpdatedSignal(chartViewerB, fStartTimeB, fEndTimeB, getTrace())); + + } + }); + } + + private void createLabelFromA(java.awt.Frame frameFrom, java.awt.Panel panelFrom, JFormattedTextField textFrom, Color backgroundColor, Color foregroundColor, TmfXYChartViewer chartViewer) { + frameFrom.add(panelFrom); + JLabel labelAFrom = new JLabel(); + labelAFrom.setText(Messages.multipleDensityViewFrom); + + // Set the background and foreground colors + panelFrom.setBackground(backgroundColor); + textFrom.setBackground(backgroundColor); + labelAFrom.setBackground(backgroundColor); + + textFrom.setForeground(foregroundColor); + labelAFrom.setForeground(foregroundColor); + + textFrom.addFocusListener(new java.awt.event.FocusListener() { + private String oldVal = ""; //$NON-NLS-1$ + + @Override + public void focusGained(java.awt.event.@Nullable FocusEvent e) { + String aFrom = textFrom.getText(); + if (aFrom != null) { + oldVal = aFrom; + } + } + + @Override + public void focusLost(java.awt.event.@Nullable FocusEvent e) { + if (!oldVal.equals(textFrom.getText())) { + long newTime = 0; + try { + newTime = fFormat.parseValue(textFrom.getText()); + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fStartTimeA = fromTime; + textFrom.setText(fStartTimeA.toString(fFormat)); + + updateSelectedRange(); + chartViewer.selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); + + } catch (ParseException e1) { + textFrom.setText(oldVal); + e1.printStackTrace(); + } + } + } + }); + textFrom.setText(fStartTimeA.toString(fFormat)); + panelFrom.add(labelAFrom); + panelFrom.add(textFrom); + ftextAFrom = textFrom; + + } + + private void createLabelFromB(java.awt.Frame frameFrom, java.awt.Panel panelFrom, JFormattedTextField textFrom, Color backgroundColor, Color foregroundColor, TmfXYChartViewer chartViewer) { + frameFrom.add(panelFrom); + JLabel labelBFrom = new JLabel(); + labelBFrom.setText(Messages.multipleDensityViewFrom); + + // Set the background and foreground colors + panelFrom.setBackground(backgroundColor); + textFrom.setBackground(backgroundColor); + labelBFrom.setBackground(backgroundColor); + + textFrom.setForeground(foregroundColor); + labelBFrom.setForeground(foregroundColor); + + textFrom.addFocusListener(new java.awt.event.FocusListener() { + private String oldVal = ""; //$NON-NLS-1$ + + @Override + public void focusGained(java.awt.event.@Nullable FocusEvent e) { + String bFrom = textFrom.getText(); + if (bFrom != null) { + oldVal = bFrom; + } + } + + @Override + public void focusLost(java.awt.event.@Nullable FocusEvent e) { + if (!oldVal.equals(textFrom.getText())) { + long newTime = 0; + try { + newTime = fFormat.parseValue(textFrom.getText()); + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fStartTimeB = fromTime; + textFrom.setText(fStartTimeB.toString(fFormat)); + + updateSelectedRange(); + chartViewer.selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeB, fEndTimeB, getTrace())); + + } catch (ParseException e1) { + textFrom.setText(oldVal); + e1.printStackTrace(); + } + + } + } + }); + + textFrom.setText(fStartTimeB.toString(fFormat)); + panelFrom.add(labelBFrom); + panelFrom.add(textFrom); + ftextBFrom = textFrom; + } + + private void createLabelToA(java.awt.Frame frameTo, java.awt.Panel panelTo, JFormattedTextField textTo, Color backgroundColor, Color foregroundColor, TmfXYChartViewer chartViewer) { + frameTo.add(panelTo); + JLabel labelATo = new JLabel(); + labelATo.setText(Messages.multipleDensityViewTo); + + // Set the background and foreground colors + panelTo.setBackground(backgroundColor); + textTo.setBackground(backgroundColor); + labelATo.setBackground(backgroundColor); + + textTo.setForeground(foregroundColor); + labelATo.setForeground(foregroundColor); + + textTo.addFocusListener(new java.awt.event.FocusListener() { + private String oldVal = ""; //$NON-NLS-1$ + + @Override + public void focusGained(java.awt.event.@Nullable FocusEvent e) { + String aTo = textTo.getText(); + if (aTo != null) { + oldVal = aTo; + } + } + + @Override + public void focusLost(java.awt.event.@Nullable FocusEvent e) { + if (!oldVal.equals(textTo.getText())) { + long newTime = 0; + try { + newTime = fFormat.parseValue(textTo.getText()); + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fEndTimeA = fromTime; + textTo.setText(fEndTimeA.toString(fFormat)); + + updateSelectedRange(); + chartViewer.selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); + + } catch (ParseException e1) { + textTo.setText(oldVal); + e1.printStackTrace(); + } + } + } + }); + textTo.setText(fEndTimeA.toString(fFormat)); + panelTo.add(labelATo); + panelTo.add(textTo); + ftextATo = textTo; + } + + private void createLabelToB(java.awt.Frame frameTo, java.awt.Panel panelTo, JFormattedTextField textTo, Color backgroundColor, Color foregroundColor, TmfXYChartViewer chartViewer) { + frameTo.add(panelTo); + JLabel labelBTo = new JLabel(); + labelBTo.setText(Messages.multipleDensityViewTo); + + // Set the background and foreground colors + panelTo.setBackground(backgroundColor); + textTo.setBackground(backgroundColor); + labelBTo.setBackground(backgroundColor); + + textTo.setForeground(foregroundColor); + labelBTo.setForeground(foregroundColor); + + textTo.addFocusListener(new java.awt.event.FocusListener() { + + public @Nullable String oldVal = null; + + @Override + public void focusGained(java.awt.event.@Nullable FocusEvent e) { + oldVal = textTo.getText(); + } + + @Override + public void focusLost(java.awt.event.@Nullable FocusEvent e) { + if (oldVal != null && !oldVal.equals(textTo.getText())) { + long newTime = 0; + try { + newTime = fFormat.parseValue(textTo.getText()); + ITmfTimestamp fromTime = TmfTimestamp.fromNanos(newTime); + fEndTimeB = fromTime; + textTo.setText(fEndTimeB.toString(fFormat)); + updateSelectedRange(); + chartViewer.selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); + + } catch (ParseException e1) { + textTo.setText(oldVal); + e1.printStackTrace(); + } + } + } + + }); + textTo.setText(fEndTimeB.toString(fFormat)); + panelTo.add(labelBTo); + panelTo.add(textTo); + ftextBTo = textTo; + } + + private void createControlPaintListenerA(TmfXYChartViewer chartViewer, SashForm sashFormLeftChildA) { + chartViewer.getControl().addPaintListener(new PaintListener() { + @Override + public void paintControl(@Nullable PaintEvent e) { + /* + * Sashes in a SashForm are being created on layout so we need + * to add the drag listener here. + */ + Listener sashDragListener = fSashDragListener; + if (sashDragListener == null) { + for (Control control : sashFormLeftChildA.getChildren()) { + if (control instanceof Sash) { + sashDragListener = event -> TmfSignalManager.dispatchSignal(new TmfTimeViewAlignmentSignal(sashFormLeftChildA, getTimeViewAlignmentInfo(chartViewer, sashFormLeftChildA))); + fSashDragListener = sashDragListener; + control.removePaintListener(this); + control.addListener(SWT.Selection, sashDragListener); + // There should be only one sash + break; + } + + } + } + } + }); + } + + private void createControlPaintListenerB(TmfXYChartViewer chartViewer, SashForm sashFormLeftChildB) { + chartViewer.getControl().addPaintListener(new PaintListener() { + @Override + public void paintControl(@Nullable PaintEvent e) { + /* + * Sashes in a SashForm are being created on layout so we need + * to add the drag listener here. + */ + Listener sashDragListener = fSashDragListener; + if (sashDragListener == null) { + for (Control control : sashFormLeftChildB.getChildren()) { + if (control instanceof Sash) { + sashDragListener = event -> TmfSignalManager.dispatchSignal(new TmfTimeViewAlignmentSignal(sashFormLeftChildB, getTimeViewAlignmentInfo(chartViewer, sashFormLeftChildB))); + fSashDragListener = sashDragListener; + control.removePaintListener(this); + control.addListener(SWT.Selection, sashDragListener); + // There should be only one sash + break; + } + + } + } + } + }); + } + + private void addTextFocusListener(Text text, TmfXYChartViewer chartViewerA, TmfXYChartViewer chartViewerB, TmfViewer tmfViewerA, TmfViewer tmfViewerB) { + text.addFocusListener(new FocusListener() { + + @Override + public void focusGained(@Nullable FocusEvent e) { + // Does nothing + } + + @Override + public void focusLost(@Nullable FocusEvent e) { + if (ftextQuery != null) { + String query = ftextQuery.getText(); + if (query == null) { + return; + } + boolean parsed = parseComparisonQuery(query); + if (parsed) { + /// Updating blue lines in density chats + chartViewerA.selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeA, fEndTimeA, getTrace())); + chartViewerB.selectionRangeUpdated(new TmfSelectionRangeUpdatedSignal(this, fStartTimeB, fEndTimeB, getTrace())); + + // treeViewerA + List treeWholeElements = ((MultipleEventDensityViewer) chartViewerA).getWholeCheckedItems(); + List treeCheckedElements = updateCheckedElements(treeWholeElements, true); + + setCheckedElements(chartViewerA, tmfViewerA, treeCheckedElements, true); + // treeViewerB + treeWholeElements = ((MultipleEventDensityViewer) chartViewerB).getWholeCheckedItems(); + treeCheckedElements = updateCheckedElements(treeWholeElements, false); + + setCheckedElements(chartViewerB, tmfViewerB, treeCheckedElements, true); + + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, fStatistic, fTraceListA, fTraceListB); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + buildDifferentialFlameGraph(); + } + } + } + }); + } + + private List updateCheckedElements(List treeWholeElements, boolean isGroupA) { + List treeCheckedElements = new ArrayList<>(); + if (isGroupA) { + for (ITmfTreeViewerEntry trace : treeWholeElements) { + if (fTraceListA.contains(trace.getName())) { + treeCheckedElements.add(trace); + treeCheckedElements.addAll(trace.getChildren()); + } + } + } else { + for (ITmfTreeViewerEntry trace : treeWholeElements) { + if (fTraceListB.contains(trace.getName())) { + treeCheckedElements.add(trace); + treeCheckedElements.addAll(trace.getChildren()); + } + } + } + return treeCheckedElements; + } + + private static void createExpandBarListener(ExpandBar bar, Composite queryText, SashForm sashForm) { + bar.addExpandListener(new ExpandListener() { + + @Override + public void itemExpanded(@Nullable ExpandEvent e) { + Display.getCurrent().asyncExec(() -> { + queryText.pack(true); + sashForm.setWeights(DEFAULT_WEIGHTS_ShowQuery); + + }); + } + + @Override + public void itemCollapsed(@Nullable ExpandEvent e) { + Display.getCurrent().asyncExec(() -> { + queryText.pack(true); + sashForm.setWeights(DEFAULT_WEIGHTS_HideQuery); + }); + } + }); + } + + /** + * Returns the time alignment information + * + * @param chartViewer + * the event distribution viewer + * @param sashFormLeftChild + * the check box viewer + * @return the time alignment information + */ + public TmfTimeViewAlignmentInfo getTimeViewAlignmentInfo(TmfXYChartViewer chartViewer, SashForm sashFormLeftChild) { + return new TmfTimeViewAlignmentInfo(chartViewer.getControl().getShell(), sashFormLeftChild.toDisplay(0, 0), getTimeAxisOffset(chartViewer, sashFormLeftChild)); + } + + private static int getTimeAxisOffset(TmfXYChartViewer chartViewer, SashForm sashFormLeftChild) { + return sashFormLeftChild.getChildren()[0].getSize().x + sashFormLeftChild.getSashWidth() + chartViewer.getPointAreaOffset(); + } + + @Override + @TmfSignalHandler + public void traceSelected(final TmfTraceSelectedSignal signal) { + super.traceSelected(signal); + if (fTmfViewerA instanceof TmfTimeViewer tmfViewerA) { + tmfViewerA.traceSelected(signal); + } + if (fChartViewerA != null) { + fChartViewerA.traceSelected(signal); + } + + if (fTmfViewerB instanceof TmfTimeViewer tmfViewerB) { + tmfViewerB.traceSelected(signal); + } + + if (fChartViewerB != null) { + fChartViewerB.traceSelected(signal); + } + ITmfTrace trace = signal.getTrace(); + fStartTimeA = trace.getStartTime(); + fEndTimeA = trace.getEndTime(); + fStartTimeB = trace.getStartTime(); + fEndTimeB = trace.getEndTime(); + + ftextAFrom.setText(fStartTimeA.toString(fFormat)); + ftextBFrom.setText(fStartTimeB.toString(fFormat)); + ftextATo.setText(fEndTimeA.toString(fFormat)); + ftextBTo.setText(fEndTimeB.toString(fFormat)); + + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, fStatistic, fTraceListA, fTraceListB); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + if (ftextQuery != null) { + ftextQuery.setText(buildComparisonQuery()); + } + buildDifferentialFlameGraph(); + } + + private Action createStatisticAction(String name) { + return new Action(name, IAction.AS_RADIO_BUTTON) { + @Override + public void run() { + ITmfTrace trace = getTrace(); + if (trace == null) { + return; + } + fStatistic = name; + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStatistic, null, null); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + if (ftextQuery != null) { + ftextQuery.setText(buildComparisonQuery()); + } + buildDifferentialFlameGraph(); + } + }; + } + + /** + * Signal that the trace was opened + * + * @param signal + * the trace open signal + */ + @TmfSignalHandler + public void traceOpened(TmfTraceOpenedSignal signal) { + if (fChartViewerA != null) { + fChartViewerA.traceOpened(signal); + } + if (fChartViewerB != null) { + fChartViewerB.traceOpened(signal); + } + + } + + private void buildDifferentialFlameGraph() { + + ITmfTrace activetrace = TmfTraceManager.getInstance().getActiveTrace(); + if (activetrace != null) { + Display.getDefault().asyncExec(() -> buildFlameGraph(activetrace, null, null)); + + } + } + + /** + * Creates left child viewer for event density chart + * + * @param parent + * composite + * @return left chart viewer + */ + public TmfViewer createLeftChildViewer(Composite parent) { + EventDensityTreeViewer histogramTreeViewer = new EventDensityTreeViewer(parent); + ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace(); + if (trace != null) { + histogramTreeViewer.traceSelected(new TmfTraceSelectedSignal(this, trace)); + } + return histogramTreeViewer; + } + + private TmfXYChartViewer createChartViewer(Composite parent) { + MultipleEventDensityViewer chartViewer = new MultipleEventDensityViewer(parent, new TmfXYChartSettings(null, null, Y_AXIS_LABEL, 1)); + chartViewer.setSendTimeAlignSignals(true); + chartViewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + chartViewer.getControl().addMouseListener(new MouseAdapter() { + @Override + public void mouseDoubleClick(@Nullable MouseEvent e) { + super.mouseDoubleClick(e); + resetStartFinishTime(true, chartViewer); + } + }); + chartViewer.getControl().addFocusListener(new FocusListener() { + @Override + public void focusLost(@Nullable FocusEvent e) { + deactivateContextService(); + } + + @Override + public void focusGained(@Nullable FocusEvent e) { + activateContextService(); + } + }); + + return chartViewer; + } + + /** + * Sets checked for the elements in TreeCheckedElements + * + * @param chart + * the chart viewer + * @param tree + * the tree viewer + * @param treeCheckedElements + * the elements in tree that should be checked + * @param queryUpdate + * updates the check state of the tree viewer if true + */ + public void setCheckedElements(TmfXYChartViewer chart, TmfViewer tree, List treeCheckedElements, boolean queryUpdate) { + if (queryUpdate) { + ((MultipleEventDensityViewer) chart).updateCheckStateChangedEvent(treeCheckedElements); + } else { + ((MultipleEventDensityViewer) chart).handleCheckStateChangedEvent(treeCheckedElements); + } + Object[] treeCheckedElementsObj = new Object[treeCheckedElements.size()]; + + treeCheckedElements.toArray(treeCheckedElementsObj); + ((AbstractSelectTreeViewer2) tree).getTriStateFilteredCheckboxTree().setCheckedElements(treeCheckedElementsObj); + } + + /** + * Resets the start and end times. + * + * @param notify + * indicating if we should broadcast the update signal + * @param chart + * determines which chart to reset start and end times + */ + public void resetStartFinishTime(boolean notify, TmfXYChartViewer chart) { + if (notify) { + TmfWindowRangeUpdatedSignal signal = new TmfWindowRangeUpdatedSignal(this, TmfTimeRange.ETERNITY, getTrace()); + broadcast(signal); + + } + } + + private void deactivateContextService() { + if (fContextService != null) { + fContextService.deactivateContexts(fActiveContexts); + fActiveContexts.clear(); + } + } + + private void activateContextService() { + if (fActiveContexts.isEmpty() && fContextService != null) { + IContextActivation activateContext = fContextService.activateContext(TMF_VIEW_UI_CONTEXT); + Objects.requireNonNull(activateContext); + fActiveContexts.add(activateContext); + } + } + + private static void coupleSelectViewer(TmfViewer tree, TmfXYChartViewer chart) { + if (tree instanceof AbstractSelectTreeViewer2 selectTree && chart instanceof TmfFilteredXYChartViewer chartViewer) { + ILegendImageProvider2 legendImageProvider = new XYChartLegendImageProvider((TmfCommonXAxisChartViewer) chart); + selectTree.addTreeListener(chartViewer); + selectTree.setLegendImageProvider(legendImageProvider); + TriStateFilteredCheckboxTree checkboxTree = selectTree.getTriStateFilteredCheckboxTree(); + checkboxTree.addPreCheckStateListener(new ManyEntriesSelectedDialogPreCheckedListener(checkboxTree)); + } + } + + /** + * @param signal + * TmfSelectionRangeUpdatedSignal signal raised when time ranges + * are updated + */ + @TmfSignalHandler + public void selectionRangeUpdated(TmfSelectionRangeUpdatedSignal signal) { + Object source = signal.getSource(); + if (source == fChartViewerA) { + fStartTimeA = signal.getBeginTime(); + fEndTimeA = signal.getEndTime(); + ftextAFrom.setText(fStartTimeA.toString(fFormat)); + ftextATo.setText(fEndTimeA.toString(fFormat)); + + } else if (source == fChartViewerB) { + fStartTimeB = signal.getBeginTime(); + fEndTimeB = signal.getEndTime(); + ftextBFrom.setText(fStartTimeB.toString(fFormat)); + ftextBTo.setText(fEndTimeB.toString(fFormat)); + } + updateSelectedRange(); + + } + + /** + * Updates the filtering parameters and query and builds flamegraph + */ + public void updateSelectedRange() { + try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MultiDensityView::SelectionRangeUpdated")) { //$NON-NLS-1$ + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, fStartTimeA, fEndTimeA, fStartTimeB, fEndTimeB, null, null, null); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + Display.getDefault().syncExec(() -> { + if (ftextQuery != null) { + ftextQuery.setText(buildComparisonQuery()); + } + }); + buildDifferentialFlameGraph(); + } + } + + /** + * Get the statistic type + * + * @return fStatistic (Duration or Self time) which will be represented in + * the flame graph + */ + public String getStatisticType() { + return fStatistic; + + } + + private Action getAggregateByAction() { + Action configureStatisticAction = new Action(Messages.flameGraphViewGroupByName, IAction.AS_DROP_DOWN_MENU) { + }; + configureStatisticAction.setToolTipText(Messages.flameGraphViewStatisticTooltip); + configureStatisticAction.setMenuCreator(new IMenuCreator() { + @Nullable + Menu menu = null; + + @Override + public void dispose() { + if (menu != null) { + menu.dispose(); + menu = null; + } + } + + @Override + public @Nullable Menu getMenu(@Nullable Control parent) { + return null; + } + + @Override + public @Nullable Menu getMenu(@Nullable Menu parent) { + menu = new Menu(parent); + + Action statisticActionDur = createStatisticAction(Objects.requireNonNull(Messages.multipleDensityViewDuration)); + new ActionContributionItem(statisticActionDur).fill(menu, -1); + + Action statisticActionSelf = createStatisticAction(Objects.requireNonNull(Messages.multipleDensityViewSelfTime)); + new ActionContributionItem(statisticActionSelf).fill(menu, -1); + return menu; + + } + }); + + return Objects.requireNonNull(configureStatisticAction); + } + + /** + * @param signal + * the TmfCheckboxChangedSignal signal + */ + @TmfSignalHandler + public void checkBoxUpdated(TmfCheckboxChangedSignal signal) { + try (ScopeLog sl = new ScopeLog(LOGGER, Level.FINE, "MultiDensityView::CheckBoxUpdated")) {//$NON-NLS-1$ + TmfComparisonFilteringUpdatedSignal rangUpdateSignal = null; + + if (signal.getSource() == fChartViewerA) { + fTraceListA.clear(); + for (String name : signal.getTraceList()) { + fTraceListA.add(name); + } + + rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, null, fTraceListA, null); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + } + + if (signal.getSource() == fChartViewerB) { + fTraceListB.clear(); + for (String name : signal.getTraceList()) { + fTraceListB.add(name); + } + + rangUpdateSignal = new TmfComparisonFilteringUpdatedSignal(this, null, null, fTraceListB); + TmfSignalManager.dispatchSignal(rangUpdateSignal); + + } + if (ftextQuery != null) { + ftextQuery.setText(buildComparisonQuery()); + } + buildDifferentialFlameGraph(); + } + + } + + @Override + public void handleCheckStateChangedEvent(Collection entries) { + // do nothing + } + + @Override + public void dispose() { + super.dispose(); + TmfSignalManager.deregister(this); + + if (fChartViewerA != null) { + fChartViewerA.dispose(); + } + if (fTmfViewerA != null) { + fTmfViewerA.dispose(); + } + if (fChartViewerB != null) { + fChartViewerB.dispose(); + } + if (fTmfViewerB != null) { + fTmfViewerB.dispose(); + } + if (fXYViewerContainerA != null) { + fXYViewerContainerA.dispose(); + } + if (fXYViewerContainerB != null) { + fXYViewerContainerB.dispose(); + } + if (fContextService != null) { + fContextService.dispose(); + } + if (fSashFormLeftChildA != null) { + fSashFormLeftChildA.dispose(); + } + if (fSashFormLeftChildB != null) { + fSashFormLeftChildB.dispose(); + } + if (fsashForm != null) { + fsashForm.dispose(); + } + } + + /* + * Constructs a query string based on the current state of selected traces + * and time ranges + */ + private String buildComparisonQuery() { + StringBuilder query = new StringBuilder(); + /// Query PartA + query.append(TRACE_NAME); + for (String trace : fTraceListA) { + if (!trace.equals("Total")) { //$NON-NLS-1$ + query.append(trace); + query.append(","); //$NON-NLS-1$ + } + } + query.append(System.lineSeparator()); + + query.append(Messages.multipleDensityViewFrom); + query.append(fStartTimeA.toString(fFormat)); + query.append(System.lineSeparator()); + + query.append(Messages.multipleDensityViewTo); + query.append(fEndTimeA.toString(fFormat)); + query.append(System.lineSeparator()); + + query.append(Messages.multipleDensityViewQueryCompare); + query.append(System.lineSeparator()); + + /// Query PartB + query.append(TRACE_NAME); + for (String trace : fTraceListB) { + if (!trace.equals("Total")) { //$NON-NLS-1$ + query.append(trace); + query.append(","); //$NON-NLS-1$ + } + } + query.append(System.lineSeparator()); + + query.append(Messages.multipleDensityViewFrom); + query.append(fStartTimeB.toString(fFormat)); + query.append(System.lineSeparator()); + + query.append(Messages.multipleDensityViewTo); + query.append(fEndTimeB.toString(fFormat)); + query.append(System.lineSeparator()); + + //// Query Statistic Part + query.append(STATISTIC_NAME); + query.append(fStatistic); + + return query.toString(); + } + + /* + * Parses a structured text query into trace and time selection parameters + */ + boolean parseComparisonQuery(String query) { + try { + String lineSeparator = System.lineSeparator(); + if (lineSeparator != null) { + String[] parts = query.split(lineSeparator); + // Times + + if (parts[1].indexOf(Messages.multipleDensityViewFrom) == -1) { + return false; + } + String fromStrA = parts[1].substring(parts[1].indexOf(Messages.multipleDensityViewFrom) + Messages.multipleDensityViewFrom.length(), parts[1].length()); + fStartTimeA = TmfTimestamp.fromNanos(fFormat.parseValue(fromStrA)); + + if (parts[2].indexOf(Messages.multipleDensityViewTo) == -1) { + return false; + } + String toStrA = parts[2].substring(parts[2].indexOf(Messages.multipleDensityViewTo) + Messages.multipleDensityViewTo.length(), parts[2].length()); + fEndTimeA = TmfTimestamp.fromNanos(fFormat.parseValue(toStrA)); + + if (parts[5].indexOf(Messages.multipleDensityViewFrom) == -1) { + return false; + } + String fromStrB = parts[5].substring(parts[5].indexOf(Messages.multipleDensityViewFrom) + Messages.multipleDensityViewFrom.length(), parts[5].length()); + fStartTimeB = TmfTimestamp.fromNanos(fFormat.parseValue(fromStrB)); + + if (parts[6].indexOf(Messages.multipleDensityViewTo) == -1) { + return false; + } + String toStrB = parts[6].substring(parts[6].indexOf(Messages.multipleDensityViewTo) + Messages.multipleDensityViewTo.length(), parts[6].length()); + fEndTimeB = TmfTimestamp.fromNanos(fFormat.parseValue(toStrB)); + + // traceListA + if (parts[0].indexOf(TRACE_NAME) == -1) { + return false; + } + String traceStrtA = parts[0].substring(parts[0].indexOf(TRACE_NAME) + TRACE_NAME.length(), parts[0].length()); + String[] traces = traceStrtA.split(","); //$NON-NLS-1$ + + parseAndAddTraces(fTraceListA, traces); + + // traceListB + String traceStrtB = parts[4].substring(parts[4].indexOf(TRACE_NAME) + TRACE_NAME.length(), parts[4].length()); + String[] tracesB = traceStrtB.split(","); //$NON-NLS-1$ + + parseAndAddTraces(fTraceListB, tracesB); + + //// Statistic + fStatistic = parts[7].substring(parts[7].indexOf(STATISTIC_NAME) + STATISTIC_NAME.length(), parts[7].length()); + + // Set time range related objects + ftextAFrom.setText(fStartTimeA.toString(fFormat)); + ftextATo.setText(fEndTimeA.toString(fFormat)); + + ftextBFrom.setText(fStartTimeB.toString(fFormat)); + ftextBTo.setText(fEndTimeB.toString(fFormat)); + } + } catch (ParseException e) { + e.printStackTrace(); + return false; + } + return true; + } + + private static void parseAndAddTraces(List fTraceList, String[] traces) { + fTraceList.clear(); + for (String trace : traces) { + if (trace != null) { + fTraceList.add(trace); + } + } + } + +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Messages.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Messages.java similarity index 50% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Messages.java rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Messages.java index 26174fbdc..12cc4e842 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Messages.java +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/Messages.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2024 École Polytechnique de Montréal + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson * * All rights reserved. This program and the accompanying materials are * made available under the terms of the Eclipse Public License 2.0 which @@ -15,76 +15,118 @@ import org.eclipse.osgi.util.NLS; /** - * @author Fateme Faraji Daneshgar + * Message bundle class + * + * @author Fateme Faraji Daneshgar and Vlad Arama */ @NonNullByDefault({}) public class Messages extends NLS { private static final String BUNDLE_NAME = "org.eclipse.tracecompass.incubator.internal.executioncomparison.ui.messages"; //$NON-NLS-1$ + /** + * The color definition for the tool background. + */ + public static String background; + + /** + * The label for the data selection portion of the execution comparison ui + */ + public static String dataSelection; + /** * The label of GroupA */ - public static String MultipleDensityView_GroupA; + public static String multipleDensityViewGroupA; /** * The label of GroupB */ - public static String MultipleDensityView_GroupB; + public static String multipleDensityViewGroupB; /** * The label of Query Group */ - public static String MultipleDensityView_QueryGroup; + public static String multipleDensityViewQueryGroup; /** * The label of Query expandable item */ - public static String MultipleDensityView_QueryExpandable; + public static String multipleDensityViewQueryExpandable; /** * The label for time range selection (from) */ - public static String MultipleDensityView_From; + public static String multipleDensityViewFrom; /** * The label for time range selection (to) */ - public static String MultipleDensityView_To; + public static String multipleDensityViewTo; /** * The label for "compare to" in query */ - public static String MultipleDensityView_QueryCompare; + public static String multipleDensityViewQueryCompare; /** * The Duration statistics */ - public static String MultipleDensityView_Duration; + public static String multipleDensityViewDuration; /** * The selfTime statistic */ - public static String MultipleDensityView_SelfTime; + public static String multipleDensityViewSelfTime; /** * The title of execution comparison view */ - public static String MultipleDensityView_title; + public static String multipleDensityViewTitle; + + /** + * The id of execution comparison view + */ + public static String multipleDensityViewId; + + /** + * The color definition for the tool foreground. + */ + public static String foreground; /** * The action name for grouping */ - public static String FlameGraphView_GroupByName; + public static String flameGraphViewGroupByName; /** * The action tooltip for selecting between Duration and SelfTime */ - public static String FlameGraphView_StatisticTooltip; + public static String flameGraphViewStatisticTooltip; /** * Execution of the callGraph Analysis */ - public static String FlameGraphView_RetrievingData; + public static String flameGraphViewRetrievingData; + + /** + * Name of the traces + */ + public static String traceName; + + /** + * The context of the TmfView + */ + public static String tmfViewUiContext; + + /** + * Name of the statistics + */ + public static String statisticName; + + /** + * Label for the Y Axis + */ + public static String yAxisLabel; static { // initialize resource bundle @@ -93,4 +135,4 @@ public class Messages extends NLS { private Messages() { } -} \ No newline at end of file +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/MultipleEventDensityViewer.java b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/MultipleEventDensityViewer.java new file mode 100644 index 000000000..425d27b12 --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/MultipleEventDensityViewer.java @@ -0,0 +1,161 @@ +/******************************************************************************* + * Copyright (c) 2024 École Polytechnique de Montréal, Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.executioncomparison.ui; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.tracecompass.incubator.internal.executioncomparison.core.TmfCheckboxChangedSignal; +import org.eclipse.tracecompass.internal.tmf.ui.viewers.eventdensity.EventDensityViewer; +import org.eclipse.tracecompass.tmf.core.model.tree.TmfTreeDataModel; +import org.eclipse.tracecompass.tmf.core.signal.TmfSelectionRangeUpdatedSignal; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalHandler; +import org.eclipse.tracecompass.tmf.core.signal.TmfSignalManager; +import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp; +import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange; +import org.eclipse.tracecompass.tmf.core.trace.ITmfTrace; +import org.eclipse.tracecompass.tmf.core.trace.TmfTraceManager; +import org.eclipse.tracecompass.tmf.ui.viewers.tree.ITmfTreeViewerEntry; +import org.eclipse.tracecompass.tmf.ui.viewers.tree.TmfGenericTreeEntry; +import org.eclipse.tracecompass.tmf.ui.viewers.xychart.linechart.TmfXYChartSettings; + +/** + * MultipleEventDensityViewer extends EventDensityViewer to override + * handleCheckStateChangedEvent in order to reflect changes to the differential + * flame graph + * + * @author Fateme Faraji Daneshgar and Vlad Arama + * + */ +@SuppressWarnings("restriction") +public class MultipleEventDensityViewer extends EventDensityViewer { + List fWholeTraceList = new ArrayList<>(); + + /** + * Constructor + * + * @param parent + * Composite + * @param settings + * ChartSetting + */ + public MultipleEventDensityViewer(Composite parent, TmfXYChartSettings settings) { + super(parent, settings); + } + + /* + * We override this method to avoid raising a signal for the second group of + * the MultipleEventDensityViewer, when a signal is raised from the first + * group. + */ + @Override + @TmfSignalHandler + public void selectionRangeUpdated(@Nullable TmfSelectionRangeUpdatedSignal signal) { + if (signal == null) { + return; + } + + /* + * Signal sent when changing the text boxes or changing the query from + * the ExecutionComparisonView. The trace context gets updated. + */ + if (!(signal.getSource() instanceof MultipleEventDensityViewer)) { + final ITmfTrace trace = getTrace(); + if (trace != null) { + ITmfTimestamp selectedTime = signal.getBeginTime(); + ITmfTimestamp selectedEndTime = signal.getEndTime(); + TmfTraceManager.getInstance().updateTraceContext(trace, + builder -> builder.setSelection(new TmfTimeRange(selectedTime, selectedEndTime))); + + } + super.selectionRangeUpdated(signal); + } + /* + * Signal being updated is itself, we set the selection range for the + * MultipleEventDensityViewer. + */ + if (signal.getSource() == this) { + final ITmfTrace trace = getTrace(); + if (trace != null) { + long selectedTime = signal.getBeginTime().toNanos(); + long selectedEndTime = signal.getEndTime().toNanos(); + setSelectionRange(selectedTime, selectedEndTime); + } + } + } + + /** + * Handles check state of tree viewer and keeps the list of whole trace + * list. Dispatches TmfCheckboxChangedSignal signal to update the + * differential flame graph + * + * @param entries + * list of entries that should be checked + */ + + @Override + public void handleCheckStateChangedEvent(Collection entries) { + super.handleCheckStateChangedEvent(entries); + updateTraceList(entries); + List traceNames = new ArrayList<>(); + for (ITmfTreeViewerEntry entry : entries) { + if (entry instanceof TmfGenericTreeEntry) { + TmfGenericTreeEntry genericEntry = (TmfGenericTreeEntry) entry; + if (genericEntry.getModel() instanceof TmfTreeDataModel) { + TmfTreeDataModel model = (TmfTreeDataModel) genericEntry.getModel(); + if (model != null) { + String name = model.getName(); + traceNames.add(name); + } + } + } + } + TmfSignalManager.dispatchSignal(new TmfCheckboxChangedSignal(this, traceNames)); + } + + /* + * Keeps fWholeTraceList updated to include all entries for experiment. it + * will be used when the checkedboxtree is reset. + */ + private void updateTraceList(Collection entries) { + for (ITmfTreeViewerEntry entry : entries) { + if (!fWholeTraceList.contains(entry)) { + fWholeTraceList.add(entry); + } + } + + } + + /** + * Get WholeCheckedItems which is the checked item in the tree viewer + * + * @return fWholeTraceList list of checked Items in tree viewer + */ + public List getWholeCheckedItems() { + return fWholeTraceList; + } + + /** + * Handles check state of the treeviewer, used in updating tree viewers with + * query updating + * + * @param entries + * list of entries that should be checked + */ + public void updateCheckStateChangedEvent(Collection entries) { + super.handleCheckStateChangedEvent(entries); + } + +} diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties new file mode 100644 index 000000000..a5a2d0efd --- /dev/null +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison.ui/src/org/eclipse/tracecompass/incubator/internal/executioncomparison/ui/messages.properties @@ -0,0 +1,31 @@ +############################################################################### + # Copyright (c) 2024 �cole Polytechnique de Montr�al, Ericsson + # + # All rights reserved. This program and the accompanying materials are + # made available under the terms of the Eclipse Public License 2.0 which + # accompanies this distribution, and is available at + # https://www.eclipse.org/legal/epl-2.0/ + # + # SPDX-License-Identifier: EPL-2.0 +############################################################################### +background=org.eclipse.tracecompass.tmf.ui.TOOL_BACKGROUND +dataSelection=Data Selection +foreground=org.eclipse.tracecompass.tmf.ui.TOOL_FOREGROUND +multipleDensityViewGroupA=GroupA +multipleDensityViewGroupB=GroupB +multipleDensityViewQueryGroup=Filtering Query +multipleDensityViewQueryCompare=Compare to: +multipleDensityViewFrom=From: +multipleDensityViewTo=To: +multipleDensityViewDuration=Duration +multipleDensityViewSelfTime=Self Time +multipleDensityViewTitle=Execution Comparison +multipleDensityViewId=org.eclipse.tracecompass.incubator.internal.executioncomparison.ui.execComparison +flameGraphViewRetrievingData=Retrieving Flame Graph Data +flameGraphViewGroupByName=Group by Descriptor +flameGraphViewStatisticTooltip=Select the statistic to represent +multipleDensityViewQueryExpandable=Get filtering query +tmfViewUiContext=org.eclipse.tracecompass.tmf.ui.view.context +traceName=Trace(s): +statisticName=Statistic: +yAxisLabel=Event Count diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/.project b/analyses/org.eclipse.tracecompass.incubator.executioncomparison/.project similarity index 100% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision/.project rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison/.project diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/build.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparison/build.properties similarity index 90% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision/build.properties rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison/build.properties index de40c6279..f05b3e5b7 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/build.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison/build.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022 École Polytechnique de Montréal +# Copyright (c) 2024 École Polytechnique de Montréal # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.properties b/analyses/org.eclipse.tracecompass.incubator.executioncomparison/feature.properties similarity index 82% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.properties rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison/feature.properties index f9f49a686..7e589fd1d 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.properties +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison/feature.properties @@ -1,5 +1,5 @@ ############################################################################### -# Copyright (c) 2022 École Polytechnique de Montréal +# Copyright (c) 2024 École Polytechnique de Montréal # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License 2.0 @@ -9,7 +9,7 @@ # SPDX-License-Identifier: EPL-2.0 ############################################################################### -featureName=Trace Compass ExecutionComparision (Incubation) +featureName=Trace Compass ExecutionComparison (Incubation) description= diff --git a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.xml b/analyses/org.eclipse.tracecompass.incubator.executioncomparison/feature.xml similarity index 57% rename from analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.xml rename to analyses/org.eclipse.tracecompass.incubator.executioncomparison/feature.xml index ea19102a8..ebb39ce70 100644 --- a/analyses/org.eclipse.tracecompass.incubator.executioncomparision/feature.xml +++ b/analyses/org.eclipse.tracecompass.incubator.executioncomparison/feature.xml @@ -1,8 +1,8 @@ @@ -18,26 +18,17 @@ %license - + + id="org.eclipse.tracecompass.incubator.executioncomparison.core" + version="0.0.0"/> + id="org.eclipse.tracecompass.incubator.executioncomparison.ui" + version="0.0.0"/> + id="org.eclipse.tracecompass.incubator.executioncomparison.core.tests" + version="0.0.0"/> diff --git a/analyses/pom.xml b/analyses/pom.xml index aa584d5db..88f8e2e33 100644 --- a/analyses/pom.xml +++ b/analyses/pom.xml @@ -39,6 +39,10 @@ org.eclipse.tracecompass.incubator.eventfieldcount org.eclipse.tracecompass.incubator.eventfieldcount.core org.eclipse.tracecompass.incubator.eventfieldcount.core.tests + org.eclipse.tracecompass.incubator.executioncomparison + org.eclipse.tracecompass.incubator.executioncomparison.core + org.eclipse.tracecompass.incubator.executioncomparison.core.tests + org.eclipse.tracecompass.incubator.executioncomparison.ui org.eclipse.tracecompass.incubator.filters org.eclipse.tracecompass.incubator.filters.core org.eclipse.tracecompass.incubator.filters.core.tests diff --git a/callstack/org.eclipse.tracecompass.incubator.analysis.core.tests/src/org/eclipse/tracecompass/incubator/analysis/core/tests/weighted/diff/WeightedTreeUtilsTest.java b/callstack/org.eclipse.tracecompass.incubator.analysis.core.tests/src/org/eclipse/tracecompass/incubator/analysis/core/tests/weighted/diff/WeightedTreeUtilsTest.java index a5a7bb10d..4c6a0432b 100644 --- a/callstack/org.eclipse.tracecompass.incubator.analysis.core.tests/src/org/eclipse/tracecompass/incubator/analysis/core/tests/weighted/diff/WeightedTreeUtilsTest.java +++ b/callstack/org.eclipse.tracecompass.incubator.analysis.core.tests/src/org/eclipse/tracecompass/incubator/analysis/core/tests/weighted/diff/WeightedTreeUtilsTest.java @@ -115,7 +115,7 @@ public void setupTrees() { } /** - * Test the {@link WeightedTreeUtils#diffTrees(Collection, Collection)} + * Test the {@link WeightedTreeUtils#diffTrees(Collection, Collection, String)} * method with simple trees */ @Test @@ -126,11 +126,11 @@ public void testDiffTree() { assertNotNull(tree2); // Differentiate tree1 and tree2 - Collection> diffTrees = WeightedTreeUtils.diffTrees(tree1, tree2); + Collection> diffTrees = WeightedTreeUtils.diffTrees(tree1, tree2, null); verifyDiffTrees12(diffTrees); // Reverse: Differentiate tree2 and tree1 - diffTrees = WeightedTreeUtils.diffTrees(tree2, tree1); + diffTrees = WeightedTreeUtils.diffTrees(tree2, tree1, null); verifyDiffTrees21(diffTrees); } diff --git a/callstack/org.eclipse.tracecompass.incubator.analysis.core/src/org/eclipse/tracecompass/incubator/analysis/core/weighted/tree/diff/WeightedTreeUtils.java b/callstack/org.eclipse.tracecompass.incubator.analysis.core/src/org/eclipse/tracecompass/incubator/analysis/core/weighted/tree/diff/WeightedTreeUtils.java index 91afdc798..52819dd86 100644 --- a/callstack/org.eclipse.tracecompass.incubator.analysis.core/src/org/eclipse/tracecompass/incubator/analysis/core/weighted/tree/diff/WeightedTreeUtils.java +++ b/callstack/org.eclipse.tracecompass.incubator.analysis.core/src/org/eclipse/tracecompass/incubator/analysis/core/weighted/tree/diff/WeightedTreeUtils.java @@ -22,6 +22,7 @@ import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeProvider; import org.eclipse.tracecompass.analysis.profiling.core.tree.IWeightedTreeSet; import org.eclipse.tracecompass.analysis.profiling.core.tree.WeightedTree; +import org.eclipse.tracecompass.internal.analysis.profiling.core.callgraph2.AggregatedCalledFunction; import org.eclipse.tracecompass.tmf.core.util.Pair; import com.google.common.collect.ImmutableList; @@ -31,6 +32,7 @@ * * @author Geneviève Bastien */ +@SuppressWarnings("restriction") public final class WeightedTreeUtils { private WeightedTreeUtils() { @@ -48,26 +50,83 @@ private WeightedTreeUtils() { * The tree that will be differentiated. * @param second * The tree to use as the base + * @param statisticType + * Determines the statistic (duration or self time) that the + * flame graph will represent * @return The differential weighted tree */ - public static <@NonNull T> Collection> diffTrees(Collection> first, Collection> second) { + public static <@NonNull T> Collection> diffTrees(Collection> first, Collection> second, @Nullable String statisticType) { List> diffTrees = new ArrayList<>(); for (WeightedTree base : second) { T object = base.getObject(); // Find the equivalent tree in the first collection WeightedTree other = findObject(first, object); - double diffWeight = other == null ? Double.NaN : (double) (base.getWeight() - other.getWeight()) / other.getWeight(); - DifferentialWeightedTree<@NonNull T> diffTree = new DifferentialWeightedTree<>(base, object, base.getWeight(), diffWeight); + DifferentialWeightedTree<@NonNull T> diffTree = calculateDiffTree(object, base, other, statisticType); diffTrees.add(diffTree); // Make the differential of the children - for (DifferentialWeightedTree childTree : diffTrees(other == null ? Collections.emptyList() : other.getChildren(), base.getChildren())) { + for (DifferentialWeightedTree childTree : diffTrees(other == null ? Collections.> emptyList() : other.getChildren(), base.getChildren(), null)) { diffTree.addChild(childTree); } } return diffTrees; } + private static DifferentialWeightedTree<@NonNull T> calculateDiffTree(@NonNull T object, WeightedTree<@NonNull T> base, @Nullable WeightedTree<@NonNull T> other, @Nullable String statisticType) { + double diffWeight; + double nullDiff = Double.NaN; + DifferentialWeightedTree<@NonNull T> diffTree; + if (statisticType == null) { + diffWeight = other == null ? nullDiff : (double) (base.getWeight() - other.getWeight()) / other.getWeight(); + diffTree = new DifferentialWeightedTree<>(base, object, base.getWeight(), diffWeight); + + } else { + long baseWeight = 0; + long otherWeight = 0; + if (base instanceof AggregatedCalledFunction) { + long[] weightsArray = calculateWeights(base, other, statisticType); + baseWeight = weightsArray[0]; + otherWeight = weightsArray[1]; + } else { + baseWeight = base.getWeight(); + otherWeight = other == null ? 0 : other.getWeight(); + } + if (other == null || otherWeight == 0) { + diffWeight = nullDiff; + } else { + diffWeight = (double) (baseWeight - otherWeight) / otherWeight; + } + diffTree = new DifferentialWeightedTree<>(base, object, base.getWeight(), diffWeight); + + } + return diffTree; + } + + private static long[] calculateWeights(WeightedTree<@NonNull T> base, @Nullable WeightedTree<@NonNull T> other, String statisticType) { + long baseWeight = 0; + long otherWeight = 0; + long[] weightsArray = new long[2]; + switch (statisticType) { + case "Self Time": //$NON-NLS-1$ + { + baseWeight = ((AggregatedCalledFunction) base).getSelfTime(); + otherWeight = other == null ? 0 : ((AggregatedCalledFunction) other).getSelfTime(); + break; + } + case "Duration": //$NON-NLS-1$ + { + baseWeight = ((AggregatedCalledFunction) base).getWeight(); + otherWeight = other == null ? 0 : ((AggregatedCalledFunction) other).getWeight(); + break; + } + default: + break; + } + weightsArray[0] = baseWeight; + weightsArray[1] = otherWeight; + return weightsArray; + } + /** * Does the differential between 2 weighted tree sets, ie for each * comparable elements, what happened in tree set 2 differently than in tree @@ -124,8 +183,8 @@ private WeightedTreeUtils() { for (Pair<@NonNull ?, @NonNull ?> pair : pairedElements) { Collection> trees1 = first.getTreesFor(pair.getFirst()); Collection> trees2 = second.getTreesFor(pair.getSecond()); - Collection> diffTrees = WeightedTreeUtils.diffTrees(trees1, trees2); - for (DifferentialWeightedTree tree: diffTrees) { + Collection> diffTrees = WeightedTreeUtils.diffTrees(trees1, trees2, null); + for (DifferentialWeightedTree tree : diffTrees) { treeSet.addWeightedTree(pair.getFirst(), tree); } } @@ -138,8 +197,10 @@ private WeightedTreeUtils() { Collection<@NonNull ?> elements2 = second.getElements(); // If there is only one element and it is not a tree, pair it if (elements1.size() == 1 && elements2.size() == 1) { - @NonNull Object element1 = elements1.iterator().next(); - @NonNull Object element2 = elements2.iterator().next(); + @NonNull + Object element1 = elements1.iterator().next(); + @NonNull + Object element2 = elements2.iterator().next(); if (!(element1 instanceof ITree) && !(element2 instanceof ITree)) { return ImmutableList.of(new Pair(element1, element2)); } @@ -158,8 +219,10 @@ private WeightedTreeUtils() { private static Collection> pairEqualElements(Collection<@NonNull ?> elements1, Collection<@NonNull ?> elements2) { List> pairedElements = new ArrayList<>(); - for (@NonNull Object element1 : elements1) { - for (@NonNull Object element2 : elements2) { + for (@NonNull + Object element1 : elements1) { + for (@NonNull + Object element2 : elements2) { if (element1.equals(element2)) { pairedElements.add(new Pair<>(element1, element1)); if (element1 instanceof ITree && element2 instanceof ITree) { @@ -174,11 +237,13 @@ private WeightedTreeUtils() { private static Collection> pairSameNameElements(Collection<@NonNull ?> elements1, Collection elements2) { List> pairedElements = new ArrayList<>(); - for (@NonNull Object element1 : elements1) { + for (@NonNull + Object element1 : elements1) { if (!(element1 instanceof ITree)) { continue; } - for (@NonNull Object element2 : elements2) { + for (@NonNull + Object element2 : elements2) { if (!(element2 instanceof ITree)) { continue; } diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AbstractCalledFunction.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AbstractCalledFunction.java new file mode 100644 index 000000000..35850e692 --- /dev/null +++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AbstractCalledFunction.java @@ -0,0 +1,185 @@ +/******************************************************************************* + * Copyright (c) 2016 Ericsson + * + * All rights reserved. This program and the accompanying materials are + * made available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.callstack.core.instrumented.callgraph; + +import java.util.Comparator; +import java.util.Objects; + +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tracecompass.common.core.NonNullUtils; +import org.eclipse.tracecompass.incubator.analysis.core.model.IHostModel; +import org.eclipse.tracecompass.incubator.callstack.core.callgraph.SymbolAspect; +import org.eclipse.tracecompass.incubator.callstack.core.instrumented.ICalledFunction; +import org.eclipse.tracecompass.segmentstore.core.ISegment; +import org.eclipse.tracecompass.segmentstore.core.SegmentComparators; + +import com.google.common.collect.Ordering; + +/** + * Called Functuon common class, defines the start, end, depth, parent and + * children. Does not define the symbol + * + * @author Matthew Khouzam + * @author Sonia Farrah + */ +abstract class AbstractCalledFunction implements ICalledFunction { + + static final Comparator COMPARATOR; + static { + /* + * requireNonNull() has to be called separately, or else it breaks the + * type inference. + */ + Comparator comp = Ordering.from(SegmentComparators.INTERVAL_START_COMPARATOR).compound(SegmentComparators.INTERVAL_END_COMPARATOR); + COMPARATOR = Objects.requireNonNull(comp); + } + + /** + * Serial Version UID + */ + private static final long serialVersionUID = 7992199223906717340L; + + protected final long fStart; + protected final long fEnd; + private final @Nullable ICalledFunction fParent; + protected long fSelfTime = 0; + private final int fProcessId; + private final int fThreadId; + + private final transient IHostModel fModel; + private transient long fCpuTime = Long.MIN_VALUE; + + public AbstractCalledFunction(long start, long end, int processId, int threadId, @Nullable ICalledFunction parent, IHostModel model) { + if (start > end) { + throw new IllegalArgumentException(Messages.TimeError + "[" + start + "," + end + "]"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + fStart = start; + fEnd = end; + fParent = parent; + // It'll be modified once we add a child to it + fSelfTime = fEnd - fStart; + fProcessId = processId; + fThreadId = threadId; + if (parent instanceof AbstractCalledFunction) { + ((AbstractCalledFunction) parent).addChild(this); + } + fModel = model; + } + + @Override + public long getStart() { + return fStart; + } + + @Override + public long getEnd() { + return fEnd; + } + + @Override + public @Nullable ICalledFunction getParent() { + return fParent; + } + + @Override + public String getName() { + return NonNullUtils.nullToEmptyString(SymbolAspect.SYMBOL_ASPECT.resolve(this)); + } + + /** + * Add the child to the segment's children, and subtract the child's + * duration to the duration of the segment so we can calculate its self + * time. + * + * @param child + * The child to add to the segment's children + */ + protected void addChild(ICalledFunction child) { + if (child.getParent() != this) { + throw new IllegalArgumentException("Child parent not the same as child being added to."); //$NON-NLS-1$ + } + substractChildDuration(child.getEnd() - child.getStart()); + } + + /** + * Subtract the child's duration to the duration of the segment. + * + * @param childDuration + * The child's duration + */ + private void substractChildDuration(long childDuration) { + fSelfTime -= childDuration; + } + + @Override + public long getSelfTime() { + return fSelfTime; + } + + @Override + public long getCpuTime() { + long cpuTime = fCpuTime; + if (cpuTime == Long.MIN_VALUE) { + cpuTime = fModel.getCpuTime(fThreadId, fStart, fEnd); + fCpuTime = cpuTime; + } + return cpuTime; + } + + @Override + public int getProcessId() { + return fProcessId; + } + + @Override + public int getThreadId() { + return fThreadId; + } + + @Override + public int compareTo(@Nullable ISegment o) { + if (o == null) { + throw new IllegalArgumentException(); + } + return COMPARATOR.compare(this, o); + } + + @Override + public String toString() { + return '[' + String.valueOf(fStart) + ", " + String.valueOf(fEnd) + ']' + " Duration: " + getLength() + ", Self Time: " + fSelfTime; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + + @Override + public int hashCode() { + return Objects.hash(fEnd, fParent, fSelfTime, fStart, getSymbol()); + } + + @Override + public boolean equals(@Nullable Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + AbstractCalledFunction other = (AbstractCalledFunction) obj; + return (fEnd == other.fEnd && + fSelfTime == other.fSelfTime && + fStart == other.fStart && + Objects.equals(fParent, other.getParent()) && + Objects.equals(getSymbol(), other.getSymbol())); + } + +} \ No newline at end of file diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AggregatedCalledFunction.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AggregatedCalledFunction.java new file mode 100644 index 000000000..e9d1d540f --- /dev/null +++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/instrumented/callgraph/AggregatedCalledFunction.java @@ -0,0 +1,345 @@ +/******************************************************************************* + * Copyright (c) 2016 Ericsson + * + * All rights reserved. This program and the accompanying materials are made + * available under the terms of the Eclipse Public License 2.0 which + * accompanies this distribution, and is available at + * https://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + *******************************************************************************/ + +package org.eclipse.tracecompass.incubator.internal.callstack.core.instrumented.callgraph; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; + +import org.eclipse.jdt.annotation.NonNull; +import org.eclipse.jdt.annotation.Nullable; +import org.eclipse.tracecompass.analysis.os.linux.core.model.ProcessStatus; +import org.eclipse.tracecompass.analysis.timing.core.statistics.IStatistics; +import org.eclipse.tracecompass.incubator.analysis.core.concepts.AggregatedCallSite; +import org.eclipse.tracecompass.incubator.analysis.core.concepts.ICallStackSymbol; +import org.eclipse.tracecompass.incubator.analysis.core.concepts.ProcessStatusInterval; +import org.eclipse.tracecompass.incubator.analysis.core.model.IHostModel; +import org.eclipse.tracecompass.incubator.analysis.core.weighted.tree.WeightedTree; + +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; + +/** + * This class represents a function call in a certain level in the call stack. + * It's used to build an aggregation segment tree (aggregated by depth and + * callers). Per example,the two calls to the function A() in the call graph + * below will be combined into one node in the generated tree: + * + *
+ *   (Depth=0)      main              main
+ *               ↓↑  ↓↑   ↓↑    =>   ↓↑   ↓↑
+ *   (Depth=1)  A()  B()  A()       A()   B()
+ * 
+ * + * @author Sonia Farrah + * + */ +public class AggregatedCalledFunction extends AggregatedCallSite { + + // ------------------------------------------------------------------------ + // Attributes + // ------------------------------------------------------------------------ + + private final AggregatedCalledFunctionStatistics fStatistics; + private long fDuration = 0; + private long fSelfTime = 0; + private long fCpuTime = IHostModel.TIME_UNKNOWN; + private int fProcessId; + private Map fProcessStatuses = new HashMap<>(); + + /** + * Constructor, parent is not null + * + * @param symbol + * The symbol of the function + */ + public AggregatedCalledFunction(ICallStackSymbol symbol) { + super(symbol, 0); + fStatistics = new AggregatedCalledFunctionStatistics(); + fProcessId = -1; + } + + /** + * copy constructor + * + * @param toCopy Object to copy + */ + public AggregatedCalledFunction(AggregatedCalledFunction toCopy) { + super(toCopy); + fStatistics = new AggregatedCalledFunctionStatistics(); + fStatistics.merge(toCopy.fStatistics); + fProcessId = toCopy.fProcessId; + fDuration = toCopy.fDuration; + fSelfTime = toCopy.fSelfTime; + fCpuTime = toCopy.fCpuTime; + mergeProcessStatuses(toCopy); + } + + @Override + public long getWeight() { + return fDuration; + } + + @Override + public AggregatedCalledFunction copyOf() { + return new AggregatedCalledFunction(this); + } + + @Override + protected void mergeData(@NonNull WeightedTree other) { + if (!(other instanceof AggregatedCalledFunction)) { + return; + } + AggregatedCalledFunction otherFct = (AggregatedCalledFunction) other; + + addToDuration(otherFct.getDuration()); + addToSelfTime(otherFct.getSelfTime()); + addToCpuTime(otherFct.getCpuTime()); + getFunctionStatistics().merge(otherFct.getFunctionStatistics(), true); + mergeProcessStatuses(otherFct); + } + + private void mergeProcessStatuses(AggregatedCalledFunction other) { + Map processStatuses = other.fProcessStatuses; + for (Entry entry : processStatuses.entrySet()) { + AggregatedThreadStatus status = fProcessStatuses.get(entry.getKey()); + if (status == null) { + status = new AggregatedThreadStatus(entry.getKey()); + } + status.merge(entry.getValue()); + fProcessStatuses.put(entry.getKey(), status); + } + } + + @Override + public Map> getStatistics() { + ImmutableMap.Builder> builder = new ImmutableMap.Builder<>(); + builder.put(String.valueOf(Messages.CallGraphStats_Duration), getFunctionStatistics().getDurationStatistics()); + builder.put(String.valueOf(Messages.CallGraphStats_SelfTime), getFunctionStatistics().getSelfTimeStatistics()); + builder.put(String.valueOf(Messages.CallGraphStats_CpuTime), getFunctionStatistics().getCpuTimesStatistics()); + return builder.build(); + } + + /** + * Add a new callee into the Callees list. If the function exists in the + * callees list, the new callee's duration will be added to its duration and + * it'll combine their callees. + * + * @param child + * The callee to add to this function + * @param aggregatedChild + * The aggregated data of the callee + */ + public synchronized void addChild(AbstractCalledFunction child, AggregatedCalledFunction aggregatedChild) { + // Update the child's statistics with itself + fSelfTime -= aggregatedChild.getDuration(); + aggregatedChild.addFunctionCall(child); + super.addChild(aggregatedChild); + } + + /** + * Adds a function call to this aggregated called function data. The called + * function must have the same symbol as this aggregate data and its + * statistics will be added to this one. This should be a function at the + * same level as this one. + * + * @param function + * The function that was called + */ + public synchronized void addFunctionCall(AbstractCalledFunction function) { + // FIXME: Aren't the statistics enough? Do we really need duration, self + // time and cpu time here? + addToDuration(function.getLength()); + addToSelfTime(function.getSelfTime()); + addToCpuTime(function.getCpuTime()); + fProcessId = function.getProcessId(); + getFunctionStatistics().update(function); + } + + /** + * Modify the function's duration + * + * @param duration + * The amount to increment the duration by + */ + private void addToDuration(long duration) { + fDuration += duration; + } + + // /** + // * Merge the callees of two functions. + // * + // * @param firstNode + // * The first parent secondNode The second parent + // */ + // private static void mergeChildren(AggregatedCalledFunction firstNode, + // AggregatedCalledFunction secondNode) { + // for (Map.Entry FunctionEntry : + // secondNode.fChildren.entrySet()) { + // Object childSymbol = Objects.requireNonNull(FunctionEntry.getKey()); + // AggregatedCalledFunction secondNodeChild = + // Objects.requireNonNull(FunctionEntry.getValue()); + // AggregatedCalledFunction aggregatedCalledFunction = + // firstNode.fChildren.get(childSymbol); + // if (aggregatedCalledFunction == null) { + // firstNode.fChildren.put(secondNodeChild.getSymbol(), secondNodeChild); + // } else { + // // combine children + // AggregatedCalledFunction firstNodeChild = aggregatedCalledFunction; + // merge(firstNodeChild, secondNodeChild, true); + // firstNode.fChildren.replace(firstNodeChild.getSymbol(), firstNodeChild); + // } + // } + // } + // + // /** + // * Merge two functions, add durations, self times, increment the calls, + // * update statistics and merge children. + // * + // * @param destination + // * the node to merge to + // * @param source + // * the node to merge + // */ + // private static void merge(AggregatedCalledFunction destination, + // AggregatedCalledFunction source, boolean isGroup) { + // long sourceDuration = source.getDuration(); + // long sourceSelfTime = source.getSelfTime(); + // destination.addToDuration(sourceDuration); + // destination.addToSelfTime(sourceSelfTime); + // destination.addToCpuTime(source.getCpuTime()); + // destination.getFunctionStatistics().merge(source.getFunctionStatistics(), + // isGroup); + // // merge the children callees. + // mergeChildren(destination, source); + // } + + private void addToCpuTime(long cpuTime) { + if (cpuTime != IHostModel.TIME_UNKNOWN) { + if (fCpuTime < 0) { + fCpuTime = 0; + } + fCpuTime += cpuTime; + } + } + + /** + * The function's duration + * + * @return The duration of the function + */ + public long getDuration() { + return fDuration; + } + + /** + * The number of calls of a function + * + * @return The number of calls of a function + */ + public long getNbCalls() { + return fStatistics.getDurationStatistics().getNbElements(); + } + + /** + * The self time of an aggregated function + * + * @return The self time + */ + public long getSelfTime() { + return fSelfTime; + } + + /** + * Add to the self time of an aggregated function + * + * @param selfTime + * The amount of self time to add + */ + private void addToSelfTime(long selfTime) { + fSelfTime += selfTime; + } + + /** + * The CPU time of an aggregated function + * + * @return The CPU time, or {@link IHostModel#TIME_UNKNOWN} if the CPU time + * is not known + */ + public long getCpuTime() { + return fCpuTime; + } + + /** + * The process ID of the trace application. + * + * @return The process Id + */ + public int getProcessId() { + return fProcessId; + } + + /** + * Add a process status interval tot his called function + * + * @param interval + * The process status interval + */ + public void addKernelStatus(ProcessStatusInterval interval) { + ProcessStatus processStatus = interval.getProcessStatus(); + AggregatedThreadStatus status = fProcessStatuses.get(processStatus); + if (status == null) { + status = new AggregatedThreadStatus(processStatus); + fProcessStatuses.put(processStatus, status); + } + status.update(interval); + } + + @Override + public @NonNull Collection<@NonNull WeightedTree<@NonNull ICallStackSymbol>> getExtraDataTrees(int index) { + if (index == 0) { + return ImmutableList.copyOf(fProcessStatuses.values()); + } + return Collections.emptyList(); + } + + @Override + public @Nullable IStatistics getStatistics(int metricIndex) { + if (metricIndex < 0) { + return getFunctionStatistics().getDurationStatistics(); + } + if (metricIndex == CallGraphAnalysis.SELF_TIME_METRIC_INDEX) { + return getFunctionStatistics().getSelfTimeStatistics(); + } + if (metricIndex == CallGraphAnalysis.CPU_TIME_METRIC_INDEX) { + return getFunctionStatistics().getCpuTimesStatistics(); + } + return null; + } + + /** + * The function's statistics + * + * @return The function's statistics + */ + public AggregatedCalledFunctionStatistics getFunctionStatistics() { + return fStatistics; + } + + @Override + public String toString() { + return "Aggregate Function: " + getObject() + ", Duration: " + getDuration() + ", Self Time: " + fSelfTime + " on " + getNbCalls() + " calls"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + } + +} diff --git a/common/org.eclipse.tracecompass.incubator.releng-site/category.xml b/common/org.eclipse.tracecompass.incubator.releng-site/category.xml index f06c69b62..adc4542d0 100644 --- a/common/org.eclipse.tracecompass.incubator.releng-site/category.xml +++ b/common/org.eclipse.tracecompass.incubator.releng-site/category.xml @@ -69,6 +69,9 @@ + + +