-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
linux.core: Add Priority/Thread name stats view for SWSLatency analysis
This commit adds view and viewer classes for the Priority/Thread name statistics view. It also adds the view to SWS Latency analysis. The view groups entries in the SWS Latency analysis based on priority and name. [Added] Priority/Thread name statistics view for SWSLatency analysis Change-Id: I003932ae82f8c6594a9866f8da4bb9cfe2131f06 Signed-off-by: Hoang Thuan Pham <hoang.pham@calian.ca> Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/204188 Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org> Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com> Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
- Loading branch information
1 parent
34d2520
commit 501cd49
Showing
7 changed files
with
161 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...ompass/analysis/os/linux/ui/segmentstore/statistics/PriorityThreadNameStatisticsView.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/********************************************************************** | ||
* 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 | ||
**********************************************************************/ | ||
|
||
package org.eclipse.tracecompass.analysis.os.linux.ui.segmentstore.statistics; | ||
|
||
import org.eclipse.jdt.annotation.NonNull; | ||
import org.eclipse.jdt.annotation.Nullable; | ||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentsStatisticsView; | ||
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentsStatisticsViewer; | ||
import org.eclipse.tracecompass.common.core.NonNullUtils; | ||
import org.eclipse.ui.PlatformUI; | ||
import org.eclipse.ui.views.IViewDescriptor; | ||
|
||
/** | ||
* A segment store statistics view for showing statistics based on Priority and | ||
* Thread name. The analysis specified by the secondaryId must create segments | ||
* that implement IPrioritySegment. | ||
* | ||
* @author Hoang Thuan Pham | ||
* @since 6.2 | ||
*/ | ||
public class PriorityThreadNameStatisticsView extends AbstractSegmentsStatisticsView { | ||
/** | ||
* ID of this view | ||
*/ | ||
public static final String ID = "org.eclipse.tracecompass.analysis.os.linux.ui.segmentstore.statistics.prioname"; //$NON-NLS-1$ | ||
|
||
@Override | ||
public void createPartControl(@Nullable Composite parent) { | ||
super.createPartControl(parent); | ||
// Set the title of the view from the actual view ID | ||
IViewDescriptor desc = PlatformUI.getWorkbench().getViewRegistry().find(getViewId()); | ||
if (desc != null) { | ||
setPartName(desc.getLabel()); | ||
} | ||
} | ||
|
||
@Override | ||
protected @NonNull AbstractSegmentsStatisticsViewer createSegmentStoreStatisticsViewer(@NonNull Composite parent) { | ||
// The analysis ID is the secondary ID of the view | ||
String analysisId = NonNullUtils.nullToEmptyString(getViewSite().getSecondaryId()); | ||
return new PriorityThreadNameStatisticsViewer(parent, analysisId); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...pass/analysis/os/linux/ui/segmentstore/statistics/PriorityThreadNameStatisticsViewer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/********************************************************************** | ||
* 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 | ||
**********************************************************************/ | ||
package org.eclipse.tracecompass.analysis.os.linux.ui.segmentstore.statistics; | ||
|
||
import org.eclipse.swt.widgets.Composite; | ||
import org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.statistics.AbstractSegmentsStatisticsViewer; | ||
import org.eclipse.tracecompass.internal.analysis.os.linux.core.segmentstore.PriorityThreadNameStatisticsDataProviderFactory; | ||
|
||
/** | ||
* A segment store statistics viewer for showing statistics based on Priority | ||
* and Thread name. | ||
* | ||
* @author Hoang Thuan Pham | ||
* @since 6.2 | ||
*/ | ||
public class PriorityThreadNameStatisticsViewer extends AbstractSegmentsStatisticsViewer { | ||
|
||
/** | ||
* Constructor | ||
* | ||
* @param parent | ||
* The parent composite | ||
* @param analysisId | ||
* The ID of the segment store provider to do statistics on | ||
*/ | ||
public PriorityThreadNameStatisticsViewer(Composite parent, String analysisId) { | ||
super(parent, PriorityThreadNameStatisticsDataProviderFactory.DATA_PROVIDER_ID + ':' + analysisId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters