perf record: Check conflict between '--timestamp-filename' option and pipe mode befor...
[linux-2.6-microblaze.git] / tools / perf / builtin-record.c
index fb8d406..5e3ea5c 100644 (file)
@@ -2472,6 +2472,11 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
        if (data->is_pipe && rec->evlist->core.nr_entries == 1)
                rec->opts.sample_id = true;
 
+       if (rec->timestamp_filename && perf_data__is_pipe(data)) {
+               rec->timestamp_filename = false;
+               pr_warning("WARNING: --timestamp-filename option is not available in pipe mode.\n");
+       }
+
        evlist__uniquify_name(rec->evlist);
 
        /* Debug message used by test scripts */