From 83a60270437c1c36a40c8b9dd4e6082dafeb8f0d Mon Sep 17 00:00:00 2001 From: yuqing Date: Tue, 8 Dec 2015 14:29:05 +0800 Subject: [PATCH] remove debug codes --- tracker/fdfs_trackerd.c | 49 +---------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/tracker/fdfs_trackerd.c b/tracker/fdfs_trackerd.c index 2d5e566..9ec1096 100644 --- a/tracker/fdfs_trackerd.c +++ b/tracker/fdfs_trackerd.c @@ -74,7 +74,7 @@ static void sigSegvHandler(int signum, siginfo_t *info, void *ptr); static void sigDumpHandler(int sig); #endif -#define SCHEDULE_ENTRIES_COUNT 15 +#define SCHEDULE_ENTRIES_COUNT 5 static void usage(const char *program) { @@ -82,24 +82,6 @@ static void usage(const char *program) program); } -static int counter = 0; -static int test_delay(void *args) -{ - logInfo("free arg: %p, count: %d", args, --counter); - free(args); - return 0; -} - -static int test_malloc(void *args) -{ - int delay; - args = malloc(1024); - delay = (30L * rand()) / RAND_MAX; - logInfo("malloc arg: %p, delay: %d, count: %d", args, delay, ++counter); - sched_add_delay_task(test_delay, args, delay, true); - return 0; -} - int main(int argc, char *argv[]) { char *conf_filename; @@ -368,35 +350,6 @@ int main(int argc, char *argv[]) } } - //sched_set_delay_params(0, 0); - sched_enable_delay_task(); - - srand(time(NULL)); - INIT_SCHEDULE_ENTRY(scheduleEntries[scheduleArray.count], - scheduleArray.count + 1, TIME_NONE, TIME_NONE, TIME_NONE, - 1, test_malloc, NULL); - scheduleArray.count++; - - INIT_SCHEDULE_ENTRY(scheduleEntries[scheduleArray.count], - scheduleArray.count + 1, TIME_NONE, TIME_NONE, TIME_NONE, - 1, test_malloc, NULL); - scheduleArray.count++; - - INIT_SCHEDULE_ENTRY(scheduleEntries[scheduleArray.count], - scheduleArray.count + 1, TIME_NONE, TIME_NONE, TIME_NONE, - 2, test_malloc, NULL); - scheduleArray.count++; - - INIT_SCHEDULE_ENTRY(scheduleEntries[scheduleArray.count], - scheduleArray.count + 1, TIME_NONE, TIME_NONE, TIME_NONE, - 5, test_malloc, NULL); - scheduleArray.count++; - - INIT_SCHEDULE_ENTRY(scheduleEntries[scheduleArray.count], - scheduleArray.count + 1, TIME_NONE, TIME_NONE, TIME_NONE, - 10, test_malloc, NULL); - scheduleArray.count++; - if ((result=sched_start(&scheduleArray, &schedule_tid, \ g_thread_stack_size, (bool * volatile)&g_continue_flag)) != 0) {