Reducing overall amount of OpenJDK source code
amishanin at swemel.ru
Tue May 25 07:30:39 UTC 2010
> Unless you plan on only doing this once, there will be a limit on what you can do without this becoming a maintenance nightmare.
> In simplistic terms with the Hotspot code base for any OS you don't support you can delete any directory with that OS in its name. This includes the src/os/* directories and the src/os_cpu/* directories and the make/* directories. You can then do the same thing for any cpu architectures you don't support.
> Unfortunately a lot of the supposedly common/platform-independent code in the VM is polluted with platform specific ifdefs. So if you wanted to go further you'd then go through and delete all the irrelevant ifdef'ed code - but that's the part that would then become a maintenance nightmare.
> Note that in the JDK the Solaris and Linux code is shared (and in the solaris directory) with a smattering of ifdefs.
> With regards to the OpenJDK libraries you may well be able to prune whole package branches, but you might find some non-obvious interactions.
> But really I don't see much point in exerting effort to achieve the above, when you could just prune the list of files to be verified, and the verification process can then ignore irrelevant ifdef'ed code.
> If you want to go further and try to prune parts of the VM you don't use, then it becomes an entirely different matter. I would not recommend attempting this.
> By the way, I think there should be very little tinkering with Makefiles.
> David Holmes
David, thanks, I'll try removing the corresponding directories from Hotspot sources and package branches from library sources and we'll see where it takes us.
More information about the build-dev