6348631 - request for review (updated)
Ivan.Krylov at Oracle.COM
Wed Dec 1 14:33:14 PST 2010
On 02.12.2010 1:15, David Holmes wrote:
> coleen phillimore said the following on 12/01/10 04:28:
>> This looks good to me. I have some concerns with the inlined socket functions in:
>> as it causes the .hpp file to import linux system specific hpp files which might cause namespace issues down the line. I'd rather these sorts of
>> includes be in a .cpp file. I don't know if they were inlined for performance reasons though, but it seems unlikely to have any benefit.
> When I was taught C programming I was taught that each file should be self-contained and include all headers that it needed. That way if I include a
> header to get the definitions for the "interface" to some library, I don't have to know what all of its dependencies are - I just include one header
> and call the library functions. I don't have to discover all its dependencies by trial and error (nor does the provider of the library have to
> document them all).
> Arguably for our xxx.inline.hpp files it is a different situation because they should only be included by our own xxx.cpp file. But as a general
> rule I would not advocate removing all system includes from all hotspot headers.
These files include os_linux.inline.hpp explicitly now.
Even worse: when gcc generates a precompiled header it wants to see definitions of those system structures and functions.That is before any cpp file
is being parsed.
More information about the hotspot-dev