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
605edd61
Commit
605edd61
authored
May 21, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to reduce reduce makefile dependencies
also, improve the annotator
parent
8f211be0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
8 deletions
+28
-8
Makefile
Makefile
+12
-4
src/codegen/irgen/hooks.cpp
src/codegen/irgen/hooks.cpp
+9
-2
tools/annotate.py
tools/annotate.py
+7
-2
No files found.
Makefile
View file @
605edd61
...
...
@@ -1204,17 +1204,25 @@ sharedmods: $(SHAREDMODS_OBJS)
.PHONY
:
ext_pyston
ext_pyston
:
$(TEST_EXT_MODULE_OBJS)
# Makefile hackery: we can build test extensions with any build configuration of pyston,
# so try to guess one that will end up being built anyway, and use that as the dependency.
ifneq
($(findstring release,$(MAKECMDGOALS))$(findstring perf,$(MAKECMDGOALS)),)
BUILD_PY
:=
pyston_release
else
BUILD_PY
:=
pyston_dbg
endif
# Hax: we want to generate multiple targets from a single rule, and run the rule only if the
# dependencies have been updated, and only run it once for all the targets.
# So just tell make to generate the first extension module, and that the non-first ones just
# depend on the first one.
$(firstword $(TEST_EXT_MODULE_OBJS))
:
$(TEST_EXT_MODULE_SRCS) |
pyston_dbg
$(VERB)
cd
$(TEST_DIR)
/test_extension
;
time
../../
pyston_dbg
setup.py build
$(firstword $(TEST_EXT_MODULE_OBJS))
:
$(TEST_EXT_MODULE_SRCS) |
$(BUILD_PY)
$(VERB)
cd
$(TEST_DIR)
/test_extension
;
time
../../
$(BUILD_PY)
setup.py build
$(VERB)
cd
$(TEST_DIR)
/test_extension
;
ln
-sf
$
(
TEST_EXT_MODULE_NAMES:%
=
build/lib.linux2-2.7/%.pyston.so
)
.
$(VERB)
touch
-c
$(TEST_EXT_MODULE_OBJS)
$(wordlist 2,9999,$(TEST_EXT_MODULE_OBJS))
:
$(firstword $(TEST_EXT_MODULE_OBJS))
$(firstword $(SHAREDMODS_OBJS))
:
$(SHAREDMODS_SRCS) |
pyston_dbg
$(VERB)
cd
$(TEST_DIR)
/test_extension
;
time
../../
pyston_dbg
../../from_cpython/setup.py build
--build-lib
../../lib_pyston
$(firstword $(SHAREDMODS_OBJS))
:
$(SHAREDMODS_SRCS) |
$(BUILD_PY)
$(VERB)
cd
$(TEST_DIR)
/test_extension
;
time
../../
$(BUILD_PY)
../../from_cpython/setup.py build
--build-lib
../../lib_pyston
$(VERB)
touch
-c
$(SHAREDMODS_OBJS)
$(wordlist 2,9999,$(SHAREDMODS_OBJS))
:
$(firstword $(SHAREDMODS_OBJS))
...
...
src/codegen/irgen/hooks.cpp
View file @
605edd61
...
...
@@ -213,9 +213,16 @@ CompiledFunction* compileFunction(CLFunction* f, FunctionSpecialization* spec, E
ss
<<
"
\033
[34;1mDoing OSR-entry partial compile of "
<<
source
->
fn
<<
":"
<<
name
<<
", starting with backedge to block "
<<
entry_descriptor
->
backedge
->
target
->
idx
;
}
ss
<<
" at effort level "
<<
(
int
)
effort
;
ss
<<
" at effort level "
<<
(
int
)
effort
<<
'\n'
;
if
(
entry_descriptor
&&
VERBOSITY
(
"irgen"
)
>=
2
)
{
for
(
const
auto
&
p
:
entry_descriptor
->
args
)
{
ss
<<
p
.
first
.
str
()
<<
": "
<<
p
.
second
->
debugName
()
<<
'\n'
;
}
}
ss
<<
"
\033
[0m"
;
printf
(
"%s
\n
"
,
ss
.
str
().
c_str
());
printf
(
"%s"
,
ss
.
str
().
c_str
());
}
#ifndef NDEBUG
...
...
tools/annotate.py
View file @
605edd61
...
...
@@ -50,7 +50,7 @@ def lookupAsHeapAddr(n):
while
True
:
l
=
_heap_proc
.
stdout
.
readline
()
if
l
.
startswith
(
"Pyston v
0.2
"
):
if
l
.
startswith
(
"Pyston v"
):
break
_heap_proc
.
stdin
.
write
(
"dumpAddr(%d)
\
n
print '!!!!'
\
n
"
%
n
)
...
...
@@ -136,11 +136,16 @@ equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'.
addr
=
l
.
split
(
':'
)[
0
]
count
=
counts
.
pop
(
addr
.
strip
(),
0
)
m
=
re
.
search
(
"movabs
\
\
$0x([0-9a-f]+),"
,
l
)
extra
=
""
m
=
re
.
search
(
"movabs
\
\
$0x([0-9a-f]{4,}),"
,
l
)
if
m
:
n
=
int
(
m
.
group
(
1
),
16
)
extra
=
lookupConstant
(
n
)
m
=
re
.
search
(
"mov
\
\
$0x([0-9a-f]{4,}),"
,
l
)
if
m
:
n
=
int
(
m
.
group
(
1
),
16
)
extra
=
lookupConstant
(
n
)
if
args
.
collapse_nops
and
l
.
endswith
(
"
\
t
nop"
):
...
...
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