instructions got incorporated into the IRSB.
git-svn-id: svn://svn.valgrind.org/vex/trunk@2313
IRSB* bb_to_IR (
/*OUT*/VexGuestExtents* vge,
/*OUT*/UInt* n_sc_extents,
+ /*OUT*/UInt* n_guest_instrs, /* stats only */
/*IN*/ void* callback_opaque,
/*IN*/ DisOneInstrFn dis_instr_fn,
/*IN*/ UChar* guest_code,
so far gone. */
delta = 0;
n_instrs = 0;
+ *n_guest_instrs = 0;
/* Guest addresses as IRConsts. Used in self-checks to specify the
restart-after-discard point. */
vex_printf( "\n");
}
+ *n_guest_instrs = n_instrs;
return irsb;
}
IRSB* bb_to_IR (
/*OUT*/VexGuestExtents* vge,
/*OUT*/UInt* n_sc_extents,
+ /*OUT*/UInt* n_guest_instrs, /* stats only */
/*IN*/ void* callback_opaque,
/*IN*/ DisOneInstrFn dis_instr_fn,
/*IN*/ UChar* guest_code,
/* Set up result struct. */
VexTranslateResult res;
- res.status = VexTransOK;
- res.n_sc_extents = 0;
- res.offs_profInc = -1;
+ res.status = VexTransOK;
+ res.n_sc_extents = 0;
+ res.offs_profInc = -1;
+ res.n_guest_instrs = 0;
/* yet more sanity checks ... */
if (vta->arch_guest == vta->arch_host) {
irsb = bb_to_IR ( vta->guest_extents,
&res.n_sc_extents,
+ &res.n_guest_instrs,
vta->callback_opaque,
disInstrFn,
vta->guest_bytes,
/* Offset in generated code of the profile inc, or -1 if
none. Needed for later patching. */
Int offs_profInc;
+ /* Stats only: the number of guest insns included in the
+ translation. It may be zero (!). */
+ UInt n_guest_instrs;
}
VexTranslateResult;