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 <mingo@elte.hu>
This commit is contained in:
Ingo Molnar 2009-08-19 14:50:35 +02:00
commit 96d6e48bc6
5 changed files with 38 additions and 2 deletions

View file

@ -28,6 +28,7 @@ static char const *input_name = "perf.data";
static char default_sort_order[] = "comm,symbol";
static char *sort_order = default_sort_order;
static int force;
static int input;
static int show_mask = SHOW_KERNEL | SHOW_USER | SHOW_HV;
@ -629,6 +630,13 @@ process_fork_event(event_t *event, unsigned long offset, unsigned long head)
(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)) {
dump_printf("problem processing PERF_EVENT_FORK, skipping event.\n");
return -1;
@ -976,6 +984,11 @@ static int __cmd_annotate(void)
exit(-1);
}
if (!force && (input_stat.st_uid != geteuid())) {
fprintf(stderr, "file: %s not owned by current user\n", input_name);
exit(-1);
}
if (!input_stat.st_size) {
fprintf(stderr, "zero-sized file, nothing to do!\n");
exit(0);
@ -1081,6 +1094,7 @@ static const struct option options[] = {
"input file name"),
OPT_STRING('s', "symbol", &sym_hist_filter, "symbol",
"symbol to annotate"),
OPT_BOOLEAN('f', "force", &force, "don't complain, do it"),
OPT_BOOLEAN('v', "verbose", &verbose,
"be more verbose (show symbol address, etc)"),
OPT_BOOLEAN('D', "dump-raw-trace", &dump_trace,