]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - tools/perf/tests/hists_link.c
perf tools: change machine__findnew_thread() to set thread pid
[mirror_ubuntu-artful-kernel.git] / tools / perf / tests / hists_link.c
index 89085a9615e2f0878c975dc93403f74e345740f5..87f9f7280c4012ede9825c66abbce22628f4e394 100644 (file)
@@ -88,7 +88,8 @@ static struct machine *setup_fake_machine(struct machines *machines)
        for (i = 0; i < ARRAY_SIZE(fake_threads); i++) {
                struct thread *thread;
 
-               thread = machine__findnew_thread(machine, fake_threads[i].pid);
+               thread = machine__findnew_thread(machine, fake_threads[i].pid,
+                                                fake_threads[i].pid);
                if (thread == NULL)
                        goto out;
 
@@ -220,7 +221,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
                        };
 
                        if (perf_event__preprocess_sample(&event, machine, &al,
-                                                         &sample, 0) < 0)
+                                                         &sample) < 0)
                                goto out;
 
                        he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1);
@@ -244,7 +245,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
                        };
 
                        if (perf_event__preprocess_sample(&event, machine, &al,
-                                                         &sample, 0) < 0)
+                                                         &sample) < 0)
                                goto out;
 
                        he = __hists__add_entry(&evsel->hists, &al, NULL, 1, 1);