~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal

« back to all changes in this revision

Viewing changes to include/trace/events/vfs.h

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-04kado7d1u2er2rl
Tags: 3.2.0-16.25
Add new lowlatency kernel flavour

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#undef TRACE_SYSTEM
 
2
#define TRACE_SYSTEM vfs
 
3
 
 
4
#if !defined(_TRACE_VFS_H) || defined(TRACE_HEADER_MULTI_READ)
 
5
#define _TRACE_VFS_H
 
6
 
 
7
/*
 
8
 * Tracepoint for dirtying an inode:
 
9
 */
 
10
TRACE_EVENT(dirty_inode,
 
11
 
 
12
        TP_PROTO(struct inode *inode, struct task_struct *task),
 
13
 
 
14
        TP_ARGS(inode, task),
 
15
 
 
16
        TP_STRUCT__entry(
 
17
                __array( char,  comm,   TASK_COMM_LEN   )
 
18
                __field( pid_t, pid                     )
 
19
                __array( char,  dev,    16              )
 
20
                __array( char,  file,   32              )
 
21
        ),
 
22
 
 
23
        TP_fast_assign(
 
24
                if (inode->i_ino || strcmp(inode->i_sb->s_id, "bdev")) {
 
25
                        struct dentry *dentry;
 
26
                        const char *name = "?";
 
27
 
 
28
                        dentry = d_find_alias(inode);
 
29
                        if (dentry) {
 
30
                                spin_lock(&dentry->d_lock);
 
31
                                name = (const char *) dentry->d_name.name;
 
32
                        }
 
33
 
 
34
                        memcpy(__entry->comm, task->comm, TASK_COMM_LEN);
 
35
                        __entry->pid = task->pid;
 
36
                        strlcpy(__entry->file, name, 32);
 
37
                        strlcpy(__entry->dev, inode->i_sb->s_id, 16);
 
38
 
 
39
                        if (dentry) {
 
40
                                spin_unlock(&dentry->d_lock);
 
41
                                dput(dentry);
 
42
                        }
 
43
                }
 
44
        ),
 
45
 
 
46
        TP_printk("task=%i (%s) file=%s dev=%s",
 
47
                __entry->pid, __entry->comm, __entry->file, __entry->dev)
 
48
);
 
49
 
 
50
#endif /* _TRACE_VFS_H */
 
51
 
 
52
/* This part must be outside protection */
 
53
#include <trace/define_trace.h>