@@ -209,7 +209,8 @@ static bool kvm_event_expand(struct kvm_event *event, int vcpu_id)
return true;
}
-static struct kvm_event *kvm_alloc_init_event(struct event_key *key)
+static struct kvm_event *kvm_alloc_init_event(struct perf_kvm_stat *kvm,
+ struct event_key *key)
{
struct kvm_event *event;
@@ -219,6 +220,7 @@ static struct kvm_event *kvm_alloc_init_event(struct event_key *key)
return NULL;
}
+ event->perf_kvm = kvm;
event->key = *key;
init_stats(&event->total.stats);
return event;
@@ -238,7 +240,7 @@ static struct kvm_event *find_create_kvm_event(struct perf_kvm_stat *kvm,
return event;
}
- event = kvm_alloc_init_event(key);
+ event = kvm_alloc_init_event(kvm, key);
if (!event)
return NULL;
@@ -24,10 +24,13 @@ struct kvm_event_stats {
struct stats stats;
};
+struct perf_kvm_stat;
+
struct kvm_event {
struct list_head hash_entry;
struct rb_node rb;
+ struct perf_kvm_stat *perf_kvm;
struct event_key key;
struct kvm_event_stats total;
@@ -44,8 +47,6 @@ struct kvm_event_key {
key_cmp_fun key;
};
-struct perf_kvm_stat;
-
struct child_event_ops {
void (*get_key)(struct evsel *evsel,
struct perf_sample *sample,