aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorScott James Remnant <scott@ubuntu.com>2009-10-27 10:05:32 +0000
committerJohn Rigby <john.rigby@linaro.org>2011-09-23 08:45:27 -0600
commitbeea40ec610dc238b35507ee5909710e011e0a24 (patch)
tree5d2cb93fb121954d39966c2cfcedec9755af8678 /fs
parentb84cf059e447b24e3b00427e8172d8e22bde6791 (diff)
UBUNTU: SAUCE: (no-up) 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 6075a1e727a..c122d78f11b 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -56,6 +56,8 @@
#include <linux/oom.h>
#include <linux/compat.h>
+#include <trace/events/fs.h>
+
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
#include <asm/tlb.h>
@@ -789,6 +791,8 @@ struct file *open_exec(const char *name)
fsnotify_open(file);
+ trace_open_exec(name);
+
err = deny_write_access(file);
if (err)
goto exit;
diff --git a/fs/open.c b/fs/open.c
index b52cf013ffa..56b1bf0b137 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -33,6 +33,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)
{
@@ -1005,6 +1008,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
} else {
fsnotify_open(f);
fd_install(fd, f);
+ trace_do_sys_open(tmp, flags, mode);
}
}
putname(tmp);