Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
bf42fc79
Commit
bf42fc79
authored
Jan 07, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some find_problem updates
parent
382d5095
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
2 deletions
+18
-2
tools/find_problem.py
tools/find_problem.py
+16
-2
tools/git_svn_gotorev.py
tools/git_svn_gotorev.py
+2
-0
No files found.
tools/find_problem.py
View file @
bf42fc79
...
...
@@ -22,9 +22,15 @@ def efficiency(rid):
return
learnt
/
effort
if
__name__
==
"__main__"
:
if
len
(
sys
.
argv
)
<
4
:
print
"Usage: python find_problem.py GOOD_REV BAD_REV make args"
print
" (anything after BAD_REV gets passed as arguments to a 'make' invocation)"
sys
.
exit
(
1
)
good_rev
,
bad_rev
=
sys
.
argv
[
1
:
3
]
good_rev
=
int
(
good_rev
)
bad_rev
=
int
(
bad_rev
)
assert
good_rev
<
bad_rev
args
=
sys
.
argv
[
3
:]
assert
args
...
...
@@ -37,22 +43,30 @@ if __name__ == "__main__":
# b = test(bad_rev, args)
# assert not b, "bad_rev must not work"
f
=
open
(
"find_problem.status"
,
"w"
)
f
.
write
(
"%d %d
\
n
"
%
(
good_rev
,
bad_rev
))
f
.
flush
()
while
bad_rev
>
good_rev
+
1
:
print
"%d is good, %d is bad"
%
(
good_rev
,
bad_rev
)
open
(
"find_problem.status"
,
"w"
).
write
(
"%d %d
\
n
"
%
(
good_rev
,
bad_rev
))
middle
=
(
good_rev
+
bad_rev
+
1
)
/
2
revs
=
range
(
good_rev
+
1
,
middle
+
1
)
revs
.
sort
(
reverse
=
True
,
key
=
efficiency
)
# print good_rev, bad_rev, (good_rev + bad_rev) / 2, revs[0]
next_rev
=
revs
[
0
]
print
>>
f
,
"Testing revision %d (p=%.1f%%)"
%
(
next_rev
,
100.0
*
(
next_rev
-
good_rev
)
/
(
bad_rev
-
good_rev
))
f
.
flush
()
print
"Testing revision %d (p=%.1f%%)"
%
(
next_rev
,
100.0
*
(
next_rev
-
good_rev
)
/
(
bad_rev
-
good_rev
))
b
=
test
(
next_rev
,
args
)
print
"Revision"
,
next_rev
,
"works"
if
b
else
"failed"
print
>>
f
,
"Revision"
,
next_rev
,
"works"
if
b
else
"failed"
f
.
flush
()
if
b
:
good_rev
=
next_rev
else
:
bad_rev
=
next_rev
open
(
"find_problem.status"
,
"w"
).
write
(
"%d %d
\
n
"
%
(
good_rev
,
bad_rev
))
print
"Rev %d is good, rev %d is bad"
%
(
good_rev
,
bad_rev
)
print
>>
f
,
"Rev %d is good, rev %d is bad"
%
(
good_rev
,
bad_rev
)
f
.
close
()
tools/git_svn_gotorev.py
View file @
bf42fc79
...
...
@@ -89,6 +89,8 @@ if __name__ == "__main__":
continue
if
"support-varargs-intrinsics"
in
patch_fn
and
svn_rev
>=
220205
:
continue
if
"Expose-getSymbolLoadAddress"
in
patch_fn
and
svn_rev
<=
222840
:
continue
patch_fn
=
os
.
path
.
abspath
(
os
.
path
.
join
(
patch_dir
,
patch_fn
))
code
=
subprocess
.
call
([
"git"
,
"am"
,
patch_fn
],
cwd
=
repo
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment