aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_trace.c
diff options
context:
space:
mode:
authorPaul E. McKenney <paul.mckenney@linaro.org>2012-10-11 20:14:32 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-11-08 14:57:07 -0500
commit7bd8f2a74bcbd39f4277766f4d49441c45dd10a0 (patch)
tree53b348112b73c8d2d1224250096d8aaacc7c7c5a /kernel/rcutree_trace.c
parent6ee0886ff6c81526bf6ad8521d843b934aafa5aa (diff)
rcu: Add tracing for synchronize_sched_expedited()
This commit adds a per-RCU-flavor "rcuexp" file that dumps out statistics for synchonize_sched_expedited(). Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree_trace.c')
-rw-r--r--kernel/rcutree_trace.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
index 967115c508bc..f9512687a6e5 100644
--- a/kernel/rcutree_trace.c
+++ b/kernel/rcutree_trace.c
@@ -173,6 +173,38 @@ static const struct file_operations rcudata_fops = {
173 .release = seq_release, 173 .release = seq_release,
174}; 174};
175 175
176static int show_rcuexp(struct seq_file *m, void *v)
177{
178 struct rcu_state *rsp = (struct rcu_state *)m->private;
179
180 seq_printf(m, "s=%lu d=%lu w=%lu tf=%lu wd1=%lu wd2=%lu n=%lu sc=%lu dt=%lu dl=%lu dx=%lu\n",
181 atomic_long_read(&rsp->expedited_start),
182 atomic_long_read(&rsp->expedited_done),
183 atomic_long_read(&rsp->expedited_wrap),
184 atomic_long_read(&rsp->expedited_tryfail),
185 atomic_long_read(&rsp->expedited_workdone1),
186 atomic_long_read(&rsp->expedited_workdone2),
187 atomic_long_read(&rsp->expedited_normal),
188 atomic_long_read(&rsp->expedited_stoppedcpus),
189 atomic_long_read(&rsp->expedited_done_tries),
190 atomic_long_read(&rsp->expedited_done_lost),
191 atomic_long_read(&rsp->expedited_done_exit));
192 return 0;
193}
194
195static int rcuexp_open(struct inode *inode, struct file *file)
196{
197 return single_open(file, show_rcuexp, inode->i_private);
198}
199
200static const struct file_operations rcuexp_fops = {
201 .owner = THIS_MODULE,
202 .open = rcuexp_open,
203 .read = seq_read,
204 .llseek = no_llseek,
205 .release = seq_release,
206};
207
176#ifdef CONFIG_RCU_BOOST 208#ifdef CONFIG_RCU_BOOST
177 209
178static void print_one_rcu_node_boost(struct seq_file *m, struct rcu_node *rnp) 210static void print_one_rcu_node_boost(struct seq_file *m, struct rcu_node *rnp)
@@ -405,6 +437,11 @@ static int __init rcutree_trace_init(void)
405 if (!retval) 437 if (!retval)
406 goto free_out; 438 goto free_out;
407 439
440 retval = debugfs_create_file("rcuexp", 0444,
441 rspdir, rsp, &rcuexp_fops);
442 if (!retval)
443 goto free_out;
444
408 retval = debugfs_create_file("rcu_pending", 0444, 445 retval = debugfs_create_file("rcu_pending", 0444,
409 rspdir, rsp, &rcu_pending_fops); 446 rspdir, rsp, &rcu_pending_fops);
410 if (!retval) 447 if (!retval)