Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8191787

move private inline functions from thread.inline.hpp -> thread.cpp

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 10
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b36
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dcubed Daniel Daugherty
                  Reporter:
                  dcubed Daniel Daugherty
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: