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
d8e5b7f6
Commit
d8e5b7f6
authored
Jun 02, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some more 'hot functions'
parent
df5d6491
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
7 deletions
+22
-7
section_ordering.txt
section_ordering.txt
+16
-1
tools/annotate.py
tools/annotate.py
+2
-1
tools/perf_diff.py
tools/perf_diff.py
+4
-5
No files found.
section_ordering.txt
View file @
d8e5b7f6
.text.intLtInt
.text.div_i64_i64
.text.div_i64_i64
.text.boxInt
.text.boxInt
.text.boxBool
.text._ZN6pyston2gc10SmallArena6_allocEmi
.text._ZN6pyston2gc10SmallArena6_allocEmi
.text._ZNSt17_Function_handlerIFvPN6pyston2gc10SmallArena16ThreadBlockCacheEEZNS2_12freeUnmarkedERSt6vectorIPNS0_3BoxESaIS8_EEE3$_0E9_M_invokeERKSt9_Any_dataS4_
.text._ZNSt17_Function_handlerIFvPN6pyston2gc10SmallArena16ThreadBlockCacheEEZNS2_12freeUnmarkedERSt6vectorIPNS0_3BoxESaIS8_EEE3$_0E9_M_invokeERKSt9_Any_dataS4_
.text.memset
.text.gc_alloc
.text.gc_realloc
.text._ZN6pyston9BoxedList6ensureEi
.text.PyNumber_AsSsize_t
.text._ZN6pyston15objectNewNoArgsEPNS_10BoxedClassE
.text._PyIndex_Check
.text._ZN6pyston9threading21allowGLReadPreemptionEv
.text._ZN6pyston9getOpNameEi
.text._ZN6pyston8callFuncEPNS_17BoxedFunctionBaseEPNS_15CallRewriteArgsENS_11ArgPassSpecEPNS_3BoxES6_S6_PS6_PKSt6vectorIPKSsSaISA_EE
.text._ZN6pyston2gc9GCVisitor5visitEPv
.text.intLtInt
.text.intModInt
.text.intAddInt
.text.intMulInt
tools/annotate.py
View file @
d8e5b7f6
...
@@ -106,6 +106,7 @@ This will typically look like:
...
@@ -106,6 +106,7 @@ This will typically look like:
Benchmark that was run. '--heap-map-target BENCHMARK' is
Benchmark that was run. '--heap-map-target BENCHMARK' is
equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'.
equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'.
"""
.
strip
())
"""
.
strip
())
parser
.
add_argument
(
"--perf-data"
,
default
=
"perf.data"
)
args
=
parser
.
parse_args
()
args
=
parser
.
parse_args
()
func
=
args
.
func_name
func
=
args
.
func_name
...
@@ -116,7 +117,7 @@ equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'.
...
@@ -116,7 +117,7 @@ equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'.
objdump
=
get_objdump
(
func
)
objdump
=
get_objdump
(
func
)
p
=
subprocess
.
Popen
([
"perf"
,
"annotate"
,
"-v"
,
func
],
stdout
=
subprocess
.
PIPE
,
stderr
=
open
(
"/dev/null"
,
"w"
))
p
=
subprocess
.
Popen
([
"perf"
,
"annotate"
,
"-
i"
,
args
.
perf_data
,
"-
v"
,
func
],
stdout
=
subprocess
.
PIPE
,
stderr
=
open
(
"/dev/null"
,
"w"
))
annotate
=
p
.
communicate
()[
0
]
annotate
=
p
.
communicate
()[
0
]
assert
p
.
wait
()
==
0
assert
p
.
wait
()
==
0
...
...
tools/perf_diff.py
View file @
d8e5b7f6
...
@@ -5,7 +5,7 @@ def tally(fn):
...
@@ -5,7 +5,7 @@ def tally(fn):
for
l
in
open
(
fn
):
for
l
in
open
(
fn
):
samples
=
int
(
l
.
split
()[
3
])
samples
=
int
(
l
.
split
()[
3
])
func
=
l
.
split
()[
-
1
]
func
=
l
.
rsplit
(
']'
,
1
)[
1
].
strip
()
counts
[
func
]
=
counts
.
get
(
func
,
0
)
+
samples
counts
[
func
]
=
counts
.
get
(
func
,
0
)
+
samples
return
counts
return
counts
...
@@ -23,12 +23,11 @@ def main():
...
@@ -23,12 +23,11 @@ def main():
diff_thresh
=
(
total1
+
total2
)
/
2
/
100
diff_thresh
=
(
total1
+
total2
)
/
2
/
100
names
.
sort
(
key
=
lambda
n
:
counts1
.
get
(
n
,
0
)
+
counts2
.
get
(
n
,
0
),
reverse
=
True
)
names
.
sort
(
key
=
lambda
n
:
abs
(
counts1
.
get
(
n
,
0
)
-
counts2
.
get
(
n
,
0
)
),
reverse
=
True
)
for
n
in
names
:
for
n
in
names
[:
10
]
:
c1
=
counts1
.
get
(
n
,
0
)
c1
=
counts1
.
get
(
n
,
0
)
c2
=
counts2
.
get
(
n
,
0
)
c2
=
counts2
.
get
(
n
,
0
)
if
abs
(
c1
-
c2
)
>=
diff_thresh
:
print
n
,
counts1
.
get
(
n
,
0
),
counts2
.
get
(
n
,
0
)
print
n
,
counts1
.
get
(
n
,
0
),
counts2
.
get
(
n
,
0
)
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
main
()
main
()
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