Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147713
b: refs/heads/master
c: 4502d77
h: refs/heads/master
i:
  147711: fb128f4
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jun 10, 2009
1 parent ca82ed3 commit 546043d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd2b5b12849a3446abad0b25e920f86f5480b309
refs/heads/master: 4502d77c1d8f15f20c04b92cb96c12d4e465de29
3 changes: 3 additions & 0 deletions trunk/tools/perf/builtin-record.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ static void create_counter(int counter, int cpu, pid_t pid)
attr->mmap = track;
attr->comm = track;
attr->inherit = (cpu < 0) && inherit;
attr->disabled = 1;

track = 0; /* only the first counter needs these */

Expand Down Expand Up @@ -402,6 +403,8 @@ static void create_counter(int counter, int cpu, pid_t pid)
error("failed to mmap with %d (%s)\n", errno, strerror(errno));
exit(-1);
}

ioctl(fd[nr_cpu][counter], PERF_COUNTER_IOC_ENABLE);
}

static void open_counters(int cpu, pid_t pid)
Expand Down
6 changes: 4 additions & 2 deletions trunk/tools/perf/builtin-report.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ struct ip_event {
struct perf_event_header header;
__u64 ip;
__u32 pid, tid;
__u64 period;
};

struct mmap_event {
Expand Down Expand Up @@ -943,12 +944,13 @@ process_overflow_event(event_t *event, unsigned long offset, unsigned long head)
uint64_t ip = event->ip.ip;
struct map *map = NULL;

dprintf("%p [%p]: PERF_EVENT (IP, %d): %d: %p\n",
dprintf("%p [%p]: PERF_EVENT (IP, %d): %d: %p period: %Ld\n",
(void *)(offset + head),
(void *)(long)(event->header.size),
event->header.misc,
event->ip.pid,
(void *)(long)ip);
(void *)(long)ip,
(long long)event->ip.period);

dprintf(" ... thread: %s:%d\n", thread->comm, thread->pid);

Expand Down

0 comments on commit 546043d

Please sign in to comment.