|
@@ -292,10 +292,10 @@ static int create_perf_stat_counter(struct perf_evsel *evsel,
|
|
|
|
|
|
attr->inherit = !no_inherit;
|
|
attr->inherit = !no_inherit;
|
|
|
|
|
|
- if (!perf_target__no_cpu(&target))
|
|
|
|
|
|
+ if (perf_target__has_cpu(&target))
|
|
return perf_evsel__open_per_cpu(evsel, evsel_list->cpus,
|
|
return perf_evsel__open_per_cpu(evsel, evsel_list->cpus,
|
|
group, group_fd);
|
|
group, group_fd);
|
|
- if (perf_target__no_task(&target) && (!group || evsel == first)) {
|
|
|
|
|
|
+ if (!perf_target__has_task(&target) && (!group || evsel == first)) {
|
|
attr->disabled = 1;
|
|
attr->disabled = 1;
|
|
attr->enable_on_exec = 1;
|
|
attr->enable_on_exec = 1;
|
|
}
|
|
}
|
|
@@ -972,7 +972,7 @@ static void print_stat(int argc, const char **argv)
|
|
if (!csv_output) {
|
|
if (!csv_output) {
|
|
fprintf(output, "\n");
|
|
fprintf(output, "\n");
|
|
fprintf(output, " Performance counter stats for ");
|
|
fprintf(output, " Performance counter stats for ");
|
|
- if (perf_target__no_task(&target)) {
|
|
|
|
|
|
+ if (!perf_target__has_task(&target)) {
|
|
fprintf(output, "\'%s", argv[0]);
|
|
fprintf(output, "\'%s", argv[0]);
|
|
for (i = 1; i < argc; i++)
|
|
for (i = 1; i < argc; i++)
|
|
fprintf(output, " %s", argv[i]);
|
|
fprintf(output, " %s", argv[i]);
|
|
@@ -1194,13 +1194,13 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used)
|
|
} else if (big_num_opt == 0) /* User passed --no-big-num */
|
|
} else if (big_num_opt == 0) /* User passed --no-big-num */
|
|
big_num = false;
|
|
big_num = false;
|
|
|
|
|
|
- if (!argc && perf_target__no_task(&target))
|
|
|
|
|
|
+ if (!argc && !perf_target__has_task(&target))
|
|
usage_with_options(stat_usage, options);
|
|
usage_with_options(stat_usage, options);
|
|
if (run_count <= 0)
|
|
if (run_count <= 0)
|
|
usage_with_options(stat_usage, options);
|
|
usage_with_options(stat_usage, options);
|
|
|
|
|
|
/* no_aggr, cgroup are for system-wide only */
|
|
/* no_aggr, cgroup are for system-wide only */
|
|
- if ((no_aggr || nr_cgroups) && perf_target__no_cpu(&target)) {
|
|
|
|
|
|
+ if ((no_aggr || nr_cgroups) && !perf_target__has_cpu(&target)) {
|
|
fprintf(stderr, "both cgroup and no-aggregation "
|
|
fprintf(stderr, "both cgroup and no-aggregation "
|
|
"modes only available in system-wide mode\n");
|
|
"modes only available in system-wide mode\n");
|
|
|
|
|
|
@@ -1213,9 +1213,9 @@ int cmd_stat(int argc, const char **argv, const char *prefix __used)
|
|
perf_target__validate(&target);
|
|
perf_target__validate(&target);
|
|
|
|
|
|
if (perf_evlist__create_maps(evsel_list, &target) < 0) {
|
|
if (perf_evlist__create_maps(evsel_list, &target) < 0) {
|
|
- if (!perf_target__no_task(&target))
|
|
|
|
|
|
+ if (perf_target__has_task(&target))
|
|
pr_err("Problems finding threads of monitor\n");
|
|
pr_err("Problems finding threads of monitor\n");
|
|
- if (!perf_target__no_cpu(&target))
|
|
|
|
|
|
+ if (perf_target__has_cpu(&target))
|
|
perror("failed to parse CPUs map");
|
|
perror("failed to parse CPUs map");
|
|
|
|
|
|
usage_with_options(stat_usage, options);
|
|
usage_with_options(stat_usage, options);
|