Merge branch 'perfcounters/urgent' into perfcounters/core
authorIngo Molnar <mingo@elte.hu>
Wed, 19 Aug 2009 12:50:35 +0000 (14:50 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 24 Aug 2009 07:24:01 +0000 (09:24 +0200)
Conflicts:
tools/perf/builtin-annotate.c
tools/perf/builtin-report.c

Merge reason: resolve these conflicts.

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

index 96d421f7161dc884497087f8bbdce0d38bb0885a,5e17de984dc839d0ad86932d73bf4e2c2c85b272..4ac618b34254ab8db10a459e373f1a96c79e31bb
@@@ -629,8 -981,15 +630,15 @@@ process_fork_event(event_t *event, unsi
                (void *)(long)(event->header.size),
                event->fork.pid, event->fork.ppid);
  
+       /*
+        * A thread clone will have the same PID for both
+        * parent and child.
+        */
+       if (thread == parent)
+               return 0;
        if (!thread || !parent || thread__fork(thread, parent)) {
 -              dprintf("problem processing PERF_EVENT_FORK, skipping event.\n");
 +              dump_printf("problem processing PERF_EVENT_FORK, skipping event.\n");
                return -1;
        }
        total_fork++;
@@@ -976,7 -1335,12 +984,12 @@@ static int __cmd_annotate(void
                exit(-1);
        }
  
 -      if (!force && (stat.st_uid != geteuid())) {
++      if (!force && (input_stat.st_uid != geteuid())) {
+               fprintf(stderr, "file: %s not owned by current user\n", input_name);
+               exit(-1);
+       }
 -      if (!stat.st_size) {
 +      if (!input_stat.st_size) {
                fprintf(stderr, "zero-sized file, nothing to do!\n");
                exit(0);
        }
index 3fc0d471b90b6ba781018e13179386ed95c95185,8b2ec882e6e0e8b44230c1d3648007d3d91ccbfe..d2e28820ee6000dfea38dd1c72d389470c7ab5fa
@@@ -1404,7 -1857,12 +1405,12 @@@ static int __cmd_report(void
                exit(-1);
        }
  
 -      if (!force && (stat.st_uid != geteuid())) {
++      if (!force && (input_stat.st_uid != geteuid())) {
+               fprintf(stderr, "file: %s not owned by current user\n", input_name);
+               exit(-1);
+       }
 -      if (!stat.st_size) {
 +      if (!input_stat.st_size) {
                fprintf(stderr, "zero-sized file, nothing to do!\n");
                exit(0);
        }
@@@ -1614,7 -2069,8 +1620,8 @@@ static const struct option options[] = 
                    "be more verbose (show symbol address, etc)"),
        OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,
                    "dump raw trace in ASCII"),
 -      OPT_STRING('k', "vmlinux", &vmlinux, "file", "vmlinux pathname"),
 +      OPT_STRING('k', "vmlinux", &vmlinux_name, "file", "vmlinux pathname"),
+       OPT_BOOLEAN('f', "force", &force, "don't complain, do it"),
        OPT_BOOLEAN('m', "modules", &modules,
                    "load module symbols - WARNING: use only with -k and LIVE kernel"),
        OPT_BOOLEAN('n', "show-nr-samples", &show_nr_samples,