Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
d7020e_srp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
d7020e
d7020e_srp
Commits
98c11e6c
Commit
98c11e6c
authored
8 years ago
by
pln
Browse files
Options
Downloads
Plain Diff
Merge branch 'klee' of git@gitlab.henriktjader.com:d7020e/d7020e_srp.git into klee
parents
a432fe12
5e640550
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Makefile
+1
-1
1 addition, 1 deletion
Makefile
klee_stm_gdb.py
+12
-5
12 additions, 5 deletions
klee_stm_gdb.py
profiling_db_parser.py
+5
-0
5 additions, 0 deletions
profiling_db_parser.py
with
18 additions
and
6 deletions
Makefile
+
1
−
1
View file @
98c11e6c
This diff is collapsed.
Click to expand it.
klee_stm_gdb.py
+
12
−
5
View file @
98c11e6c
...
@@ -14,7 +14,7 @@ file_index_current = 0
...
@@ -14,7 +14,7 @@ file_index_current = 0
object_index_current
=
0
object_index_current
=
0
"""
Max number of events guard
"""
"""
Max number of events guard
"""
object_index_max
=
10
object_index_max
=
10
0
database_name
=
"
klee_profiling
"
database_name
=
"
klee_profiling
"
...
@@ -33,7 +33,8 @@ cur.execute('''CREATE TABLE IF NOT EXISTS events
...
@@ -33,7 +33,8 @@ cur.execute('''CREATE TABLE IF NOT EXISTS events
FILE TEXT NOT NULL,
FILE TEXT NOT NULL,
TIME INT NOT NULL,
TIME INT NOT NULL,
RESOURCE TEXT NOT NULL,
RESOURCE TEXT NOT NULL,
ACTION TEXT);
'''
)
ACTION TEXT
JOB TEXT);
'''
)
class
KTestError
(
Exception
):
class
KTestError
(
Exception
):
...
@@ -178,6 +179,10 @@ def posted_event_finish_execution():
...
@@ -178,6 +179,10 @@ def posted_event_finish_execution():
str
(
object_index_current
)
+
str
(
object_index_current
)
+
"
].action
"
)
"
].action
"
)
"""
Parse which running job is active
"""
event_job
=
gdb
.
parse_and_eval
(
"
job
"
)
"""
"""
print(
"
file: %r
"
% str(file_list[file_index_current]))
print(
"
file: %r
"
% str(file_list[file_index_current]))
print(
"
time: %r
"
% int(event_time))
print(
"
time: %r
"
% int(event_time))
...
@@ -191,14 +196,15 @@ def posted_event_finish_execution():
...
@@ -191,14 +196,15 @@ def posted_event_finish_execution():
event
.
append
(
int
(
event_time
))
event
.
append
(
int
(
event_time
))
event
.
append
(
str
(
event_resource
))
event
.
append
(
str
(
event_resource
))
event
.
append
(
str
(
event_action
))
event
.
append
(
str
(
event_action
))
event
.
append
(
"
j
"
+
str
(
event_job
))
print
(
"
Event: %r
"
%
event
)
print
(
"
Event: %r
"
%
event
)
try
:
try
:
cur
=
conn
.
cursor
()
cur
=
conn
.
cursor
()
cur
.
execute
(
'
INSERT INTO events(FILE, TIME, RESOURCE, ACTION)
\
cur
.
execute
(
'
INSERT INTO events(FILE, TIME, RESOURCE, ACTION
, JOB
)
\
VALUES (?,?,?,?)
'
,
event
)
VALUES (?,?,?,?
,?
)
'
,
event
)
except
sqlite3
.
Error
as
e
:
except
sqlite3
.
Error
as
e
:
print
(
"
An error occurred:
"
,
e
.
args
[
0
])
print
(
"
An error occurred:
"
,
e
.
args
[
0
])
...
@@ -280,6 +286,7 @@ def ktest_iterate():
...
@@ -280,6 +286,7 @@ def ktest_iterate():
# AddBreakpoint("main")
# AddBreakpoint("main")
MainBP
(
"
main
"
)
MainBP
(
"
main
"
)
"""
Tell gdb-dashboard to hide
"""
"""
Tell gdb-dashboard to hide
"""
gdb
.
execute
(
"
dashboard -enabled off
"
)
gdb
.
execute
(
"
dashboard -enabled off
"
)
gdb
.
execute
(
"
dashboard -output /dev/null
"
)
gdb
.
execute
(
"
dashboard -output /dev/null
"
)
...
@@ -287,7 +294,7 @@ gdb.execute("dashboard -output /dev/null")
...
@@ -287,7 +294,7 @@ gdb.execute("dashboard -output /dev/null")
"""
Also break at the main-loop
"""
"""
Also break at the main-loop
"""
# AddBreakpoint("finish_execution")
# AddBreakpoint("finish_execution")
MainBP
(
"
finish_execution
"
)
MainBP
(
"
finish_execution
"
)
MainBP
(
"
terminate_execution
"
)
#
MainBP("terminate_execution")
"""
Used for making it scriptable
"""
"""
Used for making it scriptable
"""
gdb
.
execute
(
"
set confirm off
"
)
gdb
.
execute
(
"
set confirm off
"
)
...
...
This diff is collapsed.
Click to expand it.
profiling_db_parser.py
+
5
−
0
View file @
98c11e6c
...
@@ -145,6 +145,11 @@ def print_db_ktest():
...
@@ -145,6 +145,11 @@ def print_db_ktest():
(
filename
,))
(
filename
,))
resources
=
c
.
fetchall
()
resources
=
c
.
fetchall
()
c
.
execute
(
'
SELECT DISTINCT job FROM events WHERE (file=?)
'
,
(
filename
,))
job
=
c
.
fetchall
()
print
(
"
Job: j%s
"
%
job
)
"""
Go through the unique list of resources
"""
Go through the unique list of resources
If they are called multiple times this is handled later
If they are called multiple times this is handled later
...
...
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