PerfProfiler: Use QtcProcess instead of IDevice::createProcess()

And pass a device path to command instead. The QtcProcess
should automatically select the device's process implementation
when the process is running.

Change-Id: Id3fed8656999af58ce1a5ba0632f94c3dc76ab04
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Jarek Kobus
2022-04-29 17:08:17 +02:00
parent ddb4ecae32
commit 645d71b3db
3 changed files with 7 additions and 12 deletions

View File

@@ -124,7 +124,7 @@ public:
void start() override
{
m_process = device()->createProcess(this);
m_process = new QtcProcess(this);
if (!m_process) {
reportFailure(tr("Could not start device process."));
return;
@@ -147,7 +147,7 @@ public:
Runnable perfRunnable = runnable();
CommandLine cmd({"perf", {"record"}});
CommandLine cmd({device()->mapToGlobalPath("perf"), {"record"}});
cmd.addArgs(m_perfRecordArguments);
cmd.addArgs({"-o", "-", "--"});
cmd.addCommandLineAsArgs(perfRunnable.command, CommandLine::Raw);