]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/genassym.c
xnu-1228.3.13.tar.gz
[apple/xnu.git] / osfmk / ppc / genassym.c
index cca211733e43bef9fec4250d4d5446f23c3ae8e6..8207aeb555c4de4b6743be98f2c11d6f4dec3974 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2007 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
  *
  * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
  * 
@@ -43,7 +43,6 @@
  * the values, but we cannot run anything on the target machine.
  */
 
  * the values, but we cannot run anything on the target machine.
  */
 
-#include <va_list.h>
 #include <types.h>
 
 #include <kern/task.h>
 #include <types.h>
 
 #include <kern/task.h>
 #include <ppc/boot.h>
 #include <ppc/lowglobals.h>
 
 #include <ppc/boot.h>
 #include <ppc/lowglobals.h>
 
+#if    CONFIG_DTRACE
+#define NEED_DTRACE_DEFS
+#include <../bsd/sys/lockstat.h>
+#endif
+
 /* Undefine standard offsetof because it is different than the one here */
 #undef offsetof
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE)0)->MEMBER)
 /* Undefine standard offsetof because it is different than the one here */
 #undef offsetof
 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE)0)->MEMBER)
@@ -441,6 +445,8 @@ int main(int argc, char *argv[])
        DECLARE("hwMckIEratPE",                 offsetof(struct per_proc_info *, hwCtr.hwMckIEratPE));
        DECLARE("hwMckDEratPE",                 offsetof(struct per_proc_info *, hwCtr.hwMckDEratPE));
 
        DECLARE("hwMckIEratPE",                 offsetof(struct per_proc_info *, hwCtr.hwMckIEratPE));
        DECLARE("hwMckDEratPE",                 offsetof(struct per_proc_info *, hwCtr.hwMckDEratPE));
 
+       DECLARE("ijsave",                               offsetof(struct per_proc_info *, ijsave));
+
        DECLARE("napStamp",                     offsetof(struct per_proc_info *, hwCtr.napStamp));
        DECLARE("napTotal",                     offsetof(struct per_proc_info *, hwCtr.napTotal));
        DECLARE("PP_PROCESSOR",                 offsetof(struct per_proc_info *, processor[0]));
        DECLARE("napStamp",                     offsetof(struct per_proc_info *, hwCtr.napStamp));
        DECLARE("napTotal",                     offsetof(struct per_proc_info *, hwCtr.napTotal));
        DECLARE("PP_PROCESSOR",                 offsetof(struct per_proc_info *, processor[0]));
@@ -470,8 +476,8 @@ int main(int argc, char *argv[])
 #define IKSBASE (u_int)STACK_IKS(0)
 
        /* values from kern/thread.h */
 #define IKSBASE (u_int)STACK_IKS(0)
 
        /* values from kern/thread.h */
