Skip to content

Commit

Permalink
perf print-events: Export is_event_supported()
Browse files Browse the repository at this point in the history
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 <irogers@google.com>
Cc: James Clark <james.clark@arm.com>
Cc: John Garry <john.g.garry@oracle.com>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/linux-perf-users/ZIzYgImv61OGK1wA@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Arnaldo Carvalho de Melo committed Jun 16, 2023
1 parent bb6b369 commit e2be066
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/print-events.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ void print_sdt_events(const struct print_callbacks *print_cb, void *print_state)
strlist__delete(sdtlist);
}

static bool is_event_supported(u8 type, u64 config)
bool is_event_supported(u8 type, u64 config)
{
bool ret = true;
int open_return;
Expand Down
2 changes: 2 additions & 0 deletions tools/perf/util/print-events.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#define __PERF_PRINT_EVENTS_H

#include <linux/perf_event.h>
#include <linux/types.h>
#include <stdbool.h>

struct event_symbol;
Expand Down Expand Up @@ -36,5 +37,6 @@ void print_symbol_events(const struct print_callbacks *print_cb, void *print_sta
unsigned int max);
void print_tool_events(const struct print_callbacks *print_cb, void *print_state);
void print_tracepoint_events(const struct print_callbacks *print_cb, void *print_state);
bool is_event_supported(u8 type, u64 config);

#endif /* __PERF_PRINT_EVENTS_H */

0 comments on commit e2be066

Please sign in to comment.