|
@@ -261,6 +261,17 @@ static bool update_kvm_event(struct kvm_event *event, int vcpu_id,
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+static bool skip_event(const char *event)
|
|
|
+{
|
|
|
+ const char * const *skip_events;
|
|
|
+
|
|
|
+ for (skip_events = kvm_skip_events; *skip_events; skip_events++)
|
|
|
+ if (!strcmp(event, *skip_events))
|
|
|
+ return true;
|
|
|
+
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
static bool handle_end_event(struct perf_kvm_stat *kvm,
|
|
|
struct vcpu_event_record *vcpu_record,
|
|
|
struct event_key *key,
|
|
@@ -312,7 +323,7 @@ static bool handle_end_event(struct perf_kvm_stat *kvm,
|
|
|
char decode[DECODE_STR_LEN];
|
|
|
|
|
|
kvm->events_ops->decode_key(kvm, &event->key, decode);
|
|
|
- if (strcmp(decode, "HLT")) {
|
|
|
+ if (!skip_event(decode)) {
|
|
|
pr_info("%" PRIu64 " VM %d, vcpu %d: %s event took %" PRIu64 "usec\n",
|
|
|
sample->time, sample->pid, vcpu_record->vcpu_id,
|
|
|
decode, time_diff/1000);
|