Commit 605edd61 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Try to reduce reduce makefile dependencies

also, improve the annotator
parent 8f211be0
...@@ -1204,17 +1204,25 @@ sharedmods: $(SHAREDMODS_OBJS) ...@@ -1204,17 +1204,25 @@ sharedmods: $(SHAREDMODS_OBJS)
.PHONY: ext_pyston .PHONY: ext_pyston
ext_pyston: $(TEST_EXT_MODULE_OBJS) 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 # 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. # 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 # So just tell make to generate the first extension module, and that the non-first ones just
# depend on the first one. # depend on the first one.
$(firstword $(TEST_EXT_MODULE_OBJS)): $(TEST_EXT_MODULE_SRCS) | pyston_dbg $(firstword $(TEST_EXT_MODULE_OBJS)): $(TEST_EXT_MODULE_SRCS) | $(BUILD_PY)
$(VERB) cd $(TEST_DIR)/test_extension; time ../../pyston_dbg setup.py build $(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) 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) $(VERB) touch -c $(TEST_EXT_MODULE_OBJS)
$(wordlist 2,9999,$(TEST_EXT_MODULE_OBJS)): $(firstword $(TEST_EXT_MODULE_OBJS)) $(wordlist 2,9999,$(TEST_EXT_MODULE_OBJS)): $(firstword $(TEST_EXT_MODULE_OBJS))
$(firstword $(SHAREDMODS_OBJS)): $(SHAREDMODS_SRCS) | pyston_dbg $(firstword $(SHAREDMODS_OBJS)): $(SHAREDMODS_SRCS) | $(BUILD_PY)
$(VERB) cd $(TEST_DIR)/test_extension; time ../../pyston_dbg ../../from_cpython/setup.py build --build-lib ../../lib_pyston $(VERB) cd $(TEST_DIR)/test_extension; time ../../$(BUILD_PY) ../../from_cpython/setup.py build --build-lib ../../lib_pyston
$(VERB) touch -c $(SHAREDMODS_OBJS) $(VERB) touch -c $(SHAREDMODS_OBJS)
$(wordlist 2,9999,$(SHAREDMODS_OBJS)): $(firstword $(SHAREDMODS_OBJS)) $(wordlist 2,9999,$(SHAREDMODS_OBJS)): $(firstword $(SHAREDMODS_OBJS))
......
...@@ -213,9 +213,16 @@ CompiledFunction* compileFunction(CLFunction* f, FunctionSpecialization* spec, E ...@@ -213,9 +213,16 @@ CompiledFunction* compileFunction(CLFunction* f, FunctionSpecialization* spec, E
ss << "\033[34;1mDoing OSR-entry partial compile of " << source->fn << ":" << name ss << "\033[34;1mDoing OSR-entry partial compile of " << source->fn << ":" << name
<< ", starting with backedge to block " << entry_descriptor->backedge->target->idx; << ", 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"; ss << "\033[0m";
printf("%s\n", ss.str().c_str()); printf("%s", ss.str().c_str());
} }
#ifndef NDEBUG #ifndef NDEBUG
......
...@@ -50,7 +50,7 @@ def lookupAsHeapAddr(n): ...@@ -50,7 +50,7 @@ def lookupAsHeapAddr(n):
while True: while True:
l = _heap_proc.stdout.readline() l = _heap_proc.stdout.readline()
if l.startswith("Pyston v0.2"): if l.startswith("Pyston v"):
break break
_heap_proc.stdin.write("dumpAddr(%d)\nprint '!!!!'\n" % n) _heap_proc.stdin.write("dumpAddr(%d)\nprint '!!!!'\n" % n)
...@@ -136,11 +136,16 @@ equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'. ...@@ -136,11 +136,16 @@ equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'.
addr = l.split(':')[0] addr = l.split(':')[0]
count = counts.pop(addr.strip(), 0) count = counts.pop(addr.strip(), 0)
m = re.search("movabs \\$0x([0-9a-f]+),", l)
extra = "" extra = ""
m = re.search("movabs \\$0x([0-9a-f]{4,}),", l)
if m: if m:
n = int(m.group(1), 16) 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) extra = lookupConstant(n)
if args.collapse_nops and l.endswith("\tnop"): if args.collapse_nops and l.endswith("\tnop"):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment