Merge branch 'spi/merge' of git://git.secretlab.ca/git/linux-2.6
[pandora-kernel.git] / tools / perf / builtin-record.c
index df6064a..b2f729f 100644 (file)
@@ -817,7 +817,7 @@ static int __cmd_record(int argc, const char **argv)
         * Approximate RIP event size: 24 bytes.
         */
        fprintf(stderr,
-               "[ perf record: Captured and wrote %.3f MB %s (~%lld samples) ]\n",
+               "[ perf record: Captured and wrote %.3f MB %s (~%" PRIu64 " samples) ]\n",
                (double)bytes_written / 1024.0 / 1024.0,
                output_name,
                bytes_written / 24);
@@ -936,6 +936,8 @@ int cmd_record(int argc, const char **argv, const char *prefix __used)
        list_for_each_entry(pos, &evsel_list, node) {
                if (perf_evsel__alloc_fd(pos, cpus->nr, threads->nr) < 0)
                        goto out_free_fd;
+               if (perf_header__push_event(pos->attr.config, event_name(pos)))
+                       goto out_free_fd;
        }
        event_array = malloc((sizeof(struct pollfd) * MAX_NR_CPUS *
                              MAX_COUNTERS * threads->nr));