2020-04-25 13:19:08 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2014-12-18 03:45:05 +00:00
|
|
|
/*
|
|
|
|
* f2fs IO tracer
|
|
|
|
*
|
|
|
|
* Copyright (c) 2014 Motorola Mobility
|
|
|
|
* Copyright (c) 2014 Jaegeuk Kim <jaegeuk@kernel.org>
|
|
|
|
*/
|
|
|
|
#ifndef __F2FS_TRACE_H__
|
|
|
|
#define __F2FS_TRACE_H__
|
|
|
|
|
|
|
|
#ifdef CONFIG_F2FS_IO_TRACE
|
|
|
|
#include <trace/events/f2fs.h>
|
|
|
|
|
2014-12-18 03:51:57 +00:00
|
|
|
enum file_type {
|
|
|
|
__NORMAL_FILE,
|
|
|
|
__DIR_FILE,
|
|
|
|
__NODE_FILE,
|
|
|
|
__META_FILE,
|
|
|
|
__ATOMIC_FILE,
|
|
|
|
__VOLATILE_FILE,
|
|
|
|
__MISC_FILE,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct last_io_info {
|
|
|
|
int major, minor;
|
|
|
|
pid_t pid;
|
|
|
|
enum file_type type;
|
|
|
|
struct f2fs_io_info fio;
|
|
|
|
block_t len;
|
|
|
|
};
|
|
|
|
|
2014-12-18 03:45:05 +00:00
|
|
|
extern void f2fs_trace_pid(struct page *);
|
2015-04-23 21:38:15 +00:00
|
|
|
extern void f2fs_trace_ios(struct f2fs_io_info *, int);
|
2015-01-07 22:07:36 +00:00
|
|
|
extern void f2fs_build_trace_ios(void);
|
2015-01-07 22:09:48 +00:00
|
|
|
extern void f2fs_destroy_trace_ios(void);
|
2014-12-18 03:45:05 +00:00
|
|
|
#else
|
|
|
|
#define f2fs_trace_pid(p)
|
2015-04-23 21:38:15 +00:00
|
|
|
#define f2fs_trace_ios(i, n)
|
2015-01-07 22:07:36 +00:00
|
|
|
#define f2fs_build_trace_ios()
|
2015-01-07 22:09:48 +00:00
|
|
|
#define f2fs_destroy_trace_ios()
|
2014-12-18 03:45:05 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif /* __F2FS_TRACE_H__ */
|