summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
Diffstat (limited to 'read.c')
-rwxr-xr-xread.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/read.c b/read.c
deleted file mode 100755
index b71271a..0000000
--- a/read.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdint.h>
-#include <assert.h>
-#include <unistd.h>
-
-int
-main(int argc, const char **argv)
-{
- uint16_t counts[64];
- size_t i, len;
- int fd;
-
- fd = open("/proc/cachepc", O_RDONLY);
- len = read(fd, counts, sizeof(counts));
- assert(len == sizeof(counts));
-
- for (i = 0; i < 64; i++) {
- //printf("%d %hu\n", i, counts[i]);
- //continue;
- if (i % 16 == 0 && i)
- printf("\n");
- if (counts[i] > 0)
- printf("\x1b[91m");
- printf("%2i ", i);
- if (counts[i] > 0)
- printf("\x1b[0m");
- }
- printf("\n");
-
- close(fd);
-}