def switch(self, stacklet): if DEBUG: debug.remove(stacklet) x = cintf.save_rvmprof_stack() try: h = self._gcrootfinder.switch(stacklet) finally: cintf.restore_rvmprof_stack(x) if DEBUG: debug.add(h) return h
def new(self, callback, arg=llmemory.NULL): if DEBUG: callback = _debug_wrapper(callback) x = cintf.save_rvmprof_stack() try: cintf.empty_rvmprof_stack() h = self._gcrootfinder.new(self, callback, arg) finally: cintf.restore_rvmprof_stack(x) if DEBUG: debug.add(h) return h