Commit 7ad32c22 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Makefile: make it easier to run custom cpythons

And some other small cleanups
parent 0130b77e
......@@ -23,6 +23,7 @@ pyston_grwl
pyston_grwl_dbg
pyston_nosync
pyston_gcc
pyston_release_gcc
pystontmp*/
/*_unittest
......
......@@ -20,6 +20,7 @@ USE_CCACHE := 1
USE_DISTCC := 0
PYPY := pypy
CPYTHON := python
ENABLE_VALGRIND := 0
......@@ -72,7 +73,7 @@ CMAKE_SETUP_RELEASE := $(CMAKE_DIR_RELEASE)/build.ninja
ifneq ($(SELF_HOST),1)
PYTHON := python
PYTHON := $(CPYTHON)
PYTHON_EXE_DEPS :=
else
PYTHON := $(abspath ./pyston_dbg)
......@@ -1032,7 +1033,7 @@ $(call make_target,_gcc)
$(call make_target,_release_gcc)
nosearch_runpy_% nosearch_pyrun_%: %.py ext_python
$(VERB) PYTHONPATH=test/test_extension/build/lib.linux-x86_64-2.7 zsh -c 'time python $<'
$(VERB) PYTHONPATH=test/test_extension/build/lib.linux-x86_64-2.7 zsh -c 'time $(CPYTHON) $<'
nosearch_pypyrun_%: %.py ext_python
$(VERB) PYTHONPATH=test/test_extension/build/lib.linux-x86_64-2.7 zsh -c 'time $(PYPY) $<'
$(call make_search,runpy_%)
......@@ -1203,7 +1204,7 @@ $(wordlist 2,9999,$(SHAREDMODS_OBJS)): $(firstword $(SHAREDMODS_OBJS))
.PHONY: ext_python ext_pythondbg
ext_python: $(TEST_EXT_MODULE_SRCS)
cd $(TEST_DIR)/test_extension; python setup.py build
cd $(TEST_DIR)/test_extension; $(CPYTHON) setup.py build
ext_pythondbg: $(TEST_EXT_MODULE_SRCS)
cd $(TEST_DIR)/test_extension; python2.7-dbg setup.py build
......
......@@ -1704,6 +1704,7 @@ Box* astInterpretFunction(CLFunction* clfunc, int nargs, Box* closure, Box* gene
clfunc->dependent_interp_callsites.invalidateAll();
UNAVOIDABLE_STAT_TIMER(t0, "us_timer_in_jitted_code");
if (closure && generator)
return optimized->closure_generator_call((BoxedClosure*)closure, (BoxedGenerator*)generator, arg1, arg2,
arg3, args);
......
......@@ -87,8 +87,6 @@ extern GlobalState g;
// in runtime_hooks.cpp:
void initGlobalFuncs(GlobalState& g);
extern int sigprof_pending;
DS_DECLARE_RWLOCK(codegen_rwlock);
}
......
......@@ -55,8 +55,6 @@
namespace pyston {
int sigprof_pending = 0;
GlobalState g;
extern "C" {
......@@ -358,9 +356,13 @@ static void handle_sigusr1(int signum) {
_printStacktrace();
}
#if ENABLE_SAMPLING_PROFILER
int sigprof_pending = 0;
static void handle_sigprof(int signum) {
sigprof_pending++;
}
#endif
//#define INVESTIGATE_STAT_TIMER "us_timer_in_jitted_code"
#ifdef INVESTIGATE_STAT_TIMER
......
......@@ -197,7 +197,7 @@ public:
int pp_id = -1;
for (int i = 0; i < ii->getNumArgOperands(); i++) {
llvm::Value* op = ii->getArgOperand(i);
if (i != 1) {
if (i != 2) {
if (i == 0) {
llvm::ConstantInt* l_pp_id = llvm::cast<llvm::ConstantInt>(op);
pp_id = l_pp_id->getSExtValue();
......
......@@ -32,6 +32,11 @@ namespace gc {
class GCVisitor;
}
#if ENABLE_SAMPLING_PROFILER
extern int sigprof_pending;
void _printStacktrace();
#endif
namespace threading {
// Whether or not a second thread was ever started:
......
......@@ -1491,7 +1491,7 @@ Box* BoxedCApiFunction::tppCall(Box* _self, CallRewriteArgs* rewrite_args, ArgPa
if (!rewrite_success)
rewrite_args = NULL;
RewriterVar* r_passthrough;
RewriterVar* r_passthrough = NULL;
if (rewrite_args)
r_passthrough = rewrite_args->rewriter->loadConst((intptr_t)self->passthrough, Location::forArg(0));
......
......@@ -4090,7 +4090,7 @@ Box* compareInternal(Box* lhs, Box* rhs, int op_type, CompareRewriteArgs* rewrit
}
Box* contained;
RewriterVar* r_contained;
RewriterVar* r_contained = NULL;
if (rewrite_args) {
CallRewriteArgs crewrite_args(rewrite_args->rewriter, rewrite_args->rhs, rewrite_args->destination);
crewrite_args.arg1 = rewrite_args->lhs;
......
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