aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-kvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/builtin-kvm.c')
-rw-r--r--tools/perf/builtin-kvm.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/tools/perf/builtin-kvm.c b/tools/perf/builtin-kvm.c
index cd9f92078aba..f8bf5f244d77 100644
--- a/tools/perf/builtin-kvm.c
+++ b/tools/perf/builtin-kvm.c
@@ -1510,13 +1510,13 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
1510 /* 1510 /*
1511 * target related setups 1511 * target related setups
1512 */ 1512 */
1513 err = perf_target__validate(&kvm->opts.target); 1513 err = target__validate(&kvm->opts.target);
1514 if (err) { 1514 if (err) {
1515 perf_target__strerror(&kvm->opts.target, err, errbuf, BUFSIZ); 1515 target__strerror(&kvm->opts.target, err, errbuf, BUFSIZ);
1516 ui__warning("%s", errbuf); 1516 ui__warning("%s", errbuf);
1517 } 1517 }
1518 1518
1519 if (perf_target__none(&kvm->opts.target)) 1519 if (target__none(&kvm->opts.target))
1520 kvm->opts.target.system_wide = true; 1520 kvm->opts.target.system_wide = true;
1521 1521
1522 1522
@@ -1544,18 +1544,8 @@ static int kvm_events_live(struct perf_kvm_stat *kvm,
1544 } 1544 }
1545 kvm->session->evlist = kvm->evlist; 1545 kvm->session->evlist = kvm->evlist;
1546 perf_session__set_id_hdr_size(kvm->session); 1546 perf_session__set_id_hdr_size(kvm->session);
1547 1547 machine__synthesize_threads(&kvm->session->machines.host, &kvm->opts.target,
1548 1548 kvm->evlist->threads, false);
1549 if (perf_target__has_task(&kvm->opts.target))
1550 perf_event__synthesize_thread_map(&kvm->tool,
1551 kvm->evlist->threads,
1552 perf_event__process,
1553 &kvm->session->machines.host);
1554 else
1555 perf_event__synthesize_threads(&kvm->tool, perf_event__process,
1556 &kvm->session->machines.host);
1557
1558
1559 err = kvm_live_open_events(kvm); 1549 err = kvm_live_open_events(kvm);
1560 if (err) 1550 if (err)
1561 goto out; 1551 goto out;