53 #include <include/hpctoolkit-config.h> 64 #if defined(ENABLE_XOP) && defined (HOST_CPU_x86_64) 66 #endif // ENABLE_XOP and HOST_CPU_x86_64 93 xed_decoded_inst_t
xedd;
94 xed_decoded_inst_t *xptr = &
xedd;
95 xed_error_enum_t xed_error;
111 void *first_ins = ins;
112 void *end = ins + len;
115 iarg.
beg = first_ins;
137 while (iarg.
ins < end) {
141 xed_decoded_inst_zero_keep_mode(xptr);
142 xed_error = xed_decode(xptr, (uint8_t*) iarg.
ins, 15);
144 if (xed_error != XED_ERROR_NONE) {
145 #if defined(ENABLE_XOP) && defined (HOST_CPU_x86_64) 149 if (decode_res.
weak) {
152 iarg.
ins += decode_res.
len;
155 #endif // ENABLE_XOP and HOST_CPU_x86_64 162 void *nextins =
nextInsn(&iarg, xptr);
163 if (nextins > end)
break;
174 iarg.
ins += xed_decoded_inst_get_length(xptr);
181 status.
error = error_count;
224 TMSG(COALESCE,
"coalescing interval list starting @ %p",ui);
226 TMSG(COALESCE,
" --interval list empty, so no work");
234 bool routine_has_tail_calls =
UWI_RECIPE(first)->has_tail_calls;
236 TMSG(COALESCE,
" starting prototype interval =");
241 TMSG(COALESCE,
"comparing this interval to prototype:");
246 routine_has_tail_calls =
247 routine_has_tail_calls ||
UWI_RECIPE(current)->has_tail_calls ||
UWI_RECIPE(ui)->has_tail_calls;
260 TMSG(COALESCE,
"Intervals match! Extended interval:");
266 TMSG(COALESCE,
"Interval does not match prototype. Reset prototype to current interval");
272 UWI_RECIPE(first)->has_tail_calls = routine_has_tail_calls;
unwind_interval * restored_canonical
void link_ui(unwind_interval *current, unwind_interval *next)
void adv_amd_decode(amd_decode_t *stat, void *ins)
char * first_undecoded_ins
void dump_ui_log(unwind_interval *u)
static btuwi_status_t d_istat
static bool x86_ui_same_data(x86recipe_t *proto, x86recipe_t *cand)
#define UWI_RECIPE(btuwi)
static int x86_coalesce_unwind_intervals(unwind_interval *ui)
bitree_uwi_t * canonical_interval
static char * nextInsn(uint32_t *insn)
xed_control_t x86_decoder_settings
btuwi_status_t x86_build_intervals(void *ins, unsigned int len, int noisy)
static xed_decoded_inst_t xedd
highwatermark_t highwatermark
unwind_interval * new_ui(char *startaddr, sp_ty_t sp_ty, ra_ty_t ra_ty, int sp_arg, int ra_arg)
int x86_fix_unwind_intervals(char *ins, int len, btuwi_status_t *stat)
void * rax_rbp_equivalent_at
btuwi_status_t * d_build_intervals(void *b, unsigned l)
void dump_ui(unwind_interval *u, int dump_to_stderr)
void bitree_uwi_free(unwinder_t uw, bitree_uwi_t *tree)
#define UWI_END_ADDR(btuwi)
bitree_uwi_t unwind_interval
unwind_interval * process_inst(xed_decoded_inst_t *xptr, interval_arg_t *iarg)
void x86_dump_ins(void *addr)
void bitree_uwi_set_rightsubtree(bitree_uwi_t *tree, bitree_uwi_t *subtree)