perf mem: Show perf mem report usage by -h option
PATCH 1/1 perf mem: Show perf mem report usage by -h option
When typing 'perf mem report -h', the result showed 'perf report' usage. So change to show 'perf mem report' usage.
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Taeung Song <[email protected]>
Signed-off-by Sangwon Hong <[email protected]>
--- tools/perf/builtin-mem.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-)
tools/perf/builtin-mem.c +20 -1
@@ -314,6 +314,25 @@ static int report_events(int argc, const char **argv, struct perf_mem *mem)return ret; } +static int __cmd_report (int argc,const char **argv,struct perf_mem *mem) +{ +int argc2; +const char *mem_report_usage[] = { +"perf mem [<options>] report" , +NULL + }; +struct option options[] = { +OPT_END () + }; + + argc2 =parse_options (argc, argv, options, mem_report_usage, +PARSE_OPT_STOP_AT_NON_OPTION ); +if (argc2) +usage_with_options (mem_report_usage, options); + +return report_events (argc, argv, mem); +} +struct mem_mode {const char *name;int mode;
@@ -451,7 +470,7 @@ int cmd_mem(int argc, const char **argv)if (!strncmp (argv[0 ],"rec" ,3 ))return __cmd_record (argc, argv, &mem);else if (!strncmp (argv[0 ],"rep" ,3 )) -return report_events (argc, argv, &mem); +return __cmd_report (argc, argv, &mem);else usage_with_options (mem_usage, mem_options);
Signature · 1 line
2.7.4