forked from luck/tmp_suning_uos_patched
perf report: Make -F more strict like -s
Currently -F allows branch-mode / mem-mode fields with -F even when perf report is not running in that mode. Don't allow that. Suggested-by: Arnaldo Carvalho de Melo <acme@kernel.org> Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.ibm.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Jin Yao <yao.jin@linux.intel.com> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lore.kernel.org/lkml/20191114132213.5419-3-ravi.bangoria@linux.ibm.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
ae87405fb5
commit
aa6b3c9923
|
@ -2959,6 +2959,9 @@ int output_field_add(struct perf_hpp_list *list, char *tok)
|
||||||
if (strncasecmp(tok, sd->name, strlen(tok)))
|
if (strncasecmp(tok, sd->name, strlen(tok)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (sort__mode != SORT_MODE__MEMORY)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
return __sort_dimension__add_output(list, sd);
|
return __sort_dimension__add_output(list, sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2968,6 +2971,9 @@ int output_field_add(struct perf_hpp_list *list, char *tok)
|
||||||
if (strncasecmp(tok, sd->name, strlen(tok)))
|
if (strncasecmp(tok, sd->name, strlen(tok)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (sort__mode != SORT_MODE__BRANCH)
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
return __sort_dimension__add_output(list, sd);
|
return __sort_dimension__add_output(list, sd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user