diff options
| author | chsun <chsun@pound.cs.unc.edu> | 2011-04-28 19:20:02 -0400 |
|---|---|---|
| committer | chsun <chsun@pound.cs.unc.edu> | 2011-04-28 19:20:02 -0400 |
| commit | 9c7329f6c8fb07e557bbb0c4e526b99dbbcdd1f9 (patch) | |
| tree | 72d5198d92b18e59d053ab3a622cf05389f6a31a | |
| parent | b1c49a19d7521174f36f39b3178afe495e000070 (diff) | |
Put back detection for simultaneouswip-kernthreads-nv-trace
| -rwxr-xr-x | unit-trace | 6 | ||||
| -rw-r--r-- | unit_trace/cedf_test.py | 386 | ||||
| -rw-r--r-- | unit_trace/stdout_printer.py | 83 |
3 files changed, 244 insertions, 231 deletions
| @@ -111,7 +111,7 @@ if options.progress is True: | |||
| 111 | # stream = gedf_test.gedf_test(stream) | 111 | # stream = gedf_test.gedf_test(stream) |
| 112 | 112 | ||
| 113 | # Produce C-EDF error records | 113 | # Produce C-EDF error records |
| 114 | if options.cedf is True: | 114 | if options.cedf is True and options.maxnum > 0: |
| 115 | from unit_trace import cedf_test | 115 | from unit_trace import cedf_test |
| 116 | stream = cedf_test.cedf_test(stream,options.csize,options.maxnum) | 116 | stream = cedf_test.cedf_test(stream,options.csize,options.maxnum) |
| 117 | 117 | ||
| @@ -165,10 +165,10 @@ if options.dist is True: | |||
| 165 | #cedf_stat_printer.cedf_stat_printer(stream9,options.cdf_unit,False,1,"Work_Item_inversion",options.out_file) | 165 | #cedf_stat_printer.cedf_stat_printer(stream9,options.cdf_unit,False,1,"Work_Item_inversion",options.out_file) |
| 166 | 166 | ||
| 167 | 167 | ||
| 168 | #cedf_stat_printer.cedf_stat_printer(stream5,options.cdf_unit,False,0,"Tasklet_simultaneous",options.out_file) | 168 | cedf_stat_printer.cedf_stat_printer(stream5,options.cdf_unit,False,0,"Tasklet_simultaneous",options.out_file) |
| 169 | #cedf_stat_printer.cedf_stat_printer(stream12,options.cdf_unit,False,1,"Tasklet_simultaneous",options.out_file) | 169 | #cedf_stat_printer.cedf_stat_printer(stream12,options.cdf_unit,False,1,"Tasklet_simultaneous",options.out_file) |
| 170 | 170 | ||
| 171 | #cedf_stat_printer.cedf_stat_printer(stream6,options.cdf_unit,False,0,"Work_Item_simultaneous",options.out_file) | 171 | cedf_stat_printer.cedf_stat_printer(stream6,options.cdf_unit,False,0,"Work_Item_simultaneous",options.out_file) |
| 172 | #cedf_stat_printer.cedf_stat_printer(stream15,options.cdf_unit,False,1,"Work_Item_simultaneous",options.out_file) | 172 | #cedf_stat_printer.cedf_stat_printer(stream15,options.cdf_unit,False,1,"Work_Item_simultaneous",options.out_file) |
| 173 | 173 | ||
| 174 | 174 | ||
diff --git a/unit_trace/cedf_test.py b/unit_trace/cedf_test.py index d09d001..7d9cc77 100644 --- a/unit_trace/cedf_test.py +++ b/unit_trace/cedf_test.py | |||
| @@ -66,12 +66,7 @@ def cedf_test(stream,csize,number): | |||
| 66 | # All records with when ==0 are garbage | 66 | # All records with when ==0 are garbage |
| 67 | if record.when == 0: | 67 | if record.when == 0: |
| 68 | continue | 68 | continue |
| 69 | #if processing count reach number(maximum) start to process | 69 | |
| 70 | if number > 0: | ||
| 71 | number -= 1 | ||
| 72 | elif number == 0: | ||
| 73 | break | ||
| 74 | |||
| 75 | #yield record | 70 | #yield record |
| 76 | #continue | 71 | #continue |
| 77 | 72 | ||
| @@ -83,7 +78,7 @@ def cedf_test(stream,csize,number): | |||
| 83 | if last_time is not None and last_time != record.when: | 78 | if last_time is not None and last_time != record.when: |
| 84 | 79 | ||
| 85 | # check PI for tasklet | 80 | # check PI for tasklet |
| 86 | errors = _cedf_check_irq( | 81 | errors = _cedf_check_irq_inversion( |
| 87 | off_cpu,on_cpu, | 82 | off_cpu,on_cpu, |
| 88 | tasklet_on_cpu,work_on_cpu, | 83 | tasklet_on_cpu,work_on_cpu, |
| 89 | tasklet_off_cpu,tasklet_on_cpu, | 84 | tasklet_off_cpu,tasklet_on_cpu, |
| @@ -91,15 +86,19 @@ def cedf_test(stream,csize,number): | |||
| 91 | first_event_this_timestamp, "Tasklet") | 86 | first_event_this_timestamp, "Tasklet") |
| 92 | for error in errors: | 87 | for error in errors: |
| 93 | yield error | 88 | yield error |
| 94 | # check Simultaneous execution of tasklet and owner | 89 | |
| 95 | #errors = _cedf_check_tasklet_simultaneous(off_cpu,on_cpu, | 90 | # check Simultaneous for tasklet |
| 96 | # tasklet_off_cpu,tasklet_on_cpu,last_time,csize, | 91 | errors = _cedf_check_irq_simultaneous( |
| 97 | # first_event_this_timestamp) | 92 | off_cpu,on_cpu, |
| 98 | #for error in errors: | 93 | tasklet_on_cpu,work_on_cpu, |
| 99 | # yield error | 94 | tasklet_off_cpu,tasklet_on_cpu, |
| 95 | last_time,csize, | ||
| 96 | first_event_this_timestamp, "Tasklet") | ||
| 97 | for error in errors: | ||
| 98 | yield error | ||
| 100 | 99 | ||
| 101 | # check PI for work item | 100 | # check PI for work item |
| 102 | errors = _cedf_check_irq( | 101 | errors = _cedf_check_irq_inversion( |
| 103 | off_cpu,on_cpu, | 102 | off_cpu,on_cpu, |
| 104 | tasklet_on_cpu,work_on_cpu, | 103 | tasklet_on_cpu,work_on_cpu, |
| 105 | work_off_cpu,work_on_cpu, | 104 | work_off_cpu,work_on_cpu, |
| @@ -108,12 +107,16 @@ def cedf_test(stream,csize,number): | |||
| 108 | for error in errors: | 107 | for error in errors: |
| 109 | yield error | 108 | yield error |
| 110 | 109 | ||
| 111 | # check Simultaneous execution of work item and owner | 110 | # check Simultaneous for work item |
| 112 | #errors = _cedf_check_work_simultaneous(off_cpu,on_cpu, | 111 | errors = _cedf_check_irq_simultaneous( |
| 113 | # work_off_cpu,work_on_cpu,last_time,csize, | 112 | off_cpu,on_cpu, |
| 114 | # first_event_this_timestamp) | 113 | tasklet_on_cpu,work_on_cpu, |
| 115 | #for error in errors: | 114 | work_off_cpu,work_on_cpu, |
| 116 | # yield error | 115 | last_time,csize, |
| 116 | first_event_this_timestamp, "Work_Item") | ||
| 117 | for error in errors: | ||
| 118 | yield error | ||
| 119 | |||
| 117 | 120 | ||
| 118 | # check PI for task | 121 | # check PI for task |
| 119 | for c in range(0,int(m/csize)): | 122 | for c in range(0,int(m/csize)): |
| @@ -178,6 +181,7 @@ def cedf_test(stream,csize,number): | |||
| 178 | msg = msg % (record.id,record.pid) | 181 | msg = msg % (record.id,record.pid) |
| 179 | print msg | 182 | print msg |
| 180 | #sys.stderr.write(msg) | 183 | #sys.stderr.write(msg) |
| 184 | yield record | ||
| 181 | #exit() | 185 | #exit() |
| 182 | continue | 186 | continue |
| 183 | 187 | ||
| @@ -204,7 +208,7 @@ def cedf_test(stream,csize,number): | |||
| 204 | " that was not running\n") | 208 | " that was not running\n") |
| 205 | msg = msg % (record.id, record.pid) | 209 | msg = msg % (record.id, record.pid) |
| 206 | print msg | 210 | print msg |
| 207 | #sys.stderr.write(msg) | 211 | #sys.stderr.write(msg) |
| 208 | #exit() | 212 | #exit() |
| 209 | yield record | 213 | yield record |
| 210 | continue | 214 | continue |
| @@ -229,6 +233,7 @@ def cedf_test(stream,csize,number): | |||
| 229 | msg = msg % (record.id,record.pid) | 233 | msg = msg % (record.id,record.pid) |
| 230 | print msg | 234 | print msg |
| 231 | #sys.stderr.write(msg) | 235 | #sys.stderr.write(msg) |
| 236 | yield record | ||
| 232 | #exit() | 237 | #exit() |
| 233 | continue | 238 | continue |
| 234 | off_cpu[pos].is_blocked =True | 239 | off_cpu[pos].is_blocked =True |
| @@ -248,6 +253,7 @@ def cedf_test(stream,csize,number): | |||
| 248 | msg = msg % (record.id,record.pid) | 253 | msg = msg % (record.id,record.pid) |
| 249 | print msg | 254 | print msg |
| 250 | #sys.stderr.write(msg) | 255 | #sys.stderr.write(msg) |
| 256 | yield record | ||
| 251 | #exit() | 257 | #exit() |
| 252 | continue | 258 | continue |
| 253 | off_cpu[pos].is_blocked = False | 259 | off_cpu[pos].is_blocked = False |
| @@ -303,6 +309,7 @@ def cedf_test(stream,csize,number): | |||
| 303 | msg = msg % (record.id, record.pid) | 309 | msg = msg % (record.id, record.pid) |
| 304 | print msg | 310 | print msg |
| 305 | #sys.stderr.write(msg) | 311 | #sys.stderr.write(msg) |
| 312 | yield record | ||
| 306 | #exit() #Continue see if anything wrong | 313 | #exit() #Continue see if anything wrong |
| 307 | continue | 314 | continue |
| 308 | job = tasklet_off_cpu[pos] | 315 | job = tasklet_off_cpu[pos] |
| @@ -320,6 +327,7 @@ def cedf_test(stream,csize,number): | |||
| 320 | msg = msg % (record.id, record.pid) | 327 | msg = msg % (record.id, record.pid) |
| 321 | print msg | 328 | print msg |
| 322 | #sys.stderr.write(msg) | 329 | #sys.stderr.write(msg) |
| 330 | yield record | ||
| 323 | #exit() #Continue see if anything wrong | 331 | #exit() #Continue see if anything wrong |
| 324 | continue | 332 | continue |
| 325 | job = work_off_cpu[pos] | 333 | job = work_off_cpu[pos] |
| @@ -335,6 +343,7 @@ def cedf_test(stream,csize,number): | |||
| 335 | " that was not running\n") | 343 | " that was not running\n") |
| 336 | msg = msg % (record.id, record.pid) | 344 | msg = msg % (record.id, record.pid) |
| 337 | print msg | 345 | print msg |
| 346 | yield record | ||
| 338 | #sys.stderr.write(msg) | 347 | #sys.stderr.write(msg) |
| 339 | pos = _find_job(record,tasklet_off_cpu) | 348 | pos = _find_job(record,tasklet_off_cpu) |
| 340 | if pos is not None: | 349 | if pos is not None: |
| @@ -359,6 +368,7 @@ def cedf_test(stream,csize,number): | |||
| 359 | " that was not running\n") | 368 | " that was not running\n") |
| 360 | msg = msg % (record.id, record.pid) | 369 | msg = msg % (record.id, record.pid) |
| 361 | print msg | 370 | print msg |
| 371 | yield record | ||
| 362 | #sys.stderr.write(msg) | 372 | #sys.stderr.write(msg) |
| 363 | pos = _find_job(record,work_off_cpu) | 373 | pos = _find_job(record,work_off_cpu) |
| 364 | if pos is not None: | 374 | if pos is not None: |
| @@ -374,34 +384,38 @@ def cedf_test(stream,csize,number): | |||
| 374 | del work_on_cpu[pos] | 384 | del work_on_cpu[pos] |
| 375 | 385 | ||
| 376 | # a Task has Priority inheritance | 386 | # a Task has Priority inheritance |
| 377 | #elif record.type_name == 'eff_prio_change': | 387 | elif record.type_name == 'eff_prio_change': |
| 378 | # inh_pos = _find_inh_job(record,off_cpu) | 388 | inh_pos = _find_inh_job(record,off_cpu) |
| 379 | # if inh_pos is None: | 389 | if inh_pos is None: |
| 380 | # inh_pos = _find_inh_job(record,on_cpu) | 390 | inh_pos = _find_inh_job(record,on_cpu) |
| 381 | # if inh_pos is not None: | 391 | if inh_pos is not None: |
| 382 | # inh_job = on_cpu[inh_pos] | 392 | inh_job = on_cpu[inh_pos] |
| 383 | # else: | 393 | else: |
| 384 | # inh_job = off_cpu[inh_pos] | 394< | |
