aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-top.c
diff options
context:
space:
mode:
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>2010-08-02 08:38:51 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2010-08-04 11:41:23 -0400
commitb83f920e179101a54721e5ab1d6c3edfb9d4bcbb (patch)
tree73f43481e5ea2f507afc2876b1cf4b5c0e395f5d /tools/perf/builtin-top.c
parentb5a6325464b700c4bdac8799c495970516eed41c (diff)
perf: expose event__process function
The event__process function is useful in processing /proc/<pid>/maps. All of the functions that are called from event__process are defined in util/event.c. Though its defined in builtin-top.c, it could be reused for perf probe for uprobes. Hence moving it to util/event.c and exporting the function. LKML-Reference: <20100802123851.GD22812@linux.vnet.ibm.com> Signed-off-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-top.c')
-rw-r--r--tools/perf/builtin-top.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 1e8e92e317b9..b513e40974f4 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1082,26 +1082,6 @@ static void event__process_sample(const event_t *self,
1082 } 1082 }
1083} 1083}
1084 1084
1085static int event__process(event_t *event, struct perf_session *session)
1086{
1087 switch (event->header.type) {
1088 case PERF_RECORD_COMM:
1089 event__process_comm(event, session);
1090 break;
1091 case PERF_RECORD_MMAP:
1092 event__process_mmap(event, session);
1093 break;
1094 case PERF_RECORD_FORK:
1095 case PERF_RECORD_EXIT:
1096 event__process_task(event, session);
1097 break;
1098 default:
1099 break;
1100 }
1101
1102 return 0;
1103}
1104
1105struct mmap_data { 1085struct mmap_data {
1106 int counter; 1086 int counter;
1107 void *base; 1087 void *base;