};
static int
-virshParseEventStr(vshControl *ctl,
- const char *event,
+virshParseEventStr(const char *event,
bool state,
virTypedParameterPtr *params,
int *nparams,
size_t i, ntok;
int ret = -1;
- if (!(tok = virStringSplitCount(event, "|", 0, &ntok)))
+ if (!(tok = virStringSplitCount(event, ",", 0, &ntok)))
return -1;
- if (ntok > VIR_PERF_EVENT_LAST) {
- vshError(ctl, _("event string '%s' has too many fields"), event);
- goto cleanup;
- }
-
for (i = 0; i < ntok; i++) {
if ((*tok[i] != '\0') &&
virTypedParamsAddBoolean(params, nparams,
vshCommandOptStringReq(ctl, cmd, "disable", &disable) < 0)
return false;
- if (enable && virshParseEventStr(ctl, enable, true,
- ¶ms, &nparams, &maxparams) < 0)
+ if (enable && virshParseEventStr(enable, true, ¶ms,
+ &nparams, &maxparams) < 0)
goto cleanup;
- if (disable && virshParseEventStr(ctl, disable, false,
- ¶ms, &nparams, &maxparams) < 0)
+ if (disable && virshParseEventStr(disable, false, ¶ms,
+ &nparams, &maxparams) < 0)
goto cleanup;
if (nparams == 0) {
Specifying -1 as a value for these limits is interpreted as unlimited.
-=item B<perf> I<domain> [I<--enable> B<eventName>]
-[I<--disable> B<eventName>]
+=item B<perf> I<domain> [I<--enable> B<eventSpec>]
+[I<--disable> B<eventSpec>]
Get the current perf events setting or enable/disable specific perf
-event for a guest domain.
+events for a guest domain.
Perf is a performance analyzing tool in Linux, and it can instrument
CPU performance counters, tracepoints, kprobes, and uprobes (dynamic
including context-switches, minor-faults, etc.. Now dozens of events
from different sources can be supported by perf.
-Currently only QEMU/KVM supports I<--enable> and I<--disable>.
-B<eventName> is a string listing one or more events, in the format
-of name|name|name. Only "cmt" event is supported presently. CMT is
-a PQos (Platform Qos) feature to monitor the usage of cache by
-applications running on the platform.
+Currently only QEMU/KVM supports this command. The I<--enable> and I<--disable>
+option combined with B<eventSpec> can be used to enabled or disable specific
+performance event. B<eventSpec> is a string list of one or more events
+separated by commas. However, just "cmt" event is supported presently. CMT is a
+PQos (Platform Qos) feature to monitor the usage of cache by applications
+running on the platform.
=item B<blkiotune> I<domain> [I<--weight> B<weight>]
[I<--device-weights> B<device-weights>]