Review request: 8003935: Simplify the needed includes for using Thread::current()
Coleen Phillimore
coleen.phillimore at oracle.com
Mon Nov 26 06:14:31 PST 2012
This looks good to me. Thank you for explaining why this is like this
again, because I still think it was the right decision. This one is
warranted though because it's critical that Thread::current() be inlined.
Thanks,
Coleen
On 11/23/2012 6:54 AM, Stefan Karlsson wrote:
> http://cr.openjdk.java.net/~stefank/8003935/webrev
>
> Today, whenever we use Thread::current() we have to all these lines:
>
> #include "runtime/thread.hpp"
> #ifdef TARGET_OS_FAMILY_linux
> # include "thread_linux.inline.hpp"
> #endif
> #ifdef TARGET_OS_FAMILY_solaris
> # include "thread_solaris.inline.hpp"
> #endif
> #ifdef TARGET_OS_FAMILY_windows
> # include "thread_windows.inline.hpp"
> #endif
> #ifdef TARGET_OS_FAMILY_bsd
> # include "thread_bsd.inline.hpp"
> #endif
>
> This patch hides this dispatching in a new file named
> thread.inline.hpp. Now we only have to include thread.inline.hpp.
>
> Some background to these includes: This type of dispatching was
> introduced into the source files when we removed the includeDB files.
> We discussed whether we should use "dispatch files" or not for this
> kind platform dependent includes. The decision was to not create
> dispatch files for all types of platform at that time, but instead
> manually create them when we thought it was warranted.
>
> thanks,
> StefanK
>
>
More information about the hotspot-dev
mailing list