[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] forking and GC

From: Paolo Bonzini
Subject: Re: [Help-smalltalk] forking and GC
Date: Tue, 25 Nov 2003 11:27:42 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031020 Debian/1.5-1

> My abstract goals here are to provide an environment
> where the bulk executes in real time, using the Emacs lisp
> files to interact with it. The top_level_loop needs to be
> executed, but perhaps I will need to simulate this.

Hmm... it may be possible to run the loop asynchronously. Not on top of my todo list, but not very complex actually. Patches are welcome, just follows these steps:

1) apply the attached patch (it is against my snapshot but should apply more or less cleanly everywhere).

2) support invoking _gst_interpret (NULL); look for is_process_terminating (processOOP)
and stick a "processOOP &&" in front of it.

3) add a mechanism to leave at once the interpreter. Like creating a routine with
  my_flag = 1;
and, in interp.c

 if (!processOOP && my_flag)
     in_interpreter = false;
     return (NULL);

4) modify file_polling_handler and _gst_async_file_polling so that it can also set my_flag (as a quick&dirty solution, you can do this is node->semaphoreOOP is NULL, but please comment the code).

5) invoke _gst_async_file_polling and (if it returns 0) _gst_interpret (NULL) from poll_and_read instead of doing the poll loop. Please add a preprocessor symbol to the top of input.c to disable this behavior (see comp.c or opt.c for examples).

6) find a better name for my_flag

7) send me the patch, fix anything I've missed :-) and send me the updated patch

Ok, it's not so big apart from steps 6 and 7, but I'll leave it as a homework because you may nevertheless get some good insights and you look like a smart guy (I'm interested in your project). Feel free to mail me.

My main problem right now is the C callouts. I will verify this without JIT. Hmm. Amazingly, it works, and the same exact speed...

Do you mean that the JIT is as fast as the interpreter? Or that the interpreter is fast enough for you?


ps: please always CC the mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]