print-events.c (597a4276fb326163b90754ef7b2a550a6b2b4054) print-events.c (1eaf496ed386934f1c2439a120fe84a05194f91a)
1// SPDX-License-Identifier: GPL-2.0
2#include <dirent.h>
3#include <errno.h>
4#include <stdio.h>
5#include <stdlib.h>
6#include <string.h>
7#include <fcntl.h>
8#include <sys/param.h>

--- 6 unchanged lines hidden (view full) ---

15#include <subcmd/pager.h>
16
17#include "build-id.h"
18#include "debug.h"
19#include "evsel.h"
20#include "metricgroup.h"
21#include "parse-events.h"
22#include "pmu.h"
1// SPDX-License-Identifier: GPL-2.0
2#include <dirent.h>
3#include <errno.h>
4#include <stdio.h>
5#include <stdlib.h>
6#include <string.h>
7#include <fcntl.h>
8#include <sys/param.h>

--- 6 unchanged lines hidden (view full) ---

15#include <subcmd/pager.h>
16
17#include "build-id.h"
18#include "debug.h"
19#include "evsel.h"
20#include "metricgroup.h"
21#include "parse-events.h"
22#include "pmu.h"
23#include "pmus.h"
23#include "print-events.h"
24#include "probe-file.h"
25#include "string2.h"
26#include "strlist.h"
27#include "tracepoint.h"
28#include "pfm.h"
29#include "thread_map.h"
30

--- 235 unchanged lines hidden (view full) ---

266 return ret;
267}
268
269int print_hwcache_events(const struct print_callbacks *print_cb, void *print_state)
270{
271 struct perf_pmu *pmu = NULL;
272 const char *event_type_descriptor = event_type_descriptors[PERF_TYPE_HW_CACHE];
273
24#include "print-events.h"
25#include "probe-file.h"
26#include "string2.h"
27#include "strlist.h"
28#include "tracepoint.h"
29#include "pfm.h"
30#include "thread_map.h"
31

--- 235 unchanged lines hidden (view full) ---

267 return ret;
268}
269
270int print_hwcache_events(const struct print_callbacks *print_cb, void *print_state)
271{
272 struct perf_pmu *pmu = NULL;
273 const char *event_type_descriptor = event_type_descriptors[PERF_TYPE_HW_CACHE];
274
274 while ((pmu = perf_pmu__scan(pmu)) != NULL) {
275 while ((pmu = perf_pmus__scan(pmu)) != NULL) {
275 /*
276 * Skip uncore PMUs for performance. PERF_TYPE_HW_CACHE type
277 * attributes can accept software PMUs in the extended type, so
278 * also skip.
279 */
280 if (pmu->is_uncore || pmu->type == PERF_TYPE_SOFTWARE)
281 continue;
282

--- 116 unchanged lines hidden (view full) ---

399 event_symbols_hw, PERF_COUNT_HW_MAX);
400 print_symbol_events(print_cb, print_state, PERF_TYPE_SOFTWARE,
401 event_symbols_sw, PERF_COUNT_SW_MAX);
402
403 print_tool_events(print_cb, print_state);
404
405 print_hwcache_events(print_cb, print_state);
406
276 /*
277 * Skip uncore PMUs for performance. PERF_TYPE_HW_CACHE type
278 * attributes can accept software PMUs in the extended type, so
279 * also skip.
280 */
281 if (pmu->is_uncore || pmu->type == PERF_TYPE_SOFTWARE)
282 continue;
283

--- 116 unchanged lines hidden (view full) ---

400 event_symbols_hw, PERF_COUNT_HW_MAX);
401 print_symbol_events(print_cb, print_state, PERF_TYPE_SOFTWARE,
402 event_symbols_sw, PERF_COUNT_SW_MAX);
403
404 print_tool_events(print_cb, print_state);
405
406 print_hwcache_events(print_cb, print_state);
407
407 print_pmu_events(print_cb, print_state);
408 perf_pmus__print_pmu_events(print_cb, print_state);
408
409 print_cb->print_event(print_state,
410 /*topic=*/NULL,
411 /*pmu_name=*/NULL,
412 "rNNN",
413 /*event_alias=*/NULL,
414 /*scale_unit=*/NULL,
415 /*deprecated=*/false,

--- 37 unchanged lines hidden ---
409
410 print_cb->print_event(print_state,
411 /*topic=*/NULL,
412 /*pmu_name=*/NULL,
413 "rNNN",
414 /*event_alias=*/NULL,
415 /*scale_unit=*/NULL,
416 /*deprecated=*/false,

--- 37 unchanged lines hidden ---