From: Ingo Molnar Date: Wed, 19 Aug 2009 12:50:35 +0000 (+0200) Subject: Merge branch 'perfcounters/urgent' into perfcounters/core X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=96d6e48bc6b38342a59ccd23e25907d12caaeaf8;p=linux-beck.git Merge branch 'perfcounters/urgent' into perfcounters/core Conflicts: tools/perf/builtin-annotate.c tools/perf/builtin-report.c Merge reason: resolve these conflicts. Signed-off-by: Ingo Molnar --- 96d6e48bc6b38342a59ccd23e25907d12caaeaf8 diff --cc tools/perf/builtin-annotate.c index 96d421f7161d,5e17de984dc8..4ac618b34254 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c @@@ -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); } diff --cc tools/perf/builtin-report.c index 3fc0d471b90b,8b2ec882e6e0..d2e28820ee60 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@@ -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,