perf intel-pt: Remove guest_machine_pid
authorAdrian Hunter <adrian.hunter@intel.com>
Mon, 11 Jul 2022 09:32:11 +0000 (12:32 +0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 20 Jul 2022 14:08:42 +0000 (11:08 -0300)
Remove guest_machine_pid because it is not needed.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: kvm@vger.kernel.org
Link: https://lore.kernel.org/r/20220711093218.10967-29-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/intel-pt.c

index 62b2f375a94dcc31fa383cf6632dcca2012ca29f..014f9f73cc49f5c7fd67b91580bffc6044236bc0 100644 (file)
@@ -194,7 +194,6 @@ struct intel_pt_queue {
        struct machine *guest_machine;
        struct thread *guest_thread;
        struct thread *unknown_guest_thread;
-       pid_t guest_machine_pid;
        bool exclude_kernel;
        bool have_sample;
        u64 time;
@@ -685,7 +684,7 @@ static int intel_pt_get_guest(struct intel_pt_queue *ptq)
        struct machine *machine;
        pid_t pid = ptq->pid <= 0 ? DEFAULT_GUEST_KERNEL_ID : ptq->pid;
 
-       if (ptq->guest_machine && pid == ptq->guest_machine_pid)
+       if (ptq->guest_machine && pid == ptq->guest_machine->pid)
                return 0;
 
        ptq->guest_machine = NULL;
@@ -705,7 +704,6 @@ static int intel_pt_get_guest(struct intel_pt_queue *ptq)
                return -1;
 
        ptq->guest_machine = machine;
-       ptq->guest_machine_pid = pid;
 
        return 0;
 }