-       DECLARE("THREAD_OPTIONS",               offsetof(thread_t, options));
-       DECLARE("TH_OPT_DELAYIDLE",     TH_OPT_DELAYIDLE);
+       DECLARE("THREAD_STATE",         offsetof(thread_t, state));
+       DECLARE("TH_IDLE",                              TH_IDLE);
        DECLARE("THREAD_KERNEL_STACK",  offsetof(thread_t, kernel_stack));
        DECLARE("THREAD_RECOVER",               offsetof(thread_t, recover));
        DECLARE("THREAD_FUNNEL_LOCK",
        DECLARE("THREAD_KERNEL_STACK",  offsetof(thread_t, kernel_stack));
        DECLARE("THREAD_RECOVER",               offsetof(thread_t, recover));
        DECLARE("THREAD_FUNNEL_LOCK",
@@ -752,13 +758,13 @@ int main(int argc, char *argv[])
        DECLARE("vmm64Bit",                             vmm64Bit);
 
        /* values from kern/task.h */
        DECLARE("vmm64Bit",                             vmm64Bit);
 
        /* values from kern/task.h */
-       DECLARE("TASK_SYSCALLS_MACH",
-               offsetof(struct task *, syscalls_mach));
-       DECLARE("TASK_SYSCALLS_UNIX",
-               offsetof(struct task *, syscalls_unix));
+       DECLARE("TASK_SYSCALLS_MACH",   offsetof(struct task *, syscalls_mach));
+       DECLARE("TASK_SYSCALLS_UNIX",   offsetof(struct task *, syscalls_unix));
+
+       DECLARE("TASK_VTIMERS",                 offsetof(struct task *, vtimers));
 
        /* values from vm/vm_map.h */
 
        /* values from vm/vm_map.h */
-       DECLARE("VMMAP_PMAP",   offsetof(struct vm_map *, pmap));
+       DECLARE("VMMAP_PMAP",   offsetof(struct _vm_map *, pmap));
 
        /* values from machine/pmap.h */
        DECLARE("pmapSpace",                    offsetof(struct pmap *, space));
 
        /* values from machine/pmap.h */
        DECLARE("pmapSpace",                    offsetof(struct pmap *, space));
@@ -802,6 +808,7 @@ int main(int argc, char *argv[])
        DECLARE("pmapVAddr",                    offsetof(struct pmapTransTab *, pmapVAddr));
        DECLARE("pmapTransSize",                sizeof(pmapTransTab));
        DECLARE("pmapResidentCnt",              offsetof(struct pmap *, stats.resident_count));
        DECLARE("pmapVAddr",                    offsetof(struct pmapTransTab *, pmapVAddr));
        DECLARE("pmapTransSize",                sizeof(pmapTransTab));
        DECLARE("pmapResidentCnt",              offsetof(struct pmap *, stats.resident_count));
+       DECLARE("pmapResidentMax",              offsetof(struct pmap *, stats.resident_max));
 
        DECLARE("maxAdrSp",                             maxAdrSp);
        DECLARE("maxAdrSpb",                    maxAdrSpb);
 
        DECLARE("maxAdrSp",                             maxAdrSp);
        DECLARE("maxAdrSpb",                    maxAdrSpb);
@@ -858,9 +865,13 @@ int main(int argc, char *argv[])
        DECLARE("TIMER_HIGHCHK",        offsetof(struct timer *, high_bits_check));
        DECLARE("TIMER_TSTAMP",         offsetof(struct timer *, tstamp));
 
        DECLARE("TIMER_HIGHCHK",        offsetof(struct timer *, high_bits_check));
        DECLARE("TIMER_TSTAMP",         offsetof(struct timer *, tstamp));
 
-       DECLARE("CURRENT_TIMER",        offsetof(struct processor *, processor_data.current_timer));
+       DECLARE("THREAD_TIMER",         offsetof(struct processor *, processor_data.thread_timer));
+       DECLARE("KERNEL_TIMER",         offsetof(struct processor *, processor_data.kernel_timer));
        DECLARE("SYSTEM_TIMER",         offsetof(struct thread *, system_timer));
        DECLARE("USER_TIMER",           offsetof(struct thread *, user_timer));
        DECLARE("SYSTEM_TIMER",         offsetof(struct thread *, system_timer));
        DECLARE("USER_TIMER",           offsetof(struct thread *, user_timer));
+       DECLARE("SYSTEM_STATE",         offsetof(struct processor *, processor_data.system_state));
+       DECLARE("USER_STATE",           offsetof(struct processor *, processor_data.user_state));
+       DECLARE("CURRENT_STATE",        offsetof(struct processor *, processor_data.current_state));
 
        /* Constants from pmap.h */
        DECLARE("PPC_SID_KERNEL", PPC_SID_KERNEL);
 
        /* Constants from pmap.h */
        DECLARE("PPC_SID_KERNEL", PPC_SID_KERNEL);
@@ -882,6 +893,7 @@ int main(int argc, char *argv[])
        /* Misc values used by assembler */
        DECLARE("AST_ALL", AST_ALL);
        DECLARE("AST_URGENT", AST_URGENT);
        /* Misc values used by assembler */
        DECLARE("AST_ALL", AST_ALL);
        DECLARE("AST_URGENT", AST_URGENT);
+       DECLARE("AST_BSD", AST_BSD);
 
        /* Spin Lock structure */
        DECLARE("SLOCK_ILK",    offsetof(lck_spin_t *, interlock));
 
        /* Spin Lock structure */
        DECLARE("SLOCK_ILK",    offsetof(lck_spin_t *, interlock));
@@ -1417,5 +1429,10 @@ int main(int argc, char *argv[])
        DECLARE("scomstat",                             offsetof(struct scomcomm *, scomstat));
        DECLARE("scomdata",                             offsetof(struct scomcomm *, scomdata));
 
        DECLARE("scomstat",                             offsetof(struct scomcomm *, scomstat));
        DECLARE("scomdata",                             offsetof(struct scomcomm *, scomdata));
 
+#if    CONFIG_DTRACE
+       DECLARE("LS_LCK_MTX_UNLOCK_RELEASE", LS_LCK_MTX_UNLOCK_RELEASE);
+       DECLARE("LS_LCK_MTX_LOCK_ACQUIRE", LS_LCK_MTX_LOCK_ACQUIRE);
+#endif
+
        return(0);  /* For ANSI C :-) */
 }
        return(0);  /* For ANSI C :-) */
 }