aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/syscall-counts.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions
a title='author Paul E. McKenney <paulmck@linux.vnet.ibm.com> 2009-08-22 16:56:45 -0400 committer Ingo Molnar <mingo@elte.hu> 2009-08-23 04:32:36 -0400 rcu: Move private definitions from include/linux/rcutree.h to kernel/rcutree.h' href='/cgit/cgit.cgi/litmus-rt-imx6.git/commit/kernel/rcutree_trace.c?id=9f77da9f40045253e91f55c12d4481254b513d2d'>9f77da9f4004
6258c4fb59e7

42c3533eee88

374b928ee806





























6ee0886ff6c8
c25e557f5d49







6ee0886ff6c8
c25e557f5d49
6ee0886ff6c8
c25e557f5d49

6ee0886ff6c8
c25e557f5d49
6ee0886ff6c8
c25e557f5d49




a46e0899eec7

d71df90eadfc



15ba0ba86087
d71df90eadfc

a46e0899eec7

64db4cfff99c

3fbfbf7a3b66

64db4cfff99c

42c3533eee88
64db4cfff99c

42c3533eee88
d7d6a11e8609
9b2e4f1880b7
23b5c8fa01b7
64db4cfff99c
23b5c8fa01b7
64db4cfff99c
2036d94a7b61
3fbfbf7a3b66


486e259340fc
3fbfbf7a3b66
0ac3d136b2e3





a46e0899eec7

62ab7072476a
d71df90eadfc


a46e0899eec7


c635a4e1c24e


64db4cfff99c

c011c41f11c4
878eda72e24d




c011c41f11c4
878eda72e24d


c011c41f11c4
878eda72e24d

c011c41f11c4
878eda72e24d
c011c41f11c4
878eda72e24d

c011c41f11c4
878eda72e24d
c011c41f11c4
878eda72e24d




7bd8f2a74bcb































0ea1f2ebeb21



5cf05ad758c3
0ea1f2ebeb21




d71df90eadfc
0ea1f2ebeb21
5cf05ad758c3

0ea1f2ebeb21

5cf05ad758c3
0ea1f2ebeb21

























29c67764f121
0ea1f2ebeb21


6ee0886ff6c8
0ea1f2ebeb21
64db4cfff99c

20133cfce7d0
64db4cfff99c


3397e040dfac
6ee0886ff6c8

42c3533eee88
64db4cfff99c
5cf05ad758c3

64db4cfff99c

b1420f1c8bfc
f885b7f2b2de
64db4cfff99c



12f5f524cafe
64db4cfff99c
12f5f524cafe


64db4cfff99c




6ee0886ff6c8
64db4cfff99c
6ee0886ff6c8

64db4cfff99c




6ee0886ff6c8
64db4cfff99c

9b2619aff033
64db4cfff99c


a608d84bdb83



15ba0ba86087









42c3533eee88


15ba0ba86087




6ee0886ff6c8

15ba0ba86087

6ee0886ff6c8
64db4cfff99c
6ee0886ff6c8

64db4cfff99c




6ee0886ff6c8
64db4cfff99c

9b2619aff033
64db4cfff99c


66b38bc52bd1



7ba5c840e64d

51d0f16d49f6

5cf05ad758c3
7ba5c840e64d

5cf05ad758c3

7ba5c840e64d
d21670acab9f
7ba5c840e64d
5cf05ad758c3
4605c0143c6d
7ba5c840e64d

7ba5c840e64d


c011c41f11c4
51d0f16d49f6




c011c41f11c4
51d0f16d49f6


c011c41f11c4
51d0f16d49f6

c011c41f11c4
51d0f16d49f6
c011c41f11c4
51d0f16d49f6

c011c41f11c4
51d0f16d49f6
c011c41f11c4
51d0f16d49f6




4a29865689db






















7ba5c840e64d
7ba5c840e64d
deb7a41815a8
64db4cfff99c
573bcd40d221
22f00b69f6a7
573bcd40d221
22f00b69f6a7
64db4cfff99c

22f00b69f6a7
64db4cfff99c
573bcd40d221



878eda72e24d
6ee0886ff6c8



