aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter/builtin-top.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-06-02 11:38:21 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-02 15:45:34 -0400
commitc70975bc8d5bac487616785f5d5bc7b090dfa2d9 (patch)
treedfbbd1e7af293dc41732fda240476598057df5ec /Documentation/perf_counter/builtin-top.c
parent0d48696f87e3618b0d35bd3e4e9d7c188d51e7de (diff)
perf_counter tools: Fix up the ABI shakeup
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <new-submission> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com> Cc: Marcelo Tosatti <mtosatti@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: John Kacur <jkacur@redhat.com> Cc: Stephane Eranian <eranian@googlemail.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'Documentation/perf_counter/builtin-top.c')
-rw-r--r--Documentation/perf_counter/builtin-top.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/Documentation/perf_counter/builtin-top.c b/Documentation/perf_counter/builtin-top.c
index a2cff7b05276..5029d8e6cd9c 100644
--- a/Documentation/perf_counter/builtin-top.c
+++ b/Documentation/perf_counter/builtin-top.c
@@ -537,7 +537,7 @@ static void mmap_read(struct mmap_data *md)
537 old += size; 537 old += size;
538 538
539 if (event->header.misc & PERF_EVENT_MISC_OVERFLOW) { 539 if (event->header.misc & PERF_EVENT_MISC_OVERFLOW) {
540 if (event->header.type & PERF_RECORD_IP) 540 if (event->header.type & PERF_SAMPLE_IP)
541 process_event(event->ip.ip, md->counter); 541 process_event(event->ip.ip, md->counter);
542 } else { 542 } else {
543 switch (event->header.type) { 543 switch (event->header.type) {
@@ -563,7 +563,7 @@ static struct mmap_data mmap_array[MAX_NR_CPUS][MAX_COUNTERS];
563 563
564static int __cmd_top(void) 564static int __cmd_top(void)
565{ 565{
566 struct perf_counter_hw_event hw_event; 566 struct perf_counter_attr attr;
567 pthread_t thread; 567 pthread_t thread;
568 int i, counter, group_fd, nr_poll = 0; 568 int i, counter, group_fd, nr_poll = 0;
569 unsigned int cpu; 569 unsigned int cpu;
@@ -577,15 +577,15 @@ static int __cmd_top(void)
577 if (target_pid == -1 && profile_cpu == -1) 577 if (target_pid == -1 && profile_cpu == -1)
578 cpu = i; 578 cpu = i;
579 579
580 memset(&hw_event, 0, sizeof(hw_event)); 580 memset(&attr, 0, sizeof(attr));
581 hw_event.config = event_id[counter]; 581 attr.config = event_id[counter];
582 hw_event.irq_period = event_count[counter]; 582 attr.sample_period = event_count[counter];
583 hw_event.record_type = PERF_RECORD_IP | PERF_RECORD_TID; 583 attr.sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID;
584 hw_event.mmap = use_mmap; 584 attr.mmap = use_mmap;
585 hw_event.munmap = use_munmap; 585 attr.munmap = use_munmap;
586 hw_event.freq = freq; 586 attr.freq = freq;
587 587
588 fd[i][counter] = sys_perf_counter_open(&hw_event, target_pid, cpu, group_fd, 0); 588 fd[i][counter] = sys_perf_counter_open(&attr, target_pid, cpu, group_fd, 0);
589 if (fd[i][counter] < 0) { 589 if (fd[i][counter] < 0) {
590 int err = errno; 590 int err = errno;
591 printf("kerneltop error: syscall returned with %d (%s)\n", 591 printf("kerneltop error: syscall returned with %d (%s)\n",