forked from qt-creator/qt-creator
RemoteLinux: Remove target-specific perf support
The base target-agnostic implementation is good enough to handle the case. Change-Id: Ib4615de59c1d5defd297a885ca2ca13ff9e0d3e6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
@@ -89,62 +89,4 @@ void RemoteLinuxQmlProfilerSupport::start()
|
|||||||
SimpleTargetRunner::start();
|
SimpleTargetRunner::start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// RemoteLinuxPerfSupport
|
|
||||||
|
|
||||||
RemoteLinuxPerfSupport::RemoteLinuxPerfSupport(RunControl *runControl)
|
|
||||||
: RunWorker(runControl)
|
|
||||||
{
|
|
||||||
setDisplayName("RemoteLinuxPerfSupport");
|
|
||||||
|
|
||||||
RunConfiguration *runConfiguration = runControl->runConfiguration();
|
|
||||||
QTC_ASSERT(runConfiguration, return);
|
|
||||||
IRunConfigurationAspect *perfAspect =
|
|
||||||
runConfiguration->extraAspect("Analyzer.Perf.Settings");
|
|
||||||
QTC_ASSERT(perfAspect, return);
|
|
||||||
m_perfRecordArguments =
|
|
||||||
perfAspect->currentSettings()->property("perfRecordArguments").toStringList()
|
|
||||||
.join(' ');
|
|
||||||
|
|
||||||
auto toolRunner = runControl->createWorker(runControl->runMode());
|
|
||||||
toolRunner->addStartDependency(this);
|
|
||||||
// connect(&m_outputGatherer, &QmlDebug::QmlOutputParser::waitingForConnectionOnPort,
|
|
||||||
// this, &RemoteLinuxPerfSupport::remoteIsRunning);
|
|
||||||
|
|
||||||
// addDependency(FifoCreatorWorkerId);
|
|
||||||
}
|
|
||||||
|
|
||||||
void RemoteLinuxPerfSupport::start()
|
|
||||||
{
|
|
||||||
// m_remoteFifo = targetRunner()->fifo();
|
|
||||||
if (m_remoteFifo.isEmpty()) {
|
|
||||||
reportFailure(tr("FIFO for profiling data could not be created."));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ApplicationLauncher *runner = targetRunner()->applicationLauncher();
|
|
||||||
|
|
||||||
auto r = runnable().as<StandardRunnable>();
|
|
||||||
|
|
||||||
r.commandLineArguments = "-c 'perf record -o - " + m_perfRecordArguments
|
|
||||||
+ " -- " + r.executable + " "
|
|
||||||
+ r.commandLineArguments + " > " + m_remoteFifo
|
|
||||||
+ "'";
|
|
||||||
r.executable = "sh";
|
|
||||||
|
|
||||||
connect(&m_outputGatherer, SIGNAL(remoteStdout(QByteArray)),
|
|
||||||
runControl(), SIGNAL(analyzePerfOutput(QByteArray)));
|
|
||||||
connect(&m_outputGatherer, SIGNAL(finished(bool)),
|
|
||||||
runControl(), SIGNAL(perfFinished()));
|
|
||||||
|
|
||||||
StandardRunnable outputRunner;
|
|
||||||
outputRunner.executable = "sh";
|
|
||||||
outputRunner.commandLineArguments = QString("-c 'cat %1 && rm -r `dirname %1`'").arg(m_remoteFifo);
|
|
||||||
m_outputGatherer.start(outputRunner, device());
|
|
||||||
// remoteIsRunning();
|
|
||||||
// runControl()->notifyRemoteSetupDone(d->qmlPort);
|
|
||||||
|
|
||||||
// runner->start(r, device());
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
@@ -48,20 +48,4 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class REMOTELINUX_EXPORT RemoteLinuxPerfSupport : public ProjectExplorer::RunWorker
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
RemoteLinuxPerfSupport(ProjectExplorer::RunControl *runControl);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void start() override;
|
|
||||||
|
|
||||||
QString m_remoteFifo;
|
|
||||||
QString m_perfRecordArguments;
|
|
||||||
|
|
||||||
ProjectExplorer::ApplicationLauncher m_outputGatherer;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace RemoteLinux
|
} // namespace RemoteLinux
|
||||||
|
@@ -63,7 +63,6 @@ bool RemoteLinuxPlugin::initialize(const QStringList &arguments,
|
|||||||
RunControl::registerWorker<SimpleTargetRunner>(NORMAL_RUN_MODE, constraint);
|
RunControl::registerWorker<SimpleTargetRunner>(NORMAL_RUN_MODE, constraint);
|
||||||
RunControl::registerWorker<LinuxDeviceDebugSupport>(DEBUG_RUN_MODE, constraint);
|
RunControl::registerWorker<LinuxDeviceDebugSupport>(DEBUG_RUN_MODE, constraint);
|
||||||
RunControl::registerWorker<RemoteLinuxQmlProfilerSupport>(QML_PROFILER_RUN_MODE, constraint);
|
RunControl::registerWorker<RemoteLinuxQmlProfilerSupport>(QML_PROFILER_RUN_MODE, constraint);
|
||||||
//RunControl::registerWorker<RemoteLinuxPerfSupport>(PERFPROFILER_RUN_MODE, constraint);
|
|
||||||
|
|
||||||
addAutoReleasedObject(new GenericLinuxDeviceConfigurationFactory);
|
addAutoReleasedObject(new GenericLinuxDeviceConfigurationFactory);
|
||||||
addAutoReleasedObject(new RemoteLinuxRunConfigurationFactory);
|
addAutoReleasedObject(new RemoteLinuxRunConfigurationFactory);
|
||||||
|
Reference in New Issue
Block a user