51d0f16d49f6
7bd8f2a74bcb




6ee0886ff6c8



c25e557f5d49
6ee0886ff6c8



29c67764f121

6ee0886ff6c8


66b38bc52bd1

6ee0886ff6c8

66b38bc52bd1
6ee0886ff6c8



64db4cfff99c
6ee0886ff6c8




7ba5c840e64d
4a29865689db



64db4cfff99c

22f00b69f6a7
64db4cfff99c


deb7a41815a8
64db4cfff99c
22f00b69f6a7
64db4cfff99c


deb7a41815a8

64db4cfff99c



1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502





















                                                                             
                                 









                            
                         










                              
                        

                    

                                       





























                                                                           
                                                       







                                                               
                                                                  
 
                                                                    

 
                                                       
                             
                                




                               

                       



                                                               
                                       

 

                                    

                                                                        

                     

                             
                                                     

                                                        
                                                                      
                                                         
                                              
                                                         
                                                   
                                                       
                                      
                                                   


                                           
                                                
                           





                                                            

                                                                       
                                         


                                                                         


                                                                      


                                                            

 
                                                    




                                                    
                                                 


                         
                              

  
                                                               
 
                                                

 
                                                    
                             
                             




                               































                                                                                                     



                                                                              
                                                                            




                                                      
                                                                     
                                                           

                                         

                                                    
                                                                                

























                                                                      
                            


                                  
                                    
 

                                                                          
                            


                             
                           

                                                                 
                                  
                                                           

                                                                          

                                                         
                                                                  
                                                                               



                                           
                                                              
                                                        


                                                               




                                                                
                                                    
 

                                                               




                                                               
                                                                 

 
                                                    


                             



                               









                                                                     


                                                




                                                      

                                                                           

 
                                                  
 

                                                               




                                                             
                                                               

 
                                                  


                             



                               

                                                                           

                             
                                     

                                                        

                                                         
                                        
                                       
                                      
                                           
                                                 

                                          


                                           
                                                        




                                                       
                                                     


                         
                                  

  
                                                                   
 
                                                    

 
                                                        
                             
                                 




                               






















                                                                           
                             
 
                                          
 
                              
                              
                              
 

                                                 
                              
 



                                                               
 



                                                             
 




                                                            



                                                                 
 



                                                                

                       


                                                                      

                                              

                 
 



                                                           
 




                                                             
 



                                                                        

                 
                                         


                 
                                              
 
                                         


 

                                   



                                                                               
/*
 * Read-Copy Update tracing for classic implementation
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 * Copyright IBM Corporation, 2008
 *
 * Papers:  http://www.rdrop.com/users/paulmck/RCU
 *
 * For detailed explanation of Read-Copy Update mechanism see -
 *		Documentation/RCU
 *
 */
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/smp.h>
#include <linux/rcupdate.h>
#include <linux/interrupt.h>
#include <linux/sched.h>
#include <linux/atomic.h>
#include <linux/bitops.h>
#include <linux/module.h>
#include <linux/completion.h>
#include <linux/moduleparam.h>
#include <linux/percpu.h>
#include <linux/notifier.h>
#include <linux/cpu.h>
#include <linux/mutex.h>
#include <linux/debugfs.h>
#include <linux/seq_file.h>

#define RCU_TREE_NONCORE
#include "rcutree.h"

#define ulong2long(a) (*(long *)(&(a)))

static int r_open(struct inode *inode, struct file *file,
					const struct seq_operations *op)
{
	int ret = seq_open(file, op);
	if (!ret) {
		struct seq_file *m = (struct seq_file *)file->private_data;
		m->private = inode->i_private;
	}
	return ret;
}

static void *r_start(struct seq_file *m, loff_t *pos)
{
	struct rcu_state *rsp = (struct rcu_state *)m->private;
	*pos = cpumask_next(*pos - 1, cpu_possible_mask);
	if ((*pos) < nr_cpu_ids)
		return per_cpu_ptr(rsp->rda, *pos);
	return NULL;
}

static void *r_next(struct seq_file *m, void *v, loff_t *pos)
{
	(*pos)++;
	return r_start(m, pos);
}

