Skip to content
Snippets Groups Projects
  1. Aug 22, 2018
    • Vassil Vassilev's avatar
      [cxxmodules] Reduce the pcm duplicates. · 8c68429f
      Vassil Vassilev authored
      X3DBuffer.h is used indirectly by Graf3d and EG dictionaries. It does not
      make a lot of sense to exclude it. Digging git history shows the import from
      cvs so the real reason will probably remain unknown.
      8c68429f
    • Vassil Vassilev's avatar
      [cxxmodules] Remove uses of Gtypes.h · f63fbd15
      Vassil Vassilev authored
      It was deprecated (by comment) and emptied in year 2000.
      
      This patch removes all uses of it and 'registers' it to the modulemap
      to avoid our duplication algorithms do not find it as a duplicate.
      f63fbd15
  2. Aug 10, 2018
  3. Jun 13, 2018
  4. Jun 11, 2018
  5. Jun 08, 2018
  6. May 15, 2018
  7. Apr 03, 2018
    • Yuka Takahashi's avatar
      ROOT start up time and memory optimization · 903503ca
      Yuka Takahashi authored
        There are some codes compiled at the start up time. For example,
          - #include \"cling/Interpreter/RuntimeUniverse.h\"
          - #include \"cling/Interpreter/DynamicLookupRuntimeUniverse.h\"
          - namespace cling { class Interpreter; namespace runtime { Interpreter* gCling }}}
          - PrintValue
        These are passed to Cling as string and initialized at the start up time.  So I think it makes sense to reduce top-level global variables, #includes and virtual functions.
      
        1. Global variables
          If we break at emitModule, we can get a list of global variables and functions which are actually deserialized. These include functions, variables, STL classes and all the functions derives from them.
       I tried to change them to for example constexpr, so that it's processed at compile time.
        2. Eagerly Deserialized decls
          Thanks to @Axel 's hint and tip, we could minimize eagerly deserialized decls deserialized in ASTReader::PassInterestingDeclsToConsumer. We already removed most of eagerly deserialized decls (Some are remaining to be removed, some are hard to remove and some don't cost a lot).
      
        So far, we got 9.2% of cpu time improvement and 8.8% of memory improvement at start up time in release build.
      
        - root.exe -q -l
          - master
            cpu time = 0.09186914285714286 sec (average of 7 times)
            res  memory = 142.008 Mbytes
      
          - HEAD
            cpu time = 0.08337842857142856 sec
            res  memory = 129.508 Mbytes
      
        - hsimple.C
        Improved by 13% of cpu time and 8.5% of memory
          - master
            cpu time = 0.0954708 sec (average)
            res  memory = 142.891 Mbytes
      
          - HEAD
            cpu time = 0.0833258 sec
            res  memory = 130.73 Mbytes
      
        With modules
          - Improvement by 17.7% in cputime and 2% in memory on root.exe -q -l
          (For memory, small improvement is because most of the memory is taken by LoadModules)
          - With this patch, modules is 11.2% slower in cpu time and 6% better in residential memory.
      903503ca
  8. Mar 27, 2018
  9. Feb 22, 2018
    • Julien Nabet's avatar
      Fix some cppcheck reports · 0ebc4cbc
      Julien Nabet authored
      [core/winnt/src/TWinNTSystem.cxx:996]: (error) Invalid number of character '(' when these macros are defined: 'ROOTPREFIX'.
      [html/src/TDocDirective.cxx:316]: (error) Invalid number of character '{' when these macros are defined: 'R__BEPAEPSTLICHERALSDERPAPST'.
      [math/mathcore/src/Delaunay2D.cxx:30]: (error) Invalid number of character '{' when these macros are defined: 'HAS_CGAL'.
      
      [graf2d/qt/src/TGQt.cxx:2817]: (error) Array 'shape[15]' accessed at index 15, which is out of bounds.
      [graf2d/qt/src/TGQt.cxx:2818]: (error) Array 'shape[15]' accessed at index 16, which is out of bounds.
      [graf2d/qt/src/TGQt.cxx:2841]: (error) Array 'shape[15]' accessed at index 15, which is out of bounds.
      [net/http/civetweb/handle_form.inl:627]: (style) Array index 'd' is used before limits check.
      
      [roofit/roostats/src/MetropolisHastings.cxx:153]: (style) Condition 'i<1000' is always true
      
      [graf2d/qt/src/TQtClientGuard.cxx:289]: (warning) Assert statement modifies 'thisPix'.
      
      [roofit/roofitcore/src/BidirMMapPipe.cxx:906]: (style) Throwing a copy of the caught exception instead of rethrowing the original exception.
      [roofit/roofitcore/src/BidirMMapPipe.cxx:972]: (style) Throwing a copy of the caught exception instead of rethrowing the original exception.
      [roofit/roofitcore/src/BidirMMapPipe.cxx:1394]: (style) Throwing a copy of the caught exception instead of rethrowing the original exception.
      [roofit/roofitcore/src/BidirMMapPipe.cxx:1429]: (style) Throwing a copy of the caught exception instead of rethrowing the original exception.
      
      [graf3d/eve/src/TEveElement.cxx:1745]: (style) Exception should be caught by reference.
      [roofit/histfactory/src/hist2workspace.cxx:76]: (style) Exception should be caught by reference.
      [roofit/histfactory/src/hist2workspace.cxx:97]: (style) Exception should be caught by reference.
      [roofit/roofitcore/src/RooClassFactory.cxx:786]: (style) Exception should be caught by reference.
      [roofit/roofitcore/src/RooFactoryWSTool.cxx:413]: (style) Exception should be caught by reference.
      [roofit/roofitcore/src/RooFactoryWSTool.cxx:484]: (style) Exception should be caught by reference.
      [roofit/roofitcore/src/RooFactoryWSTool.cxx:526]: (style) Exception should be caught by reference.
      [roofit/roofitcore/src/RooFactoryWSTool.cxx:568]: (style) Exception should be caught by reference.
      [roofit/roofitcore/src/RooFactoryWSTool.cxx:588]: (style) Exception should be caught by reference.
      [roofit/roofitcore/src/RooFactoryWSTool.cxx:629]: (style) Exception should be caught by reference.
      [roofit/roofitcore/src/RooFactoryWSTool.cxx:642]: (style) Exception should be caught by reference.
      [roofit/roofitcore/src/RooFactoryWSTool.cxx:681]: (style) Exception should be caught by reference.
      [roofit/roofitcore/src/RooFactoryWSTool.cxx:859]: (style) Exception should be caught by reference.
      [tmva/tmva/src/CostComplexityPruneTool.cxx:131]: (style) Exception should be caught by reference.
      [tmva/tmva/src/CostComplexityPruneTool.cxx:142]: (style) Exception should be caught by reference.
      [tmva/tmva/src/DataSet.cxx:173]: (style) Exception should be caught by reference.
      [tmva/tmva/src/Reader.cxx:636]: (style) Exception should be caught by reference.
      [tmva/tmva/src/Reader.cxx:702]: (style) Exception should be caught by reference.
      [tmva/tmva/src/VariableGaussTransform.cxx:751]: (style) Exception should be caught by reference.
      
      [io/sql/src/TSQLStructure.cxx:1931] -> [io/sql/src/TSQLStructure.cxx:1933]: (warning) Identical condition 'len==0', second condition is always false
      0ebc4cbc
  10. Feb 21, 2018
  11. Jan 12, 2018
  12. Dec 05, 2017
  13. Nov 15, 2017
    • Julien Nabet's avatar
      clang format · ba47b086
      Julien Nabet authored
      (cherry picked from commit a4235ec91bdf35b2356855cac3fa19710259e4fd)
      ba47b086
    • Julien Nabet's avatar
      cppcheck: fix some reports · 50b0fbfd
      Julien Nabet authored
      [graf2d/asimage/src/libAfterImage/afterbase.c:1282]: (style) Array index 'i' is used before limits check
      [graf2d/asimage/src/libAfterImage/libungif/gifalloc.c:61]: (error) Memory leak: Object
      [graf2d/win32gdk/src/TGWin32.cxx:4540]: (error) Memory leak: GIFarr
      [graf3d/eve/src/TEveCalo2DGL.cxx:169]: (error) Memory leak: sliceVal
      [graf3d/eve/src/TEveCalo2DGL.cxx:169]: (error) Memory leak: sliceValRef
      [graf3d/eve/src/TEveCalo2DGL.cxx:369]: (error) Memory leak: sliceValsUp
      [graf3d/eve/src/TEveCalo2DGL.cxx:369]: (error) Memory leak: sliceValsLow
      [graf3d/eve/src/TEveCalo2DGL.cxx:369]: (error) Memory leak: sliceValsUpRef
      [graf3d/eve/src/TEveCalo2DGL.cxx:369]: (error) Memory leak: sliceValsLowRef
      [graf3d/eve/src/TEvePointSet.cxx:354]: (error) Memory leak: subarr
      
      [graf3d/gl/src/gl2ps.cxx:1382] -> [graf3d/gl/src/gl2ps.cxx:1382]: (style) Same expression on both sides of '|'
      see http://octave.org/doxygen/3.6/d3/d9c/gl2ps_8c_source.html#1343
      
      [hist/hist/src/TFormula.cxx:1741]: (style) Array index 'i' is used before limits check.
      [hist/hist/src/TFormula.cxx:1810]: (style) Array index 'i' is used before limits check.
      [hist/hist/src/TGraphSmooth.cxx:173]: (style) Array index 'imin' is used before limits check
      [hist/hist/src/TPrincipal.cxx:714]: (error) Memory leak: hX
      [hist/hist/src/TPrincipal.cxx:714]: (error) Memory leak: hD
      [hist/hist/src/TPrincipal.cxx:714]: (error) Memory leak: hP
      
      [hist/histpainter/src/TGraph2DPainter.cxx:416]: (style) Array index 'js' is used before limits check.
      [hist/histpainter/src/TGraph2DPainter.cxx:455]: (style) Array index 'js' is used before limits check.
      [interpreter/llvm/src/tools/bugpoint/ToolRunner.cpp:386]: (error) When Pos==CommandLine.size(), CommandLine[Pos] is out of bounds
      
      +Prefer prefix ++/-- operators for non-primitive types
      
      (cherry picked from commit 52dd84061dbcee5fa670b0cf42cec93f15e41819)
      50b0fbfd
  14. Oct 30, 2017
  15. Oct 06, 2017
    • Bertrand Bellenot's avatar
      formatting (clang-format) · 76813eff
      Bertrand Bellenot authored
      76813eff
    • Bertrand Bellenot's avatar
      formatting (clang-format) · bceb1c06
      Bertrand Bellenot authored
      bceb1c06
    • Bertrand Bellenot's avatar
      Fix compilation error on Windows · 1b85685f
      Bertrand Bellenot authored
      This fixes the following error:
      
      error G34C21FBE: static_assert expression is not an integral constant expression
              static_assert(offsetof(TEveVectorT, fZ) == offsetof(TEveVectorT, fX) + 2*sizeof(TT),
                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stddef.h:42:31: note: expanded from macro 'offsetof'
                #define offsetof(s,m) ((size_t)&reinterpret_cast<char const volatile&>((((s*)0)->m)))
                                      ^
        TEveProjections.h:174:71: note: in instantiation of member function 'TEveVectorT<float>::Arr' requested here
           virtual Float_t*    GetProjectedCenter() { return fProjectedCenter.Arr(); }
                                                                              ^
        TEveVector.h:55:21: note: cast that performs the conversions of a reinterpret_cast is not allowed in a constant expression
              static_assert(offsetof(TEveVectorT, fZ) == offsetof(TEveVectorT, fX) + 2*sizeof(TT),
                            ^
        C:\Program Files (x86)\Windows Kits\10\Include\10.0.15063.0\ucrt\stddef.h:42:32: note: expanded from macro 'offsetof'
                #define offsetof(s,m) ((size_t)&reinterpret_cast<char const volatile&>((((s*)0)->m)))
                                       ^
      1b85685f
  16. Oct 05, 2017
  17. Sep 29, 2017
    • Matevz Tadel's avatar
      Make TGLVertex3 and TGLVector3 PODs. · b4b1431c
      Matevz Tadel authored
      b4b1431c
    • Matevz Tadel's avatar
      Allow disabling of display list usage, v1. · c34ef1b7
      Matevz Tadel authored
      Some MesaGL implementations (since 2016) have trouble (segv) when one tries
      to store vertex array operations into display lists. The practice is indeed
      somewhat questionable :) The following options will allow complete or partial
      disablement of display list usage.
      OpenGL.UseDisplayLists:                     1
      OpenGL.UseDisplayListsForVertexArrays:      1
      
      OpenGL.UseDisplayLists already works.
      
      Handling of OpenGL.UseDisplayListsForVertexArrays still needs to be
      implemented as it requires review of all GL rendering classes.
      c34ef1b7
  18. Sep 20, 2017
    • Olivier Couet's avatar
      Fix memory leak in the Cocoa backend. · d28e2ca2
      Olivier Couet authored
      This was reported here:
      https://sft.its.cern.ch/jira/browse/ROOT-8951
      
      Fix from Timur:
      
      1. Add missing TGCocoa::ClosePixmap implementation. Apparently, while scanning for this function
          calls in TPad's code, I forgot to check TPadPainter and thus decided it's never used at all.
      2. Make DestroyDrawable more 'atomic' - hide the fact that we first have to 'select drawable'
          (gVirtualX->SelectWindow(id) - note, SelectWindow for pixmap!!!) and then call
          ClosePixmap() - this is due to the old design problem/inconsistency in X11 backend
          and TPad::fPixmapID, which is not a real pixmap ID but some index that points to array
          where the real pixmap id is. Now DestroyDrawable accepts this fPixmapID and does
         all work of selecting pixmap and closing it.
      d28e2ca2
  19. Sep 08, 2017
  20. Sep 05, 2017
  21. Aug 31, 2017
  22. Jul 28, 2017
    • Raphael Isemann's avatar
      Use ROOT_STANDARD_LIBRARY_PACKAGE where possible [NFC] · ac0de75b
      Raphael Isemann authored
      This refactors the CMake build files to no longer manually call
      the CMake functions for generating and linking the dicionairies.
      One reason is to reduce boilerplate, the other is that it is now
      no longer possible to have naming mismatches between the dictionary
      generation arguments and linking function arguments which was causing
      the race conditions we had in our build system.
      
      This also now follows more strictly the separation between dependencies
      like Math, Tree and Core and pure linking flags to external libraries.
      ac0de75b
  23. Jul 26, 2017
  24. Jul 13, 2017
  25. Jul 12, 2017
    • Raphael Isemann's avatar
      Fixed dependencies between rootcling invocations and linking. · 82ecb5f0
      Raphael Isemann authored
      The naming of the library in the two function calls ROOT_GENERATE_DICTIONARY
      and ROOT_LINKER_LIBRARY was often not matching. This causes that
      ROOT_LINKER_LIBRARY couldn't correctly set its dependencies to the output
      file of ROOT_GENERATE_DICTIONARY and therefore causes race conditions in
      the build system.
      
      Note: We're attached all dependencies to a custom target, and
      NOT to the output files generated by rootcling. This should mitigate
      the race conditions we experience when multiple targets in different
      Make jobs request the same output file as a dependency and then
      suffer from this Make problem that is described here:
      https://cmake.org/Bug/view.php?id=10082
      
      This patch also adds a (commented out) piece of code that can print
      warnings if we don't have a fitting G__*.cxx file for a
      ROOT_LINKER_LIBRARY call. This is sometimes intended, so I didn't
      enable this warning by default. We should enable this code
      by default in the future once we have a way to express if we
      intentionally don't provide the G__*.cxx file when calling
      ROOT_LINKER_LIBRARY.
      82ecb5f0
    • Raphael Isemann's avatar
      Add missing dependencies to ROOT_GENERATE_DICTIONARY · 8a646b53
      Raphael Isemann authored
      ROOT_GENERATE_DICTIONARY allows to specify dependencies, but we currently
      don't actually specify those. As we need this for getting the module
      dependencies right (as we can't build missing modules on demand), we should
      add those dependencies here. Then those dependencies propagate to the
      rootcling invocation which will in the future also generate the C++ module
      for the selected dictionary.
      8a646b53
  26. Jun 08, 2017
  27. Jun 06, 2017
    • Vassil Vassilev's avatar
      Do not confuse clang-format. · 68a8a335
      Vassil Vassilev authored
      ClassImp is a macro defined in Rtypes.h. It can be written without trailing
      semicolon. However, clang-format is based on lexing and it doesn't know at
      all about preprocessors and how to expand macros. When visiting ClassImp(X)
      it thinks this is not a completed entity (as it doesn't expand macros) and
      considers the next line as continuation of the previous.
      
      Inserting a semicolon fixes the issue and makes formatting with clang-format
      in the ROOT codebase less tricky.
      68a8a335
  28. Jun 01, 2017
  29. May 19, 2017
  30. May 12, 2017
Loading