Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-7641

TMethodCall::Execute (unnecessary) slowness in ROOT 6

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 6.06/00
    • Fix Version/s: 6.10/00
    • Component/s: Cling
    • Labels:
      None
    • Environment:

      Gentoo Linux x86_64

      Description

      Dear Axel,

      as promised from my presentation, here's the bugreport for the (unnecessary) slowness of TMethodCall::Execute.
      I think it's mostly clear from the callgrind information in the attached image (taken with kcachegrind disassembly).

      Sadly, line number information is somehow missing from the disassembly, but I am pretty sure it is happening in "core/meta/src/TClingCallFun
      c.cxx:1973":

      *ret = cling::Value(QT, *fInterp);

      This is also present in some of the other branches of "TClingCallFunc::exec_with_valref_return", actually.

      It triggers cling::Value construction, move, and destruction.
      Most time in this cling::Value constructor seems to go into

      cling::Value::determineStorageType(clang::QualType)

      which of course only needs to be done when a fresh cling::Value is really necessary.

      From callgrind it seems that this eats more than 50 % of the cycles if the function called itself is lightweight and PoD-returning.

      Cheers,
      Oliver

        Attachments

        1. 1-execInt.png
          1-execInt.png
          109 kB
        2. 2-IFacePtr.png
          2-IFacePtr.png
          33 kB
        3. 4-clingValue_construction.png
          4-clingValue_construction.png
          58 kB
        4. 5-determineStorageType.png
          5-determineStorageType.png
          86 kB
        5. 6-isSignedIntegerOrEnumerationType.png
          6-isSignedIntegerOrEnumerationType.png
          125 kB
        6. callfuncCallgrind.png
          callfuncCallgrind.png
          21 kB

          Activity

            People

            Assignee:
            axel Axel Naumann
            Reporter:
            ofreyerm Oliver Freyermuth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: