Parcourir la source

[LibOS] Fix typo CATAGORY to CATEGORY

Isaku Yamahata il y a 5 ans
Parent
commit
67c148f3f2

+ 10 - 10
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; })

+ 1 - 1
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);

+ 1 - 1
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);

+ 1 - 1
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

+ 3 - 3
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;
         }
     }

+ 6 - 6
LibOS/shim/src/shim_checkpoint.c

@@ -41,18 +41,18 @@
 #include <asm/fcntl.h>
 #include <asm/mman.h>
 
-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);

+ 6 - 6
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);

+ 1 - 1
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)

+ 1 - 1
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

+ 2 - 2
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 <shim_checkpoint.h>
 
-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);

+ 1 - 1
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)

+ 2 - 2
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);

+ 2 - 2
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);

+ 1 - 1
LibOS/shim/src/sys/shim_wait.c

@@ -38,7 +38,7 @@
 #include <linux/wait.h>
 #include <errno.h>
 
-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,