[pypy-commit] lang-smalltalk default: changed the ui-process handling in case of an explicit message send:
lwassermann
noreply at buildbot.pypy.org
Fri May 31 11:55:02 CEST 2013
Author: Lars Wassermann <lars.wassermann at gmail.com>
Branch:
Changeset: r427:d3122742615c
Date: 2013-05-30 16:31 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/d3122742615c/
Log: changed the ui-process handling in case of an explicit message send:
added another primitive to vmdebugging which indicates whether the
ui process should stop the VM now has to ensure that it does
indeed stop when asked to
diff --git a/spyvm/plugins/vmdebugging.py b/spyvm/plugins/vmdebugging.py
--- a/spyvm/plugins/vmdebugging.py
+++ b/spyvm/plugins/vmdebugging.py
@@ -4,6 +4,9 @@
DebuggingPlugin = Plugin()
+DebuggingPlugin.userdata['stop_ui'] = False
+def stop_ui_process():
+ DebuggingPlugin.userdata['stop_ui'] = True
@DebuggingPlugin.expose_primitive(unwrap_spec=[object])
def trace(interp, s_frame, w_rcvr):
@@ -46,3 +49,10 @@
raise error.PrimitiveFailedError()
print w_string.as_string().replace('\r', '\n')
return w_rcvr
+
+ at DebuggingPlugin.expose_primitive(unwrap_spec=[object])
+def stopUIProcess(interp, s_frame, w_rcvr):
+ if DebuggingPlugin.userdata.get('stop_ui', False):
+ return interp.space.w_true
+ else:
+ return interp.space.w_false
diff --git a/targetimageloadingsmalltalk.py b/targetimageloadingsmalltalk.py
--- a/targetimageloadingsmalltalk.py
+++ b/targetimageloadingsmalltalk.py
@@ -10,8 +10,11 @@
def _run_benchmark(interp, number, benchmark):
+ from spyvm.plugins.vmdebugging import stop_ui_process
+ stop_ui_process()
+
scheduler = wrapper.scheduler(interp.space)
- w_hpp = scheduler.highest_priority_process()
+ w_hpp = scheduler.active_process()
if space.unwrap_int(scheduler.active_process().fetch(space, 2)) > space.unwrap_int(w_hpp.fetch(space, 2)):
w_hpp = scheduler.active_process()
assert isinstance(w_hpp, model.W_PointersObject)
@@ -36,7 +39,7 @@
# third variable is priority
priority = space.unwrap_int(w_hpp.fetch(space, 2)) / 2 + 1
# Priorities below 10 are not allowed in newer versions of Squeak.
- priority = max(41, priority)
+ priority = max(11, priority)
w_benchmark_proc.store(space, 2, space.wrap_int(priority))
# make process eligible for scheduling
More information about the pypy-commit
mailing list