Loading kernel/trace/msm_rtb.c +10 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <linux/io.h> #include <asm-generic/sizes.h> #include <linux/msm_rtb.h> #include <asm/timex.h> #define SENTINEL_BYTE_1 0xFF #define SENTINEL_BYTE_2 0xAA Loading @@ -41,8 +42,9 @@ * 4) 4 bytes index * 4) 8 bytes extra data from the caller * 5) 8 bytes of timestamp * 6) 8 bytes of cyclecount * * Total = 32 bytes. * Total = 40 bytes. */ struct msm_rtb_layout { unsigned char sentinel[3]; Loading @@ -51,6 +53,7 @@ struct msm_rtb_layout { uint64_t caller; uint64_t data; uint64_t timestamp; uint64_t cycle_count; } __attribute__ ((__packed__)); Loading Loading @@ -132,6 +135,11 @@ static void msm_rtb_write_timestamp(struct msm_rtb_layout *start) start->timestamp = sched_clock(); } static void msm_rtb_write_cyclecount(struct msm_rtb_layout *start) { start->cycle_count = get_cycles(); } static void uncached_logk_pc_idx(enum logk_event_type log_type, uint64_t caller, uint64_t data, int idx) { Loading @@ -145,6 +153,7 @@ static void uncached_logk_pc_idx(enum logk_event_type log_type, uint64_t caller, msm_rtb_write_idx(idx, start); msm_rtb_write_data(data, start); msm_rtb_write_timestamp(start); msm_rtb_write_cyclecount(start); mb(); } Loading Loading
kernel/trace/msm_rtb.c +10 −1 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <linux/io.h> #include <asm-generic/sizes.h> #include <linux/msm_rtb.h> #include <asm/timex.h> #define SENTINEL_BYTE_1 0xFF #define SENTINEL_BYTE_2 0xAA Loading @@ -41,8 +42,9 @@ * 4) 4 bytes index * 4) 8 bytes extra data from the caller * 5) 8 bytes of timestamp * 6) 8 bytes of cyclecount * * Total = 32 bytes. * Total = 40 bytes. */ struct msm_rtb_layout { unsigned char sentinel[3]; Loading @@ -51,6 +53,7 @@ struct msm_rtb_layout { uint64_t caller; uint64_t data; uint64_t timestamp; uint64_t cycle_count; } __attribute__ ((__packed__)); Loading Loading @@ -132,6 +135,11 @@ static void msm_rtb_write_timestamp(struct msm_rtb_layout *start) start->timestamp = sched_clock(); } static void msm_rtb_write_cyclecount(struct msm_rtb_layout *start) { start->cycle_count = get_cycles(); } static void uncached_logk_pc_idx(enum logk_event_type log_type, uint64_t caller, uint64_t data, int idx) { Loading @@ -145,6 +153,7 @@ static void uncached_logk_pc_idx(enum logk_event_type log_type, uint64_t caller, msm_rtb_write_idx(idx, start); msm_rtb_write_data(data, start); msm_rtb_write_timestamp(start); msm_rtb_write_cyclecount(start); mb(); } Loading