perf kvm: Use thread_{,_set}_priv helpers
authorNamhyung Kim <namhyung@kernel.org>
Mon, 6 Oct 2014 00:46:02 +0000 (09:46 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 15 Oct 2014 20:39:01 +0000 (17:39 -0300)
This is mechanical changes only for accounting access to thread->priv
properly in the source level.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1412556363-26229-5-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-kvm.c

index 460a4ce9c04427624a7c9fb029c47318e1407ff5..ef9fc15fbfbfd60d63439877abcb72bf7113a17f 100644 (file)
@@ -376,7 +376,7 @@ struct vcpu_event_record *per_vcpu_record(struct thread *thread,
                                          struct perf_sample *sample)
 {
        /* Only kvm_entry records vcpu id. */
-       if (!thread->priv && kvm_entry_event(evsel)) {
+       if (!thread__priv(thread) && kvm_entry_event(evsel)) {
                struct vcpu_event_record *vcpu_record;
 
                vcpu_record = zalloc(sizeof(*vcpu_record));
@@ -386,10 +386,10 @@ struct vcpu_event_record *per_vcpu_record(struct thread *thread,
                }
 
                vcpu_record->vcpu_id = perf_evsel__intval(evsel, sample, VCPU_ID);
-               thread->priv = vcpu_record;
+               thread__set_priv(thread, vcpu_record);
        }
 
-       return thread->priv;
+       return thread__priv(thread);
 }
 
 static bool handle_kvm_event(struct perf_kvm_stat *kvm,