Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Merge from master RC1 to feature-prof2 branch #208

Merged
merged 7 commits into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ if [[ "$VERBOSE" == "1" ]]; then
fi
./build.sh ${OPTION}

if [ -f hpcdata*.tgz ]; then
if [ -f hpcdata-${RELEASE}.tgz ]; then
cp hpcdata*.tgz ../..
else
echo "Fail to build hpcdata"
Expand All @@ -349,6 +349,6 @@ echo " Done"
echo "=================================="

ls -l hpcviewer-${RELEASE}-*
if [ -f hpcdata*.tgz ]; then
if [ -f hpcdata-${RELEASE}.tgz ]; then
ls -l hpcdata*
fi
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,8 @@ protected Control createDialogArea(Composite parent) {
final Label lblName = new Label(nameArea, SWT.LEFT);
lblName.setText("Name:"); // $NON-SLS

this.cbMetricName = new Combo(nameArea, SWT.NONE);
this.cbMetricName.setToolTipText("Name of the derived metric"); // $NON-SLS
cbMetricName = new Combo(nameArea, SWT.NONE);
cbMetricName.setToolTipText("Type the displayed name of the derived metric"); // $NON-SLS
objHistoryName = new UserInputHistory( ExtDerivedMetricDlg.HISTORY_METRIC_NAME );

final List<String> nameHistory = objHistoryName.getHistory();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected Control createContents(Composite parent) {
// call-site area
//
Group groupCallsite = createGroupControl(parent, "Call-site glyph settings ", false);
fontCallsiteEditor = createFontEditor(groupCallsite, PreferenceConstants.ID_FONT_CALLSITE, "Glyph font:", FontManager.getCallsiteGlyphFont());
fontCallsiteEditor = createFontEditor(groupCallsite, PreferenceConstants.ID_FONT_CALLSITE, "Glyph font:", FontManager.getCallsiteGlyphFont());

Composite glyphArea = new Composite(groupCallsite, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, true).span(3, 1).applyTo(glyphArea);
Expand All @@ -94,7 +94,7 @@ protected Control createContents(Composite parent) {
glyphComboEditor.setFont(font);
});

return parent;
return parent;
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,17 @@ public void setDefaults() {
PreferenceConstants.ID_FONT_CALLSITE,
FontManager.getCallsiteGlyphDefaultFont().getFontData());

store.setDefault(PreferenceConstants.ID_CHAR_CALLTO, DEFAULT_CALLTO[DEFAULT_CALLSITE_INDEX]);
store.setDefault(PreferenceConstants.ID_CHAR_CALLFROM, DEFAULT_CALLFROM[DEFAULT_CALLSITE_INDEX]);
// fix issue #207 (some platforms don't support unicode)
// check if the encoding supports UTF or not.
// Most systems that have ANSI platform has no UTF support
// Example: ANSI_X3.4-1968 is basically an ASCII set
int indexDefault = DEFAULT_CALLSITE_INDEX;
var encoding = System.getProperty("file.encoding");
if (encoding.startsWith("ANSI"))
indexDefault = 0;

store.setDefault(PreferenceConstants.ID_CHAR_CALLTO, DEFAULT_CALLTO[indexDefault]);
store.setDefault(PreferenceConstants.ID_CHAR_CALLFROM, DEFAULT_CALLFROM[indexDefault]);
}


Expand Down Expand Up @@ -138,4 +147,4 @@ public String getCallFromGlyph() {
return EMPTY;
return store.getString(PreferenceConstants.ID_CHAR_CALLFROM);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,8 @@ private void adjustLabels()
final TraceDisplayAttribute attributes = stData.getTraceDisplayAttribute();

showTimeRange(attributes);
showProcessRange(attributes);
if (stData.getExperiment().getMajorVersion() == edu.rice.cs.hpcdata.util.Constants.EXPERIMENT_DENSED_VERSION)
showProcessRange(attributes);
showCrossHair(attributes);

// resize the composite to make sure all texts are visible
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public ScopeTreeTable(Composite parent, int style, IScopeTreeData treeData) {

// turn the auto configuration off as we want to add our header menu
// configuration
natTable = new NatTable(parent, NatTable.DEFAULT_STYLE_OPTIONS , compositeLayer, false);
natTable = new NatTable(parent, NatTable.DEFAULT_STYLE_OPTIONS, compositeLayer, false);

// as the autoconfiguration of the NatTable is turned off, we have to
// add the DefaultNatTableStyleConfiguration and the ConfigRegistry
Expand Down Expand Up @@ -170,7 +170,7 @@ public ScopeTreeTable(Composite parent, int style, IScopeTreeData treeData) {

// I don't know why we have to refresh the table here
// However, without refreshing, the content will be weird
visualRefresh();
// visualRefresh();
natTable.configure();

// --------------------------------
Expand Down Expand Up @@ -218,9 +218,9 @@ public ScopeTreeTable(Composite parent, int style, IScopeTreeData treeData) {
natTable.getDisplay().addFilter(SWT.MouseDown, resizeListener);
natTable.getDisplay().addFilter(SWT.MouseUp, resizeListener);

// Fix issue #204: has to call header font configuration manually
fontConfig.configureHeaderFont(natTable.getConfigRegistry());
visualRefresh();

}


Expand Down
6 changes: 3 additions & 3 deletions edu.rice.cs.hpctree/src/edu/rice/cs/hpctree/TableFitting.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*****************************/
public class TableFitting
{
private static final String PREF_FIT_MODE = "viewer.fit.mode";
private static final String PREF_FIT_MODE = "hpcviewer.fit.mode";
/***
*
* Mode of table column fitting:
Expand Down Expand Up @@ -45,8 +45,8 @@ private TableFitting() {
*/
public static String toString(ColumnFittingMode mode) {
if (mode == ColumnFittingMode.FIT_DATA)
return "Autofit is based on the data";
return "Autofit is based on both the header and the data";
return "Resize mode is based on the data";
return "Resize mode is based on both the header label and the data";
}


Expand Down
2 changes: 1 addition & 1 deletion edu.rice.cs.hpcviewer.ui/release.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Release 2022.06. Commit fa410307
Release 2022.06. Commit 00ec7977
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import java.io.File;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
Expand All @@ -26,7 +25,7 @@
public class DataFactory
{
private static final int DEFAULT_DB = 10;
private static Random rand;
private static final Random rand = new Random();

public static List<Experiment> createExperiments() throws NoSuchAlgorithmException {
return createExperiments(DEFAULT_DB);
Expand Down Expand Up @@ -93,17 +92,12 @@ private static void createTreeNode(RootScope root, Scope parent, int children, i
}

private static void createMetric(Scope scope, Experiment exp) throws NoSuchAlgorithmException {
if (rand == null)
rand = SecureRandom.getInstanceStrong();

for(int i=0; i<exp.getMetricCount(); i++) {
if (rand.nextInt(20) == 0)
continue;

MetricValue mv = new MetricValue(rand.nextInt(10));
scope.setMetricValue(i, mv);
}

}

}