aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-06-17 22:55:03 -0400
committerDave Airlie <airlied@redhat.com>2015-06-17 22:55:03 -0400
commit2aeab6884b77459029f37a1d7f741a296e5c3f5f (patch)
tree724261d8f2e1cc12553563ccd8b1786911ad5ef8 /tools
parentc861acc4d5fc249a0febf38dfebbb431b21628dd (diff)
parent4946b0430c6933383d33adf101529b7085a4a682 (diff)
Merge tag 'drm/panel/for-4.2-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next
drm/panel: Changes for v4.2-rc1 This contains fixes for the long-standing build issues that some of the bridge drivers were exposing. Other than that it's mostly cleanup and a couple of new simple panels that are supported. * tag 'drm/panel/for-4.2-rc1' of git://anongit.freedesktop.org/tegra/linux: drm/panel: simple: Add bus format for HannStar HSD100PXN1 drm/panel: simple: Add display timing for HannStar HSD100PXN1 drm/panel: ld9040: Remove useless padding drm/panel: Constify OF match tables drm/bridge: Remove stale ptn3460.h include drm/bridge: ps8622: Include linux/gpio/consumer.h drm/bridge: ptn3460: Include linux/gpio/consumer.h drm/bridge: dw-hdmi: Return number of EDID modes drm/panel: simple: Add support for LG LB070WV8 800x480 7" panel drm/bridge: ptn3460: Pass flags to devm_gpiod_get() drm/bridge: ps8622: Pass flags to devm_gpiod_get() drm/bridge: ptn3460: Fix I2C ID table to match the reported modalias drm/bridge: dw-hdmi: Staticize dw_hdmi_bridge_funcs
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
thor Jonathan Herman <hermanjl@cs.unc.edu> 2013-03-19 16:27:10 -0400 committer Jonathan Herman <hermanjl@cs.unc.edu> 2013-03-19 16:27:10 -0400 Formatted rest of README.' href='/cgit/cgit.cgi/experiment-scripts.git/commit/README.md?id=2e38d7072c8c6ab21349db87cc21255c81c3cd19'>2e38d70
7875daa
b1860fc
7875daa



4f97e3e
37a410a

4f97e3e

7875daa

4f97e3e





7875daa
4f97e3e
2e38d70
7875daa
4f97e3e




4162cc0
4f97e3e




7875daa
4f97e3e
7875daa
4f97e3e
7875daa
4f97e3e



7875daa


37a410a
7875daa




37a410a
7875daa












4f97e3e

7875daa
4f97e3e
7875daa
4f97e3e
7875daa
2e38d70
4f97e3e
7875daa
4f97e3e
7875daa
4f97e3e
7875daa
4f97e3e
7875daa
4f97e3e
94cc659
4f97e3e
7875daa
4f97e3e

7875daa
4f97e3e
94cc659
4f97e3e
7875daa
4f97e3e

2e38d70
37a410a
4f97e3e


7875daa
4f97e3e
37a410a














b1860fc
4f97e3e
7875daa
4f97e3e

2e38d70
7875daa







2e38d70
4f97e3e
7875daa
4f97e3e
cb0dda9
4f97e3e
2e38d70




7875daa
4f97e3e
b1860fc
37a410a


4f97e3e
2e38d70

4f97e3e
b1860fc
4f97e3e
2e38d70
4f97e3e
b1860fc
4f97e3e
b1860fc
2e38d70
b1860fc
2e38d70

4f97e3e

2e38d70
4f97e3e
2e38d70
4f97e3e
2e38d70
4f97e3e

2ddd4b0
4f97e3e




2ddd4b0
4f97e3e





2e38d70
4f97e3e
2ddd4b0
4f97e3e
2e38d70
4f97e3e



2e38d70
4f97e3e
2e38d70
4f97e3e
2e38d70
2ddd4b0
4f97e3e

2e38d70
4f97e3e


2e38d70
2ddd4b0
4f97e3e

2e38d70
4f97e3e
b1860fc
4f97e3e
2e38d70
2ddd4b0
4f97e3e

2e38d70
4f97e3e
2e38d70
4f97e3e
2e38d70
4f97e3e


2e38d70
4f97e3e
2e38d70
4f97e3e
2e38d70
2ddd4b0
4f97e3e


2e38d70
4f97e3e
cb0dda9
2e38d70

cb0dda9
2e38d70


b1860fc
2e38d70
b1860fc
2e38d70
cb0dda9
2e38d70


cb0dda9
4f97e3e
625e0f2
4f97e3e
2e38d70
4f97e3e
2e38d70
4f97e3e

cb0dda9
4f97e3e




cb0dda9
4f97e3e


2e38d70
4f97e3e
2e38d70
4f97e3e
2e38d70
4f97e3e







2e38d70
4f97e3e
2e38d70
4f97e3e
2e38d70
4f97e3e
2e38d70
4f97e3e


















2e38d70
4f97e3e
2e38d70
4f97e3e
b1860fc
4f97e3e
2e38d70
cb0dda9
4f97e3e
cb0dda9
2e38d70
cb0dda9
2e38d70



4f97e3e
cb0dda9
4f97e3e
cb0dda9
4f97e3e
cb0dda9
4f97e3e
625e0f2
4f97e3e
2e38d70
4f97e3e
2e38d70
4f97e3e

2e38d70

4f97e3e




2e38d70
4f97e3e

2e38d70

4f97e3e






2e38d70
4f97e3e

2e38d70

4f97e3e










2e38d70
4f97e3e
2e38d70
4f97e3e
2e38d70
4f97e3e







2e38d70
4f97e3e
2e38d70
4f97e3e
7875daa




b1860fc
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

                                                                                                                                                
 




















                                                                                                                                                                                                                                                                                                                                      
 



                                                                                                        
 






                                                                                                                                                                                                                                                                                                                                                           


                                                                            






                                                                                                 
                                                                                                                                                     
 
 























                                                                                                             
                                                                                                     
 
                                                                                                                                                                                                                                                                                                                                                                                                                                                               



                                                                                                                                                                                                                                                                                                                                                                                                                            
 

                                                                                                                                                                            

                                                     

                





                                                         
   
 
                
         




                                         
                




                                                
   
 
                                                                                                                
 
       



                                   


                                           
                                                 




                                                                                 
                                               












                                                                              

                                                        
   
 
                                                                    
 
       
                                  
                   
   
 
                                                                                                                                                                                                                                               
 
       
                                                   
   
 
                                                                                                      
 
       

                                                           
   
 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
 
       

                                                           
                                                                
                                    


                                                                 
   
 














                                                                                                                                                                                                                                                                                                                                                       
                                                                                                                                                                                                                                                                                                                          
 
       

            
                                            







                                               
                                             
                              
   
 
                                                                                                                                                                                                                                                                           
 




                               
   
 
                                                                                                                                                                                                                                                                                                                                                                                                                                                         


                                                       
 

                                                                                
 
                                                                         
 
                                                               
 
                                                                                                                                                                                                                                                                                                         
 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
 
                                                                     

       

                   
   
 
                                                                                                                                                                                                                                                                                                     
 
       

                            
                                                




                                         
                                                





                                                      
   
 
                                                                                                                                                                                                                
 
       



                                                        
   
 
                                                                                                                                                                    
 
       
                               

                           
   


                                                                
       
                                              

                                                        
   
 
                                                                                                                                                                                                                                                        
 
       
                                        

                                            
   
 
                                                                                                  
 
       


                                                                
   
 
                                                                                                 
 
       
                                    


                                                                      
   
 
                

                                                             
                                                                                                             


                                                                                                                                                                          
                                                                                                                                     
 
                                                                                                                                                                                                                        
 
                                                                                                                                                                                                                                                                                                                                                                                                          


                                                             
                                                                                                                                                                                                                                                                                                                                                                                                                                        
 
                                                                                  
 
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
 
       

                                                                          
               




                                  
                             


                                                                     
   
 
                                                                                                                                                                                                           
 
       







                                                         
   
 
                                                                                             
 
                                                                                                                                                                                                                                                                                                                                                                           
 
       


















                                                                     
   
 
                                                                                                                                                                                                                                                                                                                                       
 
                                                                                                                                                                                                                                                                                                                      
 
               
                                              
 
                                                                                               
   
                    



                 
 
                                           
 
                                                                                                                                                                                                   
 
                                                 
 
                                                                                                                                                                                                                                                                                                                                         
 
                                                                                                                                                                                                                                                                                                                                                             
 
                                                                                                                                                                                                                                                                                                                                         

                            

       




                   
   

                                      

       






                      
   

                                     

       










                                                                                   
   
 
                                                                                                             
 
       







                                                       
   
 
                                                                                                                                                                                                         
 




                                                                       
                                    
# About
These Python scripts provide a common way for creating, running, parsing, and plotting experiments using [LITMUS^RT][litmus]. These scripts are:

1. `gen_exps.py`: for creating sets of experiments
2. `run_exps.py`: for running and tracing experiments
3. `parse_exps.py`: for parsing LITMUS^RT trace data
4. `plot_exps.py`: for plotting directories of csv data

They are designed with the following principles in mind:

1. Little or no configuration: all scripts use certain parameters to configure behavior. However, if the user does not give these parameters, the scripts will examine the properties of the user's system to pick a suitable default. Requiring user input is a last resort.

2. Interruptability: the scripts save their work as they evaluate multiple directories. When the scripts are interrupted, or if new data is added to those directories, the scripts can be re-run and they will resume where they left off. This vastly decreases turnaround time for testing new features.

3. Maximum Safety: where possible, scripts save metadata in their output directories about the data contained. This metadata can be used by the other scripts to safely use the data later.

4. Independence / legacy support: none of these scripts assume their input was generated by another of these scripts. Three are designed to recognize generic input formats inspired by past LITMUS^RT experimental setups. (The exception to this is gen_exps.py, which has only user intput and creates output only for run_exps.py)

5. Save everything: all output and parameters (even from subprocesses) is saved for debugging / reproducability. This data is saved in tmp/ directories while scripts are running in case scripts fail.

# Dependencies
These scripts were tested using Python 2.7.2. They have not been tested using Python 3. The [Matplotlib][matplotlib] Python library is needed for plotting.

The `run_exps.py` script should almost always be run using a LITMUS^RT kernel. In addition to the kernel, the following LITMUS-related repos must be in the user's `PATH`:

1. [liblitmus][liblitmus]: for real-time executable simulation and task set release
2. [feather-trace-tools][feather-trace-tools]: for recording and parsing overheads and scheduling events

Additional features will be enabled if these repos are present in the `PATH`:

1. [rt-kernelshark][rt-kernelshark]: to record ftrace events for kernelshark visualization
2. sched_trace ([UNC internal][rtunc]) to output a file containing scheduling events as strings

# Details
Each of these scripts is designed to operate independently of the others. For example, `parse_exps.py` will find any feather trace files resembling `ft-xyz.bin` or `xyz.ft` and print out overhead statistics for the records inside. However, the scripts provide the most features (especially safety) when their results are chained together, like so:

```
gen_exps.py --> [exps/*] --> run_exps.py  --> [run-data/*] --.
.------------------------------------------------------------'
'--> parse_exps.py --> [parse-data/*] --> plot_exps.py --> [plot-data/*.pdf]
```

1. Create experiments with `gen_exps.py` or some other script.
2. Run experiments using `run_exps.py`, generating binary files in `run-data/`.
3. Parse binary data in `run-data/` using `parse_exps.py`, generating csv files in `parse-data/`.
4. Plot `parse-data` using `plot_exps.py`, generating pdfs in `plot-data/`.

Each of these scripts will be described. The `run_exps.py` script is first because `gen_exps.py` creates schedule files that depend on `run_exps.py`.


## run_exps.py
*Usage*: `run_exps.py [OPTIONS] [SCHED_FILE]... [SCHED_DIR]...`

where a `SCHED_DIR` resembles:
```
SCHED_DIR/
	SCHED_FILE
	PARAM_FILE
```

*Output*: `OUT_DIR/[files]` or `OUT_DIR/SCHED_DIR/[files]` or `OUT_DIR/SCHED_FILE/[files]` depending on input

If all features are enabled, these files are:
```
OUT_DIR/[SCHED_(FILE|DIR)/]
	trace.slog    # LITMUS logging
	st-[1..m].bin # sched_trace data
	ft.bin        # feather-trace overhead data
	trace.dat     # ftrace data for kernelshark
	params.py     # Schedule parameters
	exec-out.txt  # Standard out from schedule processes
	exec-err.txt  # Standard err '''
```