mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
fs: Remove remaining android_fs tracings
Change-Id: I2d2f5a6ef9c3f8929c6342d290f1e9010f97898b Signed-off-by: Park Ju Hyung <qkrwngud825@gmail.com> Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
parent
ec951d8c2d
commit
e40a3db314
@ -30,7 +30,6 @@
|
||||
#include "gc.h"
|
||||
#include "iostat.h"
|
||||
#include <trace/events/f2fs.h>
|
||||
#include <trace/events/android_fs.h>
|
||||
#include <uapi/linux/f2fs.h>
|
||||
|
||||
static int f2fs_filemap_fault(struct vm_fault *vmf)
|
||||
@ -268,15 +267,6 @@ static int f2fs_do_sync_file(struct file *file, loff_t start, loff_t end,
|
||||
|
||||
trace_f2fs_sync_file_enter(inode);
|
||||
|
||||
if (trace_android_fs_fsync_start_enabled()) {
|
||||
char *path, pathbuf[MAX_TRACE_PATHBUF_LEN];
|
||||
|
||||
path = android_fstrace_get_pathname(pathbuf,
|
||||
MAX_TRACE_PATHBUF_LEN, inode);
|
||||
trace_android_fs_fsync_start(inode,
|
||||
current->pid, path, current->comm);
|
||||
}
|
||||
|
||||
if (S_ISDIR(inode->i_mode))
|
||||
goto go_write;
|
||||
|
||||
|
38
fs/mpage.c
38
fs/mpage.c
@ -32,16 +32,6 @@
|
||||
#include <linux/cleancache.h>
|
||||
#include "internal.h"
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include <trace/events/android_fs.h>
|
||||
|
||||
EXPORT_TRACEPOINT_SYMBOL(android_fs_datawrite_start);
|
||||
EXPORT_TRACEPOINT_SYMBOL(android_fs_datawrite_end);
|
||||
EXPORT_TRACEPOINT_SYMBOL(android_fs_dataread_start);
|
||||
EXPORT_TRACEPOINT_SYMBOL(android_fs_dataread_end);
|
||||
EXPORT_TRACEPOINT_SYMBOL(android_fs_fsync_start);
|
||||
EXPORT_TRACEPOINT_SYMBOL(android_fs_fsync_end);
|
||||
|
||||
/*
|
||||
* I/O completion handler for multipage BIOs.
|
||||
*
|
||||
@ -59,16 +49,6 @@ static void mpage_end_io(struct bio *bio)
|
||||
struct bio_vec *bv;
|
||||
int i;
|
||||
|
||||
if (trace_android_fs_dataread_end_enabled() &&
|
||||
(bio_data_dir(bio) == READ)) {
|
||||
struct page *first_page = bio->bi_io_vec[0].bv_page;
|
||||
|
||||
if (first_page != NULL)
|
||||
trace_android_fs_dataread_end(first_page->mapping->host,
|
||||
page_offset(first_page),
|
||||
bio->bi_iter.bi_size);
|
||||
}
|
||||
|
||||
bio_for_each_segment_all(bv, bio, i) {
|
||||
struct page *page = bv->bv_page;
|
||||
page_endio(page, op_is_write(bio_op(bio)),
|
||||
@ -80,24 +60,6 @@ static void mpage_end_io(struct bio *bio)
|
||||
|
||||
static struct bio *mpage_bio_submit(int op, int op_flags, struct bio *bio)
|
||||
{
|
||||
if (trace_android_fs_dataread_start_enabled() && (op == REQ_OP_READ)) {
|
||||
struct page *first_page = bio->bi_io_vec[0].bv_page;
|
||||
|
||||
if (first_page != NULL) {
|
||||
char *path, pathbuf[MAX_TRACE_PATHBUF_LEN];
|
||||
|
||||
path = android_fstrace_get_pathname(pathbuf,
|
||||
MAX_TRACE_PATHBUF_LEN,
|
||||
first_page->mapping->host);
|
||||
trace_android_fs_dataread_start(
|
||||
first_page->mapping->host,
|
||||
page_offset(first_page),
|
||||
bio->bi_iter.bi_size,
|
||||
current->pid,
|
||||
path,
|
||||
current->comm);
|
||||
}
|
||||
}
|
||||
bio->bi_end_io = mpage_end_io;
|
||||
bio_set_op_attrs(bio, op, op_flags);
|
||||
guard_bio_eod(op, bio);
|
||||
|
@ -1,74 +0,0 @@
|
||||
#undef TRACE_SYSTEM
|
||||
#define TRACE_SYSTEM android_fs
|
||||
|
||||
#if !defined(_TRACE_ANDROID_FS_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_ANDROID_FS_H
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
#include <trace/events/android_fs_template.h>
|
||||
|
||||
DEFINE_EVENT(android_fs_data_start_template, android_fs_dataread_start,
|
||||
TP_PROTO(struct inode *inode, loff_t offset, int bytes,
|
||||
pid_t pid, char *pathname, char *command),
|
||||
TP_ARGS(inode, offset, bytes, pid, pathname, command));
|
||||
|
||||
DEFINE_EVENT(android_fs_data_end_template, android_fs_dataread_end,
|
||||
TP_PROTO(struct inode *inode, loff_t offset, int bytes),
|
||||
TP_ARGS(inode, offset, bytes));
|
||||
|
||||
DEFINE_EVENT(android_fs_data_start_template, android_fs_datawrite_start,
|
||||
TP_PROTO(struct inode *inode, loff_t offset, int bytes,
|
||||
pid_t pid, char *pathname, char *command),
|
||||
TP_ARGS(inode, offset, bytes, pid, pathname, command));
|
||||
|
||||
DEFINE_EVENT(android_fs_data_end_template, android_fs_datawrite_end,
|
||||
TP_PROTO(struct inode *inode, loff_t offset, int bytes),
|
||||
TP_ARGS(inode, offset, bytes));
|
||||
|
||||
DEFINE_EVENT(android_fs_fsync_start_template, android_fs_fsync_start,
|
||||
TP_PROTO(struct inode *inode,
|
||||
pid_t pid, char *pathname, char *command),
|
||||
TP_ARGS(inode, pid, pathname, command));
|
||||
|
||||
DEFINE_EVENT(android_fs_data_end_template, android_fs_fsync_end,
|
||||
TP_PROTO(struct inode *inode, loff_t offset, int bytes),
|
||||
TP_ARGS(inode, offset, bytes));
|
||||
|
||||
#endif /* _TRACE_ANDROID_FS_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
#ifndef ANDROID_FSTRACE_GET_PATHNAME
|
||||
#define ANDROID_FSTRACE_GET_PATHNAME
|
||||
|
||||
/* Sizes an on-stack array, so careful if sizing this up ! */
|
||||
#define MAX_TRACE_PATHBUF_LEN 256
|
||||
|
||||
static inline char *
|
||||
android_fstrace_get_pathname(char *buf, int buflen, struct inode *inode)
|
||||
{
|
||||
char *path;
|
||||
struct dentry *d;
|
||||
|
||||
/*
|
||||
* d_obtain_alias() will either iput() if it locates an existing
|
||||
* dentry or transfer the reference to the new dentry created.
|
||||
* So get an extra reference here.
|
||||
*/
|
||||
ihold(inode);
|
||||
d = d_obtain_alias(inode);
|
||||
if (likely(!IS_ERR(d))) {
|
||||
path = dentry_path_raw(d, buf, buflen);
|
||||
if (unlikely(IS_ERR(path))) {
|
||||
strcpy(buf, "ERROR");
|
||||
path = buf;
|
||||
}
|
||||
dput(d);
|
||||
} else {
|
||||
strcpy(buf, "ERROR");
|
||||
path = buf;
|
||||
}
|
||||
return path;
|
||||
}
|
||||
#endif
|
@ -1,98 +0,0 @@
|
||||
#if !defined(_TRACE_ANDROID_FS_TEMPLATE_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_ANDROID_FS_TEMPLATE_H
|
||||
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
DECLARE_EVENT_CLASS(android_fs_data_start_template,
|
||||
TP_PROTO(struct inode *inode, loff_t offset, int bytes,
|
||||
pid_t pid, char *pathname, char *command),
|
||||
TP_ARGS(inode, offset, bytes, pid, pathname, command),
|
||||
TP_STRUCT__entry(
|
||||
__string(pathbuf, pathname);
|
||||
__field(loff_t, offset);
|
||||
__field(int, bytes);
|
||||
__field(loff_t, i_size);
|
||||
__string(cmdline, command);
|
||||
__field(pid_t, pid);
|
||||
__field(ino_t, ino);
|
||||
),
|
||||
TP_fast_assign(
|
||||
{
|
||||
/*
|
||||
* Replace the spaces in filenames and cmdlines
|
||||
* because this screws up the tooling that parses
|
||||
* the traces.
|
||||
*/
|
||||
__assign_str(pathbuf, pathname);
|
||||
(void)strreplace(__get_str(pathbuf), ' ', '_');
|
||||
__entry->offset = offset;
|
||||
__entry->bytes = bytes;
|
||||
__entry->i_size = i_size_read(inode);
|
||||
__assign_str(cmdline, command);
|
||||
(void)strreplace(__get_str(cmdline), ' ', '_');
|
||||
__entry->pid = pid;
|
||||
__entry->ino = inode->i_ino;
|
||||
}
|
||||
),
|
||||
TP_printk("entry_name %s, offset %llu, bytes %d, cmdline %s,"
|
||||
" pid %d, i_size %llu, ino %lu",
|
||||
__get_str(pathbuf), __entry->offset, __entry->bytes,
|
||||
__get_str(cmdline), __entry->pid, __entry->i_size,
|
||||
(unsigned long) __entry->ino)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(android_fs_data_end_template,
|
||||
TP_PROTO(struct inode *inode, loff_t offset, int bytes),
|
||||
TP_ARGS(inode, offset, bytes),
|
||||
TP_STRUCT__entry(
|
||||
__field(ino_t, ino);
|
||||
__field(loff_t, offset);
|
||||
__field(int, bytes);
|
||||
),
|
||||
TP_fast_assign(
|
||||
{
|
||||
__entry->ino = inode->i_ino;
|
||||
__entry->offset = offset;
|
||||
__entry->bytes = bytes;
|
||||
}
|
||||
),
|
||||
TP_printk("ino %lu, offset %llu, bytes %d",
|
||||
(unsigned long) __entry->ino,
|
||||
__entry->offset, __entry->bytes)
|
||||
);
|
||||
|
||||
DECLARE_EVENT_CLASS(android_fs_fsync_start_template,
|
||||
TP_PROTO(struct inode *inode,
|
||||
pid_t pid, char *pathname, char *command),
|
||||
TP_ARGS(inode, pid, pathname, command),
|
||||
TP_STRUCT__entry(
|
||||
__string(pathbuf, pathname);
|
||||
__field(loff_t, i_size);
|
||||
__string(cmdline, command);
|
||||
__field(pid_t, pid);
|
||||
__field(ino_t, ino);
|
||||
),
|
||||
TP_fast_assign(
|
||||
{
|
||||
/*
|
||||
* Replace the spaces in filenames and cmdlines
|
||||
* because this screws up the tooling that parses
|
||||
* the traces.
|
||||
*/
|
||||
__assign_str(pathbuf, pathname);
|
||||
(void)strreplace(__get_str(pathbuf), ' ', '_');
|
||||
__entry->i_size = i_size_read(inode);
|
||||
__assign_str(cmdline, command);
|
||||
(void)strreplace(__get_str(cmdline), ' ', '_');
|
||||
__entry->pid = pid;
|
||||
__entry->ino = inode->i_ino;
|
||||
}
|
||||
),
|
||||
TP_printk("entry_name %s, cmdline %s,"
|
||||
" pid %d, i_size %llu, ino %lu",
|
||||
__get_str(pathbuf),
|
||||
__get_str(cmdline), __entry->pid, __entry->i_size,
|
||||
(unsigned long) __entry->ino)
|
||||
);
|
||||
|
||||
#endif /* _TRACE_ANDROID_FS_TEMPLATE_H */
|
Loading…
x
Reference in New Issue
Block a user