Issue Details (XML | Word | Printable)

Key: RVM-752
Type: Sub-task Sub-task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Filip Pizlo
Reporter: Ian Rogers
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RVM
RVM-91

Rationalize createVM code

Created: 23/Jan/09 05:52 AM   Updated: 11/May/09 08:20 AM   Resolved: 03/Apr/09 07:00 PM
Component/s: Runtime: Threads and Concurrency
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. Text File fixCreateVM.patch (5 kB)



 Description  « Hide

CreateVM is a routine in libvm.c that is responsible for starting the VM, it takes an argument as to whether to create the VM on a separate thread or not. On IA32 this argument is ignored. On PowerPC it is taken. The Intel createVM code with native threads always keeps the primordial thread alive, whereas the PowerPC code that starts the VM on a separate thread only keeps it alive as long as the boot thread hasn't reached boot completed. We should have a coherent story on what this code is doing.



Filip Pizlo added a comment - 02/Feb/09 09:16 PM

On IA32/Linux we keep the primordial thread alive in a bizarre way because on some versions of Linux's pthreads, if the main() thread dies, the process dies with it.


Filip Pizlo added a comment - 07/Feb/09 10:36 PM

Actually, OS X pthreads do the same thing. If main() exits, the process exits. I suppose that makes sense.

I'm changing the code now so that createVM no longer takes that silly argument. This is a nice little simplification. Will commit when it's confirmed to not break stuff.


Filip Pizlo added a comment - 07/Feb/09 11:54 PM

Patch to simplify createVM().


Filip Pizlo added a comment - 07/Feb/09 11:55 PM

I've got a patch that does this; holding off on it because I want to see if I can fix some of these crashes.


Filip Pizlo added a comment - 03/Apr/09 07:00 PM

Fixed in r15640