]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/arm64/pgtrace.h
xnu-7195.50.7.100.1.tar.gz
[apple/xnu.git] / osfmk / arm64 / pgtrace.h
index bbee25de968c6a03a1eb429efe02b0bb68ff0e0a..06c2ca19871725ed27f1e0a1c54f08017c44f4b9 100644 (file)
 #define PGTRACE_STACK_DEPTH     8
 
 typedef enum {
-    PGTRACE_RW_LOAD,
-    PGTRACE_RW_STORE,
-    PGTRACE_RW_PREFETCH
+       PGTRACE_RW_LOAD,
+       PGTRACE_RW_STORE,
+       PGTRACE_RW_PREFETCH
 } pgtrace_rw_t;
 
 typedef struct {
-    vm_offset_t ad_addr;
-    uint64_t    ad_data;
+       vm_offset_t ad_addr;
+       uint64_t    ad_data;
 } pgtrace_addr_data_t;
 
 typedef struct {
-    uint64_t            rr_time;
-    pgtrace_rw_t        rr_rw;
-    uint8_t             rr_num;
-    pgtrace_addr_data_t rr_addrdata[RR_NUM_MAX];
+       uint64_t            rr_time;
+       pgtrace_rw_t        rr_rw;
+       uint8_t             rr_num;
+       pgtrace_addr_data_t rr_addrdata[RR_NUM_MAX];
 } pgtrace_run_result_t;
 
 #ifdef CONFIG_PGTRACE_NONKEXT
@@ -61,35 +61,35 @@ typedef struct {
 #define PGTRACE_OPTION_SPIN     0x4
 
 typedef struct {
-    struct {
-        uint32_t sl_bytes;
-    } stat_logger;
-
-    struct {
-        uint64_t sd_ldr;
-        uint64_t sd_str;
-        uint64_t sd_ldrs;
-        uint64_t sd_ldtr;
-        uint64_t sd_sttr;
-        uint64_t sd_ldtrs;
-        uint64_t sd_ldp;
-        uint64_t sd_stp;
-        uint64_t sd_ldpsw;
-        uint64_t sd_prfm;
-
-        uint64_t sd_c335;
-        uint64_t sd_c336;
-        uint64_t sd_c337;
-        uint64_t sd_c338;
-        uint64_t sd_c339;
-        uint64_t sd_c3310;
-        uint64_t sd_c3311;
-        uint64_t sd_c3312;
-        uint64_t sd_c3313;
-        uint64_t sd_c3314;
-        uint64_t sd_c3315;
-        uint64_t sd_c3316;
-    } stat_decoder;
+       struct {
+               uint32_t sl_bytes;
+       } stat_logger;
+
+       struct {
+               uint64_t sd_ldr;
+               uint64_t sd_str;
+               uint64_t sd_ldrs;
+               uint64_t sd_ldtr;
+               uint64_t sd_sttr;
+               uint64_t sd_ldtrs;
+               uint64_t sd_ldp;
+               uint64_t sd_stp;
+               uint64_t sd_ldpsw;
+               uint64_t sd_prfm;
+
+               uint64_t sd_c335;
+               uint64_t sd_c336;
+               uint64_t sd_c337;
+               uint64_t sd_c338;
+               uint64_t sd_c339;
+               uint64_t sd_c3310;
+               uint64_t sd_c3311;
+               uint64_t sd_c3312;
+               uint64_t sd_c3313;
+               uint64_t sd_c3314;
+               uint64_t sd_c3315;
+               uint64_t sd_c3316;
+       } stat_decoder;
 } pgtrace_stats_t;
 
 void pgtrace_init(void);
@@ -112,14 +112,14 @@ int pgtrace_get_stats(pgtrace_stats_t *stats);
 extern "C" {
 #endif
 typedef struct {
-    vm_offset_t addr;
-    uint64_t    bytes;
+       vm_offset_t addr;
+       uint64_t    bytes;
 } pgtrace_instruction_info_t;
 
-typedef struct { 
-    uint64_t                id;
-    pgtrace_run_result_t    res;
-    void                    *stack[PGTRACE_STACK_DEPTH];
+typedef struct {
+       uint64_t                id;
+       pgtrace_run_result_t    res;
+       void                    *stack[PGTRACE_STACK_DEPTH];
 } log_t;
 
 typedef int (*run_func_t)(uint32_t inst, vm_offset_t pa, vm_offset_t va, void *ss, pgtrace_run_result_t *res);
@@ -127,18 +127,18 @@ typedef bool (*decode_func_t)(uint32_t inst, void *ss, pgtrace_instruction_info_
 typedef void (*write_func_t)(pgtrace_run_result_t res);
 
 typedef struct {
-    uint64_t            magic;
-    char                *arch;
-    char                *desc; 
-    decode_func_t       decode;
-    run_func_t          run;
+       uint64_t            magic;
+       char                *arch;
+       char                *desc;
+       decode_func_t       decode;
+       run_func_t          run;
 } decoder_t;
 
 typedef struct {
-    uint64_t        magic;
-    char            *arch;
-    char            *desc; 
-    write_func_t    write;
+       uint64_t        magic;
+       char            *arch;
+       char            *desc;
+       write_func_t    write;
 } logger_t;
 
 //------------------------------------