diff --git a/LibOS/shim/include/shim_profile.h b/LibOS/shim/include/shim_profile.h index 5857643f..2d269916 100644 --- a/LibOS/shim/include/shim_profile.h +++ b/LibOS/shim/include/shim_profile.h @@ -33,7 +33,7 @@ struct shim_profile { const char * name; - enum { CATAGORY, OCCURENCE, INTERVAL } type; + enum { CATEGORY, OCCURENCE, INTERVAL } type; bool disabled; struct shim_profile * root; union { @@ -68,27 +68,27 @@ extern struct shim_profile __profile_end; #define PROFILES (&__profile) -#define DEFINE_PROFILE_CATAGORY(prof, rprof) \ - _DEFINE_PROFILE_CATAGORY(prof, rprof) -#define _DEFINE_PROFILE_CATAGORY(prof, rprof) \ +#define DEFINE_PROFILE_CATEGORY(prof, rprof) \ + _DEFINE_PROFILE_CATEGORY(prof, rprof) +#define _DEFINE_PROFILE_CATEGORY(prof, rprof) \ extern struct shim_profile profile_##rprof; \ struct shim_profile profile_##prof \ __attribute__((section(".profile"))) = { \ .name = #prof, \ .root = &profile_##rprof, \ - .type = CATAGORY, \ + .type = CATEGORY, \ }; -#define DEFINE_PROFILE_CATAGORY_DISABLED(prof, rprof) \ - _DEFINE_PROFILE_CATAGORY(prof, rprof) -#define _DEFINE_PROFILE_CATAGORY_DISABLED(prof, rprof) \ +#define DEFINE_PROFILE_CATEGORY_DISABLED(prof, rprof) \ + _DEFINE_PROFILE_CATEGORY(prof, rprof) +#define _DEFINE_PROFILE_CATEGORY_DISABLED(prof, rprof) \ extern struct shim_profile profile_##rprof; \ struct shim_profile profile_##prof \ __attribute__((section(".profile"))) = { \ .name = #prof, \ .disabled = true, \ .root = &profile_##rprof, \ - .type = CATAGORY, \ + .type = CATEGORY, \ }; @@ -211,7 +211,7 @@ extern struct shim_profile __profile_end; #else -#define DEFINE_PROFILE_CATAGORY(prof, rprof) +#define DEFINE_PROFILE_CATEGORY(prof, rprof) #define DEFINE_PROFILE_OCCURENCE(prof, rprof) #define DEFINE_PROFILE_INTERVAL(prof, rprof) #define INC_PROFILE_OCCURENCE(prof) ({ do {} while (0); 0; }) diff --git a/LibOS/shim/src/bookkeep/shim_vma.c b/LibOS/shim/src/bookkeep/shim_vma.c index f1380a17..cf7fb52d 100644 --- a/LibOS/shim/src/bookkeep/shim_vma.c +++ b/LibOS/shim/src/bookkeep/shim_vma.c @@ -1134,7 +1134,7 @@ no_mem: } END_CP_FUNC(vma) -DEFINE_PROFILE_CATAGORY(inside_rs_vma, resume_func); +DEFINE_PROFILE_CATEGORY(inside_rs_vma, resume_func); DEFINE_PROFILE_INTERVAL(vma_add_bookkeep, inside_rs_vma); DEFINE_PROFILE_INTERVAL(vma_map_file, inside_rs_vma); DEFINE_PROFILE_INTERVAL(vma_map_anonymous, inside_rs_vma); diff --git a/LibOS/shim/src/elf/shim_rtld.c b/LibOS/shim/src/elf/shim_rtld.c index dd71414b..7d3dcb47 100644 --- a/LibOS/shim/src/elf/shim_rtld.c +++ b/LibOS/shim/src/elf/shim_rtld.c @@ -1664,7 +1664,7 @@ BEGIN_CP_FUNC(library) } END_CP_FUNC(library) -DEFINE_PROFILE_CATAGORY(inside_rs_library, resume_func); +DEFINE_PROFILE_CATEGORY(inside_rs_library, resume_func); DEFINE_PROFILE_INTERVAL(clean_up_library, inside_rs_library); DEFINE_PROFILE_INTERVAL(search_library_vma, inside_rs_library); DEFINE_PROFILE_INTERVAL(relocate_library, inside_rs_library); diff --git a/LibOS/shim/src/ipc/shim_ipc.c b/LibOS/shim/src/ipc/shim_ipc.c index f7e85546..a6f6420b 100644 --- a/LibOS/shim/src/ipc/shim_ipc.c +++ b/LibOS/shim/src/ipc/shim_ipc.c @@ -48,7 +48,7 @@ struct shim_lock ipc_info_lock; struct shim_process cur_process; -DEFINE_PROFILE_CATAGORY(ipc, ); +DEFINE_PROFILE_CATEGORY(ipc, ); DEFINE_PROFILE_OCCURENCE(syscall_use_ipc, ipc); //#define DEBUG_REF diff --git a/LibOS/shim/src/ipc/shim_ipc_child.c b/LibOS/shim/src/ipc/shim_ipc_child.c index 094344dc..919b9233 100644 --- a/LibOS/shim/src/ipc/shim_ipc_child.c +++ b/LibOS/shim/src/ipc/shim_ipc_child.c @@ -295,7 +295,7 @@ int ipc_cld_profile_send (void) if (atomic_read(&PROFILES[i].val.interval.count)) nsending++; break; - case CATAGORY: + case CATEGORY: break; } @@ -336,7 +336,7 @@ int ipc_cld_profile_send (void) } break; } - case CATAGORY: + case CATEGORY: break; } @@ -378,7 +378,7 @@ int ipc_cld_profile_callback (IPC_CALLBACK_ARGS) atomic_add(msgin->profile[i].val.interval.time, &PROFILES[idx].val.interval.time); break; - case CATAGORY: + case CATEGORY: break; } } diff --git a/LibOS/shim/src/shim_checkpoint.c b/LibOS/shim/src/shim_checkpoint.c index 2f5c0796..bfe98251 100644 --- a/LibOS/shim/src/shim_checkpoint.c +++ b/LibOS/shim/src/shim_checkpoint.c @@ -41,18 +41,18 @@ #include #include -DEFINE_PROFILE_CATAGORY(migrate, ); +DEFINE_PROFILE_CATEGORY(migrate, ); -DEFINE_PROFILE_CATAGORY(checkpoint, migrate); +DEFINE_PROFILE_CATEGORY(checkpoint, migrate); DEFINE_PROFILE_INTERVAL(checkpoint_create_map, checkpoint); DEFINE_PROFILE_INTERVAL(checkpoint_copy, checkpoint); -DEFINE_PROFILE_CATAGORY(checkpoint_func, checkpoint); +DEFINE_PROFILE_CATEGORY(checkpoint_func, checkpoint); DEFINE_PROFILE_INTERVAL(checkpoint_destroy_map, checkpoint); DEFINE_PROFILE_OCCURENCE(checkpoint_count, checkpoint); DEFINE_PROFILE_OCCURENCE(checkpoint_total_size, checkpoint); -DEFINE_PROFILE_CATAGORY(resume, migrate); +DEFINE_PROFILE_CATEGORY(resume, migrate); DEFINE_PROFILE_INTERVAL(child_created_in_new_process, resume); DEFINE_PROFILE_INTERVAL(child_wait_header, resume); DEFINE_PROFILE_INTERVAL(child_receive_header, resume); @@ -62,7 +62,7 @@ DEFINE_PROFILE_INTERVAL(child_load_memory_by_gipc, resume); DEFINE_PROFILE_INTERVAL(child_load_checkpoint_on_pipe, resume); DEFINE_PROFILE_INTERVAL(child_receive_handles, resume); DEFINE_PROFILE_INTERVAL(restore_checkpoint, resume); -DEFINE_PROFILE_CATAGORY(resume_func, resume); +DEFINE_PROFILE_CATEGORY(resume_func, resume); DEFINE_PROFILE_INTERVAL(child_total_migration_time, resume); #define CP_HASH_SIZE 256 @@ -863,7 +863,7 @@ static void * cp_alloc (struct shim_cp_store * store, void * addr, size_t size) return addr; } -DEFINE_PROFILE_CATAGORY(migrate_proc, migrate); +DEFINE_PROFILE_CATEGORY(migrate_proc, migrate); DEFINE_PROFILE_INTERVAL(migrate_create_process, migrate_proc); DEFINE_PROFILE_INTERVAL(migrate_create_gipc, migrate_proc); DEFINE_PROFILE_INTERVAL(migrate_connect_ipc, migrate_proc); diff --git a/LibOS/shim/src/shim_init.c b/LibOS/shim/src/shim_init.c index 2d0cffb0..42ea4ef1 100644 --- a/LibOS/shim/src/shim_init.c +++ b/LibOS/shim/src/shim_init.c @@ -577,7 +577,7 @@ static void set_profile_enabled (const char ** envp) struct shim_profile * profile = &PROFILES[i]; if (!memcmp(profile->name, str, len) && !profile->name[len]) { profile->disabled = false; - if (profile->type == CATAGORY) + if (profile->type == CATEGORY) enabled = true; } } @@ -593,7 +593,7 @@ static void set_profile_enabled (const char ** envp) continue; if (!profile->root->disabled) { profile->disabled = false; - if (profile->type == CATAGORY) + if (profile->type == CATEGORY) enabled = true; } } @@ -601,7 +601,7 @@ static void set_profile_enabled (const char ** envp) for (int i = 0 ; i < N_PROFILE ; i++) { struct shim_profile * profile = &PROFILES[i]; - if (profile->type == CATAGORY || profile->disabled) + if (profile->type == CATEGORY || profile->disabled) continue; for (profile = profile->root ; profile != &profile_ && profile->disabled ; @@ -626,7 +626,7 @@ static int init_newproc (struct newproc_header * hdr) return hdr->failure; } -DEFINE_PROFILE_CATAGORY(pal, ); +DEFINE_PROFILE_CATEGORY(pal, ); DEFINE_PROFILE_INTERVAL(pal_startup_time, pal); DEFINE_PROFILE_INTERVAL(pal_host_specific_startup_time, pal); DEFINE_PROFILE_INTERVAL(pal_relocation_time, pal); @@ -636,7 +636,7 @@ DEFINE_PROFILE_INTERVAL(pal_allocation_time, pal); DEFINE_PROFILE_INTERVAL(pal_tail_startup_time, pal); DEFINE_PROFILE_INTERVAL(pal_child_creation_time, pal); -DEFINE_PROFILE_CATAGORY(init, ); +DEFINE_PROFILE_CATEGORY(init, ); DEFINE_PROFILE_INTERVAL(init_vma, init); DEFINE_PROFILE_INTERVAL(init_slab, init); DEFINE_PROFILE_INTERVAL(init_str_mgr, init); @@ -1101,7 +1101,7 @@ static void print_profile_result (PAL_HANDLE hdl, struct shim_profile * root, } break; } - case CATAGORY: + case CATEGORY: for (int j = 0 ; j < level ; j++) __SYS_FPRINTF(hdl, " "); __SYS_FPRINTF(hdl, "- %s:\n", profile->name); diff --git a/LibOS/shim/src/shim_malloc.c b/LibOS/shim/src/shim_malloc.c index 60903918..4ce4eda1 100644 --- a/LibOS/shim/src/shim_malloc.c +++ b/LibOS/shim/src/shim_malloc.c @@ -55,7 +55,7 @@ static struct shim_lock slab_mgr_lock; static SLAB_MGR slab_mgr = NULL; -DEFINE_PROFILE_CATAGORY(memory, ); +DEFINE_PROFILE_CATEGORY(memory, ); /* Returns NULL on failure */ void * __system_malloc (size_t size) diff --git a/LibOS/shim/src/shim_syscalls.c b/LibOS/shim/src/shim_syscalls.c index c536f647..9a905933 100644 --- a/LibOS/shim/src/shim_syscalls.c +++ b/LibOS/shim/src/shim_syscalls.c @@ -44,7 +44,7 @@ long int if_call_defined (long int sys_no) return shim_table[sys_no] != 0; } -DEFINE_PROFILE_CATAGORY(syscall, ); +DEFINE_PROFILE_CATEGORY(syscall, ); ////////////////////////////////////////////////// // Mappings from system calls to shim calls diff --git a/LibOS/shim/src/sys/shim_exec.c b/LibOS/shim/src/sys/shim_exec.c index 734f0014..8f70bfa6 100644 --- a/LibOS/shim/src/sys/shim_exec.c +++ b/LibOS/shim/src/sys/shim_exec.c @@ -56,7 +56,7 @@ static int close_cloexec_handle (struct shim_handle_map * map) return walk_handle_map(&close_on_exec, map, NULL); } -DEFINE_PROFILE_CATAGORY(exec_rtld, exec); +DEFINE_PROFILE_CATEGORY(exec_rtld, exec); DEFINE_PROFILE_INTERVAL(alloc_new_stack_for_exec, exec_rtld); DEFINE_PROFILE_INTERVAL(arrange_arguments_for_exec, exec_rtld); DEFINE_PROFILE_INTERVAL(unmap_executable_for_exec, exec_rtld); @@ -205,7 +205,7 @@ retry_dump_vmas: #include -DEFINE_PROFILE_CATAGORY(exec, ); +DEFINE_PROFILE_CATEGORY(exec, ); DEFINE_PROFILE_INTERVAL(search_and_check_file_for_exec, exec); DEFINE_PROFILE_INTERVAL(open_file_for_exec, exec); DEFINE_PROFILE_INTERVAL(close_CLOEXEC_files_for_exec, exec); diff --git a/LibOS/shim/src/sys/shim_msgget.c b/LibOS/shim/src/sys/shim_msgget.c index 8704596e..6bf0f4c3 100644 --- a/LibOS/shim/src/sys/shim_msgget.c +++ b/LibOS/shim/src/sys/shim_msgget.c @@ -52,7 +52,7 @@ static struct shim_lock msgq_list_lock; static int __load_msg_persist (struct shim_msg_handle * msgq, bool readmsg); static int __store_msg_persist(struct shim_msg_handle * msgq); -DEFINE_PROFILE_CATAGORY(sysv_msg, ); +DEFINE_PROFILE_CATEGORY(sysv_msg, ); #define MSG_TO_HANDLE(msghdl) \ container_of((msghdl), struct shim_handle, info.msg) diff --git a/LibOS/shim/src/sys/shim_poll.c b/LibOS/shim/src/sys/shim_poll.c index 3d564fcf..52ac8c09 100644 --- a/LibOS/shim/src/sys/shim_poll.c +++ b/LibOS/shim/src/sys/shim_poll.c @@ -72,7 +72,7 @@ void __try_free (struct shim_thread * cur, void * mem) free(mem); } -DEFINE_PROFILE_CATAGORY(__do_poll, select); +DEFINE_PROFILE_CATEGORY(__do_poll, select); DEFINE_PROFILE_INTERVAL(do_poll_get_handle, __do_poll); DEFINE_PROFILE_INTERVAL(do_poll_search_repeat, __do_poll); DEFINE_PROFILE_INTERVAL(do_poll_set_bookkeeping, __do_poll); @@ -509,7 +509,7 @@ typedef long int __fd_mask; #define __FD_ISSET(d, set) \ ((__FDS_BITS(set)[__FD_ELT(d)] & __FD_MASK(d)) != 0) -DEFINE_PROFILE_CATAGORY(select, ); +DEFINE_PROFILE_CATEGORY(select, ); DEFINE_PROFILE_INTERVAL(select_tryalloca_1, select); DEFINE_PROFILE_INTERVAL(select_setup_array, select); DEFINE_PROFILE_INTERVAL(select_do_poll, select); diff --git a/LibOS/shim/src/sys/shim_semget.c b/LibOS/shim/src/sys/shim_semget.c index 7d6945be..3788119c 100644 --- a/LibOS/shim/src/sys/shim_semget.c +++ b/LibOS/shim/src/sys/shim_semget.c @@ -50,7 +50,7 @@ static LISTP_TYPE(shim_sem_handle) sem_key_hlist [SEM_HASH_NUM]; static LISTP_TYPE(shim_sem_handle) sem_sid_hlist [SEM_HASH_NUM]; static struct shim_lock sem_list_lock; -DEFINE_PROFILE_CATAGORY(sysv_sem, ); +DEFINE_PROFILE_CATEGORY(sysv_sem, ); #define SEM_TO_HANDLE(semhdl) \ container_of((semhdl), struct shim_handle, info.sem) @@ -659,7 +659,7 @@ static struct sysv_balance_policy sem_policy = { }; #endif -DEFINE_PROFILE_CATAGORY(submit_sysv_sem, sysv_sem); +DEFINE_PROFILE_CATEGORY(submit_sysv_sem, sysv_sem); DEFINE_PROFILE_INTERVAL(sem_prepare_stat, submit_sysv_sem); DEFINE_PROFILE_INTERVAL(sem_lock_handle, submit_sysv_sem); DEFINE_PROFILE_INTERVAL(sem_count_score, submit_sysv_sem); diff --git a/LibOS/shim/src/sys/shim_wait.c b/LibOS/shim/src/sys/shim_wait.c index cbb146da..0d634416 100644 --- a/LibOS/shim/src/sys/shim_wait.c +++ b/LibOS/shim/src/sys/shim_wait.c @@ -38,7 +38,7 @@ #include #include -DEFINE_PROFILE_CATAGORY(wait, ); +DEFINE_PROFILE_CATEGORY(wait, ); DEFINE_PROFILE_INTERVAL(child_exit_notification, wait); pid_t shim_do_wait4 (pid_t pid, int * status, int option,