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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 10
    • 10
    • hotspot
    • b36
    • generic
    • generic

        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.

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

                Created:
                Updated:
                Resolved: