Skip to content

Commit

Permalink
callstack: Move these to new callstack.core.base
Browse files Browse the repository at this point in the history
As a way to start reducing the size of callstack.core's WIP flat list.

Base this early packaging on the existing relationships among these
callstack objects from Incubator and the sibling analysis.profiling
plugin. Also base this on which objects use each, blending all of these
informal criteria together, balanced yet for an eventual clean plugin.

Move IDataPalette from core.tree to core.base, as it became used by
objects beyond core.tree centric ones.

Change-Id: I4b0f08f76fc070ae7eaaca74c55aa6629b70f444
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/199464
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
marco-miller committed Mar 31, 2023
1 parent c04e58f commit fa737e3
Show file tree
Hide file tree
Showing 27 changed files with 54 additions and 15 deletions.
Expand Up @@ -17,6 +17,7 @@
import java.util.Map;

import org.eclipse.tracecompass.analysis.timing.core.statistics.IStatistics;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackSymbol;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.WeightedTree;

import com.google.common.annotations.VisibleForTesting;
Expand Down
Expand Up @@ -21,6 +21,7 @@
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.internal.analysis.callstack.core.base.ICallStackSymbol;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.WeightedTree;

import com.google.common.collect.ImmutableList;
Expand Down
Expand Up @@ -12,6 +12,7 @@
package org.eclipse.tracecompass.internal.analysis.callstack.core;

import org.eclipse.tracecompass.analysis.os.linux.core.model.ProcessStatus;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.StringSymbol;

/**
* Class to calculate statistics for an aggregated function.
Expand Down
Expand Up @@ -16,6 +16,8 @@
import java.util.HashSet;
import java.util.Set;

import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackElement;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackSymbol;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IWeightedTreeSet;

import com.google.common.collect.HashMultimap;
Expand Down
Expand Up @@ -23,7 +23,10 @@
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.osgi.util.NLS;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IDataPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.FlameWithKernelPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackElement;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackSymbol;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.IDataPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IWeightedTreeGroupDescriptor;
import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
import org.eclipse.tracecompass.tmf.core.analysis.TmfAbstractAnalysisModule;
Expand Down
Expand Up @@ -23,6 +23,7 @@
import org.eclipse.tracecompass.analysis.os.linux.core.model.HostThread;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackHostUtils.IHostIdProvider;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackSeries.IThreadIdProvider;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackElement;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
import org.eclipse.tracecompass.statesystem.core.StateSystemUtils;
import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
Expand Down
Expand Up @@ -16,6 +16,7 @@
import java.util.List;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackElement;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.ITree;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IWeightedTreeGroupDescriptor;

Expand Down
Expand Up @@ -19,6 +19,7 @@
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackElement;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
Expand Down
Expand Up @@ -27,6 +27,8 @@
import org.eclipse.tracecompass.analysis.os.linux.core.model.HostThread;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackHostUtils.IHostIdProvider;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackHostUtils.IHostIdResolver;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackElement;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackGroupDescriptor;
import org.eclipse.tracecompass.segmentstore.core.BasicSegment;
import org.eclipse.tracecompass.segmentstore.core.ISegment;
import org.eclipse.tracecompass.segmentstore.core.ISegmentStore;
Expand Down
Expand Up @@ -13,6 +13,11 @@

import java.util.regex.Pattern;

import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackElement;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackSymbol;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ResolvableSymbol;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.StringSymbol;

/**
* A factory that creates the appropriate symbol for a given element
*
Expand Down
Expand Up @@ -15,7 +15,10 @@

import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IDataPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.FlameDefaultPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackElement;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackSymbol;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.IDataPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IWeightedTreeGroupDescriptor;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IWeightedTreeProvider;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IWeightedTreeSet;
Expand Down
Expand Up @@ -23,7 +23,8 @@
import org.eclipse.tracecompass.analysis.timing.core.segmentstore.IAnalysisProgressListener;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackHostUtils.TraceHostIdResolver;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackSeries.IThreadIdResolver;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IDataPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.EdgeStateValue;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.IDataPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IWeightedTreeGroupDescriptor;
import org.eclipse.tracecompass.segmentstore.core.ISegment;
import org.eclipse.tracecompass.segmentstore.core.ISegmentStore;
Expand Down
Expand Up @@ -28,6 +28,7 @@
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackHostUtils.IHostIdResolver;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackSeries.IThreadIdProvider;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackSeries.IThreadIdResolver;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.ICallStackElement;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IWeightedTreeGroupDescriptor;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;
import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException;
Expand Down
Expand Up @@ -14,6 +14,7 @@
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.CallStackGroupDescriptor;
import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem;

/**
Expand Down
Expand Up @@ -9,7 +9,7 @@
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.internal.analysis.callstack.core;
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;

import org.eclipse.jdt.annotation.Nullable;

Expand Down
Expand Up @@ -9,7 +9,7 @@
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.internal.analysis.callstack.core;
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;

import java.nio.charset.StandardCharsets;
import java.util.Comparator;
Expand Down
Expand Up @@ -9,14 +9,15 @@
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.internal.analysis.callstack.core;
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IDataPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.AggregatedCallSite;
import org.eclipse.tracecompass.internal.analysis.callstack.core.ICalledFunction;
import org.eclipse.tracecompass.tmf.core.dataprovider.X11ColorUtils;
import org.eclipse.tracecompass.tmf.core.model.OutputElementStyle;
import org.eclipse.tracecompass.tmf.core.model.StyleProperties;
Expand Down
Expand Up @@ -9,14 +9,14 @@
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.internal.analysis.callstack.core;
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IDataPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.AggregatedThreadStatus;
import org.eclipse.tracecompass.internal.analysis.os.linux.core.kernel.StateValues;
import org.eclipse.tracecompass.internal.analysis.os.linux.core.registry.LinuxStyle;
import org.eclipse.tracecompass.tmf.core.model.OutputElementStyle;
Expand Down
Expand Up @@ -9,7 +9,7 @@
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.internal.analysis.callstack.core;
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;

import java.util.Collection;

Expand Down
Expand Up @@ -9,7 +9,7 @@
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.internal.analysis.callstack.core;
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.tree.IWeightedTreeGroupDescriptor;
Expand Down
Expand Up @@ -9,7 +9,7 @@
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.internal.analysis.callstack.core;
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;

import java.util.Collection;

Expand Down
Expand Up @@ -9,7 +9,7 @@
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.internal.analysis.callstack.core.tree;
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;

import java.util.Map;

Expand Down
Expand Up @@ -9,7 +9,7 @@
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.internal.analysis.callstack.core;
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;

import java.util.Collection;

Expand Down
Expand Up @@ -9,7 +9,7 @@
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.tracecompass.internal.analysis.callstack.core;
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;

import java.util.Collection;
import java.util.Objects;
Expand Down
@@ -0,0 +1,12 @@
/*******************************************************************************
* Copyright (c) 2023 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
*******************************************************************************/

@org.eclipse.jdt.annotation.NonNullByDefault
package org.eclipse.tracecompass.internal.analysis.callstack.core.base;
Expand Up @@ -16,6 +16,7 @@
import java.util.Map;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.IDataPalette;
import org.eclipse.tracecompass.tmf.core.dataprovider.X11ColorUtils;
import org.eclipse.tracecompass.tmf.core.model.OutputElementStyle;
import org.eclipse.tracecompass.tmf.core.model.StyleProperties;
Expand Down
Expand Up @@ -26,6 +26,7 @@
import org.eclipse.tracecompass.common.core.format.DataSpeedWithUnitFormat;
import org.eclipse.tracecompass.common.core.format.DecimalUnitFormat;
import org.eclipse.tracecompass.common.core.format.SubSecondTimeWithUnitFormat;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.IDataPalette;
import org.eclipse.tracecompass.tmf.core.timestamp.ITmfTimestamp;

/**
Expand Down

0 comments on commit fa737e3

Please sign in to comment.