core/x86/interp.c
/* Add profile call to front of the trace in dc
 * Must call finalize_profile_call and pass it the fragment_t*
 * once the trace is turned into a fragment to fix up a few profile
 * call instructions.
 */
Add profile call to front of the trace in dc
Must call finalize_profile_call and pass it the fragment_t
once the trace is turned into a fragment to fix up a few profile
call instructions.
Add profile call to front of the trace in dc Must call finalize_profile_call and pass it the fragment_t once the trace is turned into a fragment to fix up a few profile call instructions .
void
add_profile_call(dcontext_t *dcontext)
{
    monitor_data_t *md = (monitor_data_t *) dcontext->monitor_field;
    instrlist_t *trace = &(md->trace);
    byte *p = ((byte *)md->trace_buf) + md->trace_buf_top;
    instr_t *instr;
    uint num_bytes = profile_call_size();
    ASSERT(num_bytes + md->trace_buf_top < md->trace_buf_size);
    insert_profile_call((cache_pc)p);
    instr = instr_create(dcontext);
    instr_set_raw_bits(instr, p, num_bytes);
    instrlist_prepend(trace, instr);
    md->trace_buf_top += num_bytes;
}
void add_profile_call ( dcontext_t * dcontext ) { monitor_data_t * md = ( monitor_data_t * ) dcontext -> monitor_field ; instrlist_t * trace = & ( md -> trace ) ; byte * p = ( ( byte * ) md -> trace_buf ) + md -> trace_buf_top ; instr_t * instr ; uint num_bytes = profile_call_size ( ) ; ASSERT ( num_bytes + md -> trace_buf_top < md -> trace_buf_size ) ; insert_profile_call ( ( cache_pc ) p ) ; instr = instr_create ( dcontext ) ; instr_set_raw_bits ( instr , p , num_bytes ) ; instrlist_prepend ( trace , instr ) ; md -> trace_buf_top += num_bytes ; }
Add profile call to front of the trace in dc
 Must call finalize_profile_call and pass it the fragment_t
 once the trace is turned into a fragment to fix up a few profile
 call instructions.
Add profile call to front of the trace in dc Must call finalize_profile_call and pass it the fragment_t once the trace is turned into a fragment to fix up a few profile call instructions .
/* use one giant BINARY instruction to hold everything,
     * to keep dynamo from interpreting the cti instructions as real ones
     */