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

Add macro for Unified Logging to internalize ResourceMark allocation

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Won't Fix
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      svc

      Description

      To improve clarity and conciseness in logging code, a macro should be added so that when LogHandle(<tag>)::<level>_stream() is passed into a logging function, a ResourceMark is automatically created. A macro is also needed for when the external_name() function is used with classunload logging, so that

      if (log_is_enabled(Trace, classunload)) {
      ResourceMark rm;
      log_trace(classunload)("unlinking class (sibling) %s", sibling->external_name());
      }

      does not require the first two lines.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rprotacio Rachel Protacio (Inactive)
                Reporter:
                rprotacio Rachel Protacio (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: