Skip to main content

dr_prepopulate_indirect_targets

Function dr_prepopulate_indirect_targets 

Source
pub unsafe extern "C" fn dr_prepopulate_indirect_targets(
    branch_type: dr_indirect_branch_type_t,
    tags: *mut app_pc,
    tags_count: usize,
) -> bool_
Expand description

Intended to augment dr_prepopulate_cache() by populating DR’s indirect branch tables, avoiding trips back to the dispatcher during initial execution. This is only effective when one of the the runtime options -shared_trace_ibt_tables and -shared_bb_ibt_tables (depending on whether traces are enabled) is turned on, as this routine does not try to populate tables belonging to threads other than the calling thread.

This is meant to be called between dr_app_setup() and dr_app_start(), immediately after calling dr_prepopulate_cache(). It adds entries for each target address in the \p tags array to the indirect branch table for the branch type \p branch_type.

Returns whether successful.