aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcutree_trace.c
diff options
context:
space:
mode:
authorMichael Wang <wangyun@linux.vnet.ibm.com>2012-09-19 20:51:05 -0400
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-11-08 14:50:16 -0500
commitd29200efa2ad7a1dc516a1048faf98dcc01b9fef (patch)
tree479df2431123bf27309da8f88ff3774ef931486c /kernel/rcutree_trace.c
parent878eda72e24d11e463a25b1dc7097a8d953f17cb (diff)
rcu: Optimize the 'rcudata.csv' for RCU trace
This patch implements the new 'rcudata.csv' interface under each rsp directory, by using the 'CPU units sequence reading', thus avoiding loss of tracing data. 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.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/kernel/rcutree_trace.c b/kernel/rcutree_trace.c
index a11522f62c71..e387a642632b 100644
--- a/kernel/rcutree_trace.c
+++ b/kernel/rcutree_trace.c
@@ -267,6 +267,43 @@ static const struct file_operations rcudata_csv_fops = {
267 .release = single_release, 267 .release = single_release,
268}; 268};
269 269
270static int new_show_rcudata_csv(struct seq_file *m, void *v)
271{
272 struct rcu_data *rdp = (struct rcu_data *)v;
273 if (cpumask_first(cpu_possible_mask) == rdp->cpu) {
274 seq_puts(m, "\"CPU\",\"Online?\",\"c\",\"g\",\"pq\",\"pq\",");
275 seq_puts(m, "\"dt\",\"dt nesting\",\"dt NMI nesting\",\"df\",");
276 seq_puts(m, "\"of\",\"qll\",\"ql\",\"qs\"");
277#ifdef CONFIG_RCU_BOOST
278 seq_puts(m, "\"kt\",\"ktl\"");
279#endif /* #ifdef CONFIG_RCU_BOOST */
280 seq_puts(m, ",\"b\",\"ci\",\"co\",\"ca\"\n");
281 }
282
283 print_one_rcu_data_csv(m, rdp);
284 return 0;
285}
286
287static const struct seq_operations new_rcudate_csv_op = {
288 .start = r_start,
289 .next = r_next,
290 .stop = r_stop,
291 .show = new_show_rcudata_csv,
292};
293
294static int new_rcudata_csv_open(struct inode *inode, struct file *file)
295{
296 return r_open(inode, file, &new_rcudate_csv_op);
297}
298
299static const struct file_operations new_rcudata_csv_fops = {
300 .owner = THIS_MODULE,
301 .open = new_rcudata_csv_open,
302 .read = seq_read,
303 .llseek = no_llseek,
304 .release = seq_release,
305};
306
270#ifdef CONFIG_RCU_BOOST 307#ifdef CONFIG_RCU_BOOST
271 308
272static void print_one_rcu_node_boost(struct seq_file *m, struct rcu_node *rnp) 309static void print_one_rcu_node_boost(struct seq_file *m, struct rcu_node *rnp)
@@ -519,6 +556,11 @@ static int __init rcutree_trace_init(void)
519 rspdir, rsp, &new_rcudata_fops); 556 rspdir, rsp, &new_rcudata_fops);
520 if (!retval) 557 if (!retval)
521 goto free_out; 558 goto free_out;
559
560 retval = debugfs_create_file("rcudata.csv", 0444,
561 rspdir, rsp, &new_rcudata_csv_fops);
562 if (!retval)
563 goto free_out;
522 } 564 }
523 565
524 retval = debugfs_create_file("rcubarrier", 0444, rcudir, 566 retval = debugfs_create_file("rcubarrier", 0444, rcudir,