4 #include <api/fs/tracing_path.h> 18 unsigned int nr_openat_calls = 111, i;
23 if (threads == NULL) {
30 tracing_path__strerror_open_tp(errno, errbuf,
sizeof(errbuf),
"syscalls",
"sys_enter_openat");
32 goto out_thread_map_delete;
36 pr_debug(
"failed to open counter: %s, " 37 "tweak /proc/sys/kernel/perf_event_paranoid?\n",
38 str_error_r(errno, sbuf,
sizeof(sbuf)));
39 goto out_evsel_delete;
42 for (i = 0; i < nr_openat_calls; ++i) {
43 fd = openat(0,
"/etc/passwd", O_RDONLY);
48 pr_debug(
"perf_evsel__read_on_cpu\n");
53 pr_debug(
"perf_evsel__read_on_cpu: expected to intercept %d calls, got %" PRIu64
"\n",
63 out_thread_map_delete:
static int perf_evsel__read_on_cpu(struct perf_evsel *evsel, int cpu, int thread)
void perf_evsel__delete(struct perf_evsel *evsel)
#define pr_debug(fmt,...)
int perf_evsel__open_per_thread(struct perf_evsel *evsel, struct thread_map *threads)
struct perf_counts * counts
void perf_evsel__close_fd(struct perf_evsel *evsel)
int test__openat_syscall_event(struct test *test __maybe_unused, int subtest __maybe_unused)
void thread_map__put(struct thread_map *map)
static struct perf_counts_values * perf_counts(struct perf_counts *counts, int cpu, int thread)
static struct perf_evsel * perf_evsel__newtp(const char *sys, const char *name)
struct thread_map * thread_map__new(pid_t pid, pid_t tid, uid_t uid)