forked from qt-creator/qt-creator
Perf profiler: Fix UI text
Change-Id: I3a2e7a67db1259f847f04ff523bd9a2b12863510 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -211,7 +211,7 @@ void PerfConfigWidget::handleProcessFinished()
|
||||
|
||||
if (tracePoints.isEmpty()) {
|
||||
Core::AsynchronousMessageBox::warning(
|
||||
tr("No trace points found"),
|
||||
tr("No Trace Points Found"),
|
||||
tr("Trace points can be defined with \"perf probe -a\"."));
|
||||
} else {
|
||||
for (const QByteArray &event : qAsConst(tracePoints)) {
|
||||
@@ -233,7 +233,7 @@ void PerfConfigWidget::handleProcessError(QProcess::ProcessError error)
|
||||
{
|
||||
if (error == QProcess::FailedToStart) {
|
||||
Core::AsynchronousMessageBox::warning(
|
||||
tr("Cannot list trace points"),
|
||||
tr("Cannot List Trace Points"),
|
||||
tr("\"perf probe -l\" failed to start. Is perf installed?"));
|
||||
m_ui->useTracePointsButton->setEnabled(true);
|
||||
}
|
||||
|
@@ -75,8 +75,8 @@ PerfDataReader::PerfDataReader(QObject *parent) :
|
||||
}
|
||||
if (exitCode != 0) {
|
||||
QMessageBox::warning(Core::ICore::mainWindow(),
|
||||
tr("Perf data parser failed"),
|
||||
tr("The perf data parser failed to process all the samples. "
|
||||
tr("Perf Data Parser Failed"),
|
||||
tr("The Perf data parser failed to process all the samples. "
|
||||
"Your trace is incomplete. The exit code was %1.")
|
||||
.arg(exitCode));
|
||||
}
|
||||
@@ -101,17 +101,17 @@ PerfDataReader::PerfDataReader(QObject *parent) :
|
||||
connect(&m_input, &QProcess::errorOccurred, this, [this](QProcess::ProcessError e){
|
||||
switch (e) {
|
||||
case QProcess::FailedToStart:
|
||||
emit processFailed(tr("perfparser failed to start"));
|
||||
emit processFailed(tr("perfparser failed to start."));
|
||||
QMessageBox::warning(Core::ICore::mainWindow(),
|
||||
tr("Perf data parser failed"),
|
||||
tr("Could not start the 'perfparser' utility program. "
|
||||
"Make sure a working perf parser is available at the location "
|
||||
tr("Perf Data Parser Failed"),
|
||||
tr("Could not start the perfparser utility program. "
|
||||
"Make sure a working Perf parser is available at the location "
|
||||
"given by the PERFPROFILER_PARSER_FILEPATH environment "
|
||||
"variable."));
|
||||
break;
|
||||
case QProcess::Crashed:
|
||||
QMessageBox::warning(Core::ICore::mainWindow(),
|
||||
tr("Perf data parser crashed"),
|
||||
tr("Perf Data Parser Crashed"),
|
||||
tr("This is a bug. Please report it."));
|
||||
break;
|
||||
case QProcess::ReadError:
|
||||
@@ -346,8 +346,8 @@ void PerfDataReader::writeChunk()
|
||||
m_input.kill();
|
||||
emit finished();
|
||||
QMessageBox::warning(Core::ICore::mainWindow(),
|
||||
tr("Cannot send data to Perf data parser"),
|
||||
tr("The perf data parser doesn't accept further input. "
|
||||
tr("Cannot Send Data to Perf Data Parser"),
|
||||
tr("The Perf data parser does not accept further input. "
|
||||
"Your trace is incomplete."));
|
||||
}
|
||||
}
|
||||
|
@@ -19,7 +19,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label1">
|
||||
<property name="text">
|
||||
<string>&Trace File:</string>
|
||||
<string>&Trace file:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>traceFileLineEdit</cstring>
|
||||
@@ -39,7 +39,7 @@
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label2">
|
||||
<property name="text">
|
||||
<string>Directory of &Executable:</string>
|
||||
<string>Directory of &executable:</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>executableDirLineEdit</cstring>
|
||||
|
@@ -138,10 +138,10 @@ public:
|
||||
// The terminate() below will frequently lead to QProcess::Crashed. We're not interested
|
||||
// in that. FailedToStart is the only actual failure.
|
||||
if (e == QProcess::FailedToStart) {
|
||||
QString msg = tr("perf process failed to start");
|
||||
QString msg = tr("Perf Process Failed to Start");
|
||||
QMessageBox::warning(Core::ICore::mainWindow(),
|
||||
msg, tr("Make sure you are running a recent Linux kernel and "
|
||||
"that the 'perf' utility is available."));
|
||||
msg, tr("Make sure that you are running a recent Linux kernel and "
|
||||
"that the \"perf\" utility is available."));
|
||||
reportFailure(msg);
|
||||
}
|
||||
});
|
||||
@@ -227,7 +227,7 @@ void PerfProfilerRunner::start()
|
||||
});
|
||||
connect(recorder, &DeviceProcess::readyReadStandardOutput, this, [this, reader, recorder] {
|
||||
if (!reader->feedParser(recorder->readAllStandardOutput()))
|
||||
reportFailure(tr("Failed to transfer perf data to perfparser"));
|
||||
reportFailure(tr("Failed to transfer Perf data to perfparser."));
|
||||
});
|
||||
}
|
||||
|
||||
|
@@ -89,19 +89,19 @@ PerfProfilerTool::PerfProfilerTool(QObject *parent) :
|
||||
options->menu()->setEnabled(true);
|
||||
|
||||
const Core::Context globalContext(Core::Constants::C_GLOBAL);
|
||||
m_loadPerfData = new QAction(tr("Load perf.data file"), options);
|
||||
m_loadPerfData = new QAction(tr("Load perf.data File"), options);
|
||||
Core::Command *command = Core::ActionManager::registerAction(
|
||||
m_loadPerfData, Constants::PerfProfilerTaskLoadPerf, globalContext);
|
||||
connect(m_loadPerfData, &QAction::triggered, this, &PerfProfilerTool::showLoadPerfDialog);
|
||||
options->addAction(command);
|
||||
|
||||
m_loadTrace = new QAction(tr("Load trace file"), options);
|
||||
m_loadTrace = new QAction(tr("Load Trace File"), options);
|
||||
command = Core::ActionManager::registerAction(m_loadTrace, Constants::PerfProfilerTaskLoadTrace,
|
||||
globalContext);
|
||||
connect(m_loadTrace, &QAction::triggered, this, &PerfProfilerTool::showLoadTraceDialog);
|
||||
options->addAction(command);
|
||||
|
||||
m_saveTrace = new QAction(tr("Save trace file"), options);
|
||||
m_saveTrace = new QAction(tr("Save Trace File"), options);
|
||||
command = Core::ActionManager::registerAction(m_saveTrace, Constants::PerfProfilerTaskSaveTrace,
|
||||
globalContext);
|
||||
connect(m_saveTrace, &QAction::triggered, this, &PerfProfilerTool::showSaveTraceDialog);
|
||||
@@ -126,7 +126,7 @@ PerfProfilerTool::PerfProfilerTool(QObject *parent) :
|
||||
});
|
||||
options->addAction(command);
|
||||
|
||||
QAction *tracePointsAction = new QAction(tr("Create memory trace points"), options);
|
||||
QAction *tracePointsAction = new QAction(tr("Create Memory Trace Points"), options);
|
||||
tracePointsAction->setIcon(Debugger::Icons::TRACEPOINT_TOOLBAR.icon());
|
||||
tracePointsAction->setIconVisibleInMenu(false);
|
||||
tracePointsAction->setToolTip(tr("Create trace points for memory profiling on the target "
|
||||
@@ -141,7 +141,7 @@ PerfProfilerTool::PerfProfilerTool(QObject *parent) :
|
||||
m_tracePointsButton->setDefaultAction(tracePointsAction);
|
||||
|
||||
auto action = new QAction(tr("Performance Analyzer"), this);
|
||||
action->setToolTip(tr("The Performance Analyzer can be used to find performance bottlenecks"));
|
||||
action->setToolTip(tr("Finds performance bottlenecks."));
|
||||
menu->addAction(ActionManager::registerAction(action, Constants::PerfProfilerLocalActionId),
|
||||
Debugger::Constants::G_ANALYZER_TOOLS);
|
||||
QObject::connect(action, &QAction::triggered, this, [this] {
|
||||
@@ -251,7 +251,7 @@ void PerfProfilerTool::createViews()
|
||||
connect(m_recordButton, &QAbstractButton::clicked, this, &PerfProfilerTool::setRecording);
|
||||
|
||||
m_clearButton->setIcon(Utils::Icons::CLEAN_TOOLBAR.icon());
|
||||
m_clearButton->setToolTip(tr("Discard data"));
|
||||
m_clearButton->setToolTip(tr("Discard data."));
|
||||
connect(m_clearButton, &QAbstractButton::clicked, this, &PerfProfilerTool::clear);
|
||||
|
||||
m_filterButton->setIcon(Utils::Icons::FILTER.icon());
|
||||
@@ -410,10 +410,10 @@ void PerfProfilerTool::onReaderFinished()
|
||||
m_readerRunning = false;
|
||||
if (m_traceManager->traceDuration() <= 0) {
|
||||
QMessageBox::warning(Core::ICore::mainWindow(),
|
||||
tr("No data loaded"),
|
||||
tr("No Data Loaded"),
|
||||
tr("The profiler did not produce any samples. "
|
||||
"Make sure you are running a recent Linux kernel and that the "
|
||||
"'perf' utility is available and generates useful call "
|
||||
"Make sure that you are running a recent Linux kernel and that "
|
||||
"the \"perf\" utility is available and generates useful call "
|
||||
"graphs."));
|
||||
clear();
|
||||
} else {
|
||||
@@ -612,7 +612,7 @@ void PerfProfilerTool::showLoadTraceDialog()
|
||||
m_perspective.select();
|
||||
|
||||
QString filename = QFileDialog::getOpenFileName(
|
||||
ICore::mainWindow(), tr("Load trace file"),
|
||||
ICore::mainWindow(), tr("Load Trace File"),
|
||||
"", tr("Trace File (*.ptr)"));
|
||||
if (filename.isEmpty())
|
||||
return;
|
||||
@@ -627,7 +627,7 @@ void PerfProfilerTool::showSaveTraceDialog()
|
||||
m_perspective.select();
|
||||
|
||||
QString filename = QFileDialog::getSaveFileName(
|
||||
ICore::mainWindow(), tr("Save trace file"),
|
||||
ICore::mainWindow(), tr("Save Trace File"),
|
||||
"", tr("Trace File (*.ptr)"));
|
||||
if (filename.isEmpty())
|
||||
return;
|
||||
@@ -641,8 +641,8 @@ void PerfProfilerTool::showSaveTraceDialog()
|
||||
void PerfProfilerTool::setAggregated(bool aggregated)
|
||||
{
|
||||
m_aggregateButton->setChecked(aggregated);
|
||||
m_aggregateButton->setToolTip(aggregated ? tr("Show all addresses")
|
||||
: tr("Aggregate by functions"));
|
||||
m_aggregateButton->setToolTip(aggregated ? tr("Show all addresses.")
|
||||
: tr("Aggregate by functions."));
|
||||
emit aggregatedChanged(aggregated);
|
||||
}
|
||||
|
||||
@@ -653,8 +653,8 @@ void PerfProfilerTool::setRecording(bool recording)
|
||||
|
||||
m_recordButton->setIcon(recording ? recordOn : recordOff);
|
||||
m_recordButton->setChecked(recording);
|
||||
m_recordButton->setToolTip(recording ? tr("Stop collecting profile data") :
|
||||
tr("Collect profile data"));
|
||||
m_recordButton->setToolTip(recording ? tr("Stop collecting profile data.") :
|
||||
tr("Collect profile data."));
|
||||
emit recordingChanged(recording);
|
||||
}
|
||||
|
||||
@@ -668,7 +668,7 @@ void PerfProfilerTool::updateTime(qint64 duration, qint64 delay)
|
||||
m_recordedLabel->clear();
|
||||
|
||||
if (delay > 0)
|
||||
m_delayLabel->setText(tr("Processing Delay: %1.%2s").arg(delay / e9)
|
||||
m_delayLabel->setText(tr("Processing delay: %1.%2s").arg(delay / e9)
|
||||
.arg(qAbs(delay / e8) % ten));
|
||||
else if (delay == 0)
|
||||
m_delayLabel->clear();
|
||||
|
@@ -94,13 +94,13 @@ void PerfProfilerEventStorage::clear()
|
||||
m_file.clear();
|
||||
m_size = 0;
|
||||
if (!m_file.open())
|
||||
m_errorHandler(tr("Failed to reset temporary trace file"));
|
||||
m_errorHandler(tr("Failed to reset temporary trace file."));
|
||||
}
|
||||
|
||||
void PerfProfilerEventStorage::finalize()
|
||||
{
|
||||
if (!m_file.flush())
|
||||
m_errorHandler(tr("Failed to flush temporary trace file"));
|
||||
m_errorHandler(tr("Failed to flush temporary trace file."));
|
||||
}
|
||||
|
||||
bool PerfProfilerEventStorage::replay(
|
||||
@@ -110,13 +110,13 @@ bool PerfProfilerEventStorage::replay(
|
||||
case Timeline::TraceStashFile<PerfEvent>::ReplaySuccess:
|
||||
return true;
|
||||
case Timeline::TraceStashFile<PerfEvent>::ReplayOpenFailed:
|
||||
m_errorHandler(tr("Cannot re-open temporary trace file"));
|
||||
m_errorHandler(tr("Cannot re-open temporary trace file."));
|
||||
break;
|
||||
case Timeline::TraceStashFile<PerfEvent>::ReplayLoadFailed:
|
||||
// Happens if the loader rejects an event. Not an actual error
|
||||
break;
|
||||
case Timeline::TraceStashFile<PerfEvent>::ReplayReadPastEnd:
|
||||
m_errorHandler(tr("Read past end from temporary trace file"));
|
||||
m_errorHandler(tr("Read past end from temporary trace file."));
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
|
@@ -11,7 +11,7 @@
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Creating memory trace points</string>
|
||||
<string>Creating Memory Trace Points</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
@@ -29,7 +29,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="privilegeslabel">
|
||||
<property name="text">
|
||||
<string>Elevate privileges using</string>
|
||||
<string>Elevate privileges using:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Reference in New Issue
Block a user