if (flags->type == PERF_BR_EXTEND_ABI)
st->new_counts[flags->new_type]++; else
st->counts[flags->type]++;
if (flags->type == PERF_BR_COND) { if (to > from)
st->cond_fwd++; else
st->cond_bwd++;
}
if (cross_area(from, to, AREA_2M))
st->cross_2m++; elseif (cross_area(from, to, AREA_4K))
st->cross_4k++;
}
constchar *branch_new_type_name(int new_type)
{ constchar *branch_new_names[PERF_BR_NEW_MAX] = { "FAULT_ALGN", "FAULT_DATA", "FAULT_INST", /* * TODO: This switch should happen on 'perf_session__env(session)->arch' * instead, because an arm64 platform perf recording could be * opened for analysis on other platforms as well.
*/ #ifdef __aarch64__ "ARM64_FIQ", "ARM64_DEBUG_HALT", "ARM64_DEBUG_EXIT", "ARM64_DEBUG_INST", "ARM64_DEBUG_DATA" #else "ARCH_1", "ARCH_2", "ARCH_3", "ARCH_4", "ARCH_5" #endif
};
if (new_type >= 0 && new_type < PERF_BR_NEW_MAX) return branch_new_names[new_type];
return NULL;
}
constchar *branch_type_name(int type)
{ constchar *branch_names[PERF_BR_MAX] = { "N/A", "COND", "UNCOND", "IND", "CALL", "IND_CALL", "RET", "SYSCALL", "SYSRET", "COND_CALL", "COND_RET", "ERET", "IRQ", "SERROR", "NO_TX", "", // Needed for PERF_BR_EXTEND_ABI that ends up triggering some compiler warnings about NULL deref
};
if (type >= 0 && type < PERF_BR_MAX) return branch_names[type];
return NULL;
}
constchar *get_branch_type(struct branch_entry *e)
{ if (e->flags.type == PERF_BR_UNKNOWN) return"";
if (e->flags.type == PERF_BR_EXTEND_ABI) return branch_new_type_name(e->flags.new_type);
return branch_type_name(e->flags.type);
}
void branch_type_stat_display(FILE *fp, conststruct branch_type_stat *st)
{
u64 total = 0; int i;
for (i = 0; i < PERF_BR_MAX; i++)
total += st->counts[i];
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.