提交 801a5f65 编写于 作者: J Jiri Denemark

qemu: Fix /proc/**/stat parsing

Since commit v1.3.2-119-g1e34a8f9 which enabled debug-threads in QEMU
qemuGetProcessInfo would fail to parse stats for any thread with a space
in its name.

https://bugzilla.redhat.com/show_bug.cgi?id=1316803Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
上级 d40d18fb
...@@ -1460,7 +1460,7 @@ qemuGetProcessInfo(unsigned long long *cpuTime, int *lastCpu, long *vm_rss, ...@@ -1460,7 +1460,7 @@ qemuGetProcessInfo(unsigned long long *cpuTime, int *lastCpu, long *vm_rss,
if (!pidinfo || if (!pidinfo ||
fscanf(pidinfo, fscanf(pidinfo,
/* pid -> stime */ /* pid -> stime */
"%*d %*s %*c %*d %*d %*d %*d %*d %*u %*u %*u %*u %*u %llu %llu" "%*d (%*[^)]) %*c %*d %*d %*d %*d %*d %*u %*u %*u %*u %*u %llu %llu"
/* cutime -> endcode */ /* cutime -> endcode */
"%*d %*d %*d %*d %*d %*d %*u %*u %ld %*u %*u %*u" "%*d %*d %*d %*d %*d %*d %*u %*u %ld %*u %*u %*u"
/* startstack -> processor */ /* startstack -> processor */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册