#include <linux/percpu-rwsem.h>
#include <linux/unwind_deferred.h>
#include <linux/kvm_types.h>
+#include <linux/seq_file.h>
#include "internal.h"
return 0;
}
+static void perf_show_fdinfo(struct seq_file *m, struct file *f)
+{
+ struct perf_event *event = f->private_data;
+ struct perf_event_context *ctx;
+ struct mutex *child_mutex;
+
+ ctx = perf_event_ctx_lock(event);
+ child_mutex = event->parent ? &event->parent->child_mutex : &event->child_mutex;
+ mutex_lock(child_mutex);
+
+ seq_printf(m, "perf_event_attr.type:\t%u\n", event->orig_type);
+ if (event->pmu)
+ seq_printf(m, "pmu_type:\t%u\n", event->pmu->type);
+ seq_printf(m, "perf_event_attr.config:\t0x%llx\n", (unsigned long long)event->attr.config);
+ seq_printf(m, "perf_event_attr.config1:\t0x%llx\n",
+ (unsigned long long)event->attr.config1);
+ seq_printf(m, "perf_event_attr.config2:\t0x%llx\n",
+ (unsigned long long)event->attr.config2);
+ seq_printf(m, "perf_event_attr.config3:\t0x%llx\n",
+ (unsigned long long)event->attr.config3);
+ seq_printf(m, "perf_event_attr.config4:\t0x%llx\n",
+ (unsigned long long)event->attr.config4);
+
+ mutex_unlock(child_mutex);
+ perf_event_ctx_unlock(event, ctx);
+}
+
static const struct file_operations perf_fops = {
.release = perf_release,
.read = perf_read,
.compat_ioctl = perf_compat_ioctl,
.mmap = perf_mmap,
.fasync = perf_fasync,
+ .show_fdinfo = perf_show_fdinfo,
};
/*