#define CREATE_TRACE_POINTS
#include <trace/events/mmap_lock.h>
#include <linux/mm.h>
#include <linux/cgroup.h>
#include <linux/memcontrol.h>
#include <linux/mmap_lock.h>
#include <linux/mutex.h>
#include <linux/percpu.h>
#include <linux/rcupdate.h>
#include <linux/smp.h>
#include <linux/trace_events.h>
#include <linux/local_lock.h>
EXPORT_TRACEPOINT_SYMBOL(…);
EXPORT_TRACEPOINT_SYMBOL(…);
EXPORT_TRACEPOINT_SYMBOL(…);
#ifdef CONFIG_MEMCG
static atomic_t reg_refcount;
#define MEMCG_PATH_BUF_SIZE …
int trace_mmap_lock_reg(void)
{ … }
void trace_mmap_lock_unreg(void)
{ … }
#define TRACE_MMAP_LOCK_EVENT(type, mm, ...) …
#else
int trace_mmap_lock_reg(void)
{
return 0;
}
void trace_mmap_lock_unreg(void)
{
}
#define TRACE_MMAP_LOCK_EVENT …
#endif
#ifdef CONFIG_TRACING
#ifdef CONFIG_MEMCG
static void get_mm_memcg_path(struct mm_struct *mm, char *buf, size_t buflen)
{ … }
#endif
void __mmap_lock_do_trace_start_locking(struct mm_struct *mm, bool write)
{ … }
EXPORT_SYMBOL(…);
void __mmap_lock_do_trace_acquire_returned(struct mm_struct *mm, bool write,
bool success)
{ … }
EXPORT_SYMBOL(…);
void __mmap_lock_do_trace_released(struct mm_struct *mm, bool write)
{ … }
EXPORT_SYMBOL(…);
#endif