From: Ingo Molnar Date: Thu, 15 Apr 2010 07:13:26 +0000 (+0200) Subject: Merge branch 'perf/live' into perf/core X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=84b13fd596522db47f9545d5124c30cc00dfdf5a;p=linux-beck.git Merge branch 'perf/live' into perf/core Conflicts: tools/perf/builtin-record.c Merge reason: add the live tracing feature, resolve conflict. Signed-off-by: Ingo Molnar --- 84b13fd596522db47f9545d5124c30cc00dfdf5a diff --cc tools/perf/builtin-record.c index ca2affc9233f,0bde31bc8e2e..a1b99eeac3c0 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c @@@ -39,9 -33,9 +39,10 @@@ static long default_interval = static int nr_cpus = 0; static unsigned int page_size; static unsigned int mmap_pages = 128; +static unsigned int user_freq = UINT_MAX; static int freq = 1000; static int output; + static int pipe_output = 0; static const char *output_name = "perf.data"; static int group = 0; static unsigned int realtime_prio = 0; @@@ -464,8 -464,17 +479,10 @@@ static int __cmd_record(int argc, cons exit(-1); } - if (!stat(output_name, &st) && st.st_size) { + if (!strcmp(output_name, "-")) + pipe_output = 1; + else if (!stat(output_name, &st) && st.st_size) { - if (!force) { - if (!append_file) { - pr_err("Error, output file %s exists, use -A " - "to append or -f to overwrite.\n", - output_name); - exit(-1); - } - } else { + if (write_mode == WRITE_FORCE) { char oldname[PATH_MAX]; snprintf(oldname, sizeof(oldname), "%s.old", output_name);