-
Bug
-
Resolution: Fixed
-
P4
-
10
-
b36
-
generic
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8192859 | 11 | Daniel Daugherty | P4 | Closed | Not an Issue |
A comment from Coleen's code review of JDK-8167108:
>>>>>
>>>>>> If these functions xchg_smr_thread_list, get_smr_java_thread_list, inc_smr_deleted_thread_count are only used by thread.cpp, I think they should go in that file and not in the .inline.hpp file to be included and possibly called by other files. I think they're private to class Threads.
>>>>>
>>>>> I have a vague memory that some of the compilers don't do inlining when
>>>>> an "inline" function is in a .cpp. I believe we want these functions
>>>>> to be inlined for performance reasons. Erik should probably chime in
>>>>> here.
>>>>
>>>> I don't see why this should be. Maybe some (older) compilers require it to be found before the call though, but that can still be accomplished in the .cpp file.
>>>
>>> Again, we'll see what Erik wants to do...
>>
>> I don't mind. Either file works for me. For me it's more intuitive if inline member function definitions are in the .inline.hpp files. But if there are strong forces to move this to the cpp file, then sure.
>
> I prefer inline member function definitions in the .inline.hpp files.
> (There might even be a style guide note about this...)
>
> Coleen, are you okay if we leave them there?
Yes, that's fine.
Stefan K would also like this move made as a Thread-SMR cleanup.
>>>>>
>>>>>> If these functions xchg_smr_thread_list, get_smr_java_thread_list, inc_smr_deleted_thread_count are only used by thread.cpp, I think they should go in that file and not in the .inline.hpp file to be included and possibly called by other files. I think they're private to class Threads.
>>>>>
>>>>> I have a vague memory that some of the compilers don't do inlining when
>>>>> an "inline" function is in a .cpp. I believe we want these functions
>>>>> to be inlined for performance reasons. Erik should probably chime in
>>>>> here.
>>>>
>>>> I don't see why this should be. Maybe some (older) compilers require it to be found before the call though, but that can still be accomplished in the .cpp file.
>>>
>>> Again, we'll see what Erik wants to do...
>>
>> I don't mind. Either file works for me. For me it's more intuitive if inline member function definitions are in the .inline.hpp files. But if there are strong forces to move this to the cpp file, then sure.
>
> I prefer inline member function definitions in the .inline.hpp files.
> (There might even be a style guide note about this...)
>
> Coleen, are you okay if we leave them there?
Yes, that's fine.
Stefan K would also like this move made as a Thread-SMR cleanup.
- backported by
-
JDK-8192859 move private inline functions from thread.inline.hpp -> thread.cpp
-
- Closed
-
- relates to
-
JDK-8167108 inconsistent handling of SR_lock can lead to crashes
-
- Resolved
-