/* * The implicitly sorted sdtlist will hold the tracepoint name followed * by @<buildid>. If the tracepoint name is unique (determined by * looking at the adjacent nodes) the @<buildid> is dropped otherwise * the executable path and buildid are added to the name.
*/
sdtlist = strlist__new(NULL, NULL); if (!sdtlist) {
pr_debug("Failed to allocate new strlist for SDT\n"); return;
}
bidlist = build_id_cache__list_all(true); if (!bidlist) {
pr_debug("Failed to get buildids: %d\n", errno); return;
}
strlist__for_each_entry(bid_nd, bidlist) { struct probe_cache *pcache; struct probe_cache_entry *ent;
evsel = evsel__new(&attr); if (evsel) {
ret = evsel__open(evsel, NULL, tmap) >= 0;
if (!ret) { /* * The event may fail to open if the paranoid value * /proc/sys/kernel/perf_event_paranoid is set to 2 * Re-run with exclude_kernel set; we don't do that by * default as some ARM machines do not support it.
*/
evsel->core.attr.exclude_kernel = 1;
ret = evsel__open(evsel, NULL, tmap) >= 0;
}
if (!ret) { /* * The event may fail to open if the PMU requires * exclude_guest to be set (e.g. as the Apple M1 PMU * requires). * Re-run with exclude_guest set; we don't do that by * default as it's equally legitimate for another PMU * driver to require that exclude_guest is clear.
*/
evsel->core.attr.exclude_guest = 1;
ret = evsel__open(evsel, NULL, tmap) >= 0;
}
/* * Only print core PMUs, skipping uncore for performance and * PERF_TYPE_SOFTWARE that can succeed in opening legacy cache evenst.
*/ while ((pmu = perf_pmus__scan_core(pmu)) != NULL) { if (pmu->is_uncore || pmu->type == PERF_TYPE_SOFTWARE) continue;
for (int type = 0; type < PERF_COUNT_HW_CACHE_MAX; type++) { for (int op = 0; op < PERF_COUNT_HW_CACHE_OP_MAX; op++) { /* skip invalid cache type */ if (!evsel__is_cache_op_valid(type, op)) continue;
for (int res = 0; res < PERF_COUNT_HW_CACHE_RESULT_MAX; res++) { char name[64]; char alias_name[128];
__u64 config; int ret;
if (!evt_name_list) {
pr_debug("Failed to allocate new strlist for symbol events\n"); return;
} for (unsignedint i = 0; i < max; i++) { /* * New attr.config still not supported here, the latest * example was PERF_COUNT_SW_CGROUP_SWITCHES
*/ if (syms[i].symbol == NULL) continue;
if (!is_event_supported(type, i)) continue;
if (strlen(syms[i].alias)) { char name[MAX_NAME_LEN];
/* * Print the help text for the event symbols:
*/ void print_events(conststruct print_callbacks *print_cb, void *print_state)
{
print_symbol_events(print_cb, print_state, PERF_TYPE_HARDWARE,
event_symbols_hw, PERF_COUNT_HW_MAX);
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.