2011-06-18 06:53:19 +08:00
|
|
|
#undef TRACE_SYSTEM
|
|
|
|
#define TRACE_SYSTEM rcu
|
|
|
|
|
|
|
|
#if !defined(_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ)
|
|
|
|
#define _TRACE_RCU_H
|
|
|
|
|
|
|
|
#include <linux/tracepoint.h>
|
|
|
|
|
|
|
|
/*
|
2011-06-19 13:26:31 +08:00
|
|
|
* Tracepoint for start/end markers used for utilization calculations.
|
|
|
|
* By convention, the string is of the following forms:
|
|
|
|
*
|
|
|
|
* "Start <activity>" -- Mark the start of the specified activity,
|
|
|
|
* such as "context switch". Nesting is permitted.
|
|
|
|
* "End <activity>" -- Mark the end of the specified activity.
|
2011-06-22 13:43:26 +08:00
|
|
|
*
|
|
|
|
* An "@" character within "<activity>" is a comment character: Data
|
|
|
|
* reduction scripts will ignore the "@" and the remainder of the line.
|
2011-06-19 13:26:31 +08:00
|
|
|
*/
|
|
|
|
TRACE_EVENT(rcu_utilization,
|
|
|
|
|
|
|
|
TP_PROTO(char *s),
|
|
|
|
|
|
|
|
TP_ARGS(s),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
|
|
|
__field(char *, s)
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
|
|
|
__entry->s = s;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("%s", __entry->s)
|
|
|
|
);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Tracepoint for marking the beginning rcu_do_batch, performed to start
|
2011-06-21 16:14:54 +08:00
|
|
|
* RCU callback invocation. The first argument is the RCU flavor,
|
|
|
|
* the second is the total number of callbacks (including those that
|
|
|
|
* are not yet ready to be invoked), and the third argument is the
|
|
|
|
* current RCU-callback batch limit.
|
2011-06-18 06:53:19 +08:00
|
|
|
*/
|
|
|
|
TRACE_EVENT(rcu_batch_start,
|
|
|
|
|
2011-06-21 16:14:54 +08:00
|
|
|
TP_PROTO(char *rcuname, long qlen, int blimit),
|
2011-06-18 06:53:19 +08:00
|
|
|
|
2011-06-21 16:14:54 +08:00
|
|
|
TP_ARGS(rcuname, qlen, blimit),
|
2011-06-18 06:53:19 +08:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-06-21 16:14:54 +08:00
|
|
|
__field(char *, rcuname)
|
2011-06-19 13:26:31 +08:00
|
|
|
__field(long, qlen)
|
|
|
|
__field(int, blimit)
|
2011-06-18 06:53:19 +08:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-06-21 16:14:54 +08:00
|
|
|
__entry->rcuname = rcuname;
|
2011-06-19 13:26:31 +08:00
|
|
|
__entry->qlen = qlen;
|
|
|
|
__entry->blimit = blimit;
|
2011-06-18 06:53:19 +08:00
|
|
|
),
|
|
|
|
|
2011-06-21 16:14:54 +08:00
|
|
|
TP_printk("%s CBs=%ld bl=%d",
|
|
|
|
__entry->rcuname, __entry->qlen, __entry->blimit)
|
2011-06-18 06:53:19 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
/*
|
2011-06-19 13:26:31 +08:00
|
|
|
* Tracepoint for the invocation of a single RCU callback function.
|
|
|
|
* The argument is a pointer to the RCU callback itself.
|
2011-06-18 06:53:19 +08:00
|
|
|
*/
|
|
|
|
TRACE_EVENT(rcu_invoke_callback,
|
|
|
|
|
|
|
|
TP_PROTO(struct rcu_head *rhp),
|
|
|
|
|
|
|
|
TP_ARGS(rhp),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-06-19 13:26:31 +08:00
|
|
|
__field(void *, rhp)
|
|
|
|
__field(void *, func)
|
2011-06-18 06:53:19 +08:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-06-19 13:26:31 +08:00
|
|
|
__entry->rhp = rhp;
|
|
|
|
__entry->func = rhp->func;
|
2011-06-18 06:53:19 +08:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("rhp=%p func=%pf", __entry->rhp, __entry->func)
|
|
|
|
);
|
|
|
|
|
|
|
|
/*
|
2011-06-19 13:26:31 +08:00
|
|
|
* Tracepoint for the invocation of a single RCU callback of the special
|
|
|
|
* kfree() form. The first argument is a pointer to the RCU callback
|
|
|
|
* and the second argument is the offset of the callback within the
|
|
|
|
* enclosing RCU-protected data structure.
|
2011-06-18 06:53:19 +08:00
|
|
|
*/
|
|
|
|
TRACE_EVENT(rcu_invoke_kfree_callback,
|
|
|
|
|
|
|
|
TP_PROTO(struct rcu_head *rhp, unsigned long offset),
|
|
|
|
|
|
|
|
TP_ARGS(rhp, offset),
|
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-06-19 13:26:31 +08:00
|
|
|
__field(void *, rhp)
|
|
|
|
__field(unsigned long, offset)
|
2011-06-18 06:53:19 +08:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-06-19 13:26:31 +08:00
|
|
|
__entry->rhp = rhp;
|
2011-06-18 06:53:19 +08:00
|
|
|
__entry->offset = offset;
|
|
|
|
),
|
|
|
|
|
|
|
|
TP_printk("rhp=%p func=%ld", __entry->rhp, __entry->offset)
|
|
|
|
);
|
|
|
|
|
|
|
|
/*
|
2011-06-19 13:26:31 +08:00
|
|
|
* Tracepoint for exiting rcu_do_batch after RCU callbacks have been
|
2011-06-21 16:14:54 +08:00
|
|
|
* invoked. The first argument is the name of the RCU flavor and
|
|
|
|
* the second argument is number of callbacks actually invoked.
|
2011-06-18 06:53:19 +08:00
|
|
|
*/
|
|
|
|
TRACE_EVENT(rcu_batch_end,
|
|
|
|
|
2011-06-21 16:14:54 +08:00
|
|
|
TP_PROTO(char *rcuname, int callbacks_invoked),
|
2011-06-18 06:53:19 +08:00
|
|
|
|
2011-06-21 16:14:54 +08:00
|
|
|
TP_ARGS(rcuname, callbacks_invoked),
|
2011-06-18 06:53:19 +08:00
|
|
|
|
|
|
|
TP_STRUCT__entry(
|
2011-06-21 16:14:54 +08:00
|
|
|
__field(char *, rcuname)
|
2011-06-19 13:26:31 +08:00
|
|
|
__field(int, callbacks_invoked)
|
2011-06-18 06:53:19 +08:00
|
|
|
),
|
|
|
|
|
|
|
|
TP_fast_assign(
|
2011-06-21 16:14:54 +08:00
|
|
|
__entry->rcuname = rcuname;
|
2011-06-19 13:26:31 +08:00
|
|
|
__entry->callbacks_invoked = callbacks_invoked;
|
2011-06-18 06:53:19 +08:00
|
|
|
),
|
|
|
|
|
2011-06-21 16:14:54 +08:00
|
|
|
TP_printk("%s CBs-invoked=%d",
|
|
|
|
__entry->rcuname, __entry->callbacks_invoked)
|
2011-06-18 06:53:19 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
#endif /* _TRACE_RCU_H */
|
|
|
|
|
|
|
|
/* This part must be outside protection */
|
|
|
|
#include <trace/define_trace.h>
|