|
@@ -406,9 +406,10 @@ static int perf_evsel__check_attr(struct perf_evsel *evsel,
|
|
PERF_OUTPUT_WEIGHT))
|
|
PERF_OUTPUT_WEIGHT))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
- if (PRINT_FIELD(SYM) && !PRINT_FIELD(IP) && !PRINT_FIELD(ADDR)) {
|
|
|
|
|
|
+ if (PRINT_FIELD(SYM) &&
|
|
|
|
+ !(evsel->attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) {
|
|
pr_err("Display of symbols requested but neither sample IP nor "
|
|
pr_err("Display of symbols requested but neither sample IP nor "
|
|
- "sample address\nis selected. Hence, no addresses to convert "
|
|
|
|
|
|
+ "sample address\navailable. Hence, no addresses to convert "
|
|
"to symbols.\n");
|
|
"to symbols.\n");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
@@ -417,10 +418,9 @@ static int perf_evsel__check_attr(struct perf_evsel *evsel,
|
|
"selected.\n");
|
|
"selected.\n");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
- if (PRINT_FIELD(DSO) && !PRINT_FIELD(IP) && !PRINT_FIELD(ADDR) &&
|
|
|
|
- !PRINT_FIELD(BRSTACK) && !PRINT_FIELD(BRSTACKSYM) && !PRINT_FIELD(BRSTACKOFF)) {
|
|
|
|
- pr_err("Display of DSO requested but no address to convert. Select\n"
|
|
|
|
- "sample IP, sample address, brstack, brstacksym, or brstackoff.\n");
|
|
|
|
|
|
+ if (PRINT_FIELD(DSO) &&
|
|
|
|
+ !(evsel->attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) {
|
|
|
|
+ pr_err("Display of DSO requested but no address to convert.\n");
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
if (PRINT_FIELD(SRCLINE) && !PRINT_FIELD(IP)) {
|
|
if (PRINT_FIELD(SRCLINE) && !PRINT_FIELD(IP)) {
|
|
@@ -2491,6 +2491,8 @@ parse:
|
|
output[j].fields &= ~all_output_options[i].field;
|
|
output[j].fields &= ~all_output_options[i].field;
|
|
else
|
|
else
|
|
output[j].fields |= all_output_options[i].field;
|
|
output[j].fields |= all_output_options[i].field;
|
|
|
|
+ output[j].user_set = true;
|
|
|
|
+ output[j].wildcard_set = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
@@ -2501,7 +2503,8 @@ parse:
|
|
rc = -EINVAL;
|
|
rc = -EINVAL;
|
|
goto out;
|
|
goto out;
|
|
}
|
|
}
|
|
- output[type].fields |= all_output_options[i].field;
|
|
|
|
|
|
+ output[type].user_set = true;
|
|
|
|
+ output[type].wildcard_set = true;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|