perf kmem: Do not pass additional arguments to 'perf record'
hulk inclusion category: bugfix bugzilla: 51797 CVE: NA -------------------------------- The commit be8299e4 passes additional arguments directly to the 'perf record' to support the '-o' option. If used in the current format of the'perf kmem --help' command, there is no problem. But we're used to using this: 'perf kmem record --slab --page', where the subcommand is placed before the option. After the commit be8299e4, there is a problem with this use: # perf kmem record --slab --page Error: unknown option `slab' Usage: perf record [<options>] [<command>] or: perf record [<options>] -- <command> [<options>] -a, --all-cpus system-wide collection from all CPUs -b, --branch-any sample any taken branches -B, --no-buildid do not collect buildids in perf.data -c, --count <n> event period to sample -C, --cpu <cpu> list of cpus to monitor -d, --data Record the sample addresses ... This is because we pass all the options directly to 'perf record', but these options are 'perf kmem' options. In order to be able to use the format 'perf kmem {record|stat} [option]', we revert the commit be8299e4. In order to still support the '-o' option, we first process the '-o' option in 'perf kmem' and then add it to the list of options in'perf record'. Fixes: be8299e4("perf kmem: Pass additional arguments to 'perf record'") Signed-off-by: NLi Huafei <lihuafei1@huawei.com> Reviewed-by: NYang Jihong <yangjihong1@huawei.com> Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Showing
想要评论请 注册 或 登录