#ifndef _PERF_BRANCH_H #define _PERF_BRANCH_H 1 /* * The linux/stddef.h isn't need here, but is needed for __always_inline used * in files included from uapi/linux/perf_event.h such as * /usr/include/linux/swab.h and /usr/include/linux/byteorder/little_endian.h, * detected in at least musl libc, used in Alpine Linux. -acme
*/ #include <stdio.h> #include <linux/perf_event.h> #include <linux/types.h> #include"util/map_symbol.h" #include"util/sample.h"
/* * The hw_idx is only available when PERF_SAMPLE_BRANCH_HW_INDEX is applied. * Otherwise, the output format of a sample with branch stack is * struct branch_stack { * u64 nr; * struct branch_entry entries[0]; * } * Check whether the hw_idx is available, * and return the corresponding pointer of entries[0].
*/ staticinlinestruct branch_entry *perf_sample__branch_entries(struct perf_sample *sample)
{
u64 *entry = (u64 *)sample->branch_stack;
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.