static void r_stop(struct seq_file *m, void *v)
{
}

static int show_rcubarrier(struct seq_file *m, void *v)
{
	struct rcu_state *rsp = (struct rcu_state *)m->private;
	seq_printf(m, "bcc: %d nbd: %lu\n",
		   atomic_read(&rsp->barrier_cpu_count),
		   rsp->n_barrier_done);
	return 0;
}

static int rcubarrier_open(struct inode *inode, struct file *file)
{
	return single_open(file, show_rcubarrier, inode->i_private);
}

static const struct file_operations rcubarrier_fops = {
	.owner = THIS_MODULE,
	.open = rcubarrier_open,
	.read = seq_read,
	.llseek = no_llseek,
	.release = seq_release,
};

#ifdef CONFIG_RCU_BOOST

static char convert_kthread_status(unsigned int kthread_status)
{
	if (kthread_status > RCU_KTHREAD_MAX)
		return '?';
	return "SRWOY"[kthread_status];
}

#endif /* #ifdef CONFIG_RCU_BOOST */

static void print_one_rcu_data(struct seq_file *m, struct rcu_data *rdp)
{
	long ql, qll;

	if (!rdp->beenonline)
		return;
	seq_printf(m, "%3d%cc=%ld g=%ld pq=%d qp=%d",
		   rdp->cpu,
		   cpu_is_offline(rdp->cpu) ? '!' : ' ',
		   ulong2long(rdp->completed), ulong2long(rdp->gpnum),
		   rdp->passed_quiesce, rdp->qs_pending);
	seq_printf(m, " dt=%d/%llx/%d df=%lu",
		   atomic_read(&rdp->dynticks->dynticks),
		   rdp->dynticks->dynticks_nesting,
		   rdp->dynticks->dynticks_nmi_nesting,
		   rdp->dynticks_fqs);
	seq_printf(m, " of=%lu", rdp->offline_fqs);
	rcu_nocb_q_lengths(rdp, &ql, &qll);
	qll += rdp->qlen_lazy;
	ql += rdp->qlen;
	seq_printf(m, " ql=%ld/%ld qs=%c%c%c%c",
		   qll, ql,
		   ".N"[rdp->nxttail[RCU_NEXT_READY_TAIL] !=
			rdp->nxttail[RCU_NEXT_TAIL]],
		   ".R"[rdp->nxttail[RCU_WAIT_TAIL] !=
			rdp->nxttail[RCU_NEXT_READY_TAIL]],
		   ".W"[rdp->nxttail[RCU_DONE_TAIL] !=
			rdp->nxttail[RCU_WAIT_TAIL]],
		   ".D"[&rdp->nxtlist != rdp->nxttail[RCU_DONE_TAIL]]);
#ifdef CONFIG_RCU_BOOST
	seq_printf(m, " kt=%d/%c ktl=%x",
		   per_cpu(rcu_cpu_has_work, rdp->cpu),
		   convert_kthread_status(per_cpu(rcu_cpu_kthread_status,
					  rdp->cpu)),
		   per_cpu(rcu_cpu_kthread_loops, rdp->cpu) & 0xffff);
#endif /* #ifdef CONFIG_RCU_BOOST */
	seq_printf(m, " b=%ld", rdp->blimit);
	seq_printf(m, " ci=%lu nci=%lu co=%lu ca=%lu\n",
		   rdp->n_cbs_invoked, rdp->n_nocbs_invoked,
		   rdp->n_cbs_orphaned, rdp->n_cbs_adopted);
}

static int show_rcudata(struct seq_file *m, void *v)
{
	print_one_rcu_data(m, (struct rcu_data *)v);
	return 0;
}

static const struct seq_operations rcudate_op = {
	.start = r_start,
	.next  = r_next,
	.stop  = r_stop,
	.show  = show_rcudata,
};

static int rcudata_open(struct inode *inode, struct file *file)
{
	return r_open(inode, file, &rcudate_op);
}

static const struct file_operations rcudata_fops = {
	.owner = THIS_MODULE,
	.open = rcudata_open,
	.read = seq_read,
	.llseek = no_llseek,
	.release = seq_release,
};

