mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
4f2abe9192
I found that checking cgroup sampling support using the missing features doesn't work on old kernels. Because it added both attr.cgroup bit and PERF_SAMPLE_CGROUP bit, it needs to check whichever comes first (usually the actual event, not dummy). But it only checks the attr.cgroup bit which is set only in the dummy event so cannot detect failtures due the sample bits. Also we don't ignore the missing feature and retry, it'd be better checking it with the API probing logic. Committer notes: Extracted the minimal part to check using the new cgroup API probe routine, the part that removes the cgroup member can be left for further discussion. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ian Rogers <irogers@google.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lore.kernel.org/lkml/20210527182835.1634339-1-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
18 lines
445 B
C
18 lines
445 B
C
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __PERF_API_PROBE_H
|
|
#define __PERF_API_PROBE_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
bool perf_can_aux_sample(void);
|
|
bool perf_can_comm_exec(void);
|
|
bool perf_can_record_cpu_wide(void);
|
|
bool perf_can_record_switch_events(void);
|
|
bool perf_can_record_text_poke_events(void);
|
|
bool perf_can_sample_identifier(void);
|
|
bool perf_can_record_build_id(void);
|
|
bool perf_can_record_cgroup(void);
|
|
|
|
#endif // __PERF_API_PROBE_H
|