aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter/builtin-top.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-06-04 10:53:49 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-04 11:51:39 -0400
commit62fc44536c14b5787531bac7417580fca54c88b4 (patch)
tree6b43ae4d32a1087f5e1bfa04d323fae8067a8ce4 /Documentation/perf_counter/builtin-top.c
parentd99e9446200c1ffab28cb0e39b76c34a2bfafd06 (diff)
perf_counter tools: Use fork and remove munmap events
Use fork events to clone comm and map data and remove everything munmap related Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.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.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/Documentation/perf_counter/builtin-top.c b/Documentation/perf_counter/builtin-top.c
index 20e5b1200959..31c00ba99b14 100644
--- a/Documentation/perf_counter/builtin-top.c
+++ b/Documentation/perf_counter/builtin-top.c
@@ -75,8 +75,6 @@ static unsigned int realtime_prio = 0;
75static int group = 0; 75static int group = 0;
76static unsigned int page_size; 76static unsigned int page_size;
77static unsigned int mmap_pages = 16; 77static unsigned int mmap_pages = 16;
78static int use_mmap = 0;
79static int use_munmap = 0;
80static int freq = 0; 78static int freq = 0;
81 79
82static char *sym_filter; 80static char *sym_filter;
@@ -527,19 +525,6 @@ static void mmap_read(struct mmap_data *md)
527 if (event->header.misc & PERF_EVENT_MISC_OVERFLOW) { 525 if (event->header.misc & PERF_EVENT_MISC_OVERFLOW) {
528 if (event->header.type & PERF_SAMPLE_IP) 526 if (event->header.type & PERF_SAMPLE_IP)
529 process_event(event->ip.ip, md->counter); 527 process_event(event->ip.ip, md->counter);
530 } else {
531 switch (event->header.type) {
532 case PERF_EVENT_MMAP:
533 case PERF_EVENT_MUNMAP:
534 printf("%s: %Lu %Lu %Lu %s\n",
535 event->header.type == PERF_EVENT_MMAP
536 ? "mmap" : "munmap",
537 event->mmap.start,
538 event->mmap.len,
539 event->mmap.pgoff,
540 event->mmap.filename);
541 break;
542 }
543 } 528 }
544 } 529 }
545 530
@@ -569,8 +554,6 @@ static int __cmd_top(void)
569 attr.config = event_id[counter]; 554 attr.config = event_id[counter];
570 attr.sample_period = event_count[counter]; 555 attr.sample_period = event_count[counter];
571 attr.sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID; 556 attr.sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID;
572 attr.mmap = use_mmap;
573 attr.munmap = use_munmap;
574 attr.freq = freq; 557 attr.freq = freq;
575 558
576 fd[i][counter] = sys_perf_counter_open(&attr, target_pid, cpu, group_fd, 0); 559 fd[i][counter] = sys_perf_counter_open(&attr, target_pid, cpu, group_fd, 0);
@@ -670,10 +653,6 @@ static const struct option options[] = {
670 "only display symbols matchig this pattern"), 653 "only display symbols matchig this pattern"),
671 OPT_BOOLEAN('z', "zero", &group, 654 OPT_BOOLEAN('z', "zero", &group,
672 "zero history across updates"), 655 "zero history across updates"),
673 OPT_BOOLEAN('M', "use-mmap", &use_mmap,
674 "track mmap events"),
675 OPT_BOOLEAN('U', "use-munmap", &use_munmap,
676 "track munmap events"),
677 OPT_INTEGER('F', "freq", &freq, 656 OPT_INTEGER('F', "freq", &freq,
678 "profile at this frequency"), 657 "profile at this frequency"),
679 OPT_INTEGER('E', "entries", &print_entries, 658 OPT_INTEGER('E', "entries", &print_entries,