[Qt-creator] clangtools cpu load

Björn Schäpers qt-maillist at hazardy.de
Tue Jul 12 22:16:16 CEST 2022


That did the trick.

Many thanks!

Am 09.07.2022 um 16:07 schrieb Cristian Adam:
> Hi Björn,
>
> Try this patch:
>
> --- src/plugins/clangtools/clangtoolrunner.cpp
> +++ src/plugins/clangtools/clangtoolrunner.cpp
> @@ -67,6 +67,7 @@ void ClangToolRunner::init(const FilePath &outputDirPath, 
> const Environment &env
>      QTC_CHECK(!m_outputDirPath.isEmpty());
>      m_process.setEnvironment(environment);
> +    m_process.setUseCtrlCStub(true);
>      m_process.setWorkingDirectory(m_outputDirPath); // Current clang-cl puts 
> log file into working dir.
>      connect(&m_process, &QtcProcess::done, this, 
> &ClangToolRunner::onProcessDone);
>  }
>
> Should fix your problem.
>
> Cheers,
> Cristian.
>
> --------------------------------------------------------------------------------
> *From:* Qt-creator <qt-creator-bounces at qt-project.org> on behalf of Björn 
> Schäpers <qt-maillist at hazardy.de>
> *Sent:* Friday, July 8, 2022 10:21 PM
> *To:* qt-creator <qt-creator at qt-project.org>
> *Subject:* [Qt-creator] clangtools cpu load
> Hi there,
>
> I'm witnessing a crippling cpu load from the clangtools plugin through
> clang-tidy. I'm using a quite recent LLVM and qt-creator from this morning
> (CEST) on Windows.
>
> It seems the clang-tidy.exe analyzes the source files and afterwards starts a
> child process llvm-tokenizer.exe, and there is the problem. When the Creator
> kills the clang-tidy process, the llvm-tokenizer continues to live and use one
> core at 100%.
>
> So these processes accumulate while editing and very soon the whole system is
> quite unusable until the llvm-tokenizers are done with their work.
>
> Has anyone experience with that, or a way to handle the problem? As far as I can
> see QProcess has no way of terminating the child processes.
>
> Kind regards,
> Björn.
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> https://lists.qt-project.org/listinfo/qt-creator
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20220712/8b47206a/attachment.htm>


More information about the Qt-creator mailing list