Merge branch 'move_extents' of git://oss.oracle.com/git/tye/linux-2.6 into ocfs2...
[pandora-kernel.git] / fs / ocfs2 / ocfs2_trace.h
index 6ef3a92..3b481f4 100644 (file)
@@ -688,6 +688,31 @@ TRACE_EVENT(ocfs2_cache_block_dealloc,
                  __entry->blkno, __entry->bit)
 );
 
+TRACE_EVENT(ocfs2_trim_extent,
+       TP_PROTO(struct super_block *sb, unsigned long long blk,
+                unsigned long long count),
+       TP_ARGS(sb, blk, count),
+       TP_STRUCT__entry(
+               __field(int, dev_major)
+               __field(int, dev_minor)
+               __field(unsigned long long, blk)
+               __field(__u64,  count)
+       ),
+       TP_fast_assign(
+               __entry->dev_major = MAJOR(sb->s_dev);
+               __entry->dev_minor = MINOR(sb->s_dev);
+               __entry->blk = blk;
+               __entry->count = count;
+       ),
+       TP_printk("%d %d %llu %llu",
+                 __entry->dev_major, __entry->dev_minor,
+                 __entry->blk, __entry->count)
+);
+
+DEFINE_OCFS2_ULL_UINT_UINT_UINT_EVENT(ocfs2_trim_group);
+
+DEFINE_OCFS2_ULL_ULL_ULL_EVENT(ocfs2_trim_fs);
+
 /* End of trace events for fs/ocfs2/alloc.c. */
 
 /* Trace events for fs/ocfs2/localalloc.c. */
@@ -2461,8 +2486,275 @@ TRACE_EVENT(ocfs2_dentry_attach_lock_found,
        ),
        TP_printk("%s %llu %llu", __get_str(name), __entry->parent, __entry->ino)
 );
-
 /* End of trace events for fs/ocfs2/dcache.c. */
+
+/* Trace events for fs/ocfs2/export.c. */
+
+TRACE_EVENT(ocfs2_get_dentry_begin,
+       TP_PROTO(void *sb, void *handle, unsigned long long blkno),
+       TP_ARGS(sb, handle, blkno),
+       TP_STRUCT__entry(
+               __field(void *, sb)
+               __field(void *, handle)
+               __field(unsigned long long, blkno)
+       ),
+       TP_fast_assign(
+               __entry->sb = sb;
+               __entry->handle = handle;
+               __entry->blkno = blkno;
+       ),
+       TP_printk("%p %p %llu", __entry->sb, __entry->handle, __entry->blkno)
+);
+
+DEFINE_OCFS2_INT_INT_EVENT(ocfs2_get_dentry_test_bit);
+
+DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_get_dentry_stale);
+
+DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_get_dentry_generation);
+
+DEFINE_OCFS2_POINTER_EVENT(ocfs2_get_dentry_end);
+
+TRACE_EVENT(ocfs2_get_parent,
+       TP_PROTO(void *child, int len, const char *name,
+                unsigned long long ino),
+       TP_ARGS(child, len, name, ino),
+       TP_STRUCT__entry(
+               __field(void *, child)
+               __field(int, len)
+               __string(name, name)
+               __field(unsigned long long, ino)
+       ),
+       TP_fast_assign(
+               __entry->child = child;
+               __entry->len = len;
+               __assign_str(name, name);
+               __entry->ino = ino;
+       ),
+       TP_printk("%p %.*s %llu", __entry->child, __entry->len,
+                 __get_str(name), __entry->ino)
+);
+
+DEFINE_OCFS2_POINTER_EVENT(ocfs2_get_parent_end);
+
+TRACE_EVENT(ocfs2_encode_fh_begin,
+       TP_PROTO(void *dentry, int name_len, const char *name,
+                void *fh, int len, int connectable),
+       TP_ARGS(dentry, name_len, name, fh, len, connectable),
+       TP_STRUCT__entry(
+               __field(void *, dentry)
+               __field(int, name_len)
+               __string(name, name)
+               __field(void *, fh)
+               __field(int, len)
+               __field(int, connectable)
+       ),
+       TP_fast_assign(
+               __entry->dentry = dentry;
+               __entry->name_len = name_len;
+               __assign_str(name, name);
+               __entry->fh = fh;
+               __entry->len = len;
+               __entry->connectable = connectable;
+       ),
+       TP_printk("%p %.*s %p %d %d", __entry->dentry, __entry->name_len,
+                 __get_str(name), __entry->fh, __entry->len,
+                 __entry->connectable)
+);
+
+DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_encode_fh_self);
+
+DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_encode_fh_parent);
+
+DEFINE_OCFS2_INT_EVENT(ocfs2_encode_fh_type);
+
+/* End of trace events for fs/ocfs2/export.c. */
+
+/* Trace events for fs/ocfs2/journal.c. */
+
+DEFINE_OCFS2_UINT_EVENT(ocfs2_commit_cache_begin);
+
+DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_commit_cache_end);
+
+DEFINE_OCFS2_INT_INT_EVENT(ocfs2_extend_trans);
+
+DEFINE_OCFS2_INT_EVENT(ocfs2_extend_trans_restart);
+
+DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_journal_access);
+
+DEFINE_OCFS2_ULL_EVENT(ocfs2_journal_dirty);
+
+DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_journal_init);
+
+DEFINE_OCFS2_UINT_EVENT(ocfs2_journal_init_maxlen);
+
+DEFINE_OCFS2_INT_EVENT(ocfs2_journal_shutdown);
+
+DEFINE_OCFS2_POINTER_EVENT(ocfs2_journal_shutdown_wait);
+
+DEFINE_OCFS2_ULL_EVENT(ocfs2_complete_recovery);
+
+DEFINE_OCFS2_INT_EVENT(ocfs2_complete_recovery_end);
+
+TRACE_EVENT(ocfs2_complete_recovery_slot,
+       TP_PROTO(int slot, unsigned long long la_ino,
+                unsigned long long tl_ino, void *qrec),
+       TP_ARGS(slot, la_ino, tl_ino, qrec),
+       TP_STRUCT__entry(
+               __field(int, slot)
+               __field(unsigned long long, la_ino)
+               __field(unsigned long long, tl_ino)
+               __field(void *, qrec)
+       ),
+       TP_fast_assign(
+               __entry->slot = slot;
+               __entry->la_ino = la_ino;
+               __entry->tl_ino = tl_ino;
+               __entry->qrec = qrec;
+       ),
+       TP_printk("%d %llu %llu %p", __entry->slot, __entry->la_ino,
+                 __entry->tl_ino, __entry->qrec)
+);
+
+DEFINE_OCFS2_INT_INT_EVENT(ocfs2_recovery_thread_node);
+
+DEFINE_OCFS2_INT_EVENT(ocfs2_recovery_thread_end);
+
+TRACE_EVENT(ocfs2_recovery_thread,
+       TP_PROTO(int node_num, int osb_node_num, int disable,
+                void *recovery_thread, int map_set),
+       TP_ARGS(node_num, osb_node_num, disable, recovery_thread, map_set),
+       TP_STRUCT__entry(
+               __field(int, node_num)
+               __field(int, osb_node_num)
+               __field(int,disable)
+               __field(void *, recovery_thread)
+               __field(int,map_set)
+       ),
+       TP_fast_assign(
+               __entry->node_num = node_num;
+               __entry->osb_node_num = osb_node_num;
+               __entry->disable = disable;
+               __entry->recovery_thread = recovery_thread;
+               __entry->map_set = map_set;
+       ),
+       TP_printk("%d %d %d %p %d", __entry->node_num,
+                  __entry->osb_node_num, __entry->disable,
+                  __entry->recovery_thread, __entry->map_set)
+);
+
+DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_replay_journal_recovered);
+
+DEFINE_OCFS2_INT_EVENT(ocfs2_replay_journal_lock_err);
+
+DEFINE_OCFS2_INT_EVENT(ocfs2_replay_journal_skip);
+
+DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_recover_node);
+
+DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_recover_node_skip);
+
+DEFINE_OCFS2_UINT_UINT_EVENT(ocfs2_mark_dead_nodes);
+
+DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_queue_orphan_scan_begin);
+
+DEFINE_OCFS2_UINT_UINT_UINT_EVENT(ocfs2_queue_orphan_scan_end);
+
+DEFINE_OCFS2_ULL_EVENT(ocfs2_orphan_filldir);
+
+DEFINE_OCFS2_INT_EVENT(ocfs2_recover_orphans);
+
+DEFINE_OCFS2_ULL_EVENT(ocfs2_recover_orphans_iput);
+
+DEFINE_OCFS2_INT_EVENT(ocfs2_wait_on_mount);
+
+/* End of trace events for fs/ocfs2/journal.c. */
+
+/* Trace events for fs/ocfs2/buffer_head_io.c. */
+
+DEFINE_OCFS2_ULL_UINT_EVENT(ocfs2_read_blocks_sync);
+
+DEFINE_OCFS2_ULL_EVENT(ocfs2_read_blocks_sync_jbd);
+
+DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_read_blocks_from_disk);
+
+DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_bh);
+
+DEFINE_OCFS2_ULL_INT_INT_INT_EVENT(ocfs2_read_blocks_end);
+
+TRACE_EVENT(ocfs2_write_block,
+       TP_PROTO(unsigned long long block, void *ci),
+       TP_ARGS(block, ci),
+       TP_STRUCT__entry(
+               __field(unsigned long long, block)
+               __field(void *, ci)
+       ),
+       TP_fast_assign(
+               __entry->block = block;
+               __entry->ci = ci;
+       ),
+       TP_printk("%llu %p", __entry->block, __entry->ci)
+);
+
+TRACE_EVENT(ocfs2_read_blocks_begin,
+       TP_PROTO(void *ci, unsigned long long block,
+                unsigned int nr, int flags),
+       TP_ARGS(ci, block, nr, flags),
+       TP_STRUCT__entry(
+               __field(void *, ci)
+               __field(unsigned long long, block)
+               __field(unsigned int, nr)
+               __field(int, flags)
+       ),
+       TP_fast_assign(
+               __entry->ci = ci;
+               __entry->block = block;
+               __entry->nr = nr;
+               __entry->flags = flags;
+       ),
+       TP_printk("%p %llu %u %d", __entry->ci, __entry->block,
+                 __entry->nr, __entry->flags)
+);
+
+/* End of trace events for fs/ocfs2/buffer_head_io.c. */
+
+/* Trace events for fs/ocfs2/uptodate.c. */
+
+DEFINE_OCFS2_ULL_EVENT(ocfs2_purge_copied_metadata_tree);
+
+DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_metadata_cache_purge);
+
+DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_buffer_cached_begin);
+
+TRACE_EVENT(ocfs2_buffer_cached_end,
+       TP_PROTO(int index, void *item),
+       TP_ARGS(index, item),
+       TP_STRUCT__entry(
+               __field(int, index)
+               __field(void *, item)
+       ),
+       TP_fast_assign(
+               __entry->index = index;
+               __entry->item = item;
+       ),
+       TP_printk("%d %p", __entry->index, __entry->item)
+);
+
+DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_append_cache_array);
+
+DEFINE_OCFS2_ULL_ULL_UINT_EVENT(ocfs2_insert_cache_tree);
+
+DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_expand_cache);
+
+DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_set_buffer_uptodate);
+
+DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_set_buffer_uptodate_begin);
+
+DEFINE_OCFS2_ULL_UINT_UINT_EVENT(ocfs2_remove_metadata_array);
+
+DEFINE_OCFS2_ULL_ULL_EVENT(ocfs2_remove_metadata_tree);
+
+DEFINE_OCFS2_ULL_ULL_UINT_UINT_EVENT(ocfs2_remove_block_from_cache);
+
+/* End of trace events for fs/ocfs2/uptodate.c. */
 #endif /* _TRACE_OCFS2_H */
 
 /* This part must be outside protection */