From 021b32acd3cec8e255dd47681939797ec64b8206 Mon Sep 17 00:00:00 2001 From: John Ogness Date: Tue, 20 Feb 2018 15:03:14 +0100 Subject: tools: rename 'rtex' tool to 'pgflt' The rtex tool only demonstrates prefaultingn to avoid runtime page faults. It makes more sense to call it pgflt. Signed-off-by: John Ogness --- schulung_tools/rtex/main.c | 60 ---------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 schulung_tools/rtex/main.c (limited to 'schulung_tools/rtex/main.c') diff --git a/schulung_tools/rtex/main.c b/schulung_tools/rtex/main.c deleted file mode 100644 index a68baf4..0000000 --- a/schulung_tools/rtex/main.c +++ /dev/null @@ -1,60 +0,0 @@ -#include -#include -#include - -extern void timestamp(const char *msg, int val); -extern void testfunc_malloc(void); -extern void testfunc_deepstack(void); -extern void setup_rt(unsigned int opts); - -static void usage(const char *cmd) -{ - printf("usage: %s [opts-bitmask]\n", cmd); - printf(" opts-bits:\n"); - printf(" 0x01 = mallopt\n"); - printf(" 0x02 = mlockall\n"); - printf(" 0x04 = prefault-stack\n"); - printf(" 0x08 = prefault-heap\n"); - printf(" 0x10 = run tests\n"); - printf("\n"); - printf(" 0x10 = no rt tweaks + tests\n"); - printf(" 0x1f = full rt tweaks + tests\n"); - printf("\n"); -} - -int main(int argc, char *argv[]) -{ - unsigned int i; - - if (argc != 2) { - usage(argv[0]); - return 1; - } - - if (sscanf(argv[1], "%x", &i) != 1) { - usage(argv[0]); - return 1; - } - - printf("options: 0x%x\n", i); - - timestamp("init", -1); - - setup_rt(i); - - timestamp("main setup", -1); - - if (i & 0x10) { - for (i = 0; i < 4; i++) { - testfunc_malloc(); - timestamp("testfunc_malloc", i); - } - - for (i = 0; i < 4; i++) { - testfunc_deepstack(); - timestamp("testfunc_deepstack", i); - } - } - - return 0; -} -- cgit v1.2.3