mirror of https://gitee.com/openkylin/libvirt.git
qemu: perf: Don't set state of first event for every other event
A bug in the code used the value of the first perf event as state for all the mentioned one rather than extracting individual ones. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1346730
This commit is contained in:
parent
e33cd67a9b
commit
da8285c44a
|
@ -9750,7 +9750,7 @@ qemuDomainSetPerfEvents(virDomainPtr dom,
|
|||
if (def) {
|
||||
for (i = 0; i < nparams; i++) {
|
||||
virTypedParameterPtr param = ¶ms[i];
|
||||
enabled = params->value.b;
|
||||
enabled = param->value.b;
|
||||
type = virPerfEventTypeFromString(param->field);
|
||||
|
||||
if (!enabled && virPerfEventDisable(priv->perf, type) < 0)
|
||||
|
@ -9769,7 +9769,7 @@ qemuDomainSetPerfEvents(virDomainPtr dom,
|
|||
if (persistentDef) {
|
||||
for (i = 0; i < nparams; i++) {
|
||||
virTypedParameterPtr param = ¶ms[i];
|
||||
enabled = params->value.b;
|
||||
enabled = param->value.b;
|
||||
type = virPerfEventTypeFromString(param->field);
|
||||
|
||||
persistentDef->perf->events[type] = enabled ?
|
||||
|
|
Loading…
Reference in New Issue