diff --git a/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.cpp b/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.cpp index 2439c43c..e2687e59 100644 --- a/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.cpp +++ b/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.cpp @@ -356,14 +356,16 @@ QString AbstractTracePlotLineModel::getLabel(LineType type) } } -QString AbstractTracePlotLineModel::getLabel(unsigned int rank) +QString AbstractTracePlotLineModel::getLabel(unsigned int rank) const { - return "RA" + QString::number(rank); + std::string_view rankLabel = dataBusType == DataBusType::LegacyMode ? "RA" : "PC"; + return rankLabel.data() + QString::number(rank); } -QString AbstractTracePlotLineModel::getLabel(unsigned int rank, unsigned int group, unsigned int bank) +QString AbstractTracePlotLineModel::getLabel(unsigned int rank, unsigned int group, unsigned int bank) const { - return "RA" + QString::number(rank) + " BG" + QString::number(group) + " BA" + QString::number(bank); + std::string_view rankLabel = dataBusType == DataBusType::LegacyMode ? "RA" : "PC"; + return rankLabel.data() + QString::number(rank) + " BG" + QString::number(group) + " BA" + QString::number(bank); } AbstractTracePlotLineModel::CommandBusType AbstractTracePlotLineModel::getCommandBusType(const GeneralInfo &generalInfo) diff --git a/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.h b/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.h index 768e7f00..556bdd49 100644 --- a/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.h +++ b/DRAMSys/traceAnalyzer/businessObjects/traceplotlinemodel.h @@ -174,8 +174,8 @@ protected: std::shared_ptr createRankGroupNode(unsigned int rank) const; static QString getLabel(LineType type); - static QString getLabel(unsigned int rank); - static QString getLabel(unsigned int rank, unsigned int group, unsigned int bank); + QString getLabel(unsigned int rank) const; + QString getLabel(unsigned int rank, unsigned int group, unsigned int bank) const; static CommandBusType getCommandBusType(const GeneralInfo &generalInfo); static DataBusType getDataBusType(const GeneralInfo &generalInfo); diff --git a/DRAMSys/traceAnalyzer/tracefiletab.cpp b/DRAMSys/traceAnalyzer/tracefiletab.cpp index f776a7a7..282df492 100644 --- a/DRAMSys/traceAnalyzer/tracefiletab.cpp +++ b/DRAMSys/traceAnalyzer/tracefiletab.cpp @@ -86,14 +86,6 @@ TraceFileTab::TraceFileTab(QWidget *parent, const QString &path) std::cout << "Opening new tab for \"" << path.toStdString() << "\"" << std::endl; - initNavigatorAndItsDependentWidgets(path); - setUpFileWatcher(path); - setUpTraceplotScrollbar(); - setUpTraceSelector(); - setUpCommentView(); - - setUpPossiblePhases(); - ui->mcConfigView->setModel(mcConfigModel); ui->mcConfigView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents); @@ -109,6 +101,8 @@ TraceFileTab::TraceFileTab(QWidget *parent, const QString &path) setUpTraceplotScrollbar(); setUpCommentView(); + setUpPossiblePhases(); + tracefileChanged(); } @@ -491,6 +485,7 @@ void TraceFileTab::on_startPowerAnalysis_clicked() data->setSamples(*samples); cur->setData(data); cur->attach(ui->powerPlot); + cur->setPen(QPen(QColor(255,0,0))); QwtPlotMagnifier *mag1 = new QwtPlotMagnifier(ui->powerPlot->canvas()); mag1->setAxisEnabled(QwtPlot::xBottom, true); @@ -519,6 +514,7 @@ void TraceFileTab::on_startPowerAnalysis_clicked() data2->setSamples(*samples2); cur2->setData(data2); cur2->attach(ui->bandwidthPlot); + cur2->setPen(QPen(QColor(255,0,0))); ui->bandwidthPlot->setAxisTitle(0,"Bandwidth [%]"); ui->bandwidthPlot->setAxisScale(0,0.0,100.0); @@ -563,6 +559,7 @@ void TraceFileTab::on_startPowerAnalysis_clicked() data3->setSamples(*samples3); cur3->setData(data3); cur3->attach(ui->bufferPlot); + cur3->setPen(QPen(QColor(255,0,0))); ui->bufferPlot->setAxisTitle(0,"Buffer Utilization"); ui->bufferPlot->setAxisScale(0,0.0, maxBufferDepth);