aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/perf/builtin-record.c3
-rw-r--r--tools/perf/builtin-report.c6
2 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index deaee42d5eb0..a5698add2fcb 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -347,6 +347,7 @@ static void create_counter(int counter, int cpu, pid_t pid)
347 attr->mmap = track; 347 attr->mmap = track;
348 attr->comm = track; 348 attr->comm = track;
349 attr->inherit = (cpu < 0) && inherit; 349 attr->inherit = (cpu < 0) && inherit;
350 attr->disabled = 1;
350 351
351 track = 0; /* only the first counter needs these */ 352 track = 0; /* only the first counter needs these */
352 353
@@ -402,6 +403,8 @@ try_again:
402 error("failed to mmap with %d (%s)\n", errno, strerror(errno)); 403 error("failed to mmap with %d (%s)\n", errno, strerror(errno));
403 exit(-1); 404 exit(-1);
404 } 405 }
406
407 ioctl(fd[nr_cpu][counter], PERF_COUNTER_IOC_ENABLE);
405} 408}
406 409
407static void open_counters(int cpu, pid_t pid) 410static void open_counters(int cpu, pid_t pid)
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 0b18cb99a858..9a0e31e79e9d 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -47,6 +47,7 @@ struct ip_event {
47 struct perf_event_header header; 47 struct perf_event_header header;
48 __u64 ip; 48 __u64 ip;
49 __u32 pid, tid; 49 __u32 pid, tid;
50 __u64 period;
50}; 51};
51 52
52struct mmap_event { 53struct mmap_event {
@@ -943,12 +944,13 @@ process_overflow_event(event_t *event, unsigned long offset, unsigned long head)
943 uint64_t ip = event->ip.ip; 944 uint64_t ip = event->ip.ip;
944 struct map *map = NULL; 945 struct map *map = NULL;
945 946
946 dprintf("%p [%p]: PERF_EVENT (IP, %d): %d: %p\n", 947 dprintf("%p [%p]: PERF_EVENT (IP, %d): %d: %p period: %Ld\n",
947 (void *)(offset + head), 948 (void *)(offset + head),
948 (void *)(long)(event->header.size), 949 (void *)(long)(event->header.size),
949 event->header.misc, 950 event->header.misc,
950 event->ip.pid, 951 event->ip.pid,
951 (void *)(long)ip); 952 (void *)(long)ip,
953 (long long)event->ip.period);
952 954
953 dprintf(" ... thread: %s:%d\n", thread->comm, thread->pid); 955 dprintf(" ... thread: %s:%d\n", thread->comm, thread->pid);
954 956