static int show_rcuexp(struct seq_file *m, void *v)
{
	struct rcu_state *rsp = (struct rcu_state *)m->private;

	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",
		   atomic_long_read(&rsp->expedited_start),
		   atomic_long_read(&rsp->expedited_done),
		   atomic_long_read(&rsp->expedited_wrap),
		   atomic_long_read(&rsp->expedited_tryfail),
		   atomic_long_read(&rsp->expedited_workdone1),
		   atomic_long_read(&rsp->expedited_workdone2),
		   atomic_long_read(&rsp->expedited_normal),
		   atomic_long_read(&rsp->expedited_stoppedcpus),
		   atomic_long_read(&rsp->expedited_done_tries),
		   atomic_long_read(&rsp->expedited_done_lost),
		   atomic_long_read(&rsp->expedited_done_exit));
	return 0;
}

static int rcuexp_open(struct inode *inode, struct file *file)
{
	return single_open(file, show_rcuexp, inode->i_private);
}

static const struct file_operations rcuexp_fops = {
	.owner = THIS_MODULE,
	.open = rcuexp_open,
	.read = seq_read,
	.llseek = no_llseek,
	.release = seq_release,
};

#ifdef CONFIG_RCU_BOOST

static void print_one_rcu_node_boost(struct seq_file *m, struct rcu_node *rnp)
{
	seq_printf(m, "%d:%d tasks=%c%c%c%c kt=%c ntb=%lu neb=%lu nnb=%lu ",
		   rnp->grplo, rnp->grphi,
		   "T."[list_empty(&rnp->blkd_tasks)],
		   "N."[!rnp->gp_tasks],
		   "E."[!rnp->exp_tasks],
		   "B."[!rnp->boost_tasks],
		   convert_kthread_status(rnp->boost_kthread_status),
		   rnp->n_tasks_boosted, rnp->n_exp_boosts,
		   rnp->n_normal_boosts);
	seq_printf(m, "j=%04x bt=%04x\n",
		   (int)(jiffies & 0xffff),
		   (int)(rnp->boost_time & 0xffff));
	seq_printf(m, "    balk: nt=%lu egt=%lu bt=%lu nb=%lu ny=%lu nos=%lu\n",
		   rnp->n_balk_blkd_tasks,
		   rnp->n_balk_exp_gp_tasks,
		   rnp->n_balk_boost_tasks,
		   rnp->n_balk_notblocked,
		   rnp->n_balk_notyet,
		   rnp->n_balk_nos);
}

static int show_rcu_node_boost(struct seq_file *m, void *unused)
{
	struct rcu_node *rnp;

	rcu_for_each_leaf_node(&rcu_preempt_state, rnp)
		print_one_rcu_node_boost(m, rnp);
	return 0;
}

static int rcu_node_boost_open(struct inode *inode, struct file *file)
{
	return single_open(file, show_rcu_node_boost, NULL);
}

static const struct file_operations rcu_node_boost_fops = {
	.owner = THIS_MODULE,
	.open = rcu_node_boost_open,
	.read = seq_read,
	.llseek = no_llseek,
	.release = single_release,
};

#endif /* #ifdef CONFIG_RCU_BOOST */

static void print_one_rcu_state(struct seq_file *m, struct rcu_state *rsp)
{
	unsigned long gpnum;
	int level = 0;
	struct rcu_node *rnp;

	gpnum = rsp->gpnum;
	seq_printf(m, "c=%ld g=%ld s=%d jfq=%ld j=%x ",
		   ulong2long(rsp->completed), ulong2long(gpnum),
		   rsp->fqs_state,
		   (long)(rsp->jiffies_force_qs - jiffies),
		   (int)(jiffies & 0xffff));
	seq_printf(m, "nfqs=%lu/nfqsng=%lu(%lu) fqlh=%lu oqlen=%ld/%ld\n",
		   rsp->n_force_qs, rsp->n_force_qs_ngp,
		   rsp->n_force_qs - rsp->n_force_qs_ngp,
		   rsp->n_force_qs_lh, rsp->qlen_lazy, rsp->qlen);