-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
For now just a few simple events to trace the layout stateid lifetime, but these already were enough to find several bugs in the Linux client layout stateid handling. Signed-off-by: Christoph Hellwig <hch@lst.de>
- Loading branch information
Christoph Hellwig
committed
Feb 2, 2015
1 parent
18d1aef
commit 31ef83d
Showing
5 changed files
with
85 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
#include "state.h" | ||
|
||
#define CREATE_TRACE_POINTS | ||
#include "trace.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright (c) 2014 Christoph Hellwig. | ||
*/ | ||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM nfsd | ||
|
||
#if !defined(_NFSD_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) | ||
#define _NFSD_TRACE_H | ||
|
||
#include <linux/tracepoint.h> | ||
|
||
DECLARE_EVENT_CLASS(nfsd_stateid_class, | ||
TP_PROTO(stateid_t *stp), | ||
TP_ARGS(stp), | ||
TP_STRUCT__entry( | ||
__field(u32, cl_boot) | ||
__field(u32, cl_id) | ||
__field(u32, si_id) | ||
__field(u32, si_generation) | ||
), | ||
TP_fast_assign( | ||
__entry->cl_boot = stp->si_opaque.so_clid.cl_boot; | ||
__entry->cl_id = stp->si_opaque.so_clid.cl_id; | ||
__entry->si_id = stp->si_opaque.so_id; | ||
__entry->si_generation = stp->si_generation; | ||
), | ||
TP_printk("client %08x:%08x stateid %08x:%08x", | ||
__entry->cl_boot, | ||
__entry->cl_id, | ||
__entry->si_id, | ||
__entry->si_generation) | ||
) | ||
|
||
#define DEFINE_STATEID_EVENT(name) \ | ||
DEFINE_EVENT(nfsd_stateid_class, name, \ | ||
TP_PROTO(stateid_t *stp), \ | ||
TP_ARGS(stp)) | ||
DEFINE_STATEID_EVENT(layoutstate_alloc); | ||
DEFINE_STATEID_EVENT(layoutstate_unhash); | ||
DEFINE_STATEID_EVENT(layoutstate_free); | ||
DEFINE_STATEID_EVENT(layout_get_lookup_fail); | ||
DEFINE_STATEID_EVENT(layout_commit_lookup_fail); | ||
DEFINE_STATEID_EVENT(layout_return_lookup_fail); | ||
DEFINE_STATEID_EVENT(layout_recall); | ||
DEFINE_STATEID_EVENT(layout_recall_done); | ||
DEFINE_STATEID_EVENT(layout_recall_fail); | ||
DEFINE_STATEID_EVENT(layout_recall_release); | ||
|
||
#endif /* _NFSD_TRACE_H */ | ||
|
||
#undef TRACE_INCLUDE_PATH | ||
#define TRACE_INCLUDE_PATH . | ||
#define TRACE_INCLUDE_FILE trace | ||
#include <trace/define_trace.h> |