Merge branch 'perf/live' into perf/core
authorIngo Molnar <mingo@elte.hu>
Thu, 15 Apr 2010 07:13:26 +0000 (09:13 +0200)
committerIngo Molnar <mingo@elte.hu>
Thu, 15 Apr 2010 07:13:26 +0000 (09:13 +0200)
Conflicts:
tools/perf/builtin-record.c

Merge reason: add the live tracing feature, resolve conflict.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
1  2 
tools/perf/builtin-record.c

index ca2affc9233f92a047a97fdc6d3e0390a766a3fa,0bde31bc8e2e63f1ddcd41103b16d19ce194afcd..a1b99eeac3c0e9887af395a969d781865aab8905
@@@ -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);