| 46 | } |
| 47 | |
| 48 | void JVisualVM::beginProfilingImpl(shared_qobject_ptr<LaunchTask> process) |
| 49 | { |
| 50 | QProcess *profiler = new QProcess(this); |
| 51 | QStringList profilerArgs = |
| 52 | { |
| 53 | "--openpid", QString::number(process->pid()) |
| 54 | }; |
| 55 | auto programPath = globalSettings->get("JVisualVMPath").toString(); |
| 56 | |
| 57 | profiler->setArguments(profilerArgs); |
| 58 | profiler->setProgram(programPath); |
| 59 | |
| 60 | connect(profiler, SIGNAL(started()), SLOT(profilerStarted())); |
| 61 | connect(profiler, SIGNAL(finished(int, QProcess::ExitStatus)), SLOT(profilerFinished(int,QProcess::ExitStatus))); |
| 62 | |
| 63 | profiler->start(); |
| 64 | m_profilerProcess = profiler; |
| 65 | } |
| 66 | |
| 67 | void JVisualVMFactory::registerSettings(SettingsObjectPtr settings) |
| 68 | { |