|
@@ -662,6 +662,10 @@ static int __cmd_record(int argc, const char **argv)
|
|
int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
|
|
int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
|
|
{
|
|
{
|
|
const char * const default_sort_order = "frag,hit,bytes";
|
|
const char * const default_sort_order = "frag,hit,bytes";
|
|
|
|
+ struct perf_data_file file = {
|
|
|
|
+ .path = input_name,
|
|
|
|
+ .mode = PERF_DATA_MODE_READ,
|
|
|
|
+ };
|
|
const struct option kmem_options[] = {
|
|
const struct option kmem_options[] = {
|
|
OPT_STRING('i', "input", &input_name, "file", "input file name"),
|
|
OPT_STRING('i', "input", &input_name, "file", "input file name"),
|
|
OPT_INCR('v', "verbose", &verbose,
|
|
OPT_INCR('v', "verbose", &verbose,
|
|
@@ -675,6 +679,7 @@ int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
|
|
parse_sort_opt),
|
|
parse_sort_opt),
|
|
OPT_CALLBACK('l', "line", NULL, "num", "show n lines", parse_line_opt),
|
|
OPT_CALLBACK('l', "line", NULL, "num", "show n lines", parse_line_opt),
|
|
OPT_BOOLEAN(0, "raw-ip", &raw_ip, "show raw ip instead of symbol"),
|
|
OPT_BOOLEAN(0, "raw-ip", &raw_ip, "show raw ip instead of symbol"),
|
|
|
|
+ OPT_BOOLEAN('f', "force", &file.force, "don't complain, do it"),
|
|
OPT_END()
|
|
OPT_END()
|
|
};
|
|
};
|
|
const char *const kmem_subcommands[] = { "record", "stat", NULL };
|
|
const char *const kmem_subcommands[] = { "record", "stat", NULL };
|
|
@@ -683,10 +688,6 @@ int cmd_kmem(int argc, const char **argv, const char *prefix __maybe_unused)
|
|
NULL
|
|
NULL
|
|
};
|
|
};
|
|
struct perf_session *session;
|
|
struct perf_session *session;
|
|
- struct perf_data_file file = {
|
|
|
|
- .path = input_name,
|
|
|
|
- .mode = PERF_DATA_MODE_READ,
|
|
|
|
- };
|
|
|
|
int ret = -1;
|
|
int ret = -1;
|
|
|
|
|
|
argc = parse_options_subcommand(argc, argv, kmem_options,
|
|
argc = parse_options_subcommand(argc, argv, kmem_options,
|