Skip to content

Commit

Permalink
callstack: Move these to callstack.core.callgraph
Browse files Browse the repository at this point in the history
As a way to finish reducing the size of callstack.core's objects list.

Base this now refactored packaging on the current relationships among
these objects, as incremented through the base commits.

Change-Id: Icd6217e7a9a23561e78fc5a776f433e0a799c753
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/199488
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 53a897c commit bf0b38d
Show file tree
Hide file tree
Showing 26 changed files with 142 additions and 25 deletions.
Expand Up @@ -24,6 +24,8 @@
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.internal.analysis.callstack.core.callgraph.CalledFunctionFactory;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.ICalledFunction;
import org.eclipse.tracecompass.internal.analysis.callstack.core.model.IHostModel;
import org.eclipse.tracecompass.internal.analysis.callstack.core.model.ModelManager;
import org.eclipse.tracecompass.internal.analysis.callstack.core.model.ProcessStatusInterval;
Expand Down
Expand Up @@ -29,6 +29,8 @@
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.internal.analysis.callstack.core.callgraph.CalledFunctionFactory;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.ICalledFunction;
import org.eclipse.tracecompass.internal.analysis.callstack.core.instrumented.InstrumentedCallStackElement;
import org.eclipse.tracecompass.internal.analysis.callstack.core.instrumented.InstrumentedGroupDescriptor;
import org.eclipse.tracecompass.internal.analysis.callstack.core.model.IHostModel;
Expand Down
Expand Up @@ -16,8 +16,8 @@
import java.util.Map;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.AggregatedCallSite;
import org.eclipse.tracecompass.internal.analysis.callstack.core.ICalledFunction;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.AggregatedCallSite;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.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 @@ -16,7 +16,7 @@
import java.util.Map;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.AggregatedThreadStatus;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.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.callgraph;

import java.util.Comparator;
import java.util.Objects;
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.callgraph;

import java.util.ArrayList;
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.callgraph;

import java.util.Collection;
import java.util.Collections;
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.callgraph;

import org.eclipse.tracecompass.analysis.timing.core.statistics.IStatistics;
import org.eclipse.tracecompass.analysis.timing.core.statistics.Statistics;
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.callgraph;

import org.eclipse.tracecompass.analysis.os.linux.core.model.ProcessStatus;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.StringSymbol;
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.callgraph;

import java.util.Collection;
import java.util.Collections;
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.callgraph;

import java.util.ArrayList;
import java.util.Collection;
Expand All @@ -23,6 +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.Activator;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStack;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackSeries;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackSymbolFactory;
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;
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.callgraph;

import org.eclipse.jdt.annotation.NonNull;
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.callgraph;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.model.IHostModel;
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.callgraph;

import org.eclipse.jdt.annotation.NonNull;
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.callgraph;

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.callgraph;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.model.IHostModel;
Expand Down
@@ -0,0 +1,77 @@
/*******************************************************************************
* 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.internal.analysis.callstack.core.callgraph;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.osgi.util.NLS;

/**
* Message bundle for the call graph analysis module
*
* @author Sonia Farrah
*/
public class Messages extends NLS {
private static final String BUNDLE_NAME = Messages.class.getPackage().getName() + ".messages"; //$NON-NLS-1$

/**
* Title of the callgraph
*/
public static @Nullable String CallGraphAnalysis_Title;

/**
* Analysis description for the help
*/
public static @Nullable String CallGraphAnalysis_Description;

/**
* Prefix for the name of the analysis
*/
public static @Nullable String CallGraphAnalysis_NamePrefix;

/**
* Segment's start time exceeding its end time Error message
*/
public static @Nullable String TimeError;

/**
* Duration statistics title
*/
public static @Nullable String CallGraphStats_Duration;

/**
* Self time statistics title
*/
public static @Nullable String CallGraphStats_SelfTime;

/**
* Cpu time statistics title
*/
public static @Nullable String CallGraphStats_CpuTime;

/**
* Number of calls statistics title
*/
public static @Nullable String CallGraphStats_NbCalls;

/**
* Title of kernel status rows
*/
public static @Nullable String FlameChartDataProvider_KernelStatusTitle;

static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}

private Messages() {
}
}
@@ -0,0 +1,20 @@
###############################################################################
# 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
###############################################################################

CallGraphAnalysis_Title=Function Call Graph
CallGraphAnalysis_Description=Generate a callgraph for a trace with function entries and exits.
CallGraphAnalysis_NamePrefix=Callgraph for {0}
TimeError=Segment cannot end before it starts
CallGraphStats_Duration=Duration
CallGraphStats_SelfTime=Self time
CallGraphStats_CpuTime=Active CPU time
CallGraphStats_NbCalls=Number of calls
FlameChartDataProvider_KernelStatusTitle=Kernel statuses
@@ -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.callgraph;
Expand Up @@ -15,7 +15,7 @@

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.analysis.os.linux.core.event.aspect.Messages;
import org.eclipse.tracecompass.internal.analysis.callstack.core.ICalledFunction;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.ICalledFunction;
import org.eclipse.tracecompass.segmentstore.core.ISegment;
import org.eclipse.tracecompass.tmf.core.segment.ISegmentAspect;

Expand Down
Expand Up @@ -19,7 +19,7 @@
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackDepth;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackHostUtils;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackSeries;
import org.eclipse.tracecompass.internal.analysis.callstack.core.ICalledFunction;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.ICalledFunction;
import org.eclipse.tracecompass.segmentstore.core.ISegment;
import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;

Expand Down
Expand Up @@ -21,15 +21,15 @@
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.analysis.profiling.core.callstack.CallStackStateProvider;
import org.eclipse.tracecompass.analysis.timing.core.segmentstore.IAnalysisProgressListener;
import org.eclipse.tracecompass.internal.analysis.callstack.core.AggregatedCallSite;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallGraph;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallGraphAnalysis;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackHostUtils;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackHostUtils.TraceHostIdResolver;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackSeries;
import org.eclipse.tracecompass.internal.analysis.callstack.core.CallStackSeries.IThreadIdResolver;
import org.eclipse.tracecompass.internal.analysis.callstack.core.ICallGraphProvider;
import org.eclipse.tracecompass.internal.analysis.callstack.core.base.IDataPalette;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.AggregatedCallSite;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.CallGraph;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.CallGraphAnalysis;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.ICallGraphProvider;
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 @@ -16,7 +16,7 @@

import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.ICalledFunction;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.ICalledFunction;
import org.eclipse.tracecompass.segmentstore.core.ISegment;
import org.eclipse.tracecompass.tmf.core.segment.ISegmentAspect;
import org.eclipse.tracecompass.tmf.core.symbols.ISymbolProvider;
Expand Down
Expand Up @@ -27,7 +27,7 @@
import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelAnalysisModule;
import org.eclipse.tracecompass.analysis.os.linux.core.kernel.KernelThreadInformationProvider;
import org.eclipse.tracecompass.analysis.os.linux.core.model.ProcessStatus;
import org.eclipse.tracecompass.internal.analysis.callstack.core.AggregatedCallSite;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.AggregatedCallSite;
import org.eclipse.tracecompass.internal.analysis.callstack.core.model.ModelListener.IModuleWrapper;
import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval;
import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;
Expand Down
Expand Up @@ -15,7 +15,7 @@
import java.util.EnumSet;

import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.tracecompass.internal.analysis.callstack.core.AggregatedCallSite;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.AggregatedCallSite;
import org.eclipse.tracecompass.tmf.core.analysis.IAnalysisModule;

/**
Expand Down
Expand Up @@ -13,7 +13,7 @@

import java.util.Collection;

import org.eclipse.tracecompass.internal.analysis.callstack.core.AggregatedCallSite;
import org.eclipse.tracecompass.internal.analysis.callstack.core.callgraph.AggregatedCallSite;

/**
* Interfaces that classes providing sampling data for threads can implement
Expand Down

0 comments on commit bf0b38d

Please sign in to comment.