Skip to content

Commit e2be066

Browse files
committed
perf print-events: Export is_event_supported()
Will be used when checking if we can encode the PMU number in perf_event_attr.type, part of the logic to use in hybrid systems (multiple types of CPUs, such as Intel's (Alder Lake, etc) or ARM's big.LITTLE). Co-developed-with: Ian Rogers <[email protected]> Cc: James Clark <[email protected]> Cc: John Garry <[email protected]> Cc: Leo Yan <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mike Leach <[email protected]> Cc: Sumanth Korikkar <[email protected]> Cc: Suzuki K Poulose <[email protected]> Cc: Thomas Richter <[email protected]> Cc: Will Deacon <[email protected]> Link: https://lore.kernel.org/linux-perf-users/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent bb6b369 commit e2be066

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

tools/perf/util/print-events.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ void print_sdt_events(const struct print_callbacks *print_cb, void *print_state)
229229
strlist__delete(sdtlist);
230230
}
231231

232-
static bool is_event_supported(u8 type, u64 config)
232+
bool is_event_supported(u8 type, u64 config)
233233
{
234234
bool ret = true;
235235
int open_return;

tools/perf/util/print-events.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#define __PERF_PRINT_EVENTS_H
44

55
#include <linux/perf_event.h>
6+
#include <linux/types.h>
67
#include <stdbool.h>
78

89
struct event_symbol;
@@ -36,5 +37,6 @@ void print_symbol_events(const struct print_callbacks *print_cb, void *print_sta
3637
unsigned int max);
3738
void print_tool_events(const struct print_callbacks *print_cb, void *print_state);
3839
void print_tracepoint_events(const struct print_callbacks *print_cb, void *print_state);
40+
bool is_event_supported(u8 type, u64 config);
3941

4042
#endif /* __PERF_PRINT_EVENTS_H */

0 commit comments

Comments
 (0)