Merge branch 'linus' into x86/asm, before applying dependent patch
[firefly-linux-kernel-4.4.55.git] / tools / perf / builtin-mem.c
index 9b5663950a4dd1b11573f9c10da92ac229bbb2f4..675216e08bfcd04baf2336ece7da328e914e21fd 100644 (file)
@@ -15,6 +15,7 @@ struct perf_mem {
        char const              *input_name;
        bool                    hide_unresolved;
        bool                    dump_raw;
+       bool                    force;
        int                     operation;
        const char              *cpu_list;
        DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS);
@@ -120,6 +121,7 @@ static int report_raw_events(struct perf_mem *mem)
        struct perf_data_file file = {
                .path = input_name,
                .mode = PERF_DATA_MODE_READ,
+               .force = mem->force,
        };
        int err = -EINVAL;
        int ret;
@@ -141,7 +143,7 @@ static int report_raw_events(struct perf_mem *mem)
 
        printf("# PID, TID, IP, ADDR, LOCAL WEIGHT, DSRC, SYMBOL\n");
 
-       err = perf_session__process_events(session, &mem->tool);
+       err = perf_session__process_events(session);
        if (err)
                return err;
 
@@ -286,10 +288,11 @@ int cmd_mem(int argc, const char **argv, const char *prefix __maybe_unused)
                   "input file name"),
        OPT_STRING('C', "cpu", &mem.cpu_list, "cpu",
                   "list of cpus to profile"),
-       OPT_STRING('x', "field-separator", &symbol_conf.field_sep,
+       OPT_STRING_NOEMPTY('x', "field-separator", &symbol_conf.field_sep,
                   "separator",
                   "separator for columns, no spaces will be added"
                   " between columns '.' is reserved."),
+       OPT_BOOLEAN('f', "force", &mem.force, "don't complain, do it"),
        OPT_END()
        };
        const char *const mem_subcommands[] = { "record", "report", NULL };