aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/evsel.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/evsel.c')
-rw-r--r--tools/perf/util/evsel.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 8c13dbcb84b9..21eaab240396 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -14,6 +14,7 @@
14#include "util.h" 14#include "util.h"
15#include "cpumap.h" 15#include "cpumap.h"
16#include "thread_map.h" 16#include "thread_map.h"
17#include "target.h"
17 18
18#define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y)) 19#define FD(e, x, y) (*(int *)xyarray__entry(e->fd, x, y))
19#define GROUP_FD(group_fd, cpu) (*(int *)xyarray__entry(group_fd, cpu, 0)) 20#define GROUP_FD(group_fd, cpu) (*(int *)xyarray__entry(group_fd, cpu, 0))
@@ -106,15 +107,15 @@ void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts,
106 if (opts->call_graph) 107 if (opts->call_graph)
107 attr->sample_type |= PERF_SAMPLE_CALLCHAIN; 108 attr->sample_type |= PERF_SAMPLE_CALLCHAIN;
108 109
109 if (opts->system_wide) 110 if (opts->target.system_wide)
110 attr->sample_type |= PERF_SAMPLE_CPU; 111 attr->sample_type |= PERF_SAMPLE_CPU;
111 112
112 if (opts->period) 113 if (opts->period)
113 attr->sample_type |= PERF_SAMPLE_PERIOD; 114 attr->sample_type |= PERF_SAMPLE_PERIOD;
114 115
115 if (!opts->sample_id_all_missing && 116 if (!opts->sample_id_all_missing &&
116 (opts->sample_time || opts->system_wide || 117 (opts->sample_time || !opts->no_inherit ||
117 !opts->no_inherit || opts->cpu_list)) 118 !perf_target__no_cpu(&opts->target)))
118 attr->sample_type |= PERF_SAMPLE_TIME; 119 attr->sample_type |= PERF_SAMPLE_TIME;
119 120
120 if (opts->raw_samples) { 121 if (opts->raw_samples) {
@@ -135,7 +136,7 @@ void perf_evsel__config(struct perf_evsel *evsel, struct perf_record_opts *opts,
135 attr->mmap = track; 136 attr->mmap = track;
136 attr->comm = track; 137 attr->comm = track;
137 138
138 if (!opts->target_pid && !opts->target_tid && !opts->system_wide && 139 if (perf_target__none(&opts->target) &&
139 (!opts->group || evsel == first)) { 140 (!opts->group || evsel == first)) {
140 attr->disabled = 1; 141 attr->disabled = 1;
141 attr->enable_on_exec = 1; 142 attr->enable_on_exec = 1;