aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorScott James Remnant <scott@ubuntu.com>2009-10-27 10:05:32 +0000
committerLeann Ogasawara <leann.ogasawara@canonical.com>2010-09-02 12:55:11 -0700
commit2659556dbef222d535e1a040e956bf1d269578a3 (patch)
tree5cc7c3ea730affc0c2ed66cb0f3954f74aefa285 /fs
parent0e5dee8261568411c49730e810b974e3e35eab6f (diff)
UBUNTU: SAUCE: trace: add trace events for open(), exec() and uselib()
BugLink: http://bugs.launchpad.net/bugs/462111 This patch uses TRACE_EVENT to add tracepoints for the open(), exec() and uselib() syscalls so that ureadahead can cheaply trace the boot sequence to determine what to read to speed up the next. It's not upstream because it will need to be rebased onto the syscall trace events whenever that gets merged, and is a stop-gap. Signed-off-by: Scott James Remnant <scott@ubuntu.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Acked-by: Andy Whitcroft <andy.whitcroft@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c4
-rw-r--r--fs/open.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/fs/exec.c b/fs/exec.c
index e19de6a8033..7e46eaeb727 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -56,6 +56,8 @@
#include <linux/fs_struct.h>
#include <linux/pipe_fs_i.h>
+#include <trace/events/fs.h>
+
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/tlb.h>
@@ -685,6 +687,8 @@ struct file *open_exec(const char *name)
fsnotify_open(file->f_path.dentry);
+ trace_open_exec(name);
+
err = deny_write_access(file);
if (err)
goto exit;
diff --git a/fs/open.c b/fs/open.c
index 5463266db9e..d24b4e676ad 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -32,6 +32,9 @@
#include "internal.h"
+#define CREATE_TRACE_POINTS
+#include <trace/events/fs.h>
+
int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
struct file *filp)
{
@@ -890,6 +893,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
} else {
fsnotify_open(f->f_path.dentry);
fd_install(fd, f);
+ trace_do_sys_open(tmp, flags, mode);
}
}
putname(tmp);