forked from qt-creator/qt-creator
Valgrind: Support CallgrindTool re-running
Change-Id: I2a4d6e75afed60e455ec2267f18f381e3b19157f Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -30,7 +30,6 @@ CallgrindToolRunner::CallgrindToolRunner(RunControl *runControl)
|
||||
: ValgrindToolRunner(runControl)
|
||||
{
|
||||
setId("CallgrindToolRunner");
|
||||
runControl->setSupportsReRunning(false);
|
||||
|
||||
connect(&m_runner, &ValgrindProcess::valgrindStarted, this, [this](qint64 pid) {
|
||||
m_pid = pid;
|
||||
|
@@ -708,6 +708,26 @@ void CallgrindTool::setupRunner(CallgrindToolRunner *toolRunner)
|
||||
|
||||
connect(toolRunner, &CallgrindToolRunner::parserDataReady, this, &CallgrindTool::setParserData);
|
||||
connect(runControl, &RunControl::stopped, this, &CallgrindTool::engineFinished);
|
||||
connect(runControl, &RunControl::aboutToStart, this, [this, toolRunner] {
|
||||
toolRunner->setPaused(m_pauseAction->isChecked());
|
||||
// we may want to toggle collect for one function only in this run
|
||||
toolRunner->setToggleCollectFunction(m_toggleCollectFunction);
|
||||
m_toggleCollectFunction.clear();
|
||||
|
||||
m_toolBusy = true;
|
||||
updateRunActions();
|
||||
|
||||
// enable/disable actions
|
||||
m_resetAction->setEnabled(true);
|
||||
m_dumpAction->setEnabled(true);
|
||||
m_loadExternalLogFile->setEnabled(false);
|
||||
clearTextMarks();
|
||||
doClear();
|
||||
Debugger::showPermanentStatusMessage(Tr::tr("Starting Function Profiler..."));
|
||||
});
|
||||
connect(runControl, &RunControl::started, this, [] {
|
||||
Debugger::showPermanentStatusMessage(Tr::tr("Function Profiler running..."));
|
||||
});
|
||||
|
||||
connect(this, &CallgrindTool::dumpRequested, toolRunner, &CallgrindToolRunner::dump);
|
||||
connect(this, &CallgrindTool::resetRequested, toolRunner, &CallgrindToolRunner::reset);
|
||||
@@ -715,13 +735,6 @@ void CallgrindTool::setupRunner(CallgrindToolRunner *toolRunner)
|
||||
|
||||
connect(m_stopAction, &QAction::triggered, toolRunner, [runControl] { runControl->initiateStop(); });
|
||||
|
||||
// initialize run control
|
||||
toolRunner->setPaused(m_pauseAction->isChecked());
|
||||
|
||||
// we may want to toggle collect for one function only in this run
|
||||
toolRunner->setToggleCollectFunction(m_toggleCollectFunction);
|
||||
m_toggleCollectFunction.clear();
|
||||
|
||||
QTC_ASSERT(m_visualization, return);
|
||||
|
||||
// apply project settings
|
||||
@@ -730,16 +743,6 @@ void CallgrindTool::setupRunner(CallgrindToolRunner *toolRunner)
|
||||
m_visualization->setMinimumInclusiveCostRatio(settings.visualizationMinimumInclusiveCostRatio() / 100.0);
|
||||
m_proxyModel.setMinimumInclusiveCostRatio(settings.minimumInclusiveCostRatio() / 100.0);
|
||||
m_dataModel.setVerboseToolTipsEnabled(settings.enableEventToolTips());
|
||||
|
||||
m_toolBusy = true;
|
||||
updateRunActions();
|
||||
|
||||
// enable/disable actions
|
||||
m_resetAction->setEnabled(true);
|
||||
m_dumpAction->setEnabled(true);
|
||||
m_loadExternalLogFile->setEnabled(false);
|
||||
clearTextMarks();
|
||||
doClear();
|
||||
}
|
||||
|
||||
void CallgrindTool::updateRunActions()
|
||||
|
Reference in New Issue
Block a user