perf tools: Pass build_id object to dso__build_id_equal()
[linux-2.6-microblaze.git] / tools / perf / builtin-trace.c
index 4cbb64e..44a75f2 100644 (file)
@@ -1762,7 +1762,11 @@ static int trace__read_syscall_info(struct trace *trace, int id)
                if (table == NULL)
                        return -ENOMEM;
 
-               memset(table + trace->sctbl->syscalls.max_id, 0, (id - trace->sctbl->syscalls.max_id) * sizeof(*sc));
+               // Need to memset from offset 0 and +1 members if brand new
+               if (trace->syscalls.table == NULL)
+                       memset(table, 0, (id + 1) * sizeof(*sc));
+               else
+                       memset(table + trace->sctbl->syscalls.max_id + 1, 0, (id - trace->sctbl->syscalls.max_id) * sizeof(*sc));
 
                trace->syscalls.table         = table;
                trace->sctbl->syscalls.max_id = id;
@@ -3917,8 +3921,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
        }
 
        if (trace->sched &&
-           perf_evlist__add_newtp(evlist, "sched", "sched_stat_runtime",
-                                  trace__sched_stat_runtime))
+           evlist__add_newtp(evlist, "sched", "sched_stat_runtime", trace__sched_stat_runtime))
                goto out_error_sched_stat_runtime;
        /*
         * If a global cgroup was set, apply it to all the events without an
@@ -4150,11 +4153,11 @@ out_error_raw_syscalls:
        goto out_error;
 
 out_error_mmap:
-       perf_evlist__strerror_mmap(evlist, errno, errbuf, sizeof(errbuf));
+       evlist__strerror_mmap(evlist, errno, errbuf, sizeof(errbuf));
        goto out_error;
 
 out_error_open:
-       perf_evlist__strerror_open(evlist, errno, errbuf, sizeof(errbuf));
+       evlist__strerror_open(evlist, errno, errbuf, sizeof(errbuf));
 
 out_error:
        fprintf(trace->output, "%s\n", errbuf);
@@ -4813,7 +4816,7 @@ int cmd_trace(int argc, const char **argv)
                        "per thread proc mmap processing timeout in ms"),
        OPT_CALLBACK('G', "cgroup", &trace, "name", "monitor event in cgroup name only",
                     trace__parse_cgroups),
-       OPT_UINTEGER('D', "delay", &trace.opts.initial_delay,
+       OPT_INTEGER('D', "delay", &trace.opts.initial_delay,
                     "ms to wait before starting measurement after program "
                     "start"),
        OPTS_EVSWITCH(&trace.evswitch),