diff options
author | Michael Wang <wangyun@linux.vnet.ibm.com> | 2012-10-08 04:59:19 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-11-08 14:55:45 -0500 |
commit | a608d84bdb832a86ad3fdb0767df31fcda9fe280 (patch) | |
tree | 75b3955c220d9fccb295cdefb5b31beae27315c9 /kernel/rcutree_trace.c | |
parent | 66b38bc52bd1e0d00987e23bf7153c46201ff2ba (diff) |
rcu: split 'rcuhier' to each flavor
This patch add new 'rcuhier' to each flavor's folder, now we could use:
'cat /debugfs/rcu/rsp/rcuhier'
to get the selected rsp info.
Signed-off-by: Michael Wang <wangyun@linux.vnet.ibm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree_trace.c')
-rw-r--r-- | kernel/rcutree_trace.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c index c90d2a917def..107997ecdeeb 100644 --- a/kernel/rcutree_trace.c +++ b/kernel/rcutree_trace.c | |||
@@ -316,6 +316,26 @@ static const struct file_operations rcuhier_fops = { | |||
316 | .release = single_release, | 316 | .release = single_release, |
317 | }; | 317 | }; |
318 | 318 | ||
319 | static int new_show_rcuhier(struct seq_file *m, void *v) | ||
320 | { | ||
321 | struct rcu_state *rsp = (struct rcu_state *)m->private; | ||
322 | print_one_rcu_state(m, rsp); | ||
323 | return 0; | ||
324 | } | ||
325 | |||
326 | static int new_rcuhier_open(struct inode *inode, struct file *file) | ||
327 | { | ||
328 | return single_open(file, new_show_rcuhier, inode->i_private); | ||
329 | } | ||
330 | |||
331 | static const struct file_operations new_rcuhier_fops = { | ||
332 | .owner = THIS_MODULE, | ||
333 | .open = new_rcuhier_open, | ||
334 | .read = seq_read, | ||
335 | .llseek = no_llseek, | ||
336 | .release = seq_release, | ||
337 | }; | ||
338 | |||
319 | static void show_one_rcugp(struct seq_file *m, struct rcu_state *rsp) | 339 | static void show_one_rcugp(struct seq_file *m, struct rcu_state *rsp) |
320 | { | 340 | { |
321 | unsigned long flags; | 341 | unsigned long flags; |
@@ -494,6 +514,10 @@ static int __init rcutree_trace_init(void) | |||
494 | if (!retval) | 514 | if (!retval) |
495 | goto free_out; | 515 | goto free_out; |
496 | 516 | ||
517 | retval = debugfs_create_file("rcuhier", 0444, | ||
518 | rspdir, rsp, &new_rcuhier_fops); | ||
519 | if (!retval) | ||
520 | goto free_out; | ||
497 | } | 521 | } |
498 | 522 | ||
499 | retval = debugfs_create_file("rcubarrier", 0444, rcudir, | 523 | retval = debugfs_create_file("rcubarrier", 0444, rcudir, |