X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=gui%2Fretracer.cpp;h=cb0bad35abcfb5284a79ee971a7be9f679a01c28;hb=b34c6756b2e1abb6be20770f43f44d0b5e90f677;hp=2928ed63f321f31e34667e2448e1b8f765f2fdbf;hpb=d7c738e13decf8a8a891008c51b437ccbe3434fb;p=apitrace diff --git a/gui/retracer.cpp b/gui/retracer.cpp index 2928ed6..cb0bad3 100644 --- a/gui/retracer.cpp +++ b/gui/retracer.cpp @@ -130,6 +130,7 @@ Retracer::Retracer(QObject *parent) : QThread(parent), m_benchmarking(false), m_doubleBuffered(true), + m_singlethread(false), m_captureState(false), m_captureCall(0), m_profileGpu(false), @@ -149,6 +150,16 @@ void Retracer::setFileName(const QString &name) m_fileName = name; } +QString Retracer::remoteTarget() const +{ + return m_remoteTarget; +} + +void Retracer::setRemoteTarget(const QString &host) +{ + m_remoteTarget = host; +} + void Retracer::setAPI(trace::API api) { m_api = api; @@ -174,6 +185,16 @@ void Retracer::setDoubleBuffered(bool db) m_doubleBuffered = db; } +bool Retracer::isSinglethread() const +{ + return m_singlethread; +} + +void Retracer::setSinglethread(bool singlethread) +{ + m_singlethread = singlethread; +} + bool Retracer::isProfilingGpu() const { return m_profileGpu; @@ -271,6 +292,10 @@ void Retracer::run() return; } + if (m_singlethread) { + arguments << QLatin1String("--singlethread"); + } + if (m_captureState) { arguments << QLatin1String("-D"); arguments << QString::number(m_captureCall); @@ -303,6 +328,16 @@ void Retracer::run() arguments << m_fileName; + /* + * Support remote execution on a separate target. + */ + + if (m_remoteTarget.length() != 0) { + arguments.prepend(prog); + arguments.prepend(m_remoteTarget); + prog = QLatin1String("ssh"); + } + /* * Start the process. */ @@ -472,7 +507,6 @@ void Retracer::run() if (m_captureState) { ApiTraceState *state = new ApiTraceState(parsedJson); emit foundState(state); - msg = QLatin1String("State fetched."); } if (m_captureThumbnails && !thumbnails.isEmpty()) {