aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorScott James Remnant <scott@ubuntu.com>2009-10-27 10:05:32 +0000
committerJohn Rigby <john.rigby@linaro.org>2012-08-15 23:45:42 -0600
commit5f2e9fd0725ec7ebab543fd632facc468aa61190 (patch)
tree9b899a8ae9adc1e31c53ca21b2a304e74e9dbcc9 /include
parent3f19af46f25212393f58f4b78bd5991e4fa79547 (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 'include')
-rw-r--r--include/trace/events/fs.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/include/trace/events/fs.h b/include/trace/events/fs.h
new file mode 100644
index 00000000000..2cbb8fed1ae
--- /dev/null
+++ b/include/trace/events/fs.h
@@ -0,0 +1,53 @@
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM fs
+
+#if !defined(_TRACE_FS_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_FS_H
+
+#include <linux/fs.h>
+#include <linux/tracepoint.h>
+
+TRACE_EVENT(do_sys_open,
+
+ TP_PROTO(char *filename, int flags, int mode),
+
+ TP_ARGS(filename, flags, mode),
+
+ TP_STRUCT__entry(
+ __string( filename, filename )
+ __field( int, flags )
+ __field( int, mode )
+ ),
+
+ TP_fast_assign(
+ __assign_str(filename, filename);
+ __entry->flags = flags;
+ __entry->mode = mode;
+ ),
+
+ TP_printk("\"%s\" %x %o",
+ __get_str(filename), __entry->flags, __entry->mode)
+);
+
+TRACE_EVENT(open_exec,
+
+ TP_PROTO(char *filename),
+
+ TP_ARGS(filename),
+
+ TP_STRUCT__entry(
+ __string( filename, filename )
+ ),
+
+ TP_fast_assign(
+ __assign_str(filename, filename);
+ ),
+
+ TP_printk("\"%s\"",
+ __get_str(filename))
+);
+
+#endif /* _TRACE_FS_H */
+
+/* This part must be outside protection */
+#include <trace/define_trace.h>