Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Replacing Darwin with -O2 recompiled version

Replacing Darwin with -O2 recompiled version
Thread Tools
GeeYouEye
Junior Member
Join Date: Mar 2003
Location: Walnut Creek, CA
Status: Offline
Reply With Quote
Sep 9, 2005, 06:01 PM
 
The default installation of Darwin in Tiger and the binary versions availible at www.opensource.apple.com/darwin are compiled with -Os to keep the memory footprint down, especially of the xnu kernel. I have a lot of memory though (PowerBook with 1 GB), so I decided I'd like to have an -O2 compiled version, to see what kind of a speedup I can get. What I've done:

Downloaded darwinbuild from opendarwin.org, fetched all the sources.

Changed one of the Makefiles in CoreOSMakefiles30 to have the optimization be -O2 rather than -Os.

Ran darwinbuild on xnu, and it compiled pretty much everything.

The build products look like a CLI-only Darwin installation. They're currently all on a disk image. So the question is: did I miss anything important, and now that I've got this, how do I make Tiger use this recompiled version?

Sorry if this is in the wrong forum.
I bring order to chaos. You are in chaos windows, you are the contradiction, a bug wishing to be an OS.
     
Tesseract
Grizzled Veteran
Join Date: Apr 2002
Location: california
Status: Offline
Reply With Quote
Sep 9, 2005, 06:24 PM
 
I'm not sure.

But I'd do some benchmark-type tests on your system vs. a single-user-mode booted OS X system, to make sure it really is appreciably faster before trying to replace the OS X core (which will probably be difficult, if not impossible).
     
Detrius
Professional Poster
Join Date: Apr 2001
Location: Asheville, NC
Status: Offline
Reply With Quote
Sep 10, 2005, 01:11 AM
 
If all you did is recompile the kernel, I think you can just drop the new one on top of the old one. Of course, you want a good backup first--in case it doesn't boot. Most of that stuff is exactly the same as the release version of Tiger. Personally, I'd copy the recompiled kernel over, while backing up the existing one, repair permissions, and give it a shot. Of course, this requires having a second working installation available in case this breaks anything.
ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
     
mousehouse
Mac Enthusiast
Join Date: Dec 2002
Location: netherlands
Status: Offline
Reply With Quote
Sep 11, 2005, 03:47 PM
 
You could clone your bootdrive using Carbon Copy Cloner or some tool like that and change the kernel on that clone, then boot off that drive.

I'm very curious if it works!
MacBook Pro 13"/2.66 (09/2010), Mac Mini c2d/1.83 (01/2008)
     
bradoesch
Professional Poster
Join Date: Jun 2000
Status: Offline
Reply With Quote
Sep 11, 2005, 05:09 PM
 
This reminds me of removing that debug code to make it Snappy™.

     
Tritium
Junior Member
Join Date: Jan 2003
Status: Offline
Reply With Quote
Oct 9, 2005, 12:47 PM
 
Chances are, Apple tried this kind of thing and decided it didn't improve performance. Very frequently optimizing for size increases performance more than optimizing for pure speed because more code fits in the L1 or L2 cache at any given instant and that provides the biggest speed boost by a large margin.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 03:34 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,