├── .gitignore ├── .gitlab-ci.yml ├── .travis.yml ├── .vscode └── snippets │ ├── cmake.json │ ├── cpp.json │ ├── css.json │ ├── javascript.json │ ├── python.json │ └── shellscript.json ├── Authors.md ├── CMakeLists.txt ├── ChangeLog.md ├── Doxyfile ├── Licence_CeCILL-C-en.txt ├── Licence_CeCILL-C-fr.txt ├── README.md ├── cmake ├── FindGMock.cmake ├── FindHwloc.cmake ├── FindNpm.cmake ├── FindNumactl.cmake ├── FindPintool.cmake ├── FindPip.cmake ├── macros.cmake └── unittest-macros.cmake ├── configure ├── dev ├── gen-archive.sh └── update-version.sh ├── doc └── bibliography.md ├── extern-deps ├── CMakeLists.txt ├── from-fftw │ └── cycle.h ├── from-htopml │ ├── CMakeLists.txt │ ├── Readme.txt │ └── json │ │ ├── CMakeLists.txt │ │ ├── ConvertToJson.cpp │ │ ├── ConvertToJson.h │ │ ├── ConvertToJson_impl.h │ │ ├── FastBufferdStream.hpp │ │ ├── JsonState.cpp │ │ ├── JsonState.h │ │ └── JsonState_impl.h ├── from-malt-v2 │ ├── CMakeLists.txt │ ├── Debug.cpp │ ├── Debug.hpp │ ├── FormattedMessage.cpp │ ├── FormattedMessage.hpp │ ├── LinuxProcMapReader.cpp │ ├── LinuxProcMapReader.hpp │ ├── SymbolRegistry.cpp │ └── SymbolRegistry.hpp ├── from-numactl │ ├── MovePages.cpp │ └── MovePages.hpp ├── gmock-1.12.1 │ ├── .clang-format │ ├── .github │ │ ├── ISSUE_TEMPLATE │ │ │ ├── 00-bug_report.md │ │ │ ├── 10-feature_request.md │ │ │ └── config.yml │ │ └── workflows │ │ │ └── gtest-ci.yml │ ├── .gitignore │ ├── BUILD.bazel │ ├── CMakeLists.txt │ ├── CONTRIBUTING.md │ ├── CONTRIBUTORS │ ├── LICENSE │ ├── README.md │ ├── WORKSPACE │ ├── ci │ │ ├── linux-presubmit.sh │ │ └── macos-presubmit.sh │ ├── docs │ │ ├── _config.yml │ │ ├── _data │ │ │ └── navigation.yml │ │ ├── _layouts │ │ │ └── default.html │ │ ├── _sass │ │ │ └── main.scss │ │ ├── advanced.md │ │ ├── assets │ │ │ └── css │ │ │ │ └── style.scss │ │ ├── community_created_documentation.md │ │ ├── faq.md │ │ ├── gmock_cheat_sheet.md │ │ ├── gmock_cook_book.md │ │ ├── gmock_faq.md │ │ ├── gmock_for_dummies.md │ │ ├── index.md │ │ ├── pkgconfig.md │ │ ├── platforms.md │ │ ├── primer.md │ │ ├── quickstart-bazel.md │ │ ├── quickstart-cmake.md │ │ ├── reference │ │ │ ├── actions.md │ │ │ ├── assertions.md │ │ │ ├── matchers.md │ │ │ ├── mocking.md │ │ │ └── testing.md │ │ └── samples.md │ ├── googlemock │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── cmake │ │ │ ├── gmock.pc.in │ │ │ └── gmock_main.pc.in │ │ ├── docs │ │ │ └── README.md │ │ ├── include │ │ │ └── gmock │ │ │ │ ├── gmock-actions.h │ │ │ │ ├── gmock-cardinalities.h │ │ │ │ ├── gmock-function-mocker.h │ │ │ │ ├── gmock-matchers.h │ │ │ │ ├── gmock-more-actions.h │ │ │ │ ├── gmock-more-matchers.h │ │ │ │ ├── gmock-nice-strict.h │ │ │ │ ├── gmock-spec-builders.h │ │ │ │ ├── gmock.h │ │ │ │ └── internal │ │ │ │ ├── custom │ │ │ │ ├── README.md │ │ │ │ ├── gmock-generated-actions.h │ │ │ │ ├── gmock-matchers.h │ │ │ │ └── gmock-port.h │ │ │ │ ├── gmock-internal-utils.h │ │ │ │ ├── gmock-port.h │ │ │ │ └── gmock-pp.h │ │ ├── src │ │ │ ├── gmock-all.cc │ │ │ ├── gmock-cardinalities.cc │ │ │ ├── gmock-internal-utils.cc │ │ │ ├── gmock-matchers.cc │ │ │ ├── gmock-spec-builders.cc │ │ │ ├── gmock.cc │ │ │ └── gmock_main.cc │ │ └── test │ │ │ ├── BUILD.bazel │ │ │ ├── gmock-actions_test.cc │ │ │ ├── gmock-cardinalities_test.cc │ │ │ ├── gmock-function-mocker_test.cc │ │ │ ├── gmock-internal-utils_test.cc │ │ │ ├── gmock-matchers-arithmetic_test.cc │ │ │ ├── gmock-matchers-comparisons_test.cc │ │ │ ├── gmock-matchers-containers_test.cc │ │ │ ├── gmock-matchers-misc_test.cc │ │ │ ├── gmock-matchers_test.h │ │ │ ├── gmock-more-actions_test.cc │ │ │ ├── gmock-nice-strict_test.cc │ │ │ ├── gmock-port_test.cc │ │ │ ├── gmock-pp-string_test.cc │ │ │ ├── gmock-pp_test.cc │ │ │ ├── gmock-spec-builders_test.cc │ │ │ ├── gmock_all_test.cc │ │ │ ├── gmock_ex_test.cc │ │ │ ├── gmock_leak_test.py │ │ │ ├── gmock_leak_test_.cc │ │ │ ├── gmock_link2_test.cc │ │ │ ├── gmock_link_test.cc │ │ │ ├── gmock_link_test.h │ │ │ ├── gmock_output_test.py │ │ │ ├── gmock_output_test_.cc │ │ │ ├── gmock_output_test_golden.txt │ │ │ ├── gmock_stress_test.cc │ │ │ ├── gmock_test.cc │ │ │ └── gmock_test_utils.py │ └── googletest │ │ ├── CMakeLists.txt │ │ ├── README.md │ │ ├── cmake │ │ ├── Config.cmake.in │ │ ├── gtest.pc.in │ │ ├── gtest_main.pc.in │ │ ├── internal_utils.cmake │ │ └── libgtest.la.in │ │ ├── docs │ │ └── README.md │ │ ├── include │ │ └── gtest │ │ │ ├── gtest-assertion-result.h │ │ │ ├── gtest-death-test.h │ │ │ ├── gtest-matchers.h │ │ │ ├── gtest-message.h │ │ │ ├── gtest-param-test.h │ │ │ ├── gtest-printers.h │ │ │ ├── gtest-spi.h │ │ │ ├── gtest-test-part.h │ │ │ ├── gtest-typed-test.h │ │ │ ├── gtest.h │ │ │ ├── gtest_pred_impl.h │ │ │ ├── gtest_prod.h │ │ │ └── internal │ │ │ ├── custom │ │ │ ├── README.md │ │ │ ├── gtest-port.h │ │ │ ├── gtest-printers.h │ │ │ └── gtest.h │ │ │ ├── gtest-death-test-internal.h │ │ │ ├── gtest-filepath.h │ │ │ ├── gtest-internal.h │ │ │ ├── gtest-param-util.h │ │ │ ├── gtest-port-arch.h │ │ │ ├── gtest-port.h │ │ │ ├── gtest-string.h │ │ │ └── gtest-type-util.h │ │ ├── samples │ │ ├── prime_tables.h │ │ ├── sample1.cc │ │ ├── sample1.h │ │ ├── sample10_unittest.cc │ │ ├── sample1_unittest.cc │ │ ├── sample2.cc │ │ ├── sample2.h │ │ ├── sample2_unittest.cc │ │ ├── sample3-inl.h │ │ ├── sample3_unittest.cc │ │ ├── sample4.cc │ │ ├── sample4.h │ │ ├── sample4_unittest.cc │ │ ├── sample5_unittest.cc │ │ ├── sample6_unittest.cc │ │ ├── sample7_unittest.cc │ │ ├── sample8_unittest.cc │ │ └── sample9_unittest.cc │ │ ├── src │ │ ├── gtest-all.cc │ │ ├── gtest-assertion-result.cc │ │ ├── gtest-death-test.cc │ │ ├── gtest-filepath.cc │ │ ├── gtest-internal-inl.h │ │ ├── gtest-matchers.cc │ │ ├── gtest-port.cc │ │ ├── gtest-printers.cc │ │ ├── gtest-test-part.cc │ │ ├── gtest-typed-test.cc │ │ ├── gtest.cc │ │ └── gtest_main.cc │ │ └── test │ │ ├── BUILD.bazel │ │ ├── googletest-break-on-failure-unittest.py │ │ ├── googletest-break-on-failure-unittest_.cc │ │ ├── googletest-catch-exceptions-test.py │ │ ├── googletest-catch-exceptions-test_.cc │ │ ├── googletest-color-test.py │ │ ├── googletest-color-test_.cc │ │ ├── googletest-death-test-test.cc │ │ ├── googletest-death-test_ex_test.cc │ │ ├── googletest-env-var-test.py │ │ ├── googletest-env-var-test_.cc │ │ ├── googletest-failfast-unittest.py │ │ ├── googletest-failfast-unittest_.cc │ │ ├── googletest-filepath-test.cc │ │ ├── googletest-filter-unittest.py │ │ ├── googletest-filter-unittest_.cc │ │ ├── googletest-global-environment-unittest.py │ │ ├── googletest-global-environment-unittest_.cc │ │ ├── googletest-json-outfiles-test.py │ │ ├── googletest-json-output-unittest.py │ │ ├── googletest-list-tests-unittest.py │ │ ├── googletest-list-tests-unittest_.cc │ │ ├── googletest-listener-test.cc │ │ ├── googletest-message-test.cc │ │ ├── googletest-options-test.cc │ │ ├── googletest-output-test-golden-lin.txt │ │ ├── googletest-output-test.py │ │ ├── googletest-output-test_.cc │ │ ├── googletest-param-test-invalid-name1-test.py │ │ ├── googletest-param-test-invalid-name1-test_.cc │ │ ├── googletest-param-test-invalid-name2-test.py │ │ ├── googletest-param-test-invalid-name2-test_.cc │ │ ├── googletest-param-test-test.cc │ │ ├── googletest-param-test-test.h │ │ ├── googletest-param-test2-test.cc │ │ ├── googletest-port-test.cc │ │ ├── googletest-printers-test.cc │ │ ├── googletest-setuptestsuite-test.py │ │ ├── googletest-setuptestsuite-test_.cc │ │ ├── googletest-shuffle-test.py │ │ ├── googletest-shuffle-test_.cc │ │ ├── googletest-test-part-test.cc │ │ ├── googletest-throw-on-failure-test.py │ │ ├── googletest-throw-on-failure-test_.cc │ │ ├── googletest-uninitialized-test.py │ │ ├── googletest-uninitialized-test_.cc │ │ ├── gtest-typed-test2_test.cc │ │ ├── gtest-typed-test_test.cc │ │ ├── gtest-typed-test_test.h │ │ ├── gtest-unittest-api_test.cc │ │ ├── gtest_all_test.cc │ │ ├── gtest_assert_by_exception_test.cc │ │ ├── gtest_environment_test.cc │ │ ├── gtest_help_test.py │ │ ├── gtest_help_test_.cc │ │ ├── gtest_json_test_utils.py │ │ ├── gtest_list_output_unittest.py │ │ ├── gtest_list_output_unittest_.cc │ │ ├── gtest_main_unittest.cc │ │ ├── gtest_no_test_unittest.cc │ │ ├── gtest_pred_impl_unittest.cc │ │ ├── gtest_premature_exit_test.cc │ │ ├── gtest_prod_test.cc │ │ ├── gtest_repeat_test.cc │ │ ├── gtest_skip_check_output_test.py │ │ ├── gtest_skip_environment_check_output_test.py │ │ ├── gtest_skip_in_environment_setup_test.cc │ │ ├── gtest_skip_test.cc │ │ ├── gtest_sole_header_test.cc │ │ ├── gtest_stress_test.cc │ │ ├── gtest_test_macro_stack_footprint_test.cc │ │ ├── gtest_test_utils.py │ │ ├── gtest_testbridge_test.py │ │ ├── gtest_testbridge_test_.cc │ │ ├── gtest_throw_on_failure_ex_test.cc │ │ ├── gtest_unittest.cc │ │ ├── gtest_xml_outfile1_test_.cc │ │ ├── gtest_xml_outfile2_test_.cc │ │ ├── gtest_xml_outfiles_test.py │ │ ├── gtest_xml_output_unittest.py │ │ ├── gtest_xml_output_unittest_.cc │ │ ├── gtest_xml_test_utils.py │ │ ├── production.cc │ │ └── production.h ├── iniparser │ ├── AUTHORS │ ├── CMakeLists.txt │ ├── INSTALL │ ├── LICENSE │ ├── Makefile │ ├── README │ ├── html │ │ ├── bc_s.png │ │ ├── closed.png │ │ ├── doxygen.css │ │ ├── doxygen.png │ │ ├── globals_func.html │ │ ├── index.html │ │ ├── iniparser_8h.html │ │ ├── iniparser_8main.html │ │ ├── nav_f.png │ │ ├── nav_h.png │ │ ├── open.png │ │ ├── tab_a.png │ │ ├── tab_b.gif │ │ ├── tab_b.png │ │ ├── tab_h.png │ │ ├── tab_l.gif │ │ ├── tab_r.gif │ │ ├── tab_s.png │ │ └── tabs.css │ ├── src │ │ ├── CMakeLists.txt │ │ ├── dictionary.c │ │ ├── dictionary.h │ │ ├── iniparser.c │ │ └── iniparser.h │ └── test │ │ ├── Makefile │ │ ├── iniexample.c │ │ ├── parse.c │ │ ├── twisted-errors.ini │ │ ├── twisted-genhuge.py │ │ ├── twisted-ofkey.ini │ │ ├── twisted-ofval.ini │ │ └── twisted.ini ├── jsoncpp │ ├── .clang-format │ ├── .travis.yml │ └── dist │ │ ├── CMakeLists.txt │ │ ├── json │ │ ├── json-forwards.h │ │ └── json.h │ │ ├── jsoncpp-doxygen-warning.log │ │ └── jsoncpp.cpp └── openpa │ ├── README.md │ └── opa_queue.h ├── options └── src ├── CMakeLists.txt ├── integration ├── CMakeLists.txt ├── pintool │ ├── CMakeLists.txt │ ├── Makefile.pin.in │ ├── makefile.rules.in │ ├── numaprof.cpp │ └── scala.sh └── scripts │ ├── CMakeLists.txt │ ├── numaprof-pintool.sh.in │ └── numaprof-to-callgrind.py ├── lib ├── CMakeLists.txt ├── caches │ ├── CMakeLists.txt │ ├── CpuCache.cpp │ ├── CpuCache.hpp │ ├── CpuCacheBuilder.cpp │ ├── CpuCacheBuilder.hpp │ ├── CpuCacheDummy.cpp │ ├── CpuCacheDummy.hpp │ ├── CpuSimpleFlatCache.cpp │ ├── CpuSimpleFlatCache.hpp │ ├── CpuSimpleFlatCacheStatic.hpp │ └── CpuSimpleFlatCacheStatic_impl.hpp ├── common │ ├── CMakeLists.txt │ ├── Debug.cpp │ ├── Debug.hpp │ ├── FormattedMessage.cpp │ ├── FormattedMessage.hpp │ ├── Helper.cpp │ ├── Helper.hpp │ ├── Options.cpp │ ├── Options.hpp │ ├── StaticAssoCache.hpp │ └── StaticAssoCache_impl.hpp ├── core │ ├── AccessMatrix.cpp │ ├── AccessMatrix.hpp │ ├── CMakeLists.txt │ ├── MallocTracker.cpp │ ├── MallocTracker.hpp │ ├── PageTable.cpp │ ├── PageTable.hpp │ ├── ProcessTracker.cpp │ ├── ProcessTracker.hpp │ ├── Stack.cpp │ ├── Stack.hpp │ ├── Stats.cpp │ ├── Stats.hpp │ ├── ThreadTracker.cpp │ └── ThreadTracker.hpp ├── portability │ ├── CMakeLists.txt │ ├── Clock.cpp │ ├── Clock.hpp │ ├── Mutex.hpp │ ├── NumaTopo.cpp │ ├── NumaTopo.hpp │ ├── OS.cpp │ ├── OS.hpp │ ├── TopoHwloc.cpp │ └── TopoHwloc.hpp └── tests │ ├── BenchCpuCache.cpp │ ├── BenchInstrCache.cpp │ ├── BenchTBLVsPageTable.cpp │ ├── CMakeLists.txt │ ├── ReplayAllocTracker.cpp │ ├── TestCpuCacheBuilder.cpp │ ├── TestCpuCacheDummy.cpp │ ├── TestCpuSimpleFlatCache.cpp │ ├── TestCpuSimpleFlatCacheStatic.cpp │ ├── TestFormattedMessage.cpp │ ├── TestHelper.cpp │ ├── TestMallocTracker.cpp │ ├── TestMovePages.cpp │ ├── TestPageTable.cpp │ ├── TestStack.cpp │ └── TestStaticAssoCache.cpp ├── manpages ├── CMakeLists.txt ├── Makefile ├── numaprof-passwd.1.bz2 ├── numaprof-passwd.1.html ├── numaprof-passwd.ronn ├── numaprof-qt5.1.bz2 ├── numaprof-qt5.1.html ├── numaprof-qt5.ronn ├── numaprof-webview.1.bz2 ├── numaprof-webview.1.html ├── numaprof-webview.ronn ├── numaprof.1.bz2 ├── numaprof.1.html └── numaprof.ronn ├── qtview ├── CMakeLists.txt └── main.cpp ├── testcase ├── CMakeLists.txt ├── case-omp-stack-issue.cpp ├── case-openmp-loop.cpp ├── main-1G-big-alloc.cpp ├── main-1G-small-alloc.cpp ├── main-simple.cpp └── main-threads.cpp └── webview ├── CMakeLists.txt ├── Helper.py ├── ProfileHandler.py ├── bower.json ├── nhtpasswd.py ├── nhtpasswd.sh ├── nocache.py ├── prepare.sh ├── server.py ├── server.sh ├── static ├── css │ ├── prism.css │ ├── sources.css │ └── style.css └── js │ ├── details.js │ ├── helper.js │ ├── index.js │ ├── metrics.js │ ├── prism.js │ ├── selector.js │ ├── source-editor.js │ ├── sources.js │ └── threads.js ├── templates ├── asm.html ├── details.html ├── help.html ├── index.html ├── layout.html ├── sources.html └── threads.html ├── webview-htpasswd.sh.in └── webview.sh.in /.gitignore: -------------------------------------------------------------------------------- 1 | build* 2 | *.pyc 3 | package-lock.json 4 | src/webview/node_modules/ 5 | src/webview/deps/ 6 | src/webview/bower_components/ 7 | src/webview/package.json 8 | .kdev4 9 | *.kdev4 10 | .vscode 11 | doxygen 12 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | build_and_test: 2 | script: 3 | - ls -la 4 | - rm -rfv build testinstall 5 | - mkdir build 6 | - cd build 7 | - if [ -d /opt/pin-3.2-81205-gcc-linux ]; then ../configure --enable-debug --prefix="$PWD/../testinstall" --with-pintool=/opt/pin-3.2-81205-gcc-linux; else cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/../testinstall; fi 8 | - make 9 | - make test 10 | - make install 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | 3 | compiler: 4 | - gcc 5 | 6 | before_install: 7 | - sudo apt-get install -y node libnuma-dev libqt5webkit5-dev 8 | # - pip install --user cpp-coveralls 9 | 10 | script: 11 | - mkdir -p build 12 | - cd build 13 | - ../configure --enable-debug --enable-gcc-coverage --disable-webview --without-pintool 14 | - make 15 | # - make test 16 | 17 | #after_success: 18 | # - if [ "$CXX" == "g++" ]; then coveralls -r ../ -e src/tests --gcov-options '\-lp'; fi 19 | -------------------------------------------------------------------------------- /.vscode/snippets/cmake.json: -------------------------------------------------------------------------------- 1 | { 2 | "sep": { 3 | "prefix": "sep", 4 | "body": "######################################################" 5 | }, 6 | "file-header": { 7 | "prefix":"file-header", 8 | "body": [ 9 | "######################################################", 10 | "# PROJECT : numaprof #", 11 | "# VERSION : 1.1.5 #", 12 | "# DATE : ${CURRENT_MONTH}/${CURRENT_YEAR} #", 13 | "# AUTHOR : ${1:name} #", 14 | "# LICENSE : CeCILL-C #", 15 | "######################################################" 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.vscode/snippets/cpp.json: -------------------------------------------------------------------------------- 1 | { 2 | "sep-function": { 3 | "prefix": "sep-function", 4 | "body": "/******************* FUNCTION *********************/", 5 | "description": "" 6 | }, 7 | "sep-consts": { 8 | "prefix": "sep-consts", 9 | "body":"/******************** CONSTS **********************/", 10 | "description": "" 11 | }, 12 | "sep-using-namespace": { 13 | "prefix": "sep-using-namespace", 14 | "body":"/***************** USING NAMESPACE ******************/" 15 | }, 16 | "sep-headers":{ 17 | "prefix": "sep-headers", 18 | "body": "/******************** HEADERS *********************/" 19 | }, 20 | "sep-namespace": { 21 | "prefix": "sep-namespace", 22 | "body": "/******************** NAMESPACE *******************/" 23 | }, 24 | "sep-types": { 25 | "prefix": "sep-types", 26 | "body": "/********************* TYPES **********************/" 27 | }, 28 | "sep-class":{ 29 | "prefix": "sep-types", 30 | "body": "/********************* CLASS **********************/" 31 | }, 32 | "sep-struct": { 33 | "prefix": "sep-struct", 34 | "body": "/********************* STRUCT *********************/" 35 | }, 36 | "file-header": { 37 | "prefix":"file-header", 38 | "body": [ 39 | "/*****************************************************", 40 | " PROJECT : numaprof", 41 | " VERSION : 1.1.0-dev", 42 | " DATE : ${CURRENT_MONTH}/${CURRENT_YEAR}", 43 | " AUTHOR : ${1:name}", 44 | " LICENSE : CeCILL-C", 45 | "*****************************************************/" 46 | ] 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /.vscode/snippets/css.json: -------------------------------------------------------------------------------- 1 | { 2 | "sep-function": { 3 | "prefix": "sep-function", 4 | "body": "/******************* FUNCTION *********************/", 5 | "description": "" 6 | }, 7 | "sep-consts": { 8 | "prefix": "sep-consts", 9 | "body":"/******************** CONSTS **********************/", 10 | "description": "" 11 | }, 12 | "sep-using-namespace": { 13 | "prefix": "sep-using-namespace", 14 | "body":"/***************** USING NAMESPACE ******************/" 15 | }, 16 | "sep-headers":{ 17 | "prefix": "sep-headers", 18 | "body": "/******************** HEADERS *********************/" 19 | }, 20 | "sep-namespace": { 21 | "prefix": "sep-namespace", 22 | "body": "/******************** NAMESPACE *******************/" 23 | }, 24 | "sep-types": { 25 | "prefix": "sep-types", 26 | "body": "/********************* TYPES **********************/" 27 | }, 28 | "sep-class":{ 29 | "prefix": "sep-types", 30 | "body": "/********************* CLASS **********************/" 31 | }, 32 | "sep-struct": { 33 | "prefix": "sep-struct", 34 | "body": "/********************* STRUCT *********************/" 35 | }, 36 | "file-header": { 37 | "prefix":"file-header", 38 | "body": [ 39 | "/*****************************************************", 40 | " PROJECT : numaprof", 41 | " VERSION : 1.1.0-dev", 42 | " DATE : ${CURRENT_MONTH}/${CURRENT_YEAR}", 43 | " AUTHOR : ${1:name}", 44 | " LICENSE : CeCILL-C", 45 | "*****************************************************/" 46 | ] 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /.vscode/snippets/javascript.json: -------------------------------------------------------------------------------- 1 | { 2 | "sep-function": { 3 | "prefix": "sep-function", 4 | "body": "/******************* FUNCTION *********************/", 5 | "description": "" 6 | }, 7 | "sep-consts": { 8 | "prefix": "sep-consts", 9 | "body":"/******************** CONSTS **********************/", 10 | "description": "" 11 | }, 12 | "sep-using-namespace": { 13 | "prefix": "sep-using-namespace", 14 | "body":"/***************** USING NAMESPACE ******************/" 15 | }, 16 | "sep-headers":{ 17 | "prefix": "sep-headers", 18 | "body": "/******************** HEADERS *********************/" 19 | }, 20 | "sep-namespace": { 21 | "prefix": "sep-namespace", 22 | "body": "/******************** NAMESPACE *******************/" 23 | }, 24 | "sep-types": { 25 | "prefix": "sep-types", 26 | "body": "/********************* TYPES **********************/" 27 | }, 28 | "sep-class":{ 29 | "prefix": "sep-types", 30 | "body": "/********************* CLASS **********************/" 31 | }, 32 | "sep-struct": { 33 | "prefix": "sep-struct", 34 | "body": "/********************* STRUCT *********************/" 35 | }, 36 | "file-header": { 37 | "prefix":"file-header", 38 | "body": [ 39 | "/*****************************************************", 40 | " PROJECT : numaprof", 41 | " VERSION : 1.1.0-dev", 42 | " DATE : ${CURRENT_MONTH}/${CURRENT_YEAR}", 43 | " AUTHOR : ${1:name}", 44 | " LICENSE : CeCILL-C", 45 | "*****************************************************/" 46 | ] 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /.vscode/snippets/python.json: -------------------------------------------------------------------------------- 1 | { 2 | "sep": { 3 | "prefix": "sep", 4 | "body": "######################################################" 5 | }, 6 | "file-header": { 7 | "prefix":"file-header", 8 | "body": [ 9 | "######################################################", 10 | "# PROJECT : numaprof #", 11 | "# VERSION : 1.1.5 #", 12 | "# DATE : ${CURRENT_MONTH}/${CURRENT_YEAR} #", 13 | "# AUTHOR : ${1:name} #", 14 | "# LICENSE : CeCILL-C #", 15 | "######################################################" 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.vscode/snippets/shellscript.json: -------------------------------------------------------------------------------- 1 | { 2 | "sep": { 3 | "prefix": "sep", 4 | "body": "######################################################" 5 | }, 6 | "file-header": { 7 | "prefix":"file-header", 8 | "body": [ 9 | "######################################################", 10 | "# PROJECT : numaprof #", 11 | "# VERSION : 1.1.5 #", 12 | "# DATE : ${CURRENT_MONTH}/${CURRENT_YEAR} #", 13 | "# AUTHOR : ${1:name} #", 14 | "# LICENSE : CeCILL-C #", 15 | "######################################################" 16 | ] 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Authors.md: -------------------------------------------------------------------------------- 1 | List of authors 2 | =============== 3 | 4 | * Sébastien Valat (CERN) [2017-2018] -- Original author 5 | * Sébastien Valat (http://svalat.github.io) [2018-*] -- Original author 6 | 7 | Thanks for the occasional contributions 8 | --------------------------------------- 9 | 10 | * Rohan Verma [2022] - Build issue on Fedora 11 | 12 | Special thanks 13 | -------------- 14 | 15 | * Othamn Bouizi [2017] -- Source of the original wishlist 16 | 17 | Thanks to CERN for providing access to Intel KNL and NUMA machine to make 18 | original tests and developement. 19 | -------------------------------------------------------------------------------- /ChangeLog.md: -------------------------------------------------------------------------------- 1 | Change log 2 | ========== 3 | 4 | 1.1.5 - 28/06/2023 5 | ------------------ 6 | 7 | * Support for naming profile files with MPI ranks intead of PID (#36). 8 | * Fix support of relative paths in webview (#46) 9 | * Fix webview issue not displayer to popover of the annotations (not showing the table) (#48) 10 | 11 | 1.1.4 - 02/12/2022 12 | ------------------ 13 | 14 | * Fix detection of bower_components/ and deps/ directory in realease version (which already contains them) (#41). 15 | * Upgrade embeded gtest version (1.12.1) to avoid warnings on recent distributions 16 | * Fix unit test on recent ubuntu (22.04) due to move_pages changes. 17 | 18 | 1.1.3 - 12/09/2022 19 | ------------------ 20 | 21 | * Support of recent version of pintool (> 3.16), tested is 3.24 on ubuntu 22.04. 22 | * Support of gtest and gmock installed by system when possible to run unit tests. 23 | * Fix missing include to build on Fedora Gcc 12. 24 | 25 | 1.1.2 - 14/11/2020 26 | ------------------ 27 | 28 | * Fix issue with ALSR & fPIE on new linux distribution like debian/ubuntu 29 | 30 | 1.1.1 - 14/11/2020 31 | ------------------ 32 | 33 | * Fix python 2->3 issue forgoten before release 34 | 35 | 1.1.0 - 01/11/2020 36 | ------------------ 37 | 38 | * Now handle local/remote MCDRAM access instead of just MCDRAM. 39 | * Add instruction cache to go faster 40 | * Add a TLB cache to avoid walking in page table for every access. 41 | * Optionnaly handle access per batch, this provide a speed up of a factor 2 but loose in precision. 42 | * Add cache simulation with a simple L1 per thread model with LRU replacement policy. Disabled by default. 43 | * Total rewrite of the ./configure infrastructure to be more reusable in other projects. 44 | * Move GUI server to python3. 45 | * Support version 3.16 of pintool. 46 | 47 | 1.0.0 - 07/02/2018 48 | ------------------ 49 | 50 | * Basic implementation of the base library to handle the mecanics of data taking. 51 | * Made pintool implementation 52 | * Provide basic pintool wrapper to ease usage 53 | * Basic support of callgrind format* 54 | * Add cutoff to not export values lower than a given value. 55 | * Add qt5 browser view 56 | -------------------------------------------------------------------------------- /cmake/FindGMock.cmake: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # - Try to find GMOCK (https://github.com/google/googletest) 3 | # Once done this will define 4 | # GMOCK_FOUND - System has GMock 5 | # GMOCK_INCLUDE_DIRS - The GMock include directories 6 | # GMOCK_LIBRARIES - The libraries needed to use GMock 7 | # GMOCK_DEFINITIONS - Compiler switches required for using GMock 8 | 9 | ###################################################### 10 | set(GMOCK_PREFIX "" CACHE STRING "Help cmake to find GMock library (https://github.com/google/googletest) into your system.") 11 | 12 | ###################################################### 13 | find_path(GMOCK_INCLUDE_DIR gmock.h 14 | HINTS ${GMOCK_PREFIX}/include 15 | PATH_SUFFIXES gmock) 16 | 17 | ###################################################### 18 | set(GMOCK_INCLUDE_DIRS ${GMOCK_INCLUDE_DIR} ) 19 | 20 | ###################################################### 21 | include(FindPackageHandleStandardArgs) 22 | # handle the QUIETLY and REQUIRED arguments and set GMOCK_FOUND to TRUE 23 | # if all listed variables are TRUE 24 | find_package_handle_standard_args(GMock DEFAULT_MSG GMOCK_INCLUDE_DIR) 25 | 26 | ###################################################### 27 | mark_as_advanced(GMOCK_INCLUDE_DIR) 28 | -------------------------------------------------------------------------------- /cmake/FindHwloc.cmake: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # - Try to find hwloc (https://github.com/open-source-parsers/hwloc/) 3 | # Once done this will define 4 | # HWLOC_FOUND - System has hwloc 5 | # HWLOC_INCLUDE_DIRS - The hwloc include directories 6 | # HWLOC_LIBRARIES - The libraries needed to use hwloc 7 | # HWLOC_DEFINITIONS - Compiler switches required for using hwloc 8 | 9 | ###################################################### 10 | set(HWLOC_PREFIX "" CACHE STRING "Help cmake to find hwloc library (https://www.open-mpi.org/projects/hwloc/) into your system.") 11 | 12 | ###################################################### 13 | find_path(HWLOC_INCLUDE_DIR hwloc.h 14 | HINTS ${HWLOC_PREFIX}/include 15 | PATH_SUFFIXES hwloc) 16 | 17 | ###################################################### 18 | find_library(HWLOC_LIBRARY NAMES hwloc 19 | HINTS ${HWLOC_PREFIX}/lib) 20 | 21 | ###################################################### 22 | set(HWLOC_LIBRARIES ${HWLOC_LIBRARY} ) 23 | set(HWLOC_INCLUDE_DIRS ${HWLOC_INCLUDE_DIR} ) 24 | 25 | ###################################################### 26 | include(FindPackageHandleStandardArgs) 27 | # handle the QUIETLY and REQUIRED arguments and set HWLOC_FOUND to TRUE 28 | # if all listed variables are TRUE 29 | find_package_handle_standard_args(Hwloc DEFAULT_MSG 30 | HWLOC_LIBRARY HWLOC_INCLUDE_DIR) 31 | 32 | ###################################################### 33 | mark_as_advanced(HWLOC_INCLUDE_DIR HWLOC_LIBRARY ) 34 | -------------------------------------------------------------------------------- /cmake/FindNpm.cmake: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # - Try to find npm command 3 | # Once done this will define 4 | # NPM_FOUND - System has npm 5 | # NPM_BINARY - Path to the npm binary file 6 | 7 | ###################################################### 8 | find_program(NPM_BINARY npm) 9 | 10 | ###################################################### 11 | include(FindPackageHandleStandardArgs) 12 | # handle the QUIETLY and REQUIRED arguments and set NPM_FOUND to TRUE 13 | # if all listed variables are TRUE 14 | find_package_handle_standard_args(Npm "Cannot find NPM. This is required beause you took the git master branch. Download official tar.gz or disable webview." 15 | NPM_BINARY) 16 | 17 | ###################################################### 18 | mark_as_advanced(NPM_BINARY) 19 | 20 | -------------------------------------------------------------------------------- /cmake/FindNumactl.cmake: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # - Try to find numactl (https://github.com/numactl/numactl) 3 | # Once done this will define 4 | # NUMACTL_FOUND - System has numactl 5 | # NUMACTL_INCLUDE_DIRS - The numactl include directories 6 | # NUMACTL_LIBRARIES - The libraries needed to use numactl 7 | # NUMACTL_DEFINITIONS - Compiler switches required for using numactl 8 | 9 | ###################################################### 10 | set(NUMACTL_PREFIX "" CACHE STRING "Help cmake to find numactl/libnuma library (https://github.com/numactl/numactl) into your system.") 11 | 12 | ###################################################### 13 | find_path(NUMACTL_INCLUDE_DIR numa.h 14 | HINTS ${NUMACTL_PREFIX}/include) 15 | 16 | ###################################################### 17 | include(GNUInstallDirs) 18 | find_library(NUMACTL_LIBRARY NAMES numa 19 | HINTS ${NUMACTL_PREFIX}/lib ${NUMACTL_PREFIX}/${CMAKE_INSTALL_LIBDIR}) 20 | 21 | ###################################################### 22 | set(NUMACTL_LIBRARIES ${NUMACTL_LIBRARY} ) 23 | set(NUMACTL_INCLUDE_DIRS ${NUMACTL_INCLUDE_DIR} ) 24 | 25 | ###################################################### 26 | include(FindPackageHandleStandardArgs) 27 | # handle the QUIETLY and REQUIRED arguments and set NUMACTL_FOUND to TRUE 28 | # if all listed variables are TRUE 29 | find_package_handle_standard_args(Numactl DEFAULT_MSG 30 | NUMACTL_LIBRARY NUMACTL_INCLUDE_DIR) 31 | 32 | ###################################################### 33 | mark_as_advanced(NUMACTL_INCLUDE_DIR NUMACTL_LIBRARY ) 34 | -------------------------------------------------------------------------------- /cmake/FindPintool.cmake: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # - Try to find pintool (https://github.com/open-source-parsers/pintool/) 3 | # Once done this will define 4 | # PINTOOL_FOUND - System has pintool 5 | # PINTOOL_PIN - Path to the pintool pin binary file 6 | 7 | ###################################################### 8 | set(PINTOOL_PREFIX "" CACHE STRING "Help cmake to find pintool library (https://software.intel.com/en-us/articles/pin-a-dynamic-binary-instrumentation-tool) into your system.") 9 | 10 | ###################################################### 11 | find_program(PINTOOL_PIN pin 12 | HINTS ${PINTOOL_PREFIX}/) 13 | 14 | ###################################################### 15 | include(FindPackageHandleStandardArgs) 16 | # handle the QUIETLY and REQUIRED arguments and set PINTOOL_FOUND to TRUE 17 | # if all listed variables are TRUE 18 | find_package_handle_standard_args(Pintool DEFAULT_MSG 19 | PINTOOL_PIN) 20 | 21 | ###################################################### 22 | mark_as_advanced(PINTOOL_PIN) 23 | 24 | -------------------------------------------------------------------------------- /cmake/FindPip.cmake: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # - Try to find pip command 3 | # Once done this will define 4 | # PIP_FOUND - System has pip 5 | # PIP_BINARY - Path to the pip binary file 6 | 7 | ###################################################### 8 | find_program(PIP_BINARY pip3) 9 | 10 | ###################################################### 11 | include(FindPackageHandleStandardArgs) 12 | # handle the QUIETLY and REQUIRED arguments and set PIP_FOUND to TRUE 13 | # if all listed variables are TRUE 14 | find_package_handle_standard_args(Pip "Cannot find 'pip'. This is required beause you took the git master branch. Download official tar.gz or disable webview." 15 | PIP_BINARY) 16 | 17 | ###################################################### 18 | mark_as_advanced(PIP_BINARY) 19 | 20 | -------------------------------------------------------------------------------- /cmake/unittest-macros.cmake: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | set(ENABLE_VALGRIND "no" CACHE BOOL "Enable automatic usage of valgrind memcheck on each unit test execution.") 11 | set(ENABLE_JUNIT_OUTPUT "no" CACHE BOOL "Generate unit test output in junit format to be used by Jenkins or similar.") 12 | 13 | ###################################################### 14 | # Define some macro for unit test execution and definition 15 | # It's better to use this wrapper to get good integration 16 | # in jenkins infrastructure. 17 | 18 | ###################################################### 19 | #For integration of tests in jenkins, but only in self-test mode 20 | macro (daq_add_test test_name) 21 | #steup wrapper 22 | if (ENABLE_VALGRIND) 23 | set(tmp_test_wrapper valgrind --xml=yes --xml-file=${CMAKE_CURRENT_BINARY_DIR}/${test_name}.memcheck.xml --tool=memcheck --leak-check=full --show-reachable=yes) 24 | else(ENABLE_VALGRIND) 25 | set(tmp_test_wrapper "") 26 | endif(ENABLE_VALGRIND) 27 | 28 | #setup output options 29 | if (ENABLE_JUNIT_OUTPUT) 30 | set(tmp_test_run_option --gtest_output=xml:${CMAKE_CURRENT_BINARY_DIR}/${test_name}.gtest.xml) 31 | endif (ENABLE_JUNIT_OUTPUT) 32 | 33 | #gen text command and register 34 | add_test(${test_name} ${tmp_test_wrapper} ${CMAKE_CURRENT_BINARY_DIR}/${test_name} ${tmp_test_run_option}) 35 | endmacro (daq_add_test) 36 | -------------------------------------------------------------------------------- /dev/gen-archive.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ###################################################### 3 | # PROJECT : numaprof # 4 | # VERSION : 1.1.5 # 5 | # DATE : 06/2023 # 6 | # AUTHOR : Valat Sébastien - CERN # 7 | # LICENSE : CeCILL-C # 8 | ###################################################### 9 | 10 | ###################################################### 11 | #This script aimed at generating archive to distribute 12 | #the project. Simply call it from root directory without 13 | #any agruments. 14 | 15 | ###################################################### 16 | #extract version 17 | version=1.1.5 18 | prefix=numaprof-${version} 19 | 20 | ###################################################### 21 | if [ ! -z "$(echo $version | grep dev)" ]; then 22 | prefix=${prefix}-$(git rev-parse --short HEAD) 23 | fi 24 | 25 | ###################################################### 26 | echo "Generate ${prefix}.tar.gz..." 27 | set -e 28 | git archive --format=tar --prefix=${prefix}/ HEAD | bzip2 > /tmp/${prefix}.tar.bz2 29 | current=$PWD 30 | cd /tmp 31 | tar -xf ${prefix}.tar.bz2 32 | cd /tmp/${prefix}/src/webview 33 | ./prepare.sh 34 | rm -rfd node_modules 35 | cd /tmp 36 | tar -cjf ${prefix}.tar.bz2 ${prefix} 37 | cd $current 38 | mv /tmp/${prefix}.tar.bz2 ./ 39 | rm -rfvd /tmp/${prefix} 40 | echo "Finished" 41 | -------------------------------------------------------------------------------- /extern-deps/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | if (ENABLE_TESTS) 11 | if (NOT GTest_FOUND OR NOT GMOCK_FOUND) 12 | set(INSTALL_GTEST off) 13 | add_subdirectory(gmock-1.12.1) 14 | endif (NOT GTest_FOUND OR NOT GMOCK_FOUND) 15 | endif (ENABLE_TESTS) 16 | add_subdirectory(jsoncpp/dist) 17 | add_subdirectory(from-htopml) 18 | add_subdirectory(from-malt-v2) 19 | add_subdirectory(iniparser) 20 | -------------------------------------------------------------------------------- /extern-deps/from-htopml/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : MATT # 3 | # VERSION : 0.0.0 # 4 | # DATE : 02/2015 # 5 | # AUTHOR : Valat Sébastien # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | add_subdirectory(json) -------------------------------------------------------------------------------- /extern-deps/from-htopml/Readme.txt: -------------------------------------------------------------------------------- 1 | All the files into this directory are copied from project htopml written in 2012 2 | by Sébastien Valat. 3 | Those files are redistributed under licence CeCILL-C. -------------------------------------------------------------------------------- /extern-deps/from-htopml/json/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : htopml # 3 | # VERSION : 0.0.0 # 4 | # DATE : 02/2015 # 5 | # AUTHOR : Valat Sébastien # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | set(JSON_SOURCES JsonState.cpp ConvertToJson.cpp) 11 | set(JSON_HEADERS JsonState.h ConvertToJson.h JsonState_impl.h ConvertToJson_impl.h) 12 | 13 | ###################################################### 14 | add_library(htopml-json OBJECT ${JSON_SOURCES}) 15 | SET_TARGET_PROPERTIES(htopml-json PROPERTIES COMPILE_FLAGS -fPIC) 16 | 17 | ###################################################### 18 | #install procedure 19 | #INSTALL(FILES ${JSON_HEADERS} DESTINATION include/htopml) -------------------------------------------------------------------------------- /extern-deps/from-malt-v2/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : htopml # 3 | # VERSION : 0.0.0 # 4 | # DATE : 02/2015 # 5 | # AUTHOR : Valat Sébastien # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | add_library(malt-core OBJECT Debug.cpp FormattedMessage.cpp LinuxProcMapReader.cpp SymbolRegistry.cpp) 11 | SET_TARGET_PROPERTIES(malt-core PROPERTIES COMPILE_FLAGS -fPIC) 12 | 13 | ###################################################### 14 | #install procedure 15 | #INSTALL(FILES ${JSON_HEADERS} DESTINATION include/htopml) -------------------------------------------------------------------------------- /extern-deps/from-malt-v2/LinuxProcMapReader.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : MATT 3 | VERSION : 0.1.0-dev 4 | DATE : 02/2015 5 | AUTHOR : Valat Sébastien 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | //standard 11 | #include 12 | #include 13 | //MATT common 14 | #include "Debug.hpp" 15 | //locals 16 | #include "LinuxProcMapReader.hpp" 17 | 18 | /******************* NAMESPACE ********************/ 19 | namespace MATT 20 | { 21 | 22 | /******************* FUNCTION *********************/ 23 | void LinuxProcMapReader::load(void) 24 | { 25 | //errors 26 | assert(procMap.empty()); 27 | 28 | //open proc map 29 | FILE * fp = fopen("/proc/self/maps","r"); 30 | assumeArg(fp != NULL,"Failed to read segment mapping in %1 : %2.").arg("/proc/self/map").argStrErrno().end(); 31 | 32 | //loop on entries 33 | char buffer[4096]; 34 | char ignored[4096]; 35 | char fileName[4096]; 36 | size_t ignored2; 37 | LinuxProcMapEntry entry; 38 | 39 | //loop on lines 40 | while (!feof(fp)) 41 | { 42 | //load buffer 43 | char * res = fgets(buffer,sizeof(buffer),fp); 44 | 45 | //if ok, parse line 46 | if (res == buffer) 47 | { 48 | //parse 49 | int cnt = sscanf(buffer,"%p-%p %s %p %s %lu %s\n",&(entry.lower),&(entry.upper),ignored,&(entry.offset),ignored,&ignored2,fileName); 50 | 51 | //check args 52 | if (cnt == 7) 53 | entry.file = fileName; 54 | else if (cnt == 6) 55 | entry.file.clear(); 56 | else 57 | MATT_FATAL_ARG("Invalid readline of proc/map entry : %1.").arg(buffer).end(); 58 | 59 | //ok push 60 | procMap.push_back(entry); 61 | } 62 | } 63 | 64 | //close 65 | fclose(fp); 66 | } 67 | 68 | /******************* FUNCTION *********************/ 69 | const LinuxProcMapEntry * LinuxProcMapReader::getEntry(void* addr) const 70 | { 71 | //search 72 | for (LinuxProcMap::const_iterator it = procMap.begin() ; it != procMap.end() ; ++it) 73 | { 74 | if ((size_t)it->lower <= (size_t)addr && (size_t)it->upper >= (size_t)addr) 75 | return &(*it); 76 | } 77 | 78 | //ok not found 79 | return NULL; 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /extern-deps/from-malt-v2/LinuxProcMapReader.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : MATT 3 | VERSION : 0.1.0-dev 4 | DATE : 02/2015 5 | AUTHOR : Valat Sébastien 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef MATT_LINUX_PROC_MAP_HPP 10 | #define MATT_LINUX_PROC_MAP_HPP 11 | 12 | /******************** HEADERS *********************/ 13 | //standard 14 | #include 15 | #include 16 | 17 | /******************* NAMESPACE ********************/ 18 | namespace MATT 19 | { 20 | 21 | /******************** STRUCT **********************/ 22 | struct LinuxProcMapEntry 23 | { 24 | void * lower; 25 | void * upper; 26 | void * offset; 27 | std::string file; 28 | }; 29 | 30 | /********************* TYPES **********************/ 31 | typedef std::vector LinuxProcMap; 32 | 33 | /********************* CLASS **********************/ 34 | class LinuxProcMapReader 35 | { 36 | public: 37 | typedef LinuxProcMap::const_iterator const_iterator; 38 | public: 39 | void load(void); 40 | const LinuxProcMapEntry* getEntry(void* addr) const; 41 | const_iterator begin(void) { return procMap.begin(); }; 42 | const_iterator end(void) { return procMap.end(); }; 43 | private: 44 | LinuxProcMap procMap; 45 | }; 46 | 47 | } 48 | 49 | #endif //MATT_LINUX_PROC_MAP_HPP 50 | -------------------------------------------------------------------------------- /extern-deps/from-numactl/MovePages.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 0.0.0-dev 4 | DATE : 05/2017 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | //Imported from libnuma to not have to link to libnuma inside pintool 10 | 11 | #ifndef NUMAIF_H 12 | #define NUMAIF_H 1 13 | 14 | #include 15 | 16 | // If keep move_pages it generates symbol error on last pin version (3.24), so use another symbol name to avoid issues. 17 | #define move_pages move_pages_pintool 18 | 19 | /******************* NAMESPACE ********************/ 20 | namespace numaprof 21 | { 22 | 23 | /******************* FUNCTION *********************/ 24 | long move_pages(int pid, unsigned long count,void **pages, const int *nodes, int *status, int flags); 25 | long get_mempolicy(int *policy, unsigned long *nmask,unsigned long maxnode, void *addr,unsigned flags); 26 | long set_mempolicy(int mode, const unsigned long *nmask,unsigned long maxnode); 27 | 28 | } 29 | 30 | #endif //NUMAIF_H 31 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/.clang-format: -------------------------------------------------------------------------------- 1 | # Run manually to reformat a file: 2 | # clang-format -i --style=file 3 | Language: Cpp 4 | BasedOnStyle: Google 5 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/.github/ISSUE_TEMPLATE/00-bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: 'bug' 6 | assignees: '' 7 | --- 8 | 9 | **Describe the bug** 10 | 11 | Include a clear and concise description of what the problem is, including what 12 | you expected to happen, and what actually happened. 13 | 14 | **Steps to reproduce the bug** 15 | 16 | It's important that we are able to reproduce the problem that you are 17 | experiencing. Please provide all code and relevant steps to reproduce the 18 | problem, including your `BUILD`/`CMakeLists.txt` file and build commands. Links 19 | to a GitHub branch or [godbolt.org](https://godbolt.org/) that demonstrate the 20 | problem are also helpful. 21 | 22 | **Does the bug persist in the most recent commit?** 23 | 24 | We recommend using the latest commit in the master branch in your projects. 25 | 26 | **What operating system and version are you using?** 27 | 28 | If you are using a Linux distribution please include the name and version of the 29 | distribution as well. 30 | 31 | **What compiler and version are you using?** 32 | 33 | Please include the output of `gcc -v` or `clang -v`, or the equivalent for your 34 | compiler. 35 | 36 | **What build system are you using?** 37 | 38 | Please include the output of `bazel --version` or `cmake --version`, or the 39 | equivalent for your build system. 40 | 41 | **Additional context** 42 | 43 | Add any other context about the problem here. 44 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/.github/ISSUE_TEMPLATE/10-feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Propose a new feature 4 | title: '' 5 | labels: 'enhancement' 6 | assignees: '' 7 | --- 8 | 9 | **Does the feature exist in the most recent commit?** 10 | 11 | We recommend using the latest commit from GitHub in your projects. 12 | 13 | **Why do we need this feature?** 14 | 15 | Ideally, explain why a combination of existing features cannot be used instead. 16 | 17 | **Describe the proposal** 18 | 19 | Include a detailed description of the feature, with usage examples. 20 | 21 | **Is the feature specific to an operating system, compiler, or build system version?** 22 | 23 | If it is, please specify which versions. 24 | 25 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/.github/workflows/gtest-ci.yml: -------------------------------------------------------------------------------- 1 | name: ci 2 | 3 | on: 4 | push: 5 | pull_request: 6 | 7 | jobs: 8 | Linux: 9 | runs-on: ubuntu-latest 10 | steps: 11 | 12 | - uses: actions/checkout@v2 13 | with: 14 | fetch-depth: 0 15 | 16 | - name: Tests 17 | run: bazel test --test_output=errors //... 18 | 19 | MacOs: 20 | runs-on: macos-latest 21 | steps: 22 | 23 | - uses: actions/checkout@v2 24 | with: 25 | fetch-depth: 0 26 | 27 | - name: Tests 28 | run: bazel test --test_output=errors //... 29 | 30 | 31 | Windows: 32 | runs-on: windows-latest 33 | steps: 34 | 35 | - uses: actions/checkout@v2 36 | with: 37 | fetch-depth: 0 38 | 39 | - name: Tests 40 | run: bazel test --test_output=errors //... 41 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/.gitignore: -------------------------------------------------------------------------------- 1 | # Ignore CI build directory 2 | build/ 3 | xcuserdata 4 | cmake-build-debug/ 5 | .idea/ 6 | bazel-bin 7 | bazel-genfiles 8 | bazel-googletest 9 | bazel-out 10 | bazel-testlogs 11 | # python 12 | *.pyc 13 | 14 | # Visual Studio files 15 | .vs 16 | *.sdf 17 | *.opensdf 18 | *.VC.opendb 19 | *.suo 20 | *.user 21 | _ReSharper.Caches/ 22 | Win32-Debug/ 23 | Win32-Release/ 24 | x64-Debug/ 25 | x64-Release/ 26 | 27 | # Ignore autoconf / automake files 28 | Makefile.in 29 | aclocal.m4 30 | configure 31 | build-aux/ 32 | autom4te.cache/ 33 | googletest/m4/libtool.m4 34 | googletest/m4/ltoptions.m4 35 | googletest/m4/ltsugar.m4 36 | googletest/m4/ltversion.m4 37 | googletest/m4/lt~obsolete.m4 38 | googlemock/m4 39 | 40 | # Ignore generated directories. 41 | googlemock/fused-src/ 42 | googletest/fused-src/ 43 | 44 | # macOS files 45 | .DS_Store 46 | googletest/.DS_Store 47 | googletest/xcode/.DS_Store 48 | 49 | # Ignore cmake generated directories and files. 50 | CMakeFiles 51 | CTestTestfile.cmake 52 | Makefile 53 | cmake_install.cmake 54 | googlemock/CMakeFiles 55 | googlemock/CTestTestfile.cmake 56 | googlemock/Makefile 57 | googlemock/cmake_install.cmake 58 | googlemock/gtest 59 | /bin 60 | /googlemock/gmock.dir 61 | /googlemock/gmock_main.dir 62 | /googlemock/RUN_TESTS.vcxproj.filters 63 | /googlemock/RUN_TESTS.vcxproj 64 | /googlemock/INSTALL.vcxproj.filters 65 | /googlemock/INSTALL.vcxproj 66 | /googlemock/gmock_main.vcxproj.filters 67 | /googlemock/gmock_main.vcxproj 68 | /googlemock/gmock.vcxproj.filters 69 | /googlemock/gmock.vcxproj 70 | /googlemock/gmock.sln 71 | /googlemock/ALL_BUILD.vcxproj.filters 72 | /googlemock/ALL_BUILD.vcxproj 73 | /lib 74 | /Win32 75 | /ZERO_CHECK.vcxproj.filters 76 | /ZERO_CHECK.vcxproj 77 | /RUN_TESTS.vcxproj.filters 78 | /RUN_TESTS.vcxproj 79 | /INSTALL.vcxproj.filters 80 | /INSTALL.vcxproj 81 | /googletest-distribution.sln 82 | /CMakeCache.txt 83 | /ALL_BUILD.vcxproj.filters 84 | /ALL_BUILD.vcxproj 85 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Note: CMake support is community-based. The maintainers do not use CMake 2 | # internally. 3 | 4 | cmake_minimum_required(VERSION 3.5) 5 | 6 | if (POLICY CMP0048) 7 | cmake_policy(SET CMP0048 NEW) 8 | endif (POLICY CMP0048) 9 | 10 | if (POLICY CMP0077) 11 | cmake_policy(SET CMP0077 NEW) 12 | endif (POLICY CMP0077) 13 | 14 | project(googletest-distribution) 15 | set(GOOGLETEST_VERSION 1.12.1) 16 | 17 | if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX) 18 | set(CMAKE_CXX_EXTENSIONS OFF) 19 | endif() 20 | 21 | enable_testing() 22 | 23 | include(CMakeDependentOption) 24 | include(GNUInstallDirs) 25 | 26 | #Note that googlemock target already builds googletest 27 | option(BUILD_GMOCK "Builds the googlemock subproject" ON) 28 | option(INSTALL_GTEST "Enable installation of googletest. (Projects embedding googletest may want to turn this OFF.)" ON) 29 | 30 | if(BUILD_GMOCK) 31 | add_subdirectory( googlemock ) 32 | else() 33 | add_subdirectory( googletest ) 34 | endif() 35 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2008, Google Inc. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above 11 | copyright notice, this list of conditions and the following disclaimer 12 | in the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of Google Inc. nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/WORKSPACE: -------------------------------------------------------------------------------- 1 | workspace(name = "com_google_googletest") 2 | 3 | load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 4 | 5 | http_archive( 6 | name = "com_google_absl", 7 | sha256 = "1a1745b5ee81392f5ea4371a4ca41e55d446eeaee122903b2eaffbd8a3b67a2b", 8 | strip_prefix = "abseil-cpp-01cc6567cff77738e416a7ddc17de2d435a780ce", 9 | urls = ["https://github.com/abseil/abseil-cpp/archive/01cc6567cff77738e416a7ddc17de2d435a780ce.zip"], # 2022-06-21T19:28:27Z 10 | ) 11 | 12 | # Note this must use a commit from the `abseil` branch of the RE2 project. 13 | # https://github.com/google/re2/tree/abseil 14 | http_archive( 15 | name = "com_googlesource_code_re2", 16 | sha256 = "0a890c2aa0bb05b2ce906a15efb520d0f5ad4c7d37b8db959c43772802991887", 17 | strip_prefix = "re2-a427f10b9fb4622dd6d8643032600aa1b50fbd12", 18 | urls = ["https://github.com/google/re2/archive/a427f10b9fb4622dd6d8643032600aa1b50fbd12.zip"], # 2022-06-09 19 | ) 20 | 21 | http_archive( 22 | name = "rules_python", 23 | sha256 = "0b460f17771258341528753b1679335b629d1d25e3af28eda47d009c103a6e15", 24 | strip_prefix = "rules_python-aef17ad72919d184e5edb7abf61509eb78e57eda", 25 | urls = ["https://github.com/bazelbuild/rules_python/archive/aef17ad72919d184e5edb7abf61509eb78e57eda.zip"], # 2022-06-21T23:44:47Z 26 | ) 27 | 28 | http_archive( 29 | name = "bazel_skylib", 30 | urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz"], 31 | sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728", 32 | ) 33 | 34 | http_archive( 35 | name = "platforms", 36 | sha256 = "a879ea428c6d56ab0ec18224f976515948822451473a80d06c2e50af0bbe5121", 37 | strip_prefix = "platforms-da5541f26b7de1dc8e04c075c99df5351742a4a2", 38 | urls = ["https://github.com/bazelbuild/platforms/archive/da5541f26b7de1dc8e04c075c99df5351742a4a2.zip"], # 2022-05-27 39 | ) 40 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/docs/_config.yml: -------------------------------------------------------------------------------- 1 | title: GoogleTest 2 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/docs/_data/navigation.yml: -------------------------------------------------------------------------------- 1 | nav: 2 | - section: "Get Started" 3 | items: 4 | - title: "Supported Platforms" 5 | url: "/platforms.html" 6 | - title: "Quickstart: Bazel" 7 | url: "/quickstart-bazel.html" 8 | - title: "Quickstart: CMake" 9 | url: "/quickstart-cmake.html" 10 | - section: "Guides" 11 | items: 12 | - title: "GoogleTest Primer" 13 | url: "/primer.html" 14 | - title: "Advanced Topics" 15 | url: "/advanced.html" 16 | - title: "Mocking for Dummies" 17 | url: "/gmock_for_dummies.html" 18 | - title: "Mocking Cookbook" 19 | url: "/gmock_cook_book.html" 20 | - title: "Mocking Cheat Sheet" 21 | url: "/gmock_cheat_sheet.html" 22 | - section: "References" 23 | items: 24 | - title: "Testing Reference" 25 | url: "/reference/testing.html" 26 | - title: "Mocking Reference" 27 | url: "/reference/mocking.html" 28 | - title: "Assertions" 29 | url: "/reference/assertions.html" 30 | - title: "Matchers" 31 | url: "/reference/matchers.html" 32 | - title: "Actions" 33 | url: "/reference/actions.html" 34 | - title: "Testing FAQ" 35 | url: "/faq.html" 36 | - title: "Mocking FAQ" 37 | url: "/gmock_faq.html" 38 | - title: "Code Samples" 39 | url: "/samples.html" 40 | - title: "Using pkg-config" 41 | url: "/pkgconfig.html" 42 | - title: "Community Documentation" 43 | url: "/community_created_documentation.html" 44 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/docs/assets/css/style.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "jekyll-theme-primer"; 5 | @import "main"; 6 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/docs/community_created_documentation.md: -------------------------------------------------------------------------------- 1 | # Community-Created Documentation 2 | 3 | The following is a list, in no particular order, of links to documentation 4 | created by the Googletest community. 5 | 6 | * [Googlemock Insights](https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles/blob/master/googletest/insights.md), 7 | by [ElectricRCAircraftGuy](https://github.com/ElectricRCAircraftGuy) 8 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/docs/index.md: -------------------------------------------------------------------------------- 1 | # GoogleTest User's Guide 2 | 3 | ## Welcome to GoogleTest! 4 | 5 | GoogleTest is Google's C++ testing and mocking framework. This user's guide has 6 | the following contents: 7 | 8 | * [GoogleTest Primer](primer.md) - Teaches you how to write simple tests using 9 | GoogleTest. Read this first if you are new to GoogleTest. 10 | * [GoogleTest Advanced](advanced.md) - Read this when you've finished the 11 | Primer and want to utilize GoogleTest to its full potential. 12 | * [GoogleTest Samples](samples.md) - Describes some GoogleTest samples. 13 | * [GoogleTest FAQ](faq.md) - Have a question? Want some tips? Check here 14 | first. 15 | * [Mocking for Dummies](gmock_for_dummies.md) - Teaches you how to create mock 16 | objects and use them in tests. 17 | * [Mocking Cookbook](gmock_cook_book.md) - Includes tips and approaches to 18 | common mocking use cases. 19 | * [Mocking Cheat Sheet](gmock_cheat_sheet.md) - A handy reference for 20 | matchers, actions, invariants, and more. 21 | * [Mocking FAQ](gmock_faq.md) - Contains answers to some mocking-specific 22 | questions. 23 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/docs/platforms.md: -------------------------------------------------------------------------------- 1 | # Supported Platforms 2 | 3 | GoogleTest requires a codebase and compiler compliant with the C++11 standard or 4 | newer. 5 | 6 | The GoogleTest code is officially supported on the following platforms. 7 | Operating systems or tools not listed below are community-supported. For 8 | community-supported platforms, patches that do not complicate the code may be 9 | considered. 10 | 11 | If you notice any problems on your platform, please file an issue on the 12 | [GoogleTest GitHub Issue Tracker](https://github.com/google/googletest/issues). 13 | Pull requests containing fixes are welcome! 14 | 15 | ### Operating systems 16 | 17 | * Linux 18 | * macOS 19 | * Windows 20 | 21 | ### Compilers 22 | 23 | * gcc 5.0+ 24 | * clang 5.0+ 25 | * MSVC 2015+ 26 | 27 | **macOS users:** Xcode 9.3+ provides clang 5.0+. 28 | 29 | ### Build systems 30 | 31 | * [Bazel](https://bazel.build/) 32 | * [CMake](https://cmake.org/) 33 | 34 | Bazel is the build system used by the team internally and in tests. CMake is 35 | supported on a best-effort basis and by the community. 36 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/docs/samples.md: -------------------------------------------------------------------------------- 1 | # Googletest Samples 2 | 3 | If you're like us, you'd like to look at 4 | [googletest samples.](https://github.com/google/googletest/tree/master/googletest/samples) 5 | The sample directory has a number of well-commented samples showing how to use a 6 | variety of googletest features. 7 | 8 | * Sample #1 shows the basic steps of using googletest to test C++ functions. 9 | * Sample #2 shows a more complex unit test for a class with multiple member 10 | functions. 11 | * Sample #3 uses a test fixture. 12 | * Sample #4 teaches you how to use googletest and `googletest.h` together to 13 | get the best of both libraries. 14 | * Sample #5 puts shared testing logic in a base test fixture, and reuses it in 15 | derived fixtures. 16 | * Sample #6 demonstrates type-parameterized tests. 17 | * Sample #7 teaches the basics of value-parameterized tests. 18 | * Sample #8 shows using `Combine()` in value-parameterized tests. 19 | * Sample #9 shows use of the listener API to modify Google Test's console 20 | output and the use of its reflection API to inspect test results. 21 | * Sample #10 shows use of the listener API to implement a primitive memory 22 | leak checker. 23 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/README.md: -------------------------------------------------------------------------------- 1 | # Googletest Mocking (gMock) Framework 2 | 3 | ### Overview 4 | 5 | Google's framework for writing and using C++ mock classes. It can help you 6 | derive better designs of your system and write better tests. 7 | 8 | It is inspired by: 9 | 10 | * [jMock](http://www.jmock.org/) 11 | * [EasyMock](http://www.easymock.org/) 12 | * [Hamcrest](http://code.google.com/p/hamcrest/) 13 | 14 | It is designed with C++'s specifics in mind. 15 | 16 | gMock: 17 | 18 | - Provides a declarative syntax for defining mocks. 19 | - Can define partial (hybrid) mocks, which are a cross of real and mock 20 | objects. 21 | - Handles functions of arbitrary types and overloaded functions. 22 | - Comes with a rich set of matchers for validating function arguments. 23 | - Uses an intuitive syntax for controlling the behavior of a mock. 24 | - Does automatic verification of expectations (no record-and-replay needed). 25 | - Allows arbitrary (partial) ordering constraints on function calls to be 26 | expressed. 27 | - Lets a user extend it by defining new matchers and actions. 28 | - Does not use exceptions. 29 | - Is easy to learn and use. 30 | 31 | Details and examples can be found here: 32 | 33 | * [gMock for Dummies](https://google.github.io/googletest/gmock_for_dummies.html) 34 | * [Legacy gMock FAQ](https://google.github.io/googletest/gmock_faq.html) 35 | * [gMock Cookbook](https://google.github.io/googletest/gmock_cook_book.html) 36 | * [gMock Cheat Sheet](https://google.github.io/googletest/gmock_cheat_sheet.html) 37 | 38 | GoogleMock is a part of 39 | [GoogleTest C++ testing framework](http://github.com/google/googletest/) and a 40 | subject to the same requirements. 41 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/cmake/gmock.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gmock 5 | Description: GoogleMock (without main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Requires: gtest = @PROJECT_VERSION@ 9 | Libs: -L${libdir} -lgmock @CMAKE_THREAD_LIBS_INIT@ 10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ 11 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/cmake/gmock_main.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gmock_main 5 | Description: GoogleMock (with main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Requires: gmock = @PROJECT_VERSION@ 9 | Libs: -L${libdir} -lgmock_main @CMAKE_THREAD_LIBS_INIT@ 10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ 11 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/docs/README.md: -------------------------------------------------------------------------------- 1 | # Content Moved 2 | 3 | We are working on updates to the GoogleTest documentation, which has moved to 4 | the top-level [docs](../../docs) directory. 5 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/include/gmock/internal/custom/README.md: -------------------------------------------------------------------------------- 1 | # Customization Points 2 | 3 | The custom directory is an injection point for custom user configurations. 4 | 5 | ## Header `gmock-port.h` 6 | 7 | The following macros can be defined: 8 | 9 | ### Flag related macros: 10 | 11 | * `GMOCK_DECLARE_bool_(name)` 12 | * `GMOCK_DECLARE_int32_(name)` 13 | * `GMOCK_DECLARE_string_(name)` 14 | * `GMOCK_DEFINE_bool_(name, default_val, doc)` 15 | * `GMOCK_DEFINE_int32_(name, default_val, doc)` 16 | * `GMOCK_DEFINE_string_(name, default_val, doc)` 17 | * `GMOCK_FLAG_GET(flag_name)` 18 | * `GMOCK_FLAG_SET(flag_name, value)` 19 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/include/gmock/internal/custom/gmock-generated-actions.h: -------------------------------------------------------------------------------- 1 | // IWYU pragma: private, include "gmock/gmock.h" 2 | // IWYU pragma: friend gmock/.* 3 | 4 | #ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 5 | #define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 6 | 7 | #endif // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_GENERATED_ACTIONS_H_ 8 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/include/gmock/internal/custom/gmock-matchers.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Injection point for custom user configurations. See README for details 31 | 32 | // IWYU pragma: private, include "gmock/gmock.h" 33 | // IWYU pragma: friend gmock/.* 34 | 35 | #ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ 36 | #define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ 37 | #endif // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_MATCHERS_H_ 38 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/include/gmock/internal/custom/gmock-port.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Injection point for custom user configurations. See README for details 31 | // 32 | // ** Custom implementation starts here ** 33 | 34 | // IWYU pragma: private, include "gmock/gmock.h" 35 | // IWYU pragma: friend gmock/.* 36 | 37 | #ifndef GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_ 38 | #define GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_ 39 | 40 | #endif // GOOGLEMOCK_INCLUDE_GMOCK_INTERNAL_CUSTOM_GMOCK_PORT_H_ 41 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/src/gmock-all.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // 31 | // Google C++ Mocking Framework (Google Mock) 32 | // 33 | // This file #includes all Google Mock implementation .cc files. The 34 | // purpose is to allow a user to build Google Mock by compiling this 35 | // file alone. 36 | 37 | // This line ensures that gmock.h can be compiled on its own, even 38 | // when it's fused. 39 | #include "gmock/gmock.h" 40 | 41 | // The following lines pull in the real gmock *.cc files. 42 | #include "src/gmock-cardinalities.cc" 43 | #include "src/gmock-internal-utils.cc" 44 | #include "src/gmock-matchers.cc" 45 | #include "src/gmock-spec-builders.cc" 46 | #include "src/gmock.cc" 47 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/test/gmock-port_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Google Mock - a framework for writing C++ mock classes. 31 | // 32 | // This file tests the internal cross-platform support utilities. 33 | 34 | #include "gmock/internal/gmock-port.h" 35 | 36 | #include "gtest/gtest.h" 37 | 38 | // NOTE: if this file is left without tests for some reason, put a dummy 39 | // test here to make references to symbols in the gtest library and avoid 40 | // 'undefined symbol' linker errors in gmock_main: 41 | 42 | TEST(DummyTest, Dummy) {} 43 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/test/gmock_link2_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Google Mock - a framework for writing C++ mock classes. 31 | // 32 | // This file is for verifying that various Google Mock constructs do not 33 | // produce linker errors when instantiated in different translation units. 34 | // Please see gmock_link_test.h for details. 35 | 36 | #define LinkTest LinkTest2 37 | 38 | #include "test/gmock_link_test.h" 39 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googlemock/test/gmock_link_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // Google Mock - a framework for writing C++ mock classes. 31 | // 32 | // This file is for verifying that various Google Mock constructs do not 33 | // produce linker errors when instantiated in different translation units. 34 | // Please see gmock_link_test.h for details. 35 | 36 | #define LinkTest LinkTest1 37 | 38 | #include "test/gmock_link_test.h" 39 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/cmake/Config.cmake.in: -------------------------------------------------------------------------------- 1 | @PACKAGE_INIT@ 2 | include(CMakeFindDependencyMacro) 3 | if (@GTEST_HAS_PTHREAD@) 4 | set(THREADS_PREFER_PTHREAD_FLAG @THREADS_PREFER_PTHREAD_FLAG@) 5 | find_dependency(Threads) 6 | endif() 7 | 8 | include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake") 9 | check_required_components("@project_name@") 10 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/cmake/gtest.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gtest 5 | Description: GoogleTest (without main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Libs: -L${libdir} -lgtest @CMAKE_THREAD_LIBS_INIT@ 9 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ 10 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/cmake/gtest_main.pc.in: -------------------------------------------------------------------------------- 1 | libdir=@CMAKE_INSTALL_FULL_LIBDIR@ 2 | includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ 3 | 4 | Name: gtest_main 5 | Description: GoogleTest (with main() function) 6 | Version: @PROJECT_VERSION@ 7 | URL: https://github.com/google/googletest 8 | Requires: gtest = @PROJECT_VERSION@ 9 | Libs: -L${libdir} -lgtest_main @CMAKE_THREAD_LIBS_INIT@ 10 | Cflags: -I${includedir} @GTEST_HAS_PTHREAD_MACRO@ 11 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/cmake/libgtest.la.in: -------------------------------------------------------------------------------- 1 | # libgtest.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.6 3 | 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # Names of this library. 8 | library_names='libgtest.so' 9 | 10 | # Is this an already installed library? 11 | installed=yes 12 | 13 | # Should we warn about portability when linking against -modules? 14 | shouldnotlink=no 15 | 16 | # Files to dlopen/dlpreopen 17 | dlopen='' 18 | dlpreopen='' 19 | 20 | # Directory that this library needs to be installed in: 21 | libdir='@CMAKE_INSTALL_FULL_LIBDIR@' 22 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/docs/README.md: -------------------------------------------------------------------------------- 1 | # Content Moved 2 | 3 | We are working on updates to the GoogleTest documentation, which has moved to 4 | the top-level [docs](../../docs) directory. 5 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/include/gtest/internal/custom/README.md: -------------------------------------------------------------------------------- 1 | # Customization Points 2 | 3 | The custom directory is an injection point for custom user configurations. 4 | 5 | ## Header `gtest.h` 6 | 7 | ### The following macros can be defined: 8 | 9 | * `GTEST_OS_STACK_TRACE_GETTER_` - The name of an implementation of 10 | `OsStackTraceGetterInterface`. 11 | * `GTEST_CUSTOM_TEMPDIR_FUNCTION_` - An override for `testing::TempDir()`. See 12 | `testing::TempDir` for semantics and signature. 13 | 14 | ## Header `gtest-port.h` 15 | 16 | The following macros can be defined: 17 | 18 | ### Logging: 19 | 20 | * `GTEST_LOG_(severity)` 21 | * `GTEST_CHECK_(condition)` 22 | * Functions `LogToStderr()` and `FlushInfoLog()` have to be provided too. 23 | 24 | ### Threading: 25 | 26 | * `GTEST_HAS_NOTIFICATION_` - Enabled if Notification is already provided. 27 | * `GTEST_HAS_MUTEX_AND_THREAD_LOCAL_` - Enabled if `Mutex` and `ThreadLocal` 28 | are already provided. Must also provide `GTEST_DECLARE_STATIC_MUTEX_(mutex)` 29 | and `GTEST_DEFINE_STATIC_MUTEX_(mutex)` 30 | * `GTEST_EXCLUSIVE_LOCK_REQUIRED_(locks)` 31 | * `GTEST_LOCK_EXCLUDED_(locks)` 32 | 33 | ### Underlying library support features 34 | 35 | * `GTEST_HAS_CXXABI_H_` 36 | 37 | ### Exporting API symbols: 38 | 39 | * `GTEST_API_` - Specifier for exported symbols. 40 | 41 | ## Header `gtest-printers.h` 42 | 43 | * See documentation at `gtest/gtest-printers.h` for details on how to define a 44 | custom printer. 45 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/include/gtest/internal/custom/gtest-port.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Injection point for custom user configurations. See README for details 31 | // 32 | // ** Custom implementation starts here ** 33 | 34 | #ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 35 | #define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 36 | 37 | #endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PORT_H_ 38 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/include/gtest/internal/custom/gtest-printers.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // This file provides an injection point for custom printers in a local 31 | // installation of gTest. 32 | // It will be included from gtest-printers.h and the overrides in this file 33 | // will be visible to everyone. 34 | // 35 | // Injection point for custom user configurations. See README for details 36 | // 37 | // ** Custom implementation starts here ** 38 | 39 | #ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ 40 | #define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ 41 | 42 | #endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_PRINTERS_H_ 43 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/include/gtest/internal/custom/gtest.h: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Injection point for custom user configurations. See README for details 31 | // 32 | // ** Custom implementation starts here ** 33 | 34 | #ifndef GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 35 | #define GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 36 | 37 | #endif // GOOGLETEST_INCLUDE_GTEST_INTERNAL_CUSTOM_GTEST_H_ 38 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/samples/sample1.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | 32 | #ifndef GOOGLETEST_SAMPLES_SAMPLE1_H_ 33 | #define GOOGLETEST_SAMPLES_SAMPLE1_H_ 34 | 35 | // Returns n! (the factorial of n). For negative n, n! is defined to be 1. 36 | int Factorial(int n); 37 | 38 | // Returns true if and only if n is a prime number. 39 | bool IsPrime(int n); 40 | 41 | #endif // GOOGLETEST_SAMPLES_SAMPLE1_H_ 42 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/samples/sample4.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | 32 | #include "sample4.h" 33 | 34 | #include 35 | 36 | // Returns the current counter value, and increments it. 37 | int Counter::Increment() { return counter_++; } 38 | 39 | // Returns the current counter value, and decrements it. 40 | // counter can not be less than 0, return 0 in this case 41 | int Counter::Decrement() { 42 | if (counter_ == 0) { 43 | return counter_; 44 | } else { 45 | return counter_--; 46 | } 47 | } 48 | 49 | // Prints the current counter value to STDOUT. 50 | void Counter::Print() const { printf("%d", counter_); } 51 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/samples/sample4.h: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // A sample program demonstrating using Google C++ testing framework. 31 | #ifndef GOOGLETEST_SAMPLES_SAMPLE4_H_ 32 | #define GOOGLETEST_SAMPLES_SAMPLE4_H_ 33 | 34 | // A simple monotonic counter. 35 | class Counter { 36 | private: 37 | int counter_; 38 | 39 | public: 40 | // Creates a counter that starts at 0. 41 | Counter() : counter_(0) {} 42 | 43 | // Returns the current counter value, and increments it. 44 | int Increment(); 45 | 46 | // Returns the current counter value, and decrements it. 47 | int Decrement(); 48 | 49 | // Prints the current counter value to STDOUT. 50 | void Print() const; 51 | }; 52 | 53 | #endif // GOOGLETEST_SAMPLES_SAMPLE4_H_ 54 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/samples/sample4_unittest.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2005, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include "sample4.h" 31 | 32 | #include "gtest/gtest.h" 33 | 34 | namespace { 35 | // Tests the Increment() method. 36 | 37 | TEST(Counter, Increment) { 38 | Counter c; 39 | 40 | // Test that counter 0 returns 0 41 | EXPECT_EQ(0, c.Decrement()); 42 | 43 | // EXPECT_EQ() evaluates its arguments exactly once, so they 44 | // can have side effects. 45 | 46 | EXPECT_EQ(0, c.Increment()); 47 | EXPECT_EQ(1, c.Increment()); 48 | EXPECT_EQ(2, c.Increment()); 49 | 50 | EXPECT_EQ(3, c.Decrement()); 51 | } 52 | 53 | } // namespace 54 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/src/gtest_main.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include 31 | 32 | #include "gtest/gtest.h" 33 | 34 | #if GTEST_OS_ESP8266 || GTEST_OS_ESP32 35 | #if GTEST_OS_ESP8266 36 | extern "C" { 37 | #endif 38 | void setup() { testing::InitGoogleTest(); } 39 | 40 | void loop() { RUN_ALL_TESTS(); } 41 | 42 | #if GTEST_OS_ESP8266 43 | } 44 | #endif 45 | 46 | #else 47 | 48 | GTEST_API_ int main(int argc, char **argv) { 49 | printf("Running main() from %s\n", __FILE__); 50 | testing::InitGoogleTest(&argc, argv); 51 | return RUN_ALL_TESTS(); 52 | } 53 | #endif 54 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/googletest-param-test-invalid-name1-test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include "gtest/gtest.h" 31 | 32 | namespace { 33 | class DummyTest : public ::testing::TestWithParam {}; 34 | 35 | TEST_P(DummyTest, Dummy) {} 36 | 37 | INSTANTIATE_TEST_SUITE_P(InvalidTestName, DummyTest, 38 | ::testing::Values("InvalidWithQuotes"), 39 | ::testing::PrintToStringParamName()); 40 | 41 | } // namespace 42 | 43 | int main(int argc, char *argv[]) { 44 | testing::InitGoogleTest(&argc, argv); 45 | return RUN_ALL_TESTS(); 46 | } 47 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/googletest-param-test-invalid-name2-test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2015, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include "gtest/gtest.h" 31 | 32 | namespace { 33 | class DummyTest : public ::testing::TestWithParam {}; 34 | 35 | std::string StringParamTestSuffix( 36 | const testing::TestParamInfo &info) { 37 | return std::string(info.param); 38 | } 39 | 40 | TEST_P(DummyTest, Dummy) {} 41 | 42 | INSTANTIATE_TEST_SUITE_P(DuplicateTestNames, DummyTest, 43 | ::testing::Values("a", "b", "a", "c"), 44 | StringParamTestSuffix); 45 | } // namespace 46 | 47 | int main(int argc, char *argv[]) { 48 | testing::InitGoogleTest(&argc, argv); 49 | return RUN_ALL_TESTS(); 50 | } 51 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/googletest-setuptestsuite-test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include "gtest/gtest.h" 31 | 32 | class SetupFailTest : public ::testing::Test { 33 | protected: 34 | static void SetUpTestSuite() { ASSERT_EQ("", "SET_UP_FAIL"); } 35 | }; 36 | 37 | TEST_F(SetupFailTest, NoopPassingTest) {} 38 | 39 | class TearDownFailTest : public ::testing::Test { 40 | protected: 41 | static void TearDownTestSuite() { ASSERT_EQ("", "TEAR_DOWN_FAIL"); } 42 | }; 43 | 44 | TEST_F(TearDownFailTest, NoopPassingTest) {} 45 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/googletest-uninitialized-test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include "gtest/gtest.h" 31 | 32 | TEST(DummyTest, Dummy) { 33 | // This test doesn't verify anything. We just need it to create a 34 | // realistic stage for testing the behavior of Google Test when 35 | // RUN_ALL_TESTS() is called without 36 | // testing::InitGoogleTest() being called first. 37 | } 38 | 39 | int main() { return RUN_ALL_TESTS(); } 40 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/gtest-typed-test2_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008 Google Inc. 2 | // All Rights Reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include 31 | 32 | #include "gtest/gtest.h" 33 | #include "test/gtest-typed-test_test.h" 34 | 35 | // Tests that the same type-parameterized test case can be 36 | // instantiated in different translation units linked together. 37 | // (ContainerTest is also instantiated in gtest-typed-test_test.cc.) 38 | INSTANTIATE_TYPED_TEST_SUITE_P(Vector, ContainerTest, 39 | testing::Types >); 40 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/gtest_help_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2009, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // This program is meant to be run by gtest_help_test.py. Do not run 31 | // it directly. 32 | 33 | #include "gtest/gtest.h" 34 | 35 | // When a help flag is specified, this program should skip the tests 36 | // and exit with 0; otherwise the following test will be executed, 37 | // causing this program to exit with a non-zero code. 38 | TEST(HelpFlagTest, ShouldNotBeRun) { 39 | ASSERT_TRUE(false) << "Tests shouldn't be run when --help is specified."; 40 | } 41 | 42 | #if GTEST_HAS_DEATH_TEST 43 | TEST(DeathTest, UsedByPythonScriptToDetectSupportForDeathTestsInThisBinary) {} 44 | #endif 45 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/gtest_main_unittest.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #include "gtest/gtest.h" 31 | 32 | // Tests that we don't have to define main() when we link to 33 | // gtest_main instead of gtest. 34 | 35 | namespace { 36 | 37 | TEST(GTestMainTest, ShouldSucceed) {} 38 | 39 | } // namespace 40 | 41 | // We are using the main() function defined in gtest_main.cc, so we 42 | // don't define it here. 43 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/gtest_skip_in_environment_setup_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2019, Google LLC. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google LLC. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // This test verifies that skipping in the environment results in the 31 | // testcases being skipped. 32 | 33 | #include 34 | 35 | #include "gtest/gtest.h" 36 | 37 | class SetupEnvironment : public testing::Environment { 38 | public: 39 | void SetUp() override { GTEST_SKIP() << "Skipping the entire environment"; } 40 | }; 41 | 42 | TEST(Test, AlwaysFails) { EXPECT_EQ(true, false); } 43 | 44 | int main(int argc, char **argv) { 45 | testing::InitGoogleTest(&argc, argv); 46 | 47 | testing::AddGlobalTestEnvironment(new SetupEnvironment()); 48 | 49 | return RUN_ALL_TESTS(); 50 | } 51 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/gtest_skip_test.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008 Google Inc. 2 | // All Rights Reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // Author: arseny.aprelev@gmail.com (Arseny Aprelev) 31 | // 32 | 33 | #include "gtest/gtest.h" 34 | 35 | using ::testing::Test; 36 | 37 | TEST(SkipTest, DoesSkip) { 38 | GTEST_SKIP() << "skipping single test"; 39 | EXPECT_EQ(0, 1); 40 | } 41 | 42 | class Fixture : public Test { 43 | protected: 44 | void SetUp() override { 45 | GTEST_SKIP() << "skipping all tests for this fixture"; 46 | } 47 | }; 48 | 49 | TEST_F(Fixture, SkipsOneTest) { EXPECT_EQ(5, 7); } 50 | 51 | TEST_F(Fixture, SkipsAnotherTest) { EXPECT_EQ(99, 100); } 52 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/gtest_testbridge_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2018, Google LLC. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // This program is meant to be run by gtest_test_filter_test.py. Do not run 31 | // it directly. 32 | 33 | #include "gtest/gtest.h" 34 | 35 | // These tests are used to detect if filtering is working. Only 36 | // 'TestThatSucceeds' should ever run. 37 | 38 | TEST(TestFilterTest, TestThatSucceeds) {} 39 | 40 | TEST(TestFilterTest, TestThatFails) { 41 | ASSERT_TRUE(false) << "This test should never be run."; 42 | } 43 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/gtest_xml_outfile1_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // gtest_xml_outfile1_test_ writes some xml via TestProperty used by 31 | // gtest_xml_outfiles_test.py 32 | 33 | #include "gtest/gtest.h" 34 | 35 | class PropertyOne : public testing::Test { 36 | protected: 37 | void SetUp() override { RecordProperty("SetUpProp", 1); } 38 | void TearDown() override { RecordProperty("TearDownProp", 1); } 39 | }; 40 | 41 | TEST_F(PropertyOne, TestSomeProperties) { 42 | RecordProperty("TestSomeProperty", 1); 43 | } 44 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/gtest_xml_outfile2_test_.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2008, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | // 30 | // gtest_xml_outfile2_test_ writes some xml via TestProperty used by 31 | // gtest_xml_outfiles_test.py 32 | 33 | #include "gtest/gtest.h" 34 | 35 | class PropertyTwo : public testing::Test { 36 | protected: 37 | void SetUp() override { RecordProperty("SetUpProp", 2); } 38 | void TearDown() override { RecordProperty("TearDownProp", 2); } 39 | }; 40 | 41 | TEST_F(PropertyTwo, TestSomeProperties) { 42 | RecordProperty("TestSomeProperty", 2); 43 | } 44 | -------------------------------------------------------------------------------- /extern-deps/gmock-1.12.1/googletest/test/production.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2006, Google Inc. 2 | // All rights reserved. 3 | // 4 | // Redistribution and use in source and binary forms, with or without 5 | // modification, are permitted provided that the following conditions are 6 | // met: 7 | // 8 | // * Redistributions of source code must retain the above copyright 9 | // notice, this list of conditions and the following disclaimer. 10 | // * Redistributions in binary form must reproduce the above 11 | // copyright notice, this list of conditions and the following disclaimer 12 | // in the documentation and/or other materials provided with the 13 | // distribution. 14 | // * Neither the name of Google Inc. nor the names of its 15 | // contributors may be used to endorse or promote products derived from 16 | // this software without specific prior written permission. 17 | // 18 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 21 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 22 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 24 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | // 31 | // This is part of the unit test for gtest_prod.h. 32 | 33 | #include "production.h" 34 | 35 | PrivateCode::PrivateCode() : x_(0) {} 36 | -------------------------------------------------------------------------------- /extern-deps/iniparser/AUTHORS: -------------------------------------------------------------------------------- 1 | Author: Nicolas Devillard 2 | 3 | This tiny library has received countless contributions and I have 4 | not kept track of all the people who contributed. Let them be thanked 5 | for their ideas, code, suggestions, corrections, enhancements! 6 | 7 | -------------------------------------------------------------------------------- /extern-deps/iniparser/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | add_subdirectory(src) 11 | -------------------------------------------------------------------------------- /extern-deps/iniparser/INSTALL: -------------------------------------------------------------------------------- 1 | 2 | iniParser installation instructions 3 | ----------------------------------- 4 | 5 | - Modify the Makefile to suit your environment. 6 | - Type 'make' to make the library. 7 | - Type 'make check' to make the test program. 8 | - Type 'test/iniexample' to launch the test program. 9 | - Type 'test/parse' to launch torture tests. 10 | 11 | 12 | 13 | Enjoy! 14 | N. Devillard 15 | Wed Mar 2 21:14:17 CET 2011 16 | -------------------------------------------------------------------------------- /extern-deps/iniparser/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2000-2011 by Nicolas Devillard. 2 | MIT License 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a 5 | copy of this software and associated documentation files (the "Software"), 6 | to deal in the Software without restriction, including without limitation 7 | the rights to use, copy, modify, merge, publish, distribute, sublicense, 8 | and/or sell copies of the Software, and to permit persons to whom the 9 | Software is furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 19 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 20 | DEALINGS IN THE SOFTWARE. 21 | 22 | -------------------------------------------------------------------------------- /extern-deps/iniparser/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # iniparser Makefile 3 | # 4 | 5 | # Compiler settings 6 | CC = gcc 7 | CFLAGS = -O2 -fPIC -Wall -ansi -pedantic 8 | 9 | # Ar settings to build the library 10 | AR = ar 11 | ARFLAGS = rcv 12 | 13 | SHLD = ${CC} ${CFLAGS} 14 | LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib 15 | LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib 16 | 17 | # Set RANLIB to ranlib on systems that require it (Sun OS < 4, Mac OSX) 18 | # RANLIB = ranlib 19 | RANLIB = true 20 | 21 | RM = rm -f 22 | 23 | 24 | # Implicit rules 25 | 26 | SUFFIXES = .o .c .h .a .so .sl 27 | 28 | COMPILE.c=$(CC) $(CFLAGS) -c 29 | .c.o: 30 | @(echo "compiling $< ...") 31 | @($(COMPILE.c) -o $@ $<) 32 | 33 | 34 | SRCS = src/iniparser.c \ 35 | src/dictionary.c 36 | 37 | OBJS = $(SRCS:.c=.o) 38 | 39 | 40 | default: libiniparser.a libiniparser.so 41 | 42 | libiniparser.a: $(OBJS) 43 | @($(AR) $(ARFLAGS) libiniparser.a $(OBJS)) 44 | @($(RANLIB) libiniparser.a) 45 | 46 | libiniparser.so: $(OBJS) 47 | @$(SHLD) $(LDSHFLAGS) -o $@.0 $(OBJS) $(LDFLAGS) \ 48 | -Wl,-soname=`basename $@`.0 49 | 50 | clean: 51 | $(RM) $(OBJS) 52 | 53 | veryclean: 54 | $(RM) $(OBJS) libiniparser.a libiniparser.so* 55 | rm -rf ./html ; mkdir html 56 | cd test ; $(MAKE) veryclean 57 | 58 | docs: 59 | @(cd doc ; $(MAKE)) 60 | 61 | check: 62 | @(cd test ; $(MAKE)) 63 | -------------------------------------------------------------------------------- /extern-deps/iniparser/README: -------------------------------------------------------------------------------- 1 | 2 | Welcome to iniParser -- version 3.1 3 | released 08 Apr 2012 4 | 5 | This modules offers parsing of ini files from the C level. 6 | See a complete documentation in HTML format, from this directory 7 | open the file html/index.html with any HTML-capable browser. 8 | 9 | Enjoy! 10 | 11 | N.Devillard 12 | Sun Apr 8 16:38:09 CEST 2012 13 | -------------------------------------------------------------------------------- /extern-deps/iniparser/html/bc_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/bc_s.png -------------------------------------------------------------------------------- /extern-deps/iniparser/html/closed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/closed.png -------------------------------------------------------------------------------- /extern-deps/iniparser/html/doxygen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/doxygen.png -------------------------------------------------------------------------------- /extern-deps/iniparser/html/iniparser_8main.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | iniparser: iniparser.main File Reference 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 | 14 | 15 | 16 | 19 | 20 | 21 |
17 |
iniparser 3.1
18 |
22 |
23 |
24 |
25 |
26 |
iniparser.main File Reference
27 |
28 |
29 | 30 |
31 |
32 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /extern-deps/iniparser/html/nav_f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/nav_f.png -------------------------------------------------------------------------------- /extern-deps/iniparser/html/nav_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/nav_h.png -------------------------------------------------------------------------------- /extern-deps/iniparser/html/open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/open.png -------------------------------------------------------------------------------- /extern-deps/iniparser/html/tab_a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/tab_a.png -------------------------------------------------------------------------------- /extern-deps/iniparser/html/tab_b.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/tab_b.gif -------------------------------------------------------------------------------- /extern-deps/iniparser/html/tab_b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/tab_b.png -------------------------------------------------------------------------------- /extern-deps/iniparser/html/tab_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/tab_h.png -------------------------------------------------------------------------------- /extern-deps/iniparser/html/tab_l.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/tab_l.gif -------------------------------------------------------------------------------- /extern-deps/iniparser/html/tab_r.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/tab_r.gif -------------------------------------------------------------------------------- /extern-deps/iniparser/html/tab_s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/extern-deps/iniparser/html/tab_s.png -------------------------------------------------------------------------------- /extern-deps/iniparser/html/tabs.css: -------------------------------------------------------------------------------- 1 | .tabs, .tabs2, .tabs3 { 2 | background-image: url('tab_b.png'); 3 | width: 100%; 4 | z-index: 101; 5 | font-size: 13px; 6 | } 7 | 8 | .tabs2 { 9 | font-size: 10px; 10 | } 11 | .tabs3 { 12 | font-size: 9px; 13 | } 14 | 15 | .tablist { 16 | margin: 0; 17 | padding: 0; 18 | display: table; 19 | } 20 | 21 | .tablist li { 22 | float: left; 23 | display: table-cell; 24 | background-image: url('tab_b.png'); 25 | line-height: 36px; 26 | list-style: none; 27 | } 28 | 29 | .tablist a { 30 | display: block; 31 | padding: 0 20px; 32 | font-weight: bold; 33 | background-image:url('tab_s.png'); 34 | background-repeat:no-repeat; 35 | background-position:right; 36 | color: #283A5D; 37 | text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); 38 | text-decoration: none; 39 | outline: none; 40 | } 41 | 42 | .tabs3 .tablist a { 43 | padding: 0 10px; 44 | } 45 | 46 | .tablist a:hover { 47 | background-image: url('tab_h.png'); 48 | background-repeat:repeat-x; 49 | color: #fff; 50 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 51 | text-decoration: none; 52 | } 53 | 54 | .tablist li.current a { 55 | background-image: url('tab_a.png'); 56 | background-repeat:repeat-x; 57 | color: #fff; 58 | text-shadow: 0px 1px 1px rgba(0, 0, 0, 1.0); 59 | } 60 | -------------------------------------------------------------------------------- /extern-deps/iniparser/src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | add_library(iniparser OBJECT dictionary.c iniparser.c) 11 | SET_TARGET_PROPERTIES(iniparser PROPERTIES COMPILE_FLAGS -fPIC) 12 | -------------------------------------------------------------------------------- /extern-deps/iniparser/test/Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # iniparser tests Makefile 3 | # 4 | 5 | CC = gcc 6 | CFLAGS = -g -I../src 7 | LFLAGS = -L.. -liniparser 8 | AR = ar 9 | ARFLAGS = rcv 10 | RM = rm -f 11 | 12 | 13 | default: all 14 | 15 | all: iniexample parse 16 | 17 | iniexample: iniexample.c 18 | $(CC) $(CFLAGS) -o iniexample iniexample.c -I../src -L.. -liniparser 19 | 20 | parse: parse.c 21 | $(CC) $(CFLAGS) -o parse parse.c -I../src -L.. -liniparser 22 | 23 | clean veryclean: 24 | $(RM) iniexample example.ini parse 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /extern-deps/iniparser/test/parse.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "iniparser.h" 7 | 8 | int main(int argc, char * argv[]) 9 | { 10 | dictionary * ini ; 11 | char * ini_name ; 12 | 13 | if (argc<2) { 14 | ini_name = "twisted.ini"; 15 | } else { 16 | ini_name = argv[1] ; 17 | } 18 | 19 | ini = iniparser_load(ini_name); 20 | iniparser_dump(ini, stdout); 21 | iniparser_freedict(ini); 22 | 23 | return 0 ; 24 | } 25 | -------------------------------------------------------------------------------- /extern-deps/iniparser/test/twisted-errors.ini: -------------------------------------------------------------------------------- 1 | # 2 | # All of these should trigger syntax errors 3 | # 4 | [section] 5 | hello 6 | world 7 | hello \ 8 | world 9 | a + b ; 10 | -------------------------------------------------------------------------------- /extern-deps/iniparser/test/twisted-genhuge.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | import os 3 | import sys 4 | 5 | if __name__=="__main__": 6 | f=open('twisted-massive.ini', 'w') 7 | for i in range(100): 8 | f.write('[%03d]\n' % i) 9 | for j in range(100): 10 | f.write('key-%03d=1;\n' % j) 11 | f.close() 12 | 13 | -------------------------------------------------------------------------------- /extern-deps/iniparser/test/twisted.ini: -------------------------------------------------------------------------------- 1 | # 2 | # Twisted.ini 3 | # This file is meant for regression tests 4 | 5 | # Different blank settings around the equal sign 6 | [blanks] 7 | a=1 8 | b=1; 9 | c=1; comment 10 | d=1# comment 11 | 12 | e =1 13 | f =1; 14 | g =1; comment 15 | h =1# comment 16 | 17 | i= 1 18 | j= 1; 19 | k= 1; comment 20 | l= 1# comment 21 | 22 | m = 1 23 | n = 1; 24 | o = 1; comment 25 | p = 1# comment 26 | 27 | q=1 ; 28 | r=1 ; comment 29 | s=1 ;comment 30 | t=1 #comment 31 | 32 | # Empty values 33 | [empty] 34 | a = '' 35 | b = "" 36 | 37 | c = '' ; 38 | d = "" ; 39 | 40 | e = '' ; comment 41 | f = "" ; comment 42 | 43 | g = 44 | h = ; 45 | i = ; comment 46 | j = # comment 47 | 48 | k= 49 | l=; 50 | m=;comment 51 | n=# 52 | 53 | # Peculiar values 54 | [peculiar] 55 | a=';'; 56 | b='#'# 57 | c=';';comment 58 | d='#'#comment 59 | e=\; 60 | f=\# 61 | g=\;comment 62 | h=\#comment 63 | i=;; 64 | j=## 65 | k=;;;;;;;;;; 66 | l=########## 67 | 68 | # Quotes 69 | [quotes] 70 | s1=' 71 | s2='' 72 | s3=''' 73 | s4='''' 74 | 75 | d1=" 76 | d2="" 77 | d3=""" 78 | d4="""" 79 | 80 | m1='"' 81 | m2="'" 82 | 83 | h1=hello'world 84 | h2='hello'world 85 | h3='hello'world' 86 | 87 | h4=hello"world 88 | h5="hello"world 89 | h6="hello"world" 90 | 91 | # Section names 92 | [a] 93 | [ b] 94 | [c ] 95 | [ d ] 96 | [ begin end ] 97 | [ open[ ] 98 | 99 | # Multi-line inputs 100 | [multi] 101 | a = begin\ 102 | end 103 | b = begin \ 104 | end 105 | c = begin \ 106 | end 107 | d = 1\ 108 | 2\ 109 | 3\ 110 | 4 111 | e = 1 \ 112 | 2 \ 113 | 3 \ 114 | 4 115 | f = 1 ; \ 116 | hidden = because of the preceding backslash multi-lining the comment ; 117 | visible = 1 118 | g = 1 #\ 119 | and now this comment is hidden too \ 120 | and this one too 121 | h = 1 122 | multi \ 123 | line \ 124 | key = 1 125 | multi \ 126 | line \ 127 | key = \ 128 | multi \ 129 | line \ 130 | value ; 131 | # end of file 132 | -------------------------------------------------------------------------------- /extern-deps/jsoncpp/.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | # BasedOnStyle: LLVM 3 | AccessModifierOffset: -2 4 | ConstructorInitializerIndentWidth: 4 5 | AlignEscapedNewlinesLeft: false 6 | AlignTrailingComments: true 7 | AllowAllParametersOfDeclarationOnNextLine: true 8 | AllowShortIfStatementsOnASingleLine: false 9 | AllowShortLoopsOnASingleLine: false 10 | AlwaysBreakTemplateDeclarations: false 11 | AlwaysBreakBeforeMultilineStrings: false 12 | BreakBeforeBinaryOperators: false 13 | BreakBeforeTernaryOperators: true 14 | BreakConstructorInitializersBeforeComma: false 15 | BinPackParameters: false 16 | ColumnLimit: 80 17 | ConstructorInitializerAllOnOneLineOrOnePerLine: false 18 | DerivePointerBinding: false 19 | ExperimentalAutoDetectBinPacking: false 20 | IndentCaseLabels: false 21 | MaxEmptyLinesToKeep: 1 22 | NamespaceIndentation: None 23 | ObjCSpaceBeforeProtocolList: true 24 | PenaltyBreakBeforeFirstCallParameter: 19 25 | PenaltyBreakComment: 60 26 | PenaltyBreakString: 1000 27 | PenaltyBreakFirstLessLess: 120 28 | PenaltyExcessCharacter: 1000000 29 | PenaltyReturnTypeOnItsOwnLine: 60 30 | PointerBindsToType: false 31 | SpacesBeforeTrailingComments: 1 32 | Cpp11BracedListStyle: false 33 | Standard: Cpp03 34 | IndentWidth: 2 35 | TabWidth: 8 36 | UseTab: Never 37 | BreakBeforeBraces: Attach 38 | IndentFunctionDeclarationAfterType: false 39 | SpacesInParentheses: false 40 | SpacesInAngles: false 41 | SpaceInEmptyParentheses: false 42 | SpacesInCStyleCastParentheses: false 43 | SpaceAfterControlStatementKeyword: true 44 | SpaceBeforeAssignmentOperators: true 45 | ContinuationIndentWidth: 4 46 | ... 47 | 48 | -------------------------------------------------------------------------------- /extern-deps/jsoncpp/.travis.yml: -------------------------------------------------------------------------------- 1 | # Build matrix / environment variable are explained on: 2 | # http://about.travis-ci.org/docs/user/build-configuration/ 3 | # This file can be validated on: 4 | # http://lint.travis-ci.org/ 5 | before_install: sudo apt-get install cmake 6 | language: cpp 7 | compiler: 8 | - gcc 9 | - clang 10 | script: cmake -DJSONCPP_LIB_BUILD_SHARED=$SHARED_LIBRARY -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_VERBOSE_MAKEFILE=$VERBOSE_MAKE . && make 11 | env: 12 | matrix: 13 | - SHARED_LIBRARY=ON BUILD_TYPE=release VERBOSE_MAKE=false 14 | - SHARED_LIBRARY=OFF BUILD_TYPE=release VERBOSE_MAKE=false 15 | - SHARED_LIBRARY=OFF BUILD_TYPE=debug VERBOSE VERBOSE_MAKE=true 16 | notifications: 17 | email: 18 | - aaronjjacobs@gmail.com 19 | -------------------------------------------------------------------------------- /extern-deps/jsoncpp/dist/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | include_directories(${CMAKE_SOURCE_SOURCE_DIR}/jsoncpp/dist) 2 | link_directories(${CMAKE_SOURCE_SOURCE_DIR}/jsoncpp/dist) 3 | 4 | add_library(libjsoncpp jsoncpp.cpp) 5 | SET_TARGET_PROPERTIES(libjsoncpp PROPERTIES COMPILE_FLAGS -fPIC) 6 | -------------------------------------------------------------------------------- /extern-deps/openpa/README.md: -------------------------------------------------------------------------------- 1 | This is to fix one missing cast of void pointer which prevent to built from C++ compiler. -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Find the QtWidgets library 11 | find_package(Qt5Widgets QUIET) 12 | find_package(Qt5WebEngineWidgets QUIET) 13 | find_package(Qt5WebKitWidgets QUIET) 14 | find_package(Qt5Network QUIET) 15 | 16 | ###################################################### 17 | if (Qt5WebEngineWidgets_FOUND OR Qt5WebKitWidgets_FOUND) 18 | set(Qt5Webkit_FOUND OK) 19 | endif (Qt5WebEngineWidgets_FOUND OR Qt5WebKitWidgets_FOUND) 20 | 21 | if (Qt5Widgets_FOUND AND Qt5Webkit_FOUND AND Qt5Network_FOUND) 22 | set(QT5_FOUND OK) 23 | message(STATUS "Find QT5 to build view") 24 | else (Qt5Widgets_FOUND AND Qt5Webkit_FOUND AND Qt5Network_FOUND) 25 | message(STATUS "QT5 webkit not found, skip QT5 view") 26 | endif (Qt5Widgets_FOUND AND Qt5Webkit_FOUND AND Qt5Network_FOUND) 27 | 28 | ###################################################### 29 | add_subdirectory(lib) 30 | add_subdirectory(manpages) 31 | add_subdirectory(testcase) 32 | add_subdirectory(integration) 33 | if (ENABLE_WEBVIEW) 34 | add_subdirectory(webview) 35 | if (QT5_FOUND) 36 | add_subdirectory(qtview) 37 | endif (QT5_FOUND) 38 | endif (ENABLE_WEBVIEW) 39 | -------------------------------------------------------------------------------- /src/integration/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | find_package(Pintool) 11 | 12 | ###################################################### 13 | add_subdirectory(scripts) 14 | if (PINTOOL_FOUND) 15 | add_subdirectory(pintool) 16 | else(PINTOOL_FOUND) 17 | if(PINTOOL_PREFIX) 18 | message(FATAL_ERROR "You provided -DPINTOOL_PREFIX=${PINTOOL_PREFIX} but pin is not found in this directory ! Disable it or provide valid path.") 19 | endif(PINTOOL_PREFIX) 20 | endif (PINTOOL_FOUND) 21 | -------------------------------------------------------------------------------- /src/integration/pintool/Makefile.pin.in: -------------------------------------------------------------------------------- 1 | ############################################################## 2 | # 3 | # DO NOT EDIT THIS FILE! 4 | # 5 | ############################################################## 6 | 7 | PIN_ROOT=$(shell dirname @PINTOOL_PIN@) 8 | MAKE+=-f Makefile.pin 9 | SRCDIR=@CMAKE_CURRENT_SOURCE_DIR@ 10 | CST_DEBUG_FLAGS=@PINTOOL_CFLAGS@ 11 | 12 | # If the tool is built out of the kit, PIN_ROOT must be specified in the make invocation and point to the kit root. 13 | ifdef PIN_ROOT 14 | CONFIG_ROOT := $(PIN_ROOT)/source/tools/Config 15 | else 16 | CONFIG_ROOT := ../Config 17 | endif 18 | include $(CONFIG_ROOT)/makefile.config 19 | include makefile.rules 20 | include $(TOOLS_ROOT)/Config/makefile.default.rules 21 | 22 | ############################################################## 23 | # 24 | # DO NOT EDIT THIS FILE! 25 | # 26 | ############################################################## 27 | -------------------------------------------------------------------------------- /src/integration/pintool/scala.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ###################################################### 3 | # PROJECT : numaprof # 4 | # VERSION : 1.1.5 # 5 | # DATE : 06/2023 # 6 | # AUTHOR : Valat Sébastien - CERN # 7 | # LICENSE : CeCILL-C # 8 | ###################################################### 9 | 10 | ###################################################### 11 | if [ -z "$1" ]; then 12 | echo "Usage : $0 {THREADS}" 13 | exit 1 14 | fi 15 | 16 | ###################################################### 17 | THREADS=$1 18 | 19 | ###################################################### 20 | rm orig.txt instr.txt 21 | 22 | ###################################################### 23 | for threads in 1 2 4 8 16 `seq 32 32 256` `seq 320 64 512` 24 | do 25 | if [ $threads -le $THREADS ] 26 | then 27 | echo $threads 28 | /usr/bin/time -f "$threads\t%e" -o orig.txt --append ./a.out $threads 29 | /usr/bin/time -f "$threads\t%e" -o instr.txt --append ~/pin-3.2-81205-gcc-linux/pin -t obj-intel64/numaprof.so -- ./a.out $threads 30 | fi 31 | done 32 | -------------------------------------------------------------------------------- /src/integration/scripts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | #pintool 11 | if (PINTOOL_FOUND) 12 | #build 13 | configure_file(${CMAKE_CURRENT_SOURCE_DIR}/numaprof-pintool.sh.in ${CMAKE_CURRENT_BINARY_DIR}/numaprof-pintool @ONLY) 14 | 15 | #install 16 | INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/numaprof-pintool DESTINATION bin/) 17 | INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/numaprof-pintool DESTINATION bin RENAME numaprof) 18 | endif (PINTOOL_FOUND) 19 | 20 | ###################################################### 21 | #install 22 | INSTALL(PROGRAMS numaprof-to-callgrind.py DESTINATION bin RENAME numaprof-to-callgrind) 23 | -------------------------------------------------------------------------------- /src/lib/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | find_package(Numactl REQUIRED) 11 | include_directories(${NUMACTL_INCLUDE_DIR}) 12 | include_directories(../../extern-deps/iniparser/src) 13 | 14 | ###################################################### 15 | add_library(numaprof SHARED $ 16 | $ 17 | $ 18 | $ 19 | $ 20 | $ 21 | $) 22 | target_link_libraries(numaprof ${NUMACTL_LIBRARY}) 23 | target_link_libraries(numaprof dl) 24 | set_target_properties(numaprof PROPERTIES VERSION 1.1.5 SOVERSION 1) 25 | 26 | ###################################################### 27 | add_subdirectory(common) 28 | add_subdirectory(core) 29 | add_subdirectory(portability) 30 | add_subdirectory(caches) 31 | 32 | ###################################################### 33 | #target_link_libraries(numaprof ${HWLOC_LIBRARY}) 34 | INSTALL(TARGETS numaprof 35 | ARCHIVE DESTINATION lib 36 | LIBRARY DESTINATION lib) 37 | 38 | ###################################################### 39 | if (ENABLE_TESTS) 40 | add_subdirectory(tests) 41 | endif (ENABLE_TESTS) 42 | -------------------------------------------------------------------------------- /src/lib/caches/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | add_library(numaprof-caches OBJECT CpuCache.cpp 11 | CpuCacheDummy.cpp 12 | CpuCacheBuilder.cpp 13 | CpuSimpleFlatCache.cpp) 14 | SET_TARGET_PROPERTIES(numaprof-caches PROPERTIES COMPILE_FLAGS -fPIC) 15 | -------------------------------------------------------------------------------- /src/lib/caches/CpuCache.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************* HEADERS **********************/ 10 | #include "CpuCache.hpp" 11 | 12 | /******************* NAMESPACE ********************/ 13 | namespace numaprof 14 | { 15 | 16 | /******************* FUNCTION *********************/ 17 | /** 18 | * Default constructor 19 | **/ 20 | CpuCache::CpuCache(void) 21 | { 22 | //nothing to do 23 | } 24 | 25 | /******************* FUNCTION *********************/ 26 | /** 27 | * Default destructor 28 | **/ 29 | CpuCache::~CpuCache(void) 30 | { 31 | //nothing to do. 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/lib/caches/CpuCache.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef CPU_CACHE_HPP 10 | #define CPU_CACHE_HPP 11 | 12 | /******************** HEADERS *********************/ 13 | #include 14 | #include "../portability/NumaTopo.hpp" 15 | 16 | /******************** NAMESPACE *******************/ 17 | namespace numaprof 18 | { 19 | 20 | /********************* CLASS **********************/ 21 | /** 22 | * Abstract definition of a cache to be used by the ThreadTracker to register 23 | * accesses and check presence in cache. 24 | **/ 25 | class CpuCache 26 | { 27 | public: 28 | CpuCache(void); 29 | virtual ~CpuCache(void); 30 | /** 31 | * Handler to be called on memory access to check if the data is in the cache 32 | * and to register it in if the cache keep it for later access. 33 | * @param addr Define the address we want to access. This will automatically 34 | * be considered as a cache line access. 35 | * @return Return true if the data is already in the cache, false otherwise. 36 | * 37 | * @TODO without the size parameter we cannot distinguish large accesses like 38 | * large SIMD accseses or accessing crossing caches lines due to non ideal 39 | * alignement. 40 | **/ 41 | virtual bool onMemoryAccess(size_t addr) = 0; 42 | /** 43 | * Notify from thread movement to possibly handle multiple level and topology 44 | * of cache. 45 | * @param cpuList contain the CPU list where the thread can run on. The cache 46 | * need to decide how it interpret it. 47 | **/ 48 | virtual void onThreadMove(const CpuBindList & cpuList) = 0; 49 | }; 50 | 51 | } 52 | 53 | #endif //CPU_CACHE_HPP 54 | -------------------------------------------------------------------------------- /src/lib/caches/CpuCacheBuilder.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef CPU_CACHE_BUILDER_HPP 10 | #define CPU_CACHE_BUILDER_HPP 11 | 12 | /******************** HEADERS *********************/ 13 | #include 14 | #include "CpuCache.hpp" 15 | 16 | /******************** NAMESPACE *******************/ 17 | namespace numaprof 18 | { 19 | 20 | /********************* CLASS **********************/ 21 | /** 22 | * Class used to build cache system depending on policy and layout. 23 | **/ 24 | class CpuCacheBuilder 25 | { 26 | public: 27 | static void * buildLayout(const std::string & type); 28 | static void destroyLayout(const std::string & type,void * layout); 29 | static CpuCache * buildCache(const std::string & type,void * layout); 30 | private: 31 | CpuCacheBuilder(void); 32 | static CpuCache * buildDummyCache(void); 33 | static CpuCache * buildSimpleFlatCache(void); 34 | static CpuCache * buildSimpleFlatCacheStatic(void); 35 | static size_t convertHumanUnit(const std::string & value); 36 | }; 37 | 38 | } 39 | 40 | #endif //CPU_CACHE_BUILDER_HPP 41 | -------------------------------------------------------------------------------- /src/lib/caches/CpuCacheDummy.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************* HEADERS **********************/ 10 | #include "CpuCacheDummy.hpp" 11 | 12 | /******************* NAMESPACE ********************/ 13 | namespace numaprof 14 | { 15 | 16 | /******************* FUNCTION *********************/ 17 | /** 18 | * Default constructor 19 | **/ 20 | CpuCacheDummy::CpuCacheDummy(void) 21 | { 22 | //nothing to do 23 | } 24 | 25 | /******************* FUNCTION *********************/ 26 | bool CpuCacheDummy::onMemoryAccess(size_t addr) 27 | { 28 | return false; 29 | } 30 | 31 | /******************* FUNCTION *********************/ 32 | void CpuCacheDummy::onThreadMove(const CpuBindList & cpuList) 33 | { 34 | //nothing to do 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/lib/caches/CpuCacheDummy.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef CPU_CACHE_DUMMY_HPP 10 | #define CPU_CACHE_DUMMY_HPP 11 | 12 | /******************** HEADERS *********************/ 13 | #include "CpuCache.hpp" 14 | 15 | /******************** NAMESPACE *******************/ 16 | namespace numaprof 17 | { 18 | 19 | /********************* CLASS **********************/ 20 | /** 21 | * Provide a dummy cache which does not cache anything. 22 | **/ 23 | class CpuCacheDummy : public CpuCache 24 | { 25 | public: 26 | CpuCacheDummy(void); 27 | virtual bool onMemoryAccess(size_t addr); 28 | virtual void onThreadMove(const CpuBindList & cpuList); 29 | }; 30 | 31 | } 32 | 33 | #endif //CPU_CACHE_DUMMY_HPP 34 | -------------------------------------------------------------------------------- /src/lib/caches/CpuSimpleFlatCache.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef CPU_SIMPLE_FLAT_CACHE_HPP 10 | #define CPU_SIMPLE_FLAT_CACHE_HPP 11 | 12 | /******************** HEADERS *********************/ 13 | #include 14 | #include "CpuCache.hpp" 15 | 16 | /******************* CONSTS ***********************/ 17 | //Shift in bits to make cache line index 18 | #define SIMPLE_FLAT_CACHE_LINE_SHIFT 6 19 | //most cpus use 64 bytes cache lines. 20 | #define SIMPLE_FLAT_CACHE_LINE_SIZE (1<> SIMPLE_FLAT_CACHE_LINE_SHIFT;}; 47 | inline void scaleDownAges(size_t row); 48 | inline size_t selectVictim(size_t row) const; 49 | private: 50 | size_t size; 51 | size_t associativity; 52 | size_t waySize; 53 | size_t * tagLineVirtIndex; 54 | SimpleFlatCacheLRUAge * tagLineAge; 55 | SimpleFlatCacheLRUAge * tagCurrentAge; 56 | SimpleFlatCacheLRUAge * bufSortAges; 57 | }; 58 | 59 | } 60 | 61 | #endif //CPU_SIMPLE_FLAT_CACHE_GPP 62 | -------------------------------------------------------------------------------- /src/lib/common/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | add_library(numaprof-common OBJECT Debug.cpp Helper.cpp Options.cpp FormattedMessage.cpp) 11 | SET_TARGET_PROPERTIES(numaprof-common PROPERTIES COMPILE_FLAGS -fPIC) 12 | 13 | ###################################################### 14 | #install procedure 15 | #INSTALL(FILES ${JSON_HEADERS} DESTINATION include/htopml) 16 | -------------------------------------------------------------------------------- /src/lib/common/Helper.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef HELPER_HPP 10 | #define HELPER_HPP 11 | 12 | /******************* HEADERS **********************/ 13 | #include 14 | #include 15 | 16 | /******************* NAMESPACE ********************/ 17 | namespace numaprof 18 | { 19 | 20 | /******************* STRUCT ***********************/ 21 | /** 22 | * Provide range management. 23 | **/ 24 | struct Range 25 | { 26 | Range(const char * value); 27 | bool contain(int value); 28 | int start; 29 | int end; 30 | }; 31 | 32 | /******************* FUNCTION *********************/ 33 | /** 34 | * Provide some helper function to be used in the code. 35 | **/ 36 | struct Helper 37 | { 38 | static bool extractNth(char * out,const char * value,char sep,int index); 39 | static bool endBy(const std::string & value,const std::string & what); 40 | static bool contain(const char * in, const char * what); 41 | static bool isInteger(const std::string & value); 42 | }; 43 | 44 | } 45 | 46 | #endif //HELPER_HPP 47 | -------------------------------------------------------------------------------- /src/lib/common/StaticAssoCache.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef NUMAPROF_STATIC_ASSO_CACHE_HPP 10 | #define NUMAPROF_STATIC_ASSO_CACHE_HPP 11 | 12 | /******************** HEADERS *********************/ 13 | //std 14 | #include 15 | 16 | /******************** MACRO ***********************/ 17 | // #define NUMAPROF_CACHE_STATS 18 | 19 | /******************* NAMESPACE ********************/ 20 | namespace numaprof 21 | { 22 | 23 | /********************* CLASS **********************/ 24 | /** 25 | * Implement a cache to store datas identified by addresses. The cache is built 26 | * as an associative cache with N ways and M rows per way. It is built in template 27 | * to be faster and optimized by compiler. 28 | **/ 29 | template 30 | class StaticAssoCache 31 | { 32 | public: 33 | StaticAssoCache(void); 34 | void flush(void); 35 | T * get(size_t addr) const; 36 | void set(size_t addr,T * value); 37 | void printStats(const char * name) const; 38 | private: 39 | /** Store content **/ 40 | T * content[rows][ways]; 41 | /** store addresses identifying content to match requests **/ 42 | size_t addr[rows][ways]; 43 | /** Used to round robin on rows to override **/ 44 | unsigned char next[rows]; 45 | /** count miss **/ 46 | mutable size_t miss; 47 | /** counter hits **/ 48 | mutable size_t hits; 49 | }; 50 | 51 | } 52 | 53 | /********************** IMPL **********************/ 54 | #include "StaticAssoCache_impl.hpp" 55 | 56 | #endif //NUMAPROF_STATIC_ASSO_CACHE_HPP 57 | -------------------------------------------------------------------------------- /src/lib/core/AccessMatrix.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef ACCESS_MATRIX_HPP 10 | #define ACCESS_MATRIX_HPP 11 | 12 | /******************* HEADERS **********************/ 13 | #include 14 | #include "../../../extern-deps/from-htopml/json/ConvertToJson.h" 15 | 16 | /******************* NAMESPACE ********************/ 17 | namespace numaprof 18 | { 19 | 20 | /********************* STRUCT *********************/ 21 | /** 22 | * Track access from each thead NUMA node to each memory NUMA node. 23 | **/ 24 | class AccessMatrix 25 | { 26 | public: 27 | AccessMatrix(int numaNodes); 28 | ~AccessMatrix(void); 29 | void merge(AccessMatrix & value); 30 | void access(int threadNumaNode,int pageNumaNode); 31 | friend void convertToJson(htopml::JsonState& json, const AccessMatrix& value); 32 | private: 33 | /** Matrix to store counters **/ 34 | size_t ** matrix; 35 | /** Number of numa nodes **/ 36 | int numaNodes; 37 | }; 38 | 39 | /******************* FUNCTION *********************/ 40 | /** 41 | * Inrement counter for the current access from given thread NUMA node 42 | * to target memory NUMA node. 43 | * @param threadNumaNode Define the source of the access, -1 if the thread is not binded. 44 | * @param pageNumaNode Define the NUMA node of the accesses memory page. 45 | **/ 46 | inline void AccessMatrix::access(int threadNumaNode,int pageNumaNode) 47 | { 48 | assert(threadNumaNode >= -1); 49 | assert(threadNumaNode < numaNodes); 50 | assert(pageNumaNode >= 0); 51 | assert(pageNumaNode < numaNodes); 52 | matrix[threadNumaNode+1][pageNumaNode]++; 53 | } 54 | 55 | } 56 | 57 | #endif //ACCESS_MATRIX_HPP 58 | -------------------------------------------------------------------------------- /src/lib/core/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | add_library(numaprof-core OBJECT MallocTracker.cpp PageTable.cpp ProcessTracker.cpp Stack.cpp Stats.cpp ThreadTracker.cpp AccessMatrix.cpp) 11 | SET_TARGET_PROPERTIES(numaprof-core PROPERTIES COMPILE_FLAGS -fPIC) 12 | 13 | ###################################################### 14 | #install procedure 15 | #INSTALL(FILES ${JSON_HEADERS} DESTINATION include/htopml) 16 | -------------------------------------------------------------------------------- /src/lib/core/MallocTracker.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************* HEADERS **********************/ 10 | #include "PageTable.hpp" 11 | #include "Stats.hpp" 12 | 13 | /******************* NAMESPACE ********************/ 14 | namespace numaprof 15 | { 16 | 17 | /******************** MACROS **********************/ 18 | //#define NUMAPROF_TRACE_ALLOCS 19 | 20 | /******************* STRUCT ***********************/ 21 | /** 22 | * Malloc informations to store for every allocation. 23 | **/ 24 | struct MallocInfos 25 | { 26 | /** base pointer of the allocation. **/ 27 | size_t ptr; 28 | /** Size of the allocation to know wich range to cleanup on removal. **/ 29 | size_t size; 30 | /** Pointer to the stat counters (the one related to the malloc call site) **/ 31 | Stats * stats; 32 | }; 33 | 34 | /********************* TYPES **********************/ 35 | /** 36 | * Define the index of the std::map storing the data. 37 | * Depend on availability of stack information of just call site. 38 | **/ 39 | #ifdef NUMAPROF_CALLSTACK 40 | typedef MiniStack StackIp; 41 | #else 42 | typedef size_t StackIp; 43 | #endif 44 | 45 | /******************* FUNCTION *********************/ 46 | /** 47 | * Object use to track the allocation statistics. Should create one instance per thread. 48 | **/ 49 | class MallocTracker 50 | { 51 | public: 52 | MallocTracker(PageTable * pageTable); 53 | void onAlloc(StackIp & ip,size_t ptr, size_t size); 54 | void onFree(size_t ptr); 55 | void flush(class ProcessTracker * process); 56 | private: 57 | /** Pointer to the page table to know where to register the allocations **/ 58 | PageTable * pageTable; 59 | /** Instruction map to store the per malloc call site counters **/ 60 | InstrInfoMap instructions; 61 | }; 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/lib/core/Stack.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef NUMAPROF_STACK_HPP 10 | #define NUMAPROF_STACK_HPP 11 | 12 | /******************* HEADERS **********************/ 13 | #include 14 | #include 15 | #include "../../../extern-deps/from-htopml/json/ConvertToJson.h" 16 | 17 | /******************** MACRO ***********************/ 18 | #define NUMAPROG_MINI_STACk_SIZE 3 19 | 20 | /******************* NAMESPACE ********************/ 21 | namespace numaprof 22 | { 23 | 24 | /********************* TYPES **********************/ 25 | /** 26 | * Vector to store the stack pointers. 27 | **/ 28 | typedef std::vector StackStorage; 29 | 30 | /********************* CLASS **********************/ 31 | /** 32 | * Ministrack of a fixed size used in the thread and process handler 33 | * to identify the instructions. 34 | **/ 35 | struct MiniStack 36 | { 37 | MiniStack(void) {for (int i = 0 ; i < NUMAPROG_MINI_STACk_SIZE ; i++) stack[i] = NULL; hash = 0;}; 38 | void computeHash(void); 39 | bool operator == (const MiniStack & node) const; 40 | bool operator < (const MiniStack & node) const; 41 | /** Store the N last element of the real stack, with caller first. **/ 42 | void * stack[NUMAPROG_MINI_STACk_SIZE]; 43 | /** hash of the stack to quicly access and construct the parent hash map **/ 44 | size_t hash; 45 | }; 46 | 47 | /********************* CLASS **********************/ 48 | /** 49 | * Keep track of the call stacks. 50 | **/ 51 | class Stack 52 | { 53 | public: 54 | Stack(void); 55 | void push(void * value); 56 | void pop(void); 57 | void fillMiniStack(MiniStack & miniStack); 58 | private: 59 | /** Store the stack pointer with caller first **/ 60 | StackStorage stack; 61 | }; 62 | 63 | /******************* FUNCTION *********************/ 64 | void convertToJson(htopml::JsonState& json, const MiniStack& value); 65 | 66 | } 67 | 68 | #endif //NUMAPROF_STACK_HPP 69 | -------------------------------------------------------------------------------- /src/lib/portability/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | add_library(numaprof-portability OBJECT NumaTopo.cpp OS.cpp Clock.cpp) 11 | SET_TARGET_PROPERTIES(numaprof-portability PROPERTIES COMPILE_FLAGS -fPIC) 12 | 13 | ###################################################### 14 | #install procedure 15 | #INSTALL(FILES ${JSON_HEADERS} DESTINATION include/htopml) 16 | -------------------------------------------------------------------------------- /src/lib/portability/Clock.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include "Clock.hpp" 11 | 12 | /******************* NAMESPACE ********************/ 13 | namespace numaprof 14 | { 15 | 16 | /******************** GLOBAS **********************/ 17 | ClockValue gblClockRef = 0; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/lib/portability/Clock.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef CLOCK_HPP 10 | #define CLOCK_HPP 11 | 12 | /******************** HEADERS *********************/ 13 | #include "../../../extern-deps/from-fftw/cycle.h" 14 | 15 | /******************* NAMESPACE ********************/ 16 | namespace numaprof 17 | { 18 | 19 | /******************** TYPES ************************/ 20 | typedef ticks ClockValue; 21 | 22 | /******************** GLOBAS **********************/ 23 | extern ClockValue gblClockRef; 24 | 25 | /******************** CLASS ***********************/ 26 | struct Clock 27 | { 28 | static ClockValue get(void); 29 | static ClockValue get(ClockValue ref); 30 | }; 31 | 32 | /******************* FUNCTION *********************/ 33 | inline ClockValue Clock::get(void) 34 | { 35 | //manage ref 36 | if (gblClockRef == 0) 37 | gblClockRef = getticks(); 38 | 39 | //get current 40 | ticks current = getticks(); 41 | 42 | //take care of restart of clock 43 | if (current > gblClockRef) 44 | return current - gblClockRef; 45 | else 46 | return (((ticks)-1) - gblClockRef) + current; 47 | } 48 | 49 | /******************* FUNCTION *********************/ 50 | inline ClockValue Clock::get(ClockValue ref) 51 | { 52 | return Clock::get() - ref; 53 | } 54 | 55 | } 56 | 57 | #endif //CLOCK_HPP 58 | -------------------------------------------------------------------------------- /src/lib/portability/Mutex.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef MUTEX_HPP 10 | #define MUTEX_HPP 11 | 12 | /******************** HEADERS *********************/ 13 | #ifdef USE_PIN_LOCKS 14 | #include "pin.H" 15 | #elif defined(USE_DIRECT_PTHREAD_LOCKS) 16 | #include 17 | #else 18 | #include 19 | #endif 20 | 21 | /******************* NAMESPACE ********************/ 22 | namespace numaprof 23 | { 24 | 25 | /******************** CLASS ***********************/ 26 | #ifdef USE_PIN_LOCKS 27 | class Mutex 28 | { 29 | public: 30 | void lock(void) { PIN_GetLock(&mutex, -1); }; 31 | void unlock(void) { PIN_ReleaseLock(&mutex); }; 32 | private: 33 | PIN_LOCK mutex; 34 | }; 35 | #elif defined(USE_DIRECT_PTHREAD_LOCKS) 36 | class Mutex 37 | { 38 | public: 39 | Mutex(void) {pthread_mutex_init(&mutex, NULL);} 40 | void lock(void) { pthread_mutex_lock(&mutex); } 41 | void unlock(void) { pthread_mutex_unlock(&mutex); } 42 | private: 43 | pthread_mutex_t mutex; 44 | }; 45 | #else 46 | #include 47 | 48 | typedef std::mutex Mutex; 49 | #endif 50 | 51 | } 52 | 53 | #endif //MUTEX_HPP 54 | -------------------------------------------------------------------------------- /src/lib/portability/OS.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | #ifndef OPERATING_SYSTEM_HPP 10 | #define OPERATING_SYSTEM_HPP 11 | 12 | /******************* HEADERS **********************/ 13 | #include 14 | #include 15 | #include 16 | 17 | /******************* NAMESPACE ********************/ 18 | namespace numaprof 19 | { 20 | 21 | /******************* DEFINE ***********************/ 22 | #define MALT_NUMA_UNBOUND -1 23 | 24 | /********************* STRUCT *********************/ 25 | struct PageMapEntry 26 | { 27 | size_t pageFrameNumber:55; 28 | uint8_t softDirty:1; 29 | uint8_t exclusivelyMapped:1; 30 | uint8_t uffdWriteProtected:1; 31 | uint8_t guardRegioin:1; 32 | uint8_t ignored:2; 33 | uint8_t isFilePageOrSharedAnon:1; 34 | uint8_t swaped:1; 35 | uint8_t present:1; 36 | }; 37 | 38 | /******************* FUNCTION *********************/ 39 | struct OS 40 | { 41 | static char * loadTxtFile(const char * path,size_t maxSize = 4096); 42 | static std::string getExeName(void); 43 | static std::string getCmdLine(void); 44 | static std::string getHostname(void); 45 | static std::string getDateTime(void); 46 | static int getPID(void); 47 | static int getTID(void); 48 | static int getNumaOfPage(size_t addr, int numaOfThread); 49 | static int getNumaOfHugePage(size_t addr,bool * isHugePage, int numaOfThread); 50 | static bool getPageMapPresent(size_t addr); 51 | static int emulateNumaNode(int numaOfThread); 52 | }; 53 | 54 | } 55 | 56 | #endif //OPERATING_SYSTEM_HPP 57 | -------------------------------------------------------------------------------- /src/lib/portability/TopoHwloc.hpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | //Imported from mpc_allocator_cpp : https://github.com/svalat/mpc_allocator_cpp 10 | //from same author. 11 | 12 | #ifndef NUMAPROF_TOPO_HWLOC_H 13 | #define NUMAPROF_TOPO_HWLOC_H 14 | 15 | /******************** HEADERS *********************/ 16 | #include 17 | 18 | /******************** NAMESPACE *******************/ 19 | namespace numaprof 20 | { 21 | 22 | /********************* CLASS **********************/ 23 | class TopoHwloc 24 | { 25 | public: 26 | //lifecycle 27 | TopoHwloc(void); 28 | ~TopoHwloc(void); 29 | //get info 30 | int getLevelId(const char * name) const; 31 | const char * getLevelName(int id) const; 32 | int getNbNumaEntities(void) const; 33 | int getNbEntities(int level,int depth) const; 34 | int getCurrentId(int level, int depth) const; 35 | int getCurentNumaId(void) const; 36 | int getCurrentIdFromNUMABinding(void) const; 37 | int getCurrentIdFromThreadBinding(void) const; 38 | //load predefined topo 39 | void loadTopologyFromFile(const char * filename); 40 | private: 41 | //some helper methods 42 | int getAbsDepth(int level,int depth) const; 43 | int getFirstBitInBitmap(hwloc_bitmap_t bitmap) const; 44 | private: 45 | hwloc_topology_t topology; 46 | }; 47 | 48 | }; 49 | 50 | #endif //NUMAPROF_TOPO_HWLOC_H 51 | -------------------------------------------------------------------------------- /src/lib/tests/BenchInstrCache.cpp: -------------------------------------------------------------------------------- 1 | 2 | /***************************************************** 3 | PROJECT : numaprof 4 | VERSION : 1.1.5 5 | DATE : 06/2023 6 | AUTHOR : Valat Sébastien - CERN 7 | LICENSE : CeCILL-C 8 | *****************************************************/ 9 | 10 | /******************** HEADERS *********************/ 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "../common/StaticAssoCache.hpp" 16 | #include "../../../extern-deps/from-fftw/cycle.h" 17 | 18 | /******************** MACRO ***********************/ 19 | #define REPEAT 400 20 | #define INSTR 512 21 | 22 | /***************** USING NAMESPACE ******************/ 23 | using namespace numaprof; 24 | 25 | /********************* TYPES **********************/ 26 | typedef StaticAssoCache TLB; 27 | 28 | /******************* FUNCTION *********************/ 29 | int main(int argc, char ** argv) 30 | { 31 | //set map 32 | std::map instr; 33 | for (int i = 0 ; i < INSTR ; i++) 34 | instr[i] = i; 35 | 36 | //cache 37 | TLB cache; 38 | 39 | //measure page table 40 | ticks t0 = getticks(); 41 | for (int i = 0 ; i < INSTR ; i++) 42 | for (int r = 0 ; r < REPEAT ; r++) 43 | instr[i]; 44 | ticks t1 = getticks(); 45 | printf("Map : %llu\n",t1-t0); 46 | 47 | //measure with cache 48 | t0 = getticks(); 49 | size_t ref; 50 | for (int i = 0 ; i < INSTR ; i++) 51 | { 52 | for (int r = 0 ; r < REPEAT ; r++) 53 | { 54 | size_t * page = cache.get(i); 55 | if (page == NULL) 56 | cache.set(i,&ref); 57 | } 58 | } 59 | t1 = getticks(); 60 | printf("Cache : %llu\n",t1-t0); 61 | 62 | return EXIT_SUCCESS; 63 | } 64 | -------------------------------------------------------------------------------- /src/lib/tests/BenchTBLVsPageTable.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include 12 | #include 13 | #include "../common/StaticAssoCache.hpp" 14 | #include "../core/PageTable.hpp" 15 | #include "../../../extern-deps/from-fftw/cycle.h" 16 | 17 | /******************** MACRO ***********************/ 18 | #define REPEAT 400 19 | #define SIZE 1024*1024 20 | 21 | /***************** USING NAMESPACE ******************/ 22 | using namespace numaprof; 23 | 24 | /********************* TYPES **********************/ 25 | typedef StaticAssoCache TLB; 26 | 27 | /******************* FUNCTION *********************/ 28 | int main(int argc, char ** argv) 29 | { 30 | //buf 31 | int * buffer = new int[SIZE]; 32 | memset(buffer,0,SIZE*sizeof(int)); 33 | 34 | //table & tlb 35 | TLB tlb; 36 | PageTable table; 37 | 38 | //first set page 39 | for (int i = 0 ; i < SIZE ; i++) 40 | table.getPage((size_t)&buffer[i]); 41 | 42 | //measure page table 43 | ticks t0 = getticks(); 44 | for (int i = 0 ; i < SIZE ; i++) 45 | for (int r = 0 ; r < REPEAT ; r++) 46 | table.getPage((size_t)&buffer[i]); 47 | ticks t1 = getticks(); 48 | printf("Page table : %llu\n",t1-t0); 49 | 50 | //measure with cache 51 | t0 = getticks(); 52 | Page p; 53 | for (int i = 0 ; i < SIZE ; i++) 54 | { 55 | for (int r = 0 ; r < REPEAT ; r++) 56 | { 57 | Page * page = tlb.get((size_t)&buffer[i]>>NUMAPROF_PAGE_OFFSET); 58 | if (page == NULL) 59 | tlb.set((size_t)&buffer[i]>>NUMAPROF_PAGE_OFFSET,&p); 60 | } 61 | } 62 | t1 = getticks(); 63 | printf("TLB : %llu\n",t1-t0); 64 | 65 | return EXIT_SUCCESS; 66 | } 67 | -------------------------------------------------------------------------------- /src/lib/tests/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | #Use gtest 11 | include_directories(${GTEST_INCLUDE_DIRS} ${GMOCK_INCLUDE_DIRS}) 12 | include_directories(../) 13 | 14 | ###################################################### 15 | #add_definitions(-DTEST_DATA_PATH="${CMAKE_CURRENT_SOURCE_DIR}/data") 16 | 17 | ###################################################### 18 | set(TEST_NAMES TestPageTable 19 | TestHelper 20 | TestMovePages 21 | TestStack 22 | TestMallocTracker 23 | TestFormattedMessage 24 | TestStaticAssoCache 25 | TestCpuCacheDummy 26 | TestCpuCacheBuilder 27 | TestCpuSimpleFlatCache 28 | TestCpuSimpleFlatCacheStatic) 29 | 30 | ###################################################### 31 | FOREACH(test_name ${TEST_NAMES}) 32 | add_executable(${test_name} ${test_name}.cpp) 33 | target_link_libraries(${test_name} ${GTEST_BOTH_LIBRARIES} ${GMOCK_BOTH_LIBRARIES} numaprof) 34 | daq_add_test(${test_name} ${test_name}) 35 | ENDFOREACH(test_name) 36 | 37 | ###################################################### 38 | add_executable(ReplayAllocTracker ReplayAllocTracker.cpp) 39 | target_link_libraries(ReplayAllocTracker numaprof) 40 | 41 | ###################################################### 42 | add_executable(BenchTBLVsPageTable BenchTBLVsPageTable.cpp) 43 | target_link_libraries(BenchTBLVsPageTable numaprof) 44 | 45 | ###################################################### 46 | add_executable(BenchInstrCache BenchInstrCache.cpp) 47 | target_link_libraries(BenchInstrCache numaprof) 48 | 49 | ###################################################### 50 | add_executable(BenchCpuCache BenchCpuCache.cpp) 51 | target_link_libraries(BenchCpuCache numaprof) -------------------------------------------------------------------------------- /src/lib/tests/ReplayAllocTracker.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include 12 | #include 13 | #include "../core/PageTable.hpp" 14 | #include "../core/MallocTracker.hpp" 15 | 16 | /***************** USING NAMESPACE ******************/ 17 | using namespace numaprof; 18 | 19 | /******************* FUNCTION *********************/ 20 | int main(int argc, char ** argv) 21 | { 22 | //check 23 | if (argc != 2) 24 | { 25 | printf("Usage : %s {INPUT_FILE}\n",argv[0]); 26 | return EXIT_FAILURE; 27 | } 28 | 29 | //load input 30 | FILE * fp = fopen(argv[1],"r"); 31 | if (fp == NULL) 32 | { 33 | perror(argv[1]); 34 | return EXIT_FAILURE; 35 | } 36 | 37 | //build page table & alloc tracker 38 | PageTable table; 39 | MallocTracker tracker(&table); 40 | 41 | //loopo 42 | while (!feof(fp)) 43 | { 44 | char buffer[1024]; 45 | char * ret = fgets(buffer,sizeof(buffer),fp); 46 | if (ret != NULL) 47 | { 48 | size_t size; 49 | StackIp ip = 0; 50 | void * ptr; 51 | if (sscanf(buffer,"TRACE: tracker.onAlloc(ip,%p,%lu)",&ptr,&size) == 2) 52 | tracker.onAlloc(ip,(size_t)ptr,size); 53 | else if (sscanf(buffer,"TRACE: tracker.onFree(%p)",&ptr) == 1) 54 | tracker.onFree((size_t)ptr); 55 | } 56 | } 57 | 58 | //finish 59 | fclose(fp); 60 | return EXIT_SUCCESS; 61 | } 62 | -------------------------------------------------------------------------------- /src/lib/tests/TestCpuCacheBuilder.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.0-dev 4 | DATE : 02/2018 5 | AUTHOR : Valat Sébastien 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include "../common/Options.hpp" 12 | #include "../caches/CpuCacheBuilder.hpp" 13 | 14 | /***************** USING NAMESPACE ******************/ 15 | using namespace numaprof; 16 | 17 | /******************* FUNCTION *********************/ 18 | TEST(CpuCacheBuilder,buildDummy) 19 | { 20 | void * layout = CpuCacheBuilder::buildLayout("dummy"); 21 | CpuCache * cache = CpuCacheBuilder::buildCache("dummy",layout); 22 | 23 | EXPECT_EQ(NULL,layout); 24 | EXPECT_FALSE(cache->onMemoryAccess(0xA32)); 25 | 26 | delete cache; 27 | CpuCacheBuilder::destroyLayout("dummy",layout); 28 | } 29 | 30 | /******************* FUNCTION *********************/ 31 | TEST(CpuCacheBuilder,buildL1) 32 | { 33 | initGlobalOptions(true); 34 | 35 | void * layout = CpuCacheBuilder::buildLayout("L1"); 36 | CpuCache * cache = CpuCacheBuilder::buildCache("L1",layout); 37 | 38 | EXPECT_EQ(NULL,layout); 39 | EXPECT_FALSE(cache->onMemoryAccess(0xA32)); 40 | 41 | delete cache; 42 | CpuCacheBuilder::destroyLayout("L1",layout); 43 | } 44 | 45 | /******************* FUNCTION *********************/ 46 | TEST(CpuCacheBuilder,buildL1Satic) 47 | { 48 | initGlobalOptions(true); 49 | 50 | void * layout = CpuCacheBuilder::buildLayout("L1_static"); 51 | CpuCache * cache = CpuCacheBuilder::buildCache("L1_static",layout); 52 | 53 | EXPECT_EQ(NULL,layout); 54 | EXPECT_FALSE(cache->onMemoryAccess(0xA32)); 55 | 56 | delete cache; 57 | CpuCacheBuilder::destroyLayout("L1_static",layout); 58 | } 59 | 60 | -------------------------------------------------------------------------------- /src/lib/tests/TestCpuCacheDummy.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include "../caches/CpuCacheDummy.hpp" 12 | 13 | /***************** USING NAMESPACE ******************/ 14 | using namespace numaprof; 15 | 16 | /******************* FUNCTION *********************/ 17 | TEST(CpuCacheDummy,onMemoryAccess) 18 | { 19 | CpuCacheDummy cache; 20 | EXPECT_FALSE(cache.onMemoryAccess(0xA32)); 21 | } 22 | -------------------------------------------------------------------------------- /src/lib/tests/TestHelper.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include "../common/Helper.hpp" 12 | 13 | /***************** USING NAMESPACE ******************/ 14 | using namespace numaprof; 15 | 16 | /******************* FUNCTION *********************/ 17 | TEST(Helper,extractNth) 18 | { 19 | const char lst[] = "0-10,15-20,30-40"; 20 | 21 | char buf[32]; 22 | bool status = Helper::extractNth(buf,lst,',',0); 23 | EXPECT_TRUE(status); 24 | EXPECT_EQ("0-10",std::string(buf)); 25 | 26 | status = Helper::extractNth(buf,lst,',',1); 27 | EXPECT_TRUE(status); 28 | EXPECT_EQ("15-20",std::string(buf)); 29 | 30 | status = Helper::extractNth(buf,lst,',',2); 31 | EXPECT_TRUE(status); 32 | EXPECT_EQ("30-40",std::string(buf)); 33 | 34 | status = Helper::extractNth(buf,lst,',',3); 35 | EXPECT_FALSE(status); 36 | } 37 | 38 | /******************* FUNCTION *********************/ 39 | TEST(Range,constructor_1) 40 | { 41 | Range range("10-20"); 42 | EXPECT_EQ(10,range.start); 43 | EXPECT_EQ(20,range.end); 44 | } 45 | 46 | /******************* FUNCTION *********************/ 47 | TEST(Range,constructor_2) 48 | { 49 | Range range("10"); 50 | EXPECT_EQ(10,range.start); 51 | EXPECT_EQ(10,range.end); 52 | } 53 | 54 | /******************* FUNCTION *********************/ 55 | TEST(Range,contain) 56 | { 57 | Range range("10-20"); 58 | EXPECT_FALSE(range.contain(9)); 59 | EXPECT_TRUE(range.contain(10)); 60 | EXPECT_TRUE(range.contain(15)); 61 | EXPECT_TRUE(range.contain(20)); 62 | EXPECT_FALSE(range.contain(21)); 63 | } 64 | -------------------------------------------------------------------------------- /src/lib/tests/TestMallocTracker.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include "../core/PageTable.hpp" 12 | #include "../core/MallocTracker.hpp" 13 | 14 | /***************** USING NAMESPACE ******************/ 15 | using namespace numaprof; 16 | 17 | /******************* FUNCTION *********************/ 18 | TEST(MallocTracker,constructor) 19 | { 20 | PageTable table; 21 | MallocTracker tracker(&table); 22 | } 23 | -------------------------------------------------------------------------------- /src/lib/tests/TestMovePages.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include "../common/Options.hpp" 12 | #include "../portability/OS.hpp" 13 | #include 14 | 15 | /***************** USING NAMESPACE ******************/ 16 | using namespace numaprof; 17 | 18 | /******************* FUNCTION *********************/ 19 | TEST(MovePages,no_page) 20 | { 21 | char * buffer = new char[20*1024*1024]; 22 | initGlobalOptions(true); 23 | EXPECT_LT(OS::getNumaOfPage((size_t)buffer+10*1024*1024,MALT_NUMA_UNBOUND), 0); 24 | } 25 | 26 | 27 | /******************* FUNCTION *********************/ 28 | TEST(MovePages,have_page) 29 | { 30 | char * buffer = new char[20*1024*1024]; 31 | memset(buffer,0,20*1024*1024); 32 | initGlobalOptions(true); 33 | EXPECT_GE(OS::getNumaOfPage((size_t)buffer+10*1024*1024,MALT_NUMA_UNBOUND), 0); 34 | } 35 | 36 | /******************* FUNCTION *********************/ 37 | TEST(MovePages,have_page_emulate_numa) 38 | { 39 | char * buffer = new char[20*1024*1024]; 40 | memset(buffer,0,20*1024*1024); 41 | initGlobalOptions(true); 42 | gblOptions->emulateNuma = 4; 43 | EXPECT_GE(OS::getNumaOfPage((size_t)buffer+10*1024*1024,MALT_NUMA_UNBOUND), 0); 44 | } 45 | 46 | /******************* FUNCTION *********************/ 47 | TEST(MovePages,have_page_emulate_numa_bound) 48 | { 49 | char * buffer = new char[20*1024*1024]; 50 | memset(buffer,0,20*1024*1024); 51 | initGlobalOptions(true); 52 | gblOptions->emulateNuma = 4; 53 | EXPECT_EQ(OS::getNumaOfPage((size_t)buffer+10*1024*1024,0), 0); 54 | } -------------------------------------------------------------------------------- /src/lib/tests/TestStaticAssoCache.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include "../common/StaticAssoCache.hpp" 12 | 13 | /***************** USING NAMESPACE ******************/ 14 | using namespace numaprof; 15 | 16 | /********************* TYPES **********************/ 17 | typedef StaticAssoCache TLB; 18 | 19 | /******************* FUNCTION *********************/ 20 | TEST(StaticAssoCache,constructor) 21 | { 22 | TLB tlb; 23 | } 24 | 25 | /******************* FUNCTION *********************/ 26 | TEST(StaticAssoCache,noHit) 27 | { 28 | TLB tlb; 29 | size_t * out = tlb.get(1); 30 | EXPECT_EQ(NULL,out); 31 | } 32 | 33 | 34 | /******************* FUNCTION *********************/ 35 | TEST(StaticAssoCache,hit) 36 | { 37 | TLB tlb; 38 | size_t ref; 39 | tlb.set(1,&ref); 40 | size_t * out = tlb.get(1); 41 | EXPECT_EQ(&ref,out); 42 | } 43 | 44 | /******************* FUNCTION *********************/ 45 | TEST(StaticAssoCache,checkMany) 46 | { 47 | TLB tlb; 48 | size_t ref[8]; 49 | 50 | for (int i = 0 ; i < 8 ; i++) 51 | tlb.set(i,&(ref[i])); 52 | 53 | for (int i = 0 ; i < 8 ; i++) 54 | { 55 | size_t * out = tlb.get(i); 56 | EXPECT_EQ(&ref[i],out); 57 | } 58 | } 59 | 60 | /******************* FUNCTION *********************/ 61 | TEST(StaticAssoCache,checkTooMany) 62 | { 63 | TLB tlb; 64 | size_t ref[32*8]; 65 | 66 | for (int i = 0 ; i < 32*8 ; i++) 67 | tlb.set(i,&(ref[i])); 68 | 69 | for (int i = 0 ; i < 32*4 ; i++) 70 | { 71 | size_t * out = tlb.get(i); 72 | EXPECT_EQ(NULL,out); 73 | } 74 | 75 | for (int i = 32*8 ; i < 32*8 ; i++) 76 | { 77 | size_t * out = tlb.get(i); 78 | EXPECT_EQ(&ref[i],out); 79 | } 80 | } 81 | 82 | -------------------------------------------------------------------------------- /src/manpages/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : MALT # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | #Check that files are updated 11 | # if (${CMAKE_CURRENT_SOURCE_DIR}/malt.ronn IS_NEWER_THAN ${CMAKE_CURRENT_SOURCE_DIR}/malt.1.bz2) 12 | # message(WARNING "Please run make command into ${CMAKE_CURRENT_SOURCE_DIR} to update the manpages compiled with ronn tool") 13 | # endif (${CMAKE_CURRENT_SOURCE_DIR}/malt.ronn IS_NEWER_THAN ${CMAKE_CURRENT_SOURCE_DIR}/malt.1.bz2) 14 | # 15 | # #Check that files are updated 16 | # if (${CMAKE_CURRENT_SOURCE_DIR}/malt-passwd.ronn IS_NEWER_THAN ${CMAKE_CURRENT_SOURCE_DIR}/malt-passwd.1.bz2) 17 | # message(WARNING "Please run make command into ${CMAKE_CURRENT_SOURCE_DIR} to update the manpages compiled with ronn tool") 18 | # endif (${CMAKE_CURRENT_SOURCE_DIR}/malt-passwd.ronn IS_NEWER_THAN ${CMAKE_CURRENT_SOURCE_DIR}/malt-passwd.1.bz2) 19 | # 20 | # #Check that files are updated 21 | # if (${CMAKE_CURRENT_SOURCE_DIR}/malt-webserver.ronn IS_NEWER_THAN ${CMAKE_CURRENT_SOURCE_DIR}/malt-webserver.1.bz2) 22 | # message(WARNING "Please run make command into ${CMAKE_CURRENT_SOURCE_DIR} to update the manpages compiled with ronn tool") 23 | # endif (${CMAKE_CURRENT_SOURCE_DIR}/malt-webserver.ronn IS_NEWER_THAN ${CMAKE_CURRENT_SOURCE_DIR}/malt-webserver.1.bz2) 24 | 25 | ###################################################### 26 | #install 27 | install(FILES numaprof.1.bz2 numaprof-passwd.1.bz2 numaprof-webview.1.bz2 28 | DESTINATION share/man/man1) 29 | 30 | #optional 31 | if (QT5_FOUND) 32 | install(FILES numaprof-qt5.1.bz2 33 | DESTINATION share/man/man1) 34 | endif (QT5_FOUND) 35 | -------------------------------------------------------------------------------- /src/manpages/Makefile: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : MALT # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | RONN=ronn 11 | TARGETS=numaprof-passwd.1.bz2 numaprof-webview.1.bz2 numaprof.1.bz2 numaprof-qt5.1.bz2 numaprof-passwd.1.html numaprof-webview.1.html numaprof.1.html numaprof-qt5.1.html 12 | RM=rm -f 13 | BZIP2=bzip2 14 | 15 | ###################################################### 16 | all: $(TARGETS) 17 | 18 | ###################################################### 19 | clean: 20 | $(RM) $(TARGETS) 21 | 22 | ###################################################### 23 | %.1.bz2: %.ronn 24 | $(RONN) -r --pipe $< | $(BZIP2) > $@ 25 | 26 | ###################################################### 27 | %.1.html: %.ronn 28 | $(RONN) -5 $< 29 | 30 | ###################################################### 31 | .PHONY: all clean 32 | -------------------------------------------------------------------------------- /src/manpages/numaprof-passwd.1.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/src/manpages/numaprof-passwd.1.bz2 -------------------------------------------------------------------------------- /src/manpages/numaprof-passwd.ronn: -------------------------------------------------------------------------------- 1 | numaprof-passwd(1) -- Password editor for MALT web GUI 2 | ================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | `numaprof-passwd` {username} [password] 7 | 8 | ## DESCRIPTION 9 | 10 | The NUMAPROF web GUI provided by numaprof-webview(1) is secured by a local password which is configured 11 | by `numaprof-passwd` command and stored into `~/.numaprof/htpasswd` file. It will be called automatically 12 | the first time you call `numaprof-webserver`. 13 | 14 | `numaprof-passwd` is essentially a wrapper to call a script provided by nodeJS module `htpasswd` so it 15 | also supports all the options it provides. You can refer to the documentation of this module for 16 | more details : https://www.npmjs.com/package/htpasswd. 17 | 18 | ## VERSION 19 | 20 | This is the manpage of NUMAPROF version 1.1.5 21 | 22 | ## SEE ALSO 23 | 24 | numaprof(1), numaprof-webview(1), numaprof-qt5(1) 25 | -------------------------------------------------------------------------------- /src/manpages/numaprof-qt5.1.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/src/manpages/numaprof-qt5.1.bz2 -------------------------------------------------------------------------------- /src/manpages/numaprof-qt5.ronn: -------------------------------------------------------------------------------- 1 | numaprof-qt5(1) -- QT5 wrapper GUI 2 | ================================== 3 | 4 | ## SYNOPSIS 5 | 6 | `numaprof-qt5` [OPTIONS] {numaprof-profile.json} 7 | 8 | ## DESCRIPTION 9 | 10 | The NUMAPROF QT GUI use the QT-Webkit plugin to open a browser and automatically connect if to 11 | the `numaprof-webview` web server. The server is launched in background on a randome port 12 | with a temporary generated authfile to be used only from the GUI. 13 | 14 | ## OPTIONS 15 | 16 | * `-O`, `--override`: 17 | If you copy a profile file from a remote machine to your local one, your code might 18 | be stored into another place (not same user, not same path). Thanks to override options 19 | you can alias some paths to make it transparent to the GUI and be able to find your 20 | source code. The format is *src_path1:dest_path1,src_path2,dest_path2*. The easiest use 21 | is to override the root directory of your project. 22 | * `p`, `--port`: 23 | Force to use another port than default 8080. 24 | * `-S`, `--search-path`: 25 | Search file with non-full path in this list of directories : */home/orig/a,/tmp/b*. 26 | * `-h`, `--help`: 27 | Display a short help message to summarize the available options. 28 | * `-w`, '--wekbit`: 29 | Automatically open a QT4 webkit view to browser in the profile. 30 | * `-A`, `--authfile`: 31 | Provide a custom auth file (to be used by QT wrapper). 32 | 33 | ## VERSION 34 | 35 | This is the manpage of NUMAPROF version 1.1.5. 36 | 37 | ## SEE ALSO 38 | 39 | numaprof-webview(1), numaprof-passwd(1), numaprof(1) 40 | 41 | -------------------------------------------------------------------------------- /src/manpages/numaprof-webview.1.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/src/manpages/numaprof-webview.1.bz2 -------------------------------------------------------------------------------- /src/manpages/numaprof-webview.ronn: -------------------------------------------------------------------------------- 1 | numaprof-webview(1) -- Webserver for the NUMAPROF web GUI 2 | =========================================================== 3 | 4 | ## SYNOPSIS 5 | 6 | `numaprof-webview` [OPTIONS] {numaprof-profile.json} 7 | 8 | ## DESCRIPTION 9 | 10 | The NUMAPROF web GUI is hosted by a python script managed by `numaprof-webview` command. It will 11 | by default open a socket listening on `localhost` and port `8080` so reachable with address 12 | http://localhost:8080. 13 | 14 | ## OPTIONS 15 | 16 | * `-O`, `--override`: 17 | If you copy a profile file from a remote machine to your local one, your code might 18 | be stored into another place (not same user, not same path). Thanks to override options 19 | you can alias some paths to make it transparent to the GUI and be able to find your 20 | source code. The format is *src_path1:dest_path1,src_path2,dest_path2*. The easiest use 21 | is to override the root directory of your project. 22 | * `p`, `--port`: 23 | Force to use another port than default 8080. 24 | * `-S`, `--search-path`: 25 | Search file with non-full path in this list of directories : */home/orig/a,/tmp/b*. 26 | * `-h`, `--help`: 27 | Display a short help message to summarize the available options. 28 | * `-w`, '--wekbit`: 29 | Automatically open a QT4 webkit view to browser in the profile. 30 | * `-A`, `--authfile`: 31 | Provide a custom auth file (to be used by QT wrapper). 32 | 33 | ## REMOTE USAGE THROUGH SSH 34 | 35 | On clusters you might be interested by launching the `numaprof-webview` remotly and forward 36 | it through ssh to get it on your local machine. You can achieve this port redirection with 37 | ssh options : 38 | 39 | ssh {YOUR_HOST} -L 8080:localhost:8080 40 | 41 | Where the first 8080 is the local port and the second one the remote. 42 | 43 | ## VERSION 44 | 45 | This is the manpage of NUMAPROF version 1.1.5. 46 | 47 | ## SEE ALSO 48 | 49 | numaprof-qt5(1), numaprof-passwd(1), numaprof(1) 50 | -------------------------------------------------------------------------------- /src/manpages/numaprof.1.bz2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/memtt/numaprof/d13473c9c229cec63d553ff23809f1481de45098/src/manpages/numaprof.1.bz2 -------------------------------------------------------------------------------- /src/qtview/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | # Find includes in corresponding build directories 11 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 12 | # Instruct CMake to run moc automatically when needed. 13 | set(CMAKE_AUTOMOC OFF) 14 | 15 | ###################################################### 16 | 17 | #includes 18 | include_directories(${Qt5Widgets_INCLUDE_DIRS}) 19 | if (Qt5WebEngineWidgets_FOUND) 20 | include_directories(${Qt5WebEngineWidgets_INCLUDE_DIRS}) 21 | add_definitions(-DHAVE_QT5_WEB_ENGINE_WIDGETS) 22 | endif(Qt5WebEngineWidgets_FOUND) 23 | if (Qt5WebKitWidgets_FOUND) 24 | include_directories(${Qt5WebKitWidgets_INCLUDE_DIRS}) 25 | add_definitions(-DHAVE_QT5_WEBKIT_WIDGETS) 26 | endif(Qt5WebKitWidgets_FOUND) 27 | include_directories(${Qt5Network_INCLUDE_DIRS}) 28 | 29 | # path to prefix 30 | add_definitions(-DNUMAPROF_PREFIX="${CMAKE_INSTALL_PREFIX}") 31 | 32 | # Tell CMake to create the helloworld executable 33 | add_executable(numaprof-qt5 main.cpp) 34 | 35 | # Use the Widgets module from Qt 5. 36 | target_link_libraries(numaprof-qt5 Qt5::Widgets Qt5::Network) 37 | if (Qt5WebEngineWidgets_FOUND) 38 | target_link_libraries(numaprof-qt5 Qt5::WebEngineWidgets) 39 | endif (Qt5WebEngineWidgets_FOUND) 40 | if (Qt5WebKitWidgets_FOUND) 41 | target_link_libraries(numaprof-qt5 Qt5::WebKitWidgets) 42 | endif (Qt5WebKitWidgets_FOUND) 43 | 44 | #install 45 | install(TARGETS numaprof-qt5 DESTINATION bin) 46 | -------------------------------------------------------------------------------- /src/testcase/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ###################################################### 2 | # PROJECT : numaprof # 3 | # VERSION : 1.1.5 # 4 | # DATE : 06/2023 # 5 | # AUTHOR : Valat Sébastien - CERN # 6 | # LICENSE : CeCILL-C # 7 | ###################################################### 8 | 9 | ###################################################### 10 | add_executable(main-simple main-simple.cpp) 11 | SET_TARGET_PROPERTIES(main-simple PROPERTIES COMPILE_FLAGS "-g -O0") 12 | 13 | ###################################################### 14 | add_executable(main-threads main-threads.cpp) 15 | SET_TARGET_PROPERTIES(main-threads PROPERTIES COMPILE_FLAGS "-g -pthread -O0") 16 | target_link_libraries(main-threads "-pthread") 17 | 18 | ###################################################### 19 | add_executable(main-1G-big-alloc main-1G-big-alloc.cpp) 20 | SET_TARGET_PROPERTIES(main-simple PROPERTIES COMPILE_FLAGS "-g -O0") 21 | 22 | ###################################################### 23 | add_executable(main-1G-small-alloc main-1G-small-alloc.cpp) 24 | SET_TARGET_PROPERTIES(main-simple PROPERTIES COMPILE_FLAGS "-g -O0") 25 | 26 | ###################################################### 27 | find_package(OpenMP) 28 | 29 | ###################################################### 30 | add_executable(case-openmp-loop case-openmp-loop.cpp) 31 | SET_TARGET_PROPERTIES(case-openmp-loop PROPERTIES COMPILE_FLAGS "-g -O0 ${OpenMP_CXX_FLAGS}") 32 | SET_TARGET_PROPERTIES(case-openmp-loop PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") 33 | 34 | ###################################################### 35 | add_executable(case-omp-stack-issue case-omp-stack-issue.cpp) 36 | SET_TARGET_PROPERTIES(case-omp-stack-issue PROPERTIES COMPILE_FLAGS "-g -O0 ${OpenMP_CXX_FLAGS}") 37 | SET_TARGET_PROPERTIES(case-omp-stack-issue PROPERTIES LINK_FLAGS "${OpenMP_CXX_FLAGS}") 38 | 39 | 40 | -------------------------------------------------------------------------------- /src/testcase/case-omp-stack-issue.cpp: -------------------------------------------------------------------------------- 1 | void add(int * a,int i) 2 | { 3 | *a+=i; 4 | } 5 | 6 | void run() 7 | { 8 | int a; 9 | for (int i = 0 ; i < 1024 ; i++) 10 | add(&a,i); 11 | } 12 | 13 | int main() 14 | { 15 | #pragma omp parallel for 16 | for (int i = 0 ; i < 1024 ; i++) 17 | run(); 18 | } 19 | -------------------------------------------------------------------------------- /src/testcase/case-openmp-loop.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include 12 | #include 13 | 14 | #define SIZE_PRE_THREAD (200*1024*1024/sizeof(float)) 15 | 16 | /******************* FUNCTION *********************/ 17 | void badFirstAccess(size_t size) 18 | { 19 | float * buffer = new float[size]; 20 | 21 | //do first touch from main thread 22 | for (size_t i = 0 ; i < size ; i++) 23 | buffer[i] = i; 24 | 25 | //now do access in threads 26 | #pragma omp parallel for 27 | for (size_t i = 0 ; i < size ; i++) 28 | buffer[i]++; 29 | 30 | delete [] buffer; 31 | } 32 | 33 | /******************* FUNCTION *********************/ 34 | void betterFirstAccess(size_t size) 35 | { 36 | float * buffer = new float[size]; 37 | 38 | //do first touch from all threads in same way than access 39 | #pragma omp parallel for 40 | for (size_t i = 0 ; i < size ; i++) 41 | buffer[i] = i; 42 | 43 | //now do access in threads 44 | #pragma omp parallel for 45 | for (size_t i = 0 ; i < size ; i++) 46 | buffer[i]++; 47 | 48 | delete [] buffer; 49 | } 50 | 51 | /******************* FUNCTION *********************/ 52 | int main() 53 | { 54 | size_t threads = omp_get_num_threads(); 55 | size_t size = threads * SIZE_PRE_THREAD; 56 | printf("Run on %lu threads\n",threads); 57 | 58 | printf("Running bad first touch...\n"); 59 | badFirstAccess(size); 60 | 61 | printf("Running better first touch...\n"); 62 | betterFirstAccess(size); 63 | 64 | return EXIT_SUCCESS; 65 | } 66 | -------------------------------------------------------------------------------- /src/testcase/main-1G-big-alloc.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include 12 | #include 13 | 14 | /******************* FUNCTION *********************/ 15 | int main(int argc, char ** argv) 16 | { 17 | int repeat = 100; 18 | if (argc == 1) 19 | repeat = atoi(argv[1]); 20 | size_t size = 1024*1024*1024; 21 | for (int i = 0 ; i < repeat ; i++) 22 | { 23 | char * array = new char[size]; 24 | memset(array,0,size); 25 | delete [] array; 26 | } 27 | return EXIT_SUCCESS; 28 | } 29 | -------------------------------------------------------------------------------- /src/testcase/main-1G-small-alloc.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include 12 | #include 13 | 14 | /******************* FUNCTION *********************/ 15 | int main(int argc, char ** argv) 16 | { 17 | int repeat = 100; 18 | if (argc == 1) 19 | repeat = atoi(argv[1]); 20 | size_t size = 1024*1024*1024; 21 | size_t elmtSize = 128; 22 | size_t elmtNb = size/ elmtSize; 23 | for (int i = 0 ; i < repeat ; i++) 24 | { 25 | printf("Loop alloc%d\n",i); 26 | char ** array = new char*[elmtNb]; 27 | for (size_t j = 0 ; j < elmtNb ; j++) 28 | array[j] = new char[elmtSize]; 29 | //printf("Loop set%d\n",i); 30 | //for (size_t j = 0 ; j < elmtNb ; j++) 31 | // memset(array[j],0,elmtSize); 32 | printf("Loop free%d\n",i); 33 | for (size_t j = 0 ; j < elmtNb ; j++) 34 | delete [] array[j]; 35 | delete [] array; 36 | } 37 | return EXIT_SUCCESS; 38 | } 39 | -------------------------------------------------------------------------------- /src/testcase/main-simple.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************** HEADERS *********************/ 10 | #include 11 | #include 12 | #include 13 | 14 | #define CNT 5 15 | 16 | /******************* FUNCTION *********************/ 17 | void func() 18 | { 19 | char * buffer = (char*)malloc(128); 20 | sprintf(buffer,"Hellow world!"); 21 | printf("%s\n",buffer); 22 | free(buffer); 23 | 24 | char * lst[CNT]; 25 | for (int i = 0 ; i < CNT ; i++) 26 | lst[i] = new char[20*1024*1024]; 27 | for (int j = 0 ; j < CNT ; j++) 28 | for (int i = 0 ; i < 20*1024*1024 ; i++) 29 | lst[j][i] = 0; 30 | for (int i = 0 ; i < CNT ; i++) 31 | delete [] lst[i]; 32 | } 33 | 34 | /******************* FUNCTION *********************/ 35 | int main() 36 | { 37 | printf("ok\n"); 38 | func(); 39 | func(); 40 | return EXIT_SUCCESS; 41 | } 42 | -------------------------------------------------------------------------------- /src/webview/Helper.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ###################################################### 3 | # PROJECT : numaprof # 4 | # VERSION : 1.1.5 # 5 | # DATE : 06/2023 # 6 | # AUTHOR : Valat Sébastien - CERN # 7 | # LICENSE : CeCILL-C # 8 | ###################################################### 9 | 10 | ###################################################### 11 | -------------------------------------------------------------------------------- /src/webview/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "numaprof-webview", 3 | "authors": [ 4 | "Sebastien Valat " 5 | ], 6 | "description": "Webview for numaprof", 7 | "main": "", 8 | "license": "CeCILL-C", 9 | "homepage": "", 10 | "private": true, 11 | "ignore": [ 12 | "**/.*", 13 | "node_modules", 14 | "bower_components", 15 | "test", 16 | "tests" 17 | ], 18 | "dependencies": { 19 | "jquery": "^3.2.1", 20 | "bootstrap": "^3.4.1", 21 | "nvd3": "^1.8.5", 22 | "d3-tip": "=0.6.7", 23 | "mustache.js": "mustache#^2.3.0", 24 | "jquery-bootpag": "^1.0.7" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/webview/nhtpasswd.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ###################################################### 3 | # PROJECT : numaprof # 4 | # VERSION : 1.1.5 # 5 | # DATE : 06/2023 # 6 | # AUTHOR : Valat Sébastien - CERN # 7 | # LICENSE : CeCILL-C # 8 | ###################################################### 9 | 10 | ###################################################### 11 | #import 12 | import sys 13 | import htpasswd 14 | import getpass 15 | from os.path import expanduser 16 | 17 | ###################################################### 18 | #help 19 | if len(sys.argv) == 1: 20 | print("Missing argument, usage : numaprof-htpasswd {USER} [PASSWORD] [FILE]") 21 | sys.exit(1) 22 | 23 | ###################################################### 24 | #extract infos 25 | user = sys.argv[1] 26 | 27 | #file 28 | authFile = expanduser("~")+"/.numaprof/htpasswd" 29 | 30 | #pass 31 | if len(sys.argv) == 2: 32 | password = getpass.getpass() 33 | elif len(sys.argv) == 3: 34 | password = sys.argv[2] 35 | elif len(sys.argv) == 4: 36 | password = sys.argv[2] 37 | authFile = sys.argv[3] 38 | else: 39 | print("Too many arguments !") 40 | sys.exit(1) 41 | 42 | ###################################################### 43 | #add or set in db 44 | with htpasswd.Basic(authFile) as userdb: 45 | try: 46 | userdb.add(user, password) 47 | except htpasswd.basic.UserExists as e: 48 | userdb.change_password(user,password) 49 | -------------------------------------------------------------------------------- /src/webview/nhtpasswd.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ###################################################### 3 | # PROJECT : numaprof # 4 | # VERSION : 1.1.5 # 5 | # DATE : 06/2023 # 6 | # AUTHOR : Valat Sébastien - CERN # 7 | # LICENSE : CeCILL-C # 8 | ###################################################### 9 | 10 | ###################################################### 11 | if [ -z "$3" ]; then 12 | authFile=${HOME}/.numaprof/htpasswd 13 | else 14 | authFile=$3 15 | fi 16 | 17 | ###################################################### 18 | if [ ! -d ${HOME}/.numaprof ]; then 19 | mkdir ${HOME}/.numaprof 20 | fi 21 | 22 | ###################################################### 23 | if [ ! -f "$authFile" ]; then 24 | touch "$authFile" 25 | chmod 600 "$authFile" 26 | fi 27 | 28 | ###################################################### 29 | #export FLASK_APP=server.py 30 | export PYTHONPATH=$PWD/deps/:$PYTHONPATH 31 | python3 nhtpasswd.py "$@" 32 | exit $? 33 | -------------------------------------------------------------------------------- /src/webview/nocache.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | ###################################################### 3 | # PROJECT : numaprof # 4 | # VERSION : 1.1.5 # 5 | # DATE : 06/2023 # 6 | # AUTHOR : Valat Sébastien - CERN # 7 | # LICENSE : CeCILL-C # 8 | ###################################################### 9 | 10 | #from https://arusahni.net/blog/2014/03/flask-nocache.html 11 | 12 | from flask import make_response 13 | from functools import wraps, update_wrapper 14 | from datetime import datetime 15 | 16 | def nocache(view): 17 | @wraps(view) 18 | def no_cache(*args, **kwargs): 19 | response = make_response(view(*args, **kwargs)) 20 | response.headers['Last-Modified'] = datetime.now() 21 | response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0' 22 | response.headers['Pragma'] = 'no-cache' 23 | response.headers['Expires'] = '-1' 24 | return response 25 | 26 | return update_wrapper(no_cache, view) 27 | -------------------------------------------------------------------------------- /src/webview/server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ###################################################### 3 | # PROJECT : numaprof # 4 | # VERSION : 1.1.5 # 5 | # DATE : 06/2023 # 6 | # AUTHOR : Valat Sébastien - CERN # 7 | # LICENSE : CeCILL-C # 8 | ###################################################### 9 | 10 | ###################################################### 11 | #export FLASK_APP=server.py 12 | export PYTHONPATH=$PWD/deps/:$PYTHONPATH 13 | python3 server.py "$@" 14 | exit $? 15 | -------------------------------------------------------------------------------- /src/webview/static/css/sources.css: -------------------------------------------------------------------------------- 1 | /***************************************************** 2 | PROJECT : numaprof 3 | VERSION : 1.1.5 4 | DATE : 06/2023 5 | AUTHOR : Valat Sébastien - CERN 6 | LICENSE : CeCILL-C 7 | *****************************************************/ 8 | 9 | /******************* FLAT FUNC LIST ******************/ 10 | /* Flat list of function in stack-analysis */ 11 | #numaprof-func-list li a { 12 | height:3em 13 | } 14 | 15 | #numaprof-func-list div.progress { 16 | display:block; 17 | float:left; 18 | width:7%; 19 | } 20 | 21 | #numaprof-func-list .size { 22 | width:7em; 23 | display:block; 24 | float:left; 25 | text-align:right; 26 | padding-right:1em; 27 | } 28 | 29 | #numaprof-func-list .func { 30 | display:block; 31 | float:left; 32 | white-space: nowrap; 33 | overflow:hidden; 34 | text-overflow: 35 | ellipsis;max-width:51%; 36 | } 37 | 38 | /** 39 | * Compact function list styling 40 | */ 41 | 42 | #numaprof-func-list .progress { 43 | display: none; 44 | } 45 | 46 | #numaprof-func-list .size, #numaprof-func-list .func { 47 | font-size: 12px; 48 | } 49 | 50 | #numaprof-func-list .func { 51 | padding-top: 4px; 52 | font-family: Menlo,Monaco,Consolas,"Courier New",monospace; 53 | max-width: 75%; 54 | } 55 | 56 | #numaprof-func-list .size { 57 | width: 25%; 58 | } 59 | 60 | #numaprof-func-list .size .progress-fg { 61 | content: ''; 62 | display: block; 63 | height: 4px; 64 | background-color: #337ab7; 65 | position: relative; 66 | top: 4px; 67 | width: attr(progress); 68 | border-radius: 2px; 69 | } 70 | 71 | #numaprof-func-list .size .progress-bg { 72 | content: ''; 73 | height: 4px; 74 | display: block; 75 | border-radius: 2px; 76 | background-color: #d8d8d8; 77 | box-shadow: inset 0 1px 1px rgba(0,0,0,.1); 78 | } 79 | -------------------------------------------------------------------------------- /src/webview/static/css/style.css: -------------------------------------------------------------------------------- 1 | #errors div { 2 | background-color:#ffca8c; 3 | border: solid #ffa322 1px; 4 | color: #915d13; 5 | font-weight: bold; 6 | } 7 | 8 | .d3-tip { 9 | line-height: 1; 10 | font-weight: bold; 11 | padding: 12px; 12 | background: rgba(0, 0, 0, 0.8); 13 | color: #fff; 14 | border-radius: 2px; 15 | } 16 | 17 | /* Creates a small triangle extender for the tooltip */ 18 | .d3-tip:after { 19 | box-sizing: border-box; 20 | display: inline; 21 | font-size: 10px; 22 | width: 100%; 23 | line-height: 1; 24 | color: rgba(0, 0, 0, 0.8); 25 | content: "\25BC"; 26 | position: absolute; 27 | text-align: center; 28 | } 29 | 30 | /* Style northward tooltips differently */ 31 | .d3-tip.n:after { 32 | margin: -1px 0 0 0; 33 | top: 100%; 34 | left: 0; 35 | } 36 | 37 | /** 38 | * Bootstrap Dynamic Width for Popover Fix 39 | * Source: http://stackoverflow.com/questions/15776487/bootstrap-popover-width-for-popover-inner 40 | */ 41 | .popover { 42 | position: absolute; 43 | top: 0; 44 | left: 0; 45 | z-index: 1010; 46 | display: none; 47 | max-width: 600px; 48 | padding: 1px; 49 | text-align: left; 50 | white-space: normal; 51 | background-color: #ffffff; 52 | border: 1px solid #ccc; 53 | border: 1px solid rgba(0, 0, 0, 0.2); 54 | -webkit-border-radius: 6px; 55 | -moz-border-radius: 6px; 56 | border-radius: 6px; 57 | -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); 58 | -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); 59 | box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); 60 | -webkit-background-clip: padding-box; 61 | -moz-background-clip: padding; 62 | background-clip: padding-box; 63 | } 64 | -------------------------------------------------------------------------------- /src/webview/templates/asm.html: -------------------------------------------------------------------------------- 1 | {% extends "sources.html" %} 2 | {% block title %}Assembler{% endblock %} 3 | {% block preset %} 4 | 7 | {% endblock %} 8 | -------------------------------------------------------------------------------- /src/webview/templates/help.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block title %}Help{% endblock %} 3 | {% block import %} 4 | 5 | {% endblock %} 6 | {% block content %} 7 | TODO 8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /src/webview/templates/threads.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block title %}Threads{% endblock %} 3 | {% block import %} 4 | 5 | {% endblock %} 6 | {% block content %} 7 |
8 |
9 |
Thread binding
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
Numa nodeThreads
18 |
19 |
20 | 21 |
22 |
23 |
First touch
24 |
25 | 26 |
27 |
28 |
29 | 30 |
31 |
32 |
Memory access
33 |
34 | 35 |
36 |
37 |
38 | {% endblock %} 39 | -------------------------------------------------------------------------------- /src/webview/webview-htpasswd.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ###################################################### 3 | # PROJECT : numaprof # 4 | # VERSION : 1.1.5 # 5 | # DATE : 06/2023 # 6 | # AUTHOR : Valat Sébastien - CERN # 7 | # LICENSE : CeCILL-C # 8 | ###################################################### 9 | 10 | ###################################################### 11 | if [ ! -d ${HOME}/.numaprof ]; then 12 | mkdir ${HOME}/.numaprof 13 | fi 14 | 15 | ###################################################### 16 | if [ ! -f ${HOME}/.numaprof/htpasswd ]; then 17 | touch ${HOME}/.numaprof/htpasswd 18 | chmod go-r ${HOME}/.numaprof/htpasswd 19 | fi 20 | 21 | ###################################################### 22 | #export FLASK_APP=server.py 23 | export PYTHONPATH=@WEBVIEW_PATH@/deps/:$PYTHONPATH 24 | python3 @WEBVIEW_PATH@/nhtpasswd.py "$@" 25 | exit $? 26 | 27 | -------------------------------------------------------------------------------- /src/webview/webview.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ###################################################### 3 | # PROJECT : numaprof # 4 | # VERSION : 1.1.5 # 5 | # DATE : 06/2023 # 6 | # AUTHOR : Valat Sébastien - CERN # 7 | # LICENSE : CeCILL-C # 8 | ###################################################### 9 | 10 | ###################################################### 11 | if [ ! -f ${HOME}/.numaprof/htpasswd ]; then 12 | echo "===========================================================" 13 | echo -e "\e[31mYou first need to define a user/password to secure the GUI.\e[00m" 14 | read -p "User: " user 15 | @CMAKE_INSTALL_PREFIX@/bin/numaprof-passwd $user 16 | echo "===========================================================" 17 | fi 18 | 19 | ###################################################### 20 | function forwardSigterm() 21 | { 22 | #echo "Send KILL to python $CHILD !" 23 | kill $CHILD 24 | } 25 | 26 | ###################################################### 27 | trap forwardSigterm SIGTERM 28 | trap forwardSigterm SIGINT 29 | 30 | ###################################################### 31 | #export FLASK_APP=server.py 32 | export PYTHONPATH=@WEBVIEW_PATH@/deps/:$PYTHONPATH 33 | python3 @WEBVIEW_PATH@/server.py "$@" & 34 | CHILD=$! 35 | wait $! 36 | exit $? 37 | --------------------------------------------------------------------------------