aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/perf_counter/builtin-top.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-04-20 09:22:22 -0400
committerIngo Molnar <mingo@elte.hu>2009-04-20 11:36:48 -0400
commit6f06ccbc86f8a02aa32271263249657ce484eb25 (patch)
treec04eb04fcd1b7da2ec1a0072089cd95317a2cf54 /Documentation/perf_counter/builtin-top.c
parent0780060124011b94af55830939c86cc0916be0f5 (diff)
perf_counter tools: clean up after introduction of the Git command framework
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.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/Documentation/perf_counter/builtin-top.c b/Documentation/perf_counter/builtin-top.c
index 9d2c769e5f83..601bddbc30d5 100644
--- a/Documentation/perf_counter/builtin-top.c
+++ b/Documentation/perf_counter/builtin-top.c
@@ -63,15 +63,6 @@
63 63
64#include "util.h" 64#include "util.h"
65 65
66#define _GNU_SOURCE
67#include <sys/types.h>
68#include <sys/stat.h>
69#include <sys/time.h>
70#include <unistd.h>
71#include <stdint.h>
72#include <stdlib.h>
73#include <string.h>
74#include <limits.h>
75#include <getopt.h> 66#include <getopt.h>
76#include <assert.h> 67#include <assert.h>
77#include <fcntl.h> 68#include <fcntl.h>
@@ -103,8 +94,6 @@
103#define PR_TASK_PERF_COUNTERS_DISABLE 31 94#define PR_TASK_PERF_COUNTERS_DISABLE 31
104#define PR_TASK_PERF_COUNTERS_ENABLE 32 95#define PR_TASK_PERF_COUNTERS_ENABLE 32
105 96
106#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
107
108#define rdclock() \ 97#define rdclock() \
109({ \ 98({ \
110 struct timespec ts; \ 99 struct timespec ts; \
@@ -1077,7 +1066,7 @@ static void process_event(uint64_t ip, int counter)
1077 record_ip(ip, counter); 1066 record_ip(ip, counter);
1078} 1067}
1079 1068
1080static void process_options(int argc, char *argv[]) 1069static void process_options(int argc, char **argv)
1081{ 1070{
1082 int error = 0, counter; 1071 int error = 0, counter;
1083 1072
@@ -1255,7 +1244,7 @@ static void mmap_read(struct mmap_data *md)
1255 1244
1256 event_t event_copy; 1245 event_t event_copy;
1257 1246
1258 unsigned int size = event->header.size; 1247 size_t size = event->header.size;
1259 1248
1260 /* 1249 /*
1261 * Event straddles the mmap boundary -- header should always 1250 * Event straddles the mmap boundary -- header should always
@@ -1301,7 +1290,7 @@ static void mmap_read(struct mmap_data *md)
1301 md->prev = old; 1290 md->prev = old;
1302} 1291}
1303 1292
1304int cmd_top(int argc, const char **argv, const char *prefix) 1293int cmd_top(int argc, char **argv, const char *prefix)
1305{ 1294{
1306 struct pollfd event_array[MAX_NR_CPUS * MAX_COUNTERS]; 1295 struct pollfd event_array[MAX_NR_CPUS * MAX_COUNTERS];
1307 struct mmap_data mmap_array[MAX_NR_CPUS][MAX_COUNTERS]; 1296 struct mmap_data mmap_array[MAX_NR_CPUS][MAX_COUNTERS];