Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dosek
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
syswcet
dosek
Commits
0c25fdc1
Commit
0c25fdc1
authored
Sep 22, 2016
by
Peter Wägemann
Browse files
Options
Downloads
Patches
Plain Diff
Add tentative, manually composed WCET for aborted_computation
parent
aaf04766
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/benchmark/timing/manual-syswcet.py
+25
-22
25 additions, 22 deletions
app/benchmark/timing/manual-syswcet.py
with
25 additions
and
22 deletions
app/benchmark/timing/manual-syswcet.py
+
25
−
22
View file @
0c25fdc1
...
@@ -78,24 +78,18 @@ def run_wait_timeout(cmd, stdin_data, timeout):
...
@@ -78,24 +78,18 @@ def run_wait_timeout(cmd, stdin_data, timeout):
RELATIVE_BUILD_DIR
=
'
../../../build
'
RELATIVE_BUILD_DIR
=
'
../../../build
'
DREF_KEY
=
'
app/benchmark/timing/
'
DREF_KEY
=
'
app/benchmark/timing/
'
benchmarks
=
{
'
tmr
'
:
(
0
),
'
activate_task
'
:
(
0
,
1
,
2
),
'
simple_interrupt
'
:
(
0
,
1
),
'
computation_irq
'
:
(
0
),
'
interrupt_reaction
'
:
(
0
),
'
wait_event
'
:
(
0
),
'
aborted_computation
'
:
(
0
),
'
alarm
'
:
(
0
),
}
def
parse_args
():
def
parse_args
():
parser
=
ArgumentParser
(
description
=
"
sysbench
"
)
parser
=
ArgumentParser
(
description
=
"
script for manual evaluation of
sysbench
"
)
parser
.
add_argument
(
'
-b
'
,
'
--bench
'
,
dest
=
'
bench
'
,
parser
.
add_argument
(
'
-b
'
,
'
--bench
'
,
dest
=
'
bench
'
,
help
=
'
the benchmark under analysis
'
,
help
=
'
the benchmark under analysis
'
,
choices
=
[
'
tmr
'
,
'
computation_irq
'
,
'
aborted_computation
'
],
required
=
False
,
default
=
None
)
required
=
False
,
default
=
None
)
parser
.
add_argument
(
'
-a
'
,
'
--all
'
,
dest
=
'
all
'
,
action
=
'
store_true
'
,
help
=
'
process all benchmarks
'
,
required
=
False
,
default
=
False
)
parser
.
add_argument
(
'
-v
'
,
'
--verbose
'
,
dest
=
'
verbose
'
,
action
=
'
store_true
'
,
parser
.
add_argument
(
'
-v
'
,
'
--verbose
'
,
dest
=
'
verbose
'
,
action
=
'
store_true
'
,
help
=
'
activate verbose output
'
,
help
=
'
activate verbose output
'
,
required
=
False
,
default
=
False
)
required
=
False
,
default
=
False
)
...
@@ -166,7 +160,8 @@ def main():
...
@@ -166,7 +160,8 @@ def main():
os
.
chdir
(
dirname
)
os
.
chdir
(
dirname
)
# 1. tmr (non-hierarchical call chains)
# 1. tmr (non-hierarchical call chains)
if
args
.
bench
==
'
tmr
'
:
if
args
.
all
or
args
.
bench
==
'
tmr
'
:
args
.
bench
=
'
tmr
'
cy_entry
=
get_cycles_from_entry
(
'
timing_entry
'
,
args
.
bench
)
cy_entry
=
get_cycles_from_entry
(
'
timing_entry
'
,
args
.
bench
)
# take three times the entry
# take three times the entry
...
@@ -176,18 +171,26 @@ def main():
...
@@ -176,18 +171,26 @@ def main():
# 2. computation IRQ (operating system semantic)
# 2. computation IRQ (operating system semantic)
if
args
.
bench
==
'
computation_irq
'
:
if
args
.
all
or
args
.
bench
==
'
computation_irq
'
:
args
.
bench
=
'
computation_irq
'
cy_timing_0
=
get_cycles_from_entry
(
'
timing_0
'
,
args
.
bench
)
cy_timing_0
=
get_cycles_from_entry
(
'
timing_0
'
,
args
.
bench
)
cy_isr
=
get_cycles_from_entry
(
'
OSEKOS_ISR_ISR1
'
,
args
.
bench
)
cy_isr
=
get_cycles_from_entry
(
'
OSEKOS_ISR_ISR1
'
,
args
.
bench
)
occurences
=
(
cy_timing_0
/
cy_isr
)
+
1
# +1 => worst case
occurences
=
(
cy_timing_0
/
cy_isr
)
+
1
# +1 => worst case
cy_total
=
occurences
*
cy_isr
+
cy_timing_0
cy_total
=
(
occurences
*
cy_isr
)
+
cy_timing_0
write_result_file
(
get_elf
(
args
.
bench
),
int
(
cy_total
))
write_result_file
(
get_elf
(
args
.
bench
),
int
(
cy_total
))
# 3 aborted computation (interrupt handling)
# 3 aborted computation (interrupt handling)
if
args
.
bench
==
'
aborted_computation
'
:
if
args
.
all
or
args
.
bench
==
'
aborted_computation
'
:
assert
False
,
"
TODO
"
args
.
bench
=
'
aborted_computation
'
cy_computation
=
get_cycles_from_entry
(
'
OSEKOS_TASK_FUNC_Computation
'
,
args
.
bench
)
cy_activate_task
=
get_cycles_from_entry
(
'
OSEKOS_ActivateTask_BB8
'
,
args
.
bench
)
cy_ISR_abort
=
get_cycles_from_entry
(
'
OSEKOS_ISR_Abort
'
,
args
.
bench
)
cy_total
=
cy_computation
+
cy_activate_task
+
cy_ISR_abort
write_result_file
(
get_elf
(
args
.
bench
),
int
(
cy_total
))
if
__name__
==
'
__main__
'
:
if
__name__
==
'
__main__
'
:
main
()
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment