From d90e3d4be0ab5a68ff67b30b0bcaf5171a70bdcd Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 11 Dec 2024 19:37:18 +0100 Subject: [PATCH 01/15] add license checker --- CMakeLists.txt | 9 ++ check_license/check-headers.sh | 179 +++++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 check_license/check-headers.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index 82381f5b5b..d61afc6569 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,6 +174,15 @@ else() add_custom_target(jemalloc_prod DEPENDS ${jemalloc_targ_BINARY_DIR}/lib/libjemalloc.a) + add_custom_target(check-license + COMMAND ${PMEMSTREAM_ROOT_DIR}/check_license/check-headers.sh + ${PMEMSTREAM_ROOT_DIR} + Apache-2.0 WITH LLVM-exception -v) + add_custom_target(copyright-format + COMMAND ${PMEMSTREAM_ROOT_DIR}/check_license/check-headers.sh + ${PMEMSTREAM_ROOT_DIR} + Apache-2.0 WITH LLVM-exception -d) + add_library(jemalloc INTERFACE) target_link_libraries( jemalloc INTERFACE ${jemalloc_targ_BINARY_DIR}/lib/libjemalloc.a) diff --git a/check_license/check-headers.sh b/check_license/check-headers.sh new file mode 100644 index 0000000000..f3174cf741 --- /dev/null +++ b/check_license/check-headers.sh @@ -0,0 +1,179 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2016-2022, Intel Corporation + +# check-headers.sh - check copyright and license in source files + +SELF=$0 + +function usage() { + echo "Usage: $SELF [-h|-v|-a]" + echo " -h, --help this help message" + echo " -v, --verbose verbose mode" + echo " -a, --all check all files (only modified files are checked by default)" + echo " -d, --update_dates change Copyright dates in all analyzed files (rather not use with -a)" +} + +if [ "$#" -lt 2 ]; then + usage >&2 + exit 2 +fi + +SOURCE_ROOT=$1 +shift +LICENSE=$1 +shift + +PATTERN=`mktemp` +TMP=`mktemp` +TMP2=`mktemp` +TEMPFILE=`mktemp` +rm -f $PATTERN $TMP $TMP2 + +if [ "$1" == "-h" -o "$1" == "--help" ]; then + usage + exit 0 +fi + +export GIT="git -C ${SOURCE_ROOT}" +$GIT rev-parse || exit 1 + +if [ -f $SOURCE_ROOT/.git/shallow ]; then + SHALLOW_CLONE=1 + echo + echo "Warning: This is a shallow clone. Checking dates in copyright headers" + echo " will be skipped in case of files that have no history." + echo +else + SHALLOW_CLONE=0 +fi + +VERBOSE=0 +CHECK_ALL=0 +UPDATE_DATES=0 +while [ "$1" != "" ]; do + case $1 in + -v|--verbose) + VERBOSE=1 + ;; + -a|--all) + CHECK_ALL=1 + ;; + -d|--update_dates) + UPDATE_DATES=1 + ;; + esac + shift +done + +if [ $CHECK_ALL -eq 0 ]; then + CURRENT_COMMIT=$($GIT log --pretty=%H -1) + MERGE_BASE=$($GIT merge-base HEAD origin/master 2>/dev/null) + [ -z $MERGE_BASE ] && \ + MERGE_BASE=$($GIT log --pretty="%cN:%H" | grep GitHub | head -n1 | cut -d: -f2) + [ -z $MERGE_BASE -o "$CURRENT_COMMIT" = "$MERGE_BASE" ] && \ + CHECK_ALL=1 +fi + +if [ $CHECK_ALL -eq 1 ]; then + echo "INFO: Checking copyright headers of all files..." + GIT_COMMAND="ls-tree -r --name-only HEAD" +else + echo "INFO: Checking copyright headers of modified files only..." + GIT_COMMAND="diff --name-only $MERGE_BASE $CURRENT_COMMIT" +fi + +FILES=$($GIT $GIT_COMMAND | ${SOURCE_ROOT}/utils/check_license/file-exceptions.sh | \ + grep -E -e '*\.[chs]$' -e '*\.[ch]pp$' -e '*\.sh$' -e '*\.py$' \ + -e 'TEST*' -e 'Makefile*' -e 'CMakeLists.txt$' -e '*\.cmake$' \ + -e '*\.link$' -e '*\.map$' -e '*\.Dockerfile$' -e 'LICENSE$' \ + -e '/common.inc$' -e '/match$' -e '/check_whitespace$' -e '/cppstyle$' | \ + xargs) + +RV=0 +for file in $FILES ; do + if [ $VERBOSE -eq 1 ]; then + echo "Checking file: $file" + fi + # The src_path is a path which should be used in every command except git. + # git is called with -C flag so filepaths should be relative to SOURCE_ROOT + src_path="${SOURCE_ROOT}/$file" + [ ! -f $src_path ] && continue + # ensure that file is UTF-8 encoded + ENCODING=`file -b --mime-encoding $src_path` + iconv -f $ENCODING -t "UTF-8" $src_path > $TEMPFILE + + if ! grep -q "SPDX-License-Identifier: $LICENSE" $src_path; then + echo >&2 "error: no $LICENSE SPDX tag in file: $src_path" + RV=1 + fi + + if [ $SHALLOW_CLONE -eq 0 ]; then + $GIT log --no-merges --format="%ai %aE" -- $file | sort > $TMP + else + # mark the grafted commits (commits with no parents) + $GIT log --no-merges --format="%ai %aE grafted-%p-commit" -- $file | sort > $TMP + fi + + # skip checking dates for non-Intel commits + [[ ! $(tail -n1 $TMP) =~ "@intel.com" ]] && continue + + # skip checking dates for new files + [ $(cat $TMP | wc -l) -le 1 ] && continue + + # grep out the grafted commits (commits with no parents) + # and skip checking dates for non-Intel commits + grep -v -e "grafted--commit" $TMP | grep -e "@intel.com" > $TMP2 + + [ $(cat $TMP2 | wc -l) -eq 0 ] && continue + + FIRST=`head -n1 $TMP2` + LAST=` tail -n1 $TMP2` + + YEARS=`sed ' +/Copyright [0-9-]\+.*, Intel Corporation/!d +s/.*Copyright \([0-9]\+\)-\([0-9]\+\),.*/\1-\2/ +s/.*Copyright \([0-9]\+\),.*/\1-\1/' $src_path` + if [ -z "$YEARS" ]; then + echo >&2 "No copyright years in $src_path" + RV=1 + continue + fi + + HEADER_FIRST=`echo $YEARS | cut -d"-" -f1` + HEADER_LAST=` echo $YEARS | cut -d"-" -f2` + + COMMIT_FIRST=`echo $FIRST | cut -d"-" -f1` + COMMIT_LAST=` echo $LAST | cut -d"-" -f1` + if [ "$COMMIT_FIRST" != "" -a "$COMMIT_LAST" != "" ]; then + if [ $HEADER_LAST -lt $COMMIT_LAST ]; then + if [ $HEADER_FIRST -lt $COMMIT_FIRST ]; then + COMMIT_FIRST=$HEADER_FIRST + fi + COMMIT_LAST=`date +%G` + if [ $COMMIT_FIRST -eq $COMMIT_LAST ]; then + NEW=$COMMIT_LAST + else + NEW=$COMMIT_FIRST-$COMMIT_LAST + fi + if [ ${UPDATE_DATES} -eq 1 ]; then + sed -i "s/Copyright ${YEARS}/Copyright ${NEW}/g" "${src_path}" + else + echo "$file:1: error: wrong copyright date: (is: $YEARS, should be: $NEW)" >&2 + RV=1 + fi + fi + else + echo "error: unknown commit dates in file: $file" >&2 + RV=1 + fi +done +rm -f $TMP $TMP2 $TEMPFILE + +# check if error found +if [ $RV -eq 0 ]; then + echo "Copyright headers are OK." +else + echo "Error(s) in copyright headers found!" >&2 +fi +exit $RV \ No newline at end of file From d8ba0f40dc48ec80eff8e8836d13bf642c780f00 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 11 Dec 2024 19:51:58 +0100 Subject: [PATCH 02/15] Fix formatting of CMakeLists.txt Fix formatting of CMakeLists.txt V2 Check license Check license V2 Check license V2.2 Check license V2.3 Check license V2.3 false test Check license V2.3 false test 2 Check license V2.3 false test 3 Check license V2.3 false test 4 TEST v1 TEST v1.2 TEST v1.3 TEST v1.4 Fix V1 Add date exception Added more exception files Added more exception files V2 Added more exception files V2.2 final version final version v2 final version v3 --- .github/workflows/reusable_checks.yml | 7 +++- CMakeLists.txt | 17 ++++---- check_license/check-headers.sh | 58 ++++++++++++++++----------- check_license/file-exceptions.sh | 31 ++++++++++++++ include/umf.h | 2 +- include/umf/memory_pool_ops.h | 2 +- include/umf/pools/pool_jemalloc.h | 2 +- include/umf/pools/pool_scalable.h | 2 +- src/libumf.def | 2 +- src/libumf.map | 2 +- src/libumf.rc.in | 2 +- src/memory_pool_internal.h | 2 +- src/memory_provider_get_last_failed.c | 2 +- src/memory_provider_internal.h | 2 +- src/memspaces/memspace_numa.c | 2 +- src/memtargets/memtarget_numa.h | 2 +- src/pool/CMakeLists.txt | 2 +- src/pool/pool_disjoint.cpp | 2 +- src/proxy_lib/proxy_lib.rc.in | 2 +- src/utils/utils_common.h | 2 +- src/utils/utils_posix_concurrency.c | 2 +- src/utils/utils_windows_concurrency.c | 2 +- src/utils/utils_windows_math.c | 2 +- test/common/pool_null.c | 2 +- test/common/pool_trace.c | 2 +- test/common/test_helpers.c | 2 +- test/malloc_compliance_tests.cpp | 2 +- test/poolFixtures.hpp | 2 +- test/pools/jemalloc_pool.cpp | 2 +- test/pools/pool_base_alloc.cpp | 2 +- test/pools/scalable_pool.cpp | 2 +- test/provider_os_memory.cpp | 2 +- 32 files changed, 108 insertions(+), 61 deletions(-) create mode 100644 check_license/file-exceptions.sh diff --git a/.github/workflows/reusable_checks.yml b/.github/workflows/reusable_checks.yml index e3e264b0db..a2f5ed3b3b 100644 --- a/.github/workflows/reusable_checks.yml +++ b/.github/workflows/reusable_checks.yml @@ -1,5 +1,4 @@ # Basic checks on the code, incl. coding style, spelling, bandit analysis. -# TODO: add license check name: Basic checks on: workflow_call @@ -52,6 +51,12 @@ jobs: - name: Check Python formatting run: cmake --build build --target black-format-check + - name: Run check-license + run: cmake --build build --target check-license + + - name: Run copyright-format + run: cmake --build build --target copyright-format + - name: Run a spell check uses: crate-ci/typos@b63f421581dce830bda2f597a678cb7776b41877 # v1.18.2 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index d61afc6569..77273fb012 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,14 +174,15 @@ else() add_custom_target(jemalloc_prod DEPENDS ${jemalloc_targ_BINARY_DIR}/lib/libjemalloc.a) - add_custom_target(check-license - COMMAND ${PMEMSTREAM_ROOT_DIR}/check_license/check-headers.sh - ${PMEMSTREAM_ROOT_DIR} - Apache-2.0 WITH LLVM-exception -v) - add_custom_target(copyright-format - COMMAND ${PMEMSTREAM_ROOT_DIR}/check_license/check-headers.sh - ${PMEMSTREAM_ROOT_DIR} - Apache-2.0 WITH LLVM-exception -d) + + add_custom_target( + check-license + COMMAND ${UMF_CMAKE_SOURCE_DIR}/check_license/check-headers.sh + ${UMF_CMAKE_SOURCE_DIR} Apache-2.0 WITH LLVM-exception -v) + add_custom_target( + copyright-format + COMMAND ${UMF_CMAKE_SOURCE_DIR}/check_license/check-headers.sh + ${UMF_CMAKE_SOURCE_DIR} Apache-2.0 WITH LLVM-exception -d) add_library(jemalloc INTERFACE) target_link_libraries( diff --git a/check_license/check-headers.sh b/check_license/check-headers.sh index f3174cf741..27d0c15eed 100644 --- a/check_license/check-headers.sh +++ b/check_license/check-headers.sh @@ -1,13 +1,14 @@ #!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2022, Intel Corporation +# Copyright (C) 2024 Intel Corporation +# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # check-headers.sh - check copyright and license in source files SELF=$0 function usage() { - echo "Usage: $SELF [-h|-v|-a]" + echo "Usage: $SELF [-h|-v|-a|-d]" echo " -h, --help this help message" echo " -v, --verbose verbose mode" echo " -a, --all check all files (only modified files are checked by default)" @@ -83,12 +84,7 @@ else GIT_COMMAND="diff --name-only $MERGE_BASE $CURRENT_COMMIT" fi -FILES=$($GIT $GIT_COMMAND | ${SOURCE_ROOT}/utils/check_license/file-exceptions.sh | \ - grep -E -e '*\.[chs]$' -e '*\.[ch]pp$' -e '*\.sh$' -e '*\.py$' \ - -e 'TEST*' -e 'Makefile*' -e 'CMakeLists.txt$' -e '*\.cmake$' \ - -e '*\.link$' -e '*\.map$' -e '*\.Dockerfile$' -e 'LICENSE$' \ - -e '/common.inc$' -e '/match$' -e '/check_whitespace$' -e '/cppstyle$' | \ - xargs) +FILES=$($GIT $GIT_COMMAND | ${SOURCE_ROOT}/check_license/file-exceptions.sh) RV=0 for file in $FILES ; do @@ -130,10 +126,10 @@ for file in $FILES ; do FIRST=`head -n1 $TMP2` LAST=` tail -n1 $TMP2` - YEARS=`sed ' -/Copyright [0-9-]\+.*, Intel Corporation/!d -s/.*Copyright \([0-9]\+\)-\([0-9]\+\),.*/\1-\2/ -s/.*Copyright \([0-9]\+\),.*/\1-\1/' $src_path` + YEARS=$(sed ' +/.*Copyright (C) \+.*[0-9-]\+ Intel Corporation/!d +s/.*Copyright (C) \([0-9]\+\)-\([0-9]\+\).*/\1-\2/ +s/.*Copyright (C) \([0-9]\+\).*/\1/' "$src_path") if [ -z "$YEARS" ]; then echo >&2 "No copyright years in $src_path" RV=1 @@ -145,22 +141,36 @@ s/.*Copyright \([0-9]\+\),.*/\1-\1/' $src_path` COMMIT_FIRST=`echo $FIRST | cut -d"-" -f1` COMMIT_LAST=` echo $LAST | cut -d"-" -f1` + if [ "$COMMIT_FIRST" != "" -a "$COMMIT_LAST" != "" ]; then - if [ $HEADER_LAST -lt $COMMIT_LAST ]; then - if [ $HEADER_FIRST -lt $COMMIT_FIRST ]; then - COMMIT_FIRST=$HEADER_FIRST + if [[ -n "$COMMIT_FIRST" && -n "$COMMIT_LAST" ]]; then + FL=0 + if [[ $HEADER_FIRST -lt $COMMIT_FIRST ]]; then + FL=1 fi + COMMIT_LAST=`date +%G` - if [ $COMMIT_FIRST -eq $COMMIT_LAST ]; then - NEW=$COMMIT_LAST + + if [[ $FL -eq 1 ]]; then + NEW=$HEADER_FIRST-$COMMIT_LAST else - NEW=$COMMIT_FIRST-$COMMIT_LAST + + if [[ $COMMIT_FIRST -eq $COMMIT_LAST ]]; then + NEW=$COMMIT_LAST + else + NEW=$COMMIT_FIRST-$COMMIT_LAST + fi fi - if [ ${UPDATE_DATES} -eq 1 ]; then - sed -i "s/Copyright ${YEARS}/Copyright ${NEW}/g" "${src_path}" - else - echo "$file:1: error: wrong copyright date: (is: $YEARS, should be: $NEW)" >&2 - RV=1 + + if [[ "$YEARS" == "$NEW" ]]; then + echo "No change needed: $YEARS" + else + if [[ ${UPDATE_DATES} -eq 1 ]]; then + sed -i "s/Copyright ${YEARS}/Copyright ${NEW}/g" "${src_path}" + else + echo "$file:1: error: wrong copyright date: (is: $YEARS, should be: $NEW)" >&2 + RV=1 + fi fi fi else diff --git a/check_license/file-exceptions.sh b/check_license/file-exceptions.sh new file mode 100644 index 0000000000..0fb94595c4 --- /dev/null +++ b/check_license/file-exceptions.sh @@ -0,0 +1,31 @@ +#!/bin/sh -e +# Copyright (C) 2024 Intel Corporation +# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +# You can add an exception file +grep -v -E -e 'src/uthash/.*' \ + -e 'benchmark/ubench.h' \ + -e 'include/umf/proxy_lib_new_delete.h' \ + -e 'scripts/docs_config/conf.py' \ + -e 'src/uthash/utlist.h' \ + -e 'src/uthash/uthash.h' \ + -e '\.yml$'\ + -e '\.clang-format$' \ + -e '\.md$' \ + -e '\.cmake-format$' \ + -e 'CODEOWNERS$' \ + -e 'scripts/assets/images/.*' \ + -e 'scripts/docs_config/.*' \ + -e '\.xml$' \ + -e '\.txt$' \ + -e 'test/supp/.*' \ + -e '\.json$' \ + -e 'LICENSE.TXT' \ + -e '.github/workflows/.spellcheck-conf.toml' \ + -e '.gitignore' \ + -e '.mailmap' \ + -e '.trivyignore' \ + -e 'ChangeLog' \ + -e '\.cmake.in$' \ + -e '\.patch$' diff --git a/include/umf.h b/include/umf.h index 3e2d827991..ffc4631046 100644 --- a/include/umf.h +++ b/include/umf.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/memory_pool_ops.h b/include/umf/memory_pool_ops.h index 67afdd1669..1d9bb029d1 100644 --- a/include/umf/memory_pool_ops.h +++ b/include/umf/memory_pool_ops.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/pools/pool_jemalloc.h b/include/umf/pools/pool_jemalloc.h index c30df65092..cbaa04cb32 100644 --- a/include/umf/pools/pool_jemalloc.h +++ b/include/umf/pools/pool_jemalloc.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/pools/pool_scalable.h b/include/umf/pools/pool_scalable.h index 072169b68c..fe8449b9db 100644 --- a/include/umf/pools/pool_scalable.h +++ b/include/umf/pools/pool_scalable.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/libumf.def b/src/libumf.def index a81492af37..c1a30eacdf 100644 --- a/src/libumf.def +++ b/src/libumf.def @@ -1,5 +1,5 @@ ;;;; Begin Copyright Notice -; Copyright (C) 2024 Intel Corporation +; Copyright (C) 2023-2024 Intel Corporation ; Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. ; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ;;;; End Copyright Notice diff --git a/src/libumf.map b/src/libumf.map index 4c60b87c3b..4e6c098aad 100644 --- a/src/libumf.map +++ b/src/libumf.map @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2023-2024 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/libumf.rc.in b/src/libumf.rc.in index 7aba79e7ed..bcb400fdf8 100644 --- a/src/libumf.rc.in +++ b/src/libumf.rc.in @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Intel Corporation +// Copyright (C) 2024 Intel Corporation // // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/memory_pool_internal.h b/src/memory_pool_internal.h index e556ace214..d2ec87995f 100644 --- a/src/memory_pool_internal.h +++ b/src/memory_pool_internal.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/memory_provider_get_last_failed.c b/src/memory_provider_get_last_failed.c index 9434eea976..ecaf789761 100644 --- a/src/memory_provider_get_last_failed.c +++ b/src/memory_provider_get_last_failed.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/memory_provider_internal.h b/src/memory_provider_internal.h index 60955e0fbd..c8aea57247 100644 --- a/src/memory_provider_internal.h +++ b/src/memory_provider_internal.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/memspaces/memspace_numa.c b/src/memspaces/memspace_numa.c index 0028e394dc..0f91bd5e54 100644 --- a/src/memspaces/memspace_numa.c +++ b/src/memspaces/memspace_numa.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/memtargets/memtarget_numa.h b/src/memtargets/memtarget_numa.h index 2d3e3fd704..b078f7be63 100644 --- a/src/memtargets/memtarget_numa.h +++ b/src/memtargets/memtarget_numa.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/pool/CMakeLists.txt b/src/pool/CMakeLists.txt index 17be932a45..c51ab815e5 100644 --- a/src/pool/CMakeLists.txt +++ b/src/pool/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Intel Corporation +# Copyright (C) 2023-2024 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/pool/pool_disjoint.cpp b/src/pool/pool_disjoint.cpp index e0298b43df..a97098ee0f 100644 --- a/src/pool/pool_disjoint.cpp +++ b/src/pool/pool_disjoint.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/proxy_lib/proxy_lib.rc.in b/src/proxy_lib/proxy_lib.rc.in index dce151ec3e..39cab94002 100644 --- a/src/proxy_lib/proxy_lib.rc.in +++ b/src/proxy_lib/proxy_lib.rc.in @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Intel Corporation +// Copyright (C) 2024 Intel Corporation // // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/utils/utils_common.h b/src/utils/utils_common.h index 9ef2b3cf13..b9a30ec161 100644 --- a/src/utils/utils_common.h +++ b/src/utils/utils_common.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/utils/utils_posix_concurrency.c b/src/utils/utils_posix_concurrency.c index fcf04ed952..ce90268978 100644 --- a/src/utils/utils_posix_concurrency.c +++ b/src/utils/utils_posix_concurrency.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/utils/utils_windows_concurrency.c b/src/utils/utils_windows_concurrency.c index 696f4523bc..b6683faafe 100644 --- a/src/utils/utils_windows_concurrency.c +++ b/src/utils/utils_windows_concurrency.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/utils/utils_windows_math.c b/src/utils/utils_windows_math.c index 07c4c9978b..d765800934 100644 --- a/src/utils/utils_windows_math.c +++ b/src/utils/utils_windows_math.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/common/pool_null.c b/test/common/pool_null.c index c34bcfc169..f071c11e76 100644 --- a/test/common/pool_null.c +++ b/test/common/pool_null.c @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/common/pool_trace.c b/test/common/pool_trace.c index 29329f31c0..ee69cae9bc 100644 --- a/test/common/pool_trace.c +++ b/test/common/pool_trace.c @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/common/test_helpers.c b/test/common/test_helpers.c index 71f018d0f7..2f3d35800d 100644 --- a/test/common/test_helpers.c +++ b/test/common/test_helpers.c @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // This file contains tests for UMF pool API diff --git a/test/malloc_compliance_tests.cpp b/test/malloc_compliance_tests.cpp index 06e3b5dd78..9a7efcd9cd 100644 --- a/test/malloc_compliance_tests.cpp +++ b/test/malloc_compliance_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/poolFixtures.hpp b/test/poolFixtures.hpp index 6f54fe1142..cb75d04c55 100644 --- a/test/poolFixtures.hpp +++ b/test/poolFixtures.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/pools/jemalloc_pool.cpp b/test/pools/jemalloc_pool.cpp index 042841fc48..e9139c04f9 100644 --- a/test/pools/jemalloc_pool.cpp +++ b/test/pools/jemalloc_pool.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/pools/pool_base_alloc.cpp b/test/pools/pool_base_alloc.cpp index ec07a7c2fe..b870a1eb9a 100644 --- a/test/pools/pool_base_alloc.cpp +++ b/test/pools/pool_base_alloc.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/pools/scalable_pool.cpp b/test/pools/scalable_pool.cpp index 51cc020305..fb3c1edc58 100644 --- a/test/pools/scalable_pool.cpp +++ b/test/pools/scalable_pool.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/provider_os_memory.cpp b/test/provider_os_memory.cpp index 4c81b84f9e..f2f286223a 100644 --- a/test/provider_os_memory.cpp +++ b/test/provider_os_memory.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception From 36228204a16f203babf47326cd3097d180afaa04 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Fri, 20 Dec 2024 13:11:40 +0100 Subject: [PATCH 03/15] Final version of license check --- .github/workflows/reusable_checks.yml | 6 +- .github/workflows/sanitizers.yml | 142 ++++++++++++++++++++++++++ CMakeLists.txt | 9 -- 3 files changed, 146 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/sanitizers.yml diff --git a/.github/workflows/reusable_checks.yml b/.github/workflows/reusable_checks.yml index a2f5ed3b3b..55ab009dff 100644 --- a/.github/workflows/reusable_checks.yml +++ b/.github/workflows/reusable_checks.yml @@ -52,10 +52,12 @@ jobs: run: cmake --build build --target black-format-check - name: Run check-license - run: cmake --build build --target check-license + run: | + bash ./check_license/check-headers.sh ./ "Apache-2.0 WITH LLVM-exception" -v - name: Run copyright-format - run: cmake --build build --target copyright-format + run: | + bash ./check_license/check-headers.sh ./ "Apache-2.0 WITH LLVM-exception" -d - name: Run a spell check uses: crate-ci/typos@b63f421581dce830bda2f597a678cb7776b41877 # v1.18.2 diff --git a/.github/workflows/sanitizers.yml b/.github/workflows/sanitizers.yml new file mode 100644 index 0000000000..cf11a9543c --- /dev/null +++ b/.github/workflows/sanitizers.yml @@ -0,0 +1,142 @@ +# Check code with compilers' sanitizers +name: Sanitizers + +on: workflow_call + +env: + BUILD_DIR : "${{github.workspace}}/build" + INSTL_DIR : "${{github.workspace}}/../install-dir" + +permissions: + contents: read + +jobs: + ubuntu-build: + name: Ubuntu + strategy: + matrix: + compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}, {c: icx, cxx: icpx}] + # TSAN is mutually exclusive with other sanitizers + sanitizers: [{asan: ON, ubsan: ON, tsan: OFF}, {asan: OFF, ubsan: OFF, tsan: ON}] + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + + - name: Install apt packages + run: | + sudo apt-get update + sudo apt-get install -y clang cmake libhwloc-dev libnuma-dev libjemalloc-dev libtbb-dev + + - name: Install oneAPI basekit + if: matrix.compiler.cxx == 'icpx' + run: | + sudo apt-get install -y gpg-agent wget + wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null + echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list + sudo apt-get update + sudo apt-get install -y intel-oneapi-ippcp-devel intel-oneapi-ipp-devel intel-oneapi-common-oneapi-vars intel-oneapi-compiler-dpcpp-cpp + + + - name: Set ptrace value for IPC test + run: sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope" + + - name: Configure build + run: > + ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh &&' || ''}} + cmake + -B ${{env.BUILD_DIR}} + -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" + -DCMAKE_BUILD_TYPE=Debug + -DUMF_BUILD_SHARED_LIBRARY=OFF + -DCMAKE_C_COMPILER=${{matrix.compiler.c}} + -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=ON + -DUMF_FORMAT_CODE_STYLE=OFF + -DUMF_DEVELOPER_MODE=ON + -DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON + -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON + -DUMF_USE_ASAN=${{matrix.sanitizers.asan}} + -DUMF_USE_UBSAN=${{matrix.sanitizers.ubsan}} + -DUMF_USE_TSAN=${{matrix.sanitizers.tsan}} + -DUMF_BUILD_EXAMPLES=ON + -DUMF_TESTS_FAIL_ON_SKIP=ON + + - name: Build UMF + run: | + ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh' || true }} + cmake --build ${{env.BUILD_DIR}} -j $(nproc) + + - name: Run tests + working-directory: ${{env.BUILD_DIR}} + run: > + ${{ matrix.compiler.cxx == 'icpx' && '. /opt/intel/oneapi/setvars.sh &&' || ''}} + ctest --output-on-failure + + windows-build: + name: cl and clang-cl on Windows + env: + VCPKG_PATH: "${{github.workspace}}/build/vcpkg/packages/hwloc_x64-windows;${{github.workspace}}/build/vcpkg/packages/tbb_x64-windows;${{github.workspace}}/build/vcpkg/packages/jemalloc_x64-windows" + strategy: + matrix: + compiler: [{c: cl, cxx: cl}, {c: clang-cl, cxx: clang-cl}] + # Only ASAN is supported + sanitizers: [{asan: ON}] + runs-on: windows-2022 + + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + with: + fetch-depth: 0 + + # Use the latest MSVC toolset available, when compiling UMF with ASan. + # Running binaries compiled with older toolsets results in a + # 'STATUS_DLL_INIT_FAILED' error despite being linked with ASan from + # the same toolset as the compiler being used. + # https://github.com/actions/runner-images/issues/8891 + - name: Setup MSVC dev command prompt + if: matrix.sanitizers.asan == 'ON' + uses: TheMrMilchmann/setup-msvc-dev@48edcef51a12c80d7e62ace57aae1417795e511c # v3.0.0 + with: + arch: x64 + toolset: '14' + + - name: Initialize vcpkg + uses: lukka/run-vcpkg@5e0cab206a5ea620130caf672fce3e4a6b5666a1 # v11.5 + with: + vcpkgGitCommitId: 3dd44b931481d7a8e9ba412621fa810232b66289 + vcpkgDirectory: ${{env.BUILD_DIR}}/vcpkg + vcpkgJsonGlob: '**/vcpkg.json' + + - name: Install dependencies + run: vcpkg install + shell: pwsh # Specifies PowerShell as the shell for running the script. + + # TODO enable level zero provider + - name: Configure build + run: > + cmake + -B ${{env.BUILD_DIR}} + -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" + -DCMAKE_C_COMPILER=${{matrix.compiler.c}} + -DCMAKE_CXX_COMPILER=${{matrix.compiler.cxx}} + -DCMAKE_PREFIX_PATH="${{env.VCPKG_PATH}}" + -DUMF_BUILD_SHARED_LIBRARY=OFF + -DUMF_FORMAT_CODE_STYLE=OFF + -DUMF_DEVELOPER_MODE=ON + -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON + -DUMF_USE_ASAN=${{matrix.sanitizers.asan}} + -DUMF_BUILD_EXAMPLES=ON + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF + -DUMF_TESTS_FAIL_ON_SKIP=ON + + - name: Build UMF + run: cmake --build ${{env.BUILD_DIR}} --config Debug -j $Env:NUMBER_OF_PROCESSORS + + - name: Run tests + working-directory: ${{env.BUILD_DIR}} + run: ctest -C Debug --output-on-failure diff --git a/CMakeLists.txt b/CMakeLists.txt index 77273fb012..f60af15ddc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,15 +175,6 @@ else() add_custom_target(jemalloc_prod DEPENDS ${jemalloc_targ_BINARY_DIR}/lib/libjemalloc.a) - add_custom_target( - check-license - COMMAND ${UMF_CMAKE_SOURCE_DIR}/check_license/check-headers.sh - ${UMF_CMAKE_SOURCE_DIR} Apache-2.0 WITH LLVM-exception -v) - add_custom_target( - copyright-format - COMMAND ${UMF_CMAKE_SOURCE_DIR}/check_license/check-headers.sh - ${UMF_CMAKE_SOURCE_DIR} Apache-2.0 WITH LLVM-exception -d) - add_library(jemalloc INTERFACE) target_link_libraries( jemalloc INTERFACE ${jemalloc_targ_BINARY_DIR}/lib/libjemalloc.a) From c6a9fa0fda36900922306f879e04c2426f197f35 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Fri, 20 Dec 2024 13:19:53 +0100 Subject: [PATCH 04/15] Final version of license check. Final version of license check.. Final version of license check... Final version of license check.... --- .github/workflows/reusable_checks.yml | 4 ++-- check_license/check-headers.sh | 2 ++ check_license/file-exceptions.sh | 0 3 files changed, 4 insertions(+), 2 deletions(-) mode change 100644 => 100755 check_license/file-exceptions.sh diff --git a/.github/workflows/reusable_checks.yml b/.github/workflows/reusable_checks.yml index 55ab009dff..7e99e460c2 100644 --- a/.github/workflows/reusable_checks.yml +++ b/.github/workflows/reusable_checks.yml @@ -53,11 +53,11 @@ jobs: - name: Run check-license run: | - bash ./check_license/check-headers.sh ./ "Apache-2.0 WITH LLVM-exception" -v + bash ./check_license/check-headers.sh . "Apache-2.0 WITH LLVM-exception" -v - name: Run copyright-format run: | - bash ./check_license/check-headers.sh ./ "Apache-2.0 WITH LLVM-exception" -d + bash ./check_license/check-headers.sh . "Apache-2.0 WITH LLVM-exception" -d - name: Run a spell check uses: crate-ci/typos@b63f421581dce830bda2f597a678cb7776b41877 # v1.18.2 diff --git a/check_license/check-headers.sh b/check_license/check-headers.sh index 27d0c15eed..81d5d2bf4f 100644 --- a/check_license/check-headers.sh +++ b/check_license/check-headers.sh @@ -87,10 +87,12 @@ fi FILES=$($GIT $GIT_COMMAND | ${SOURCE_ROOT}/check_license/file-exceptions.sh) RV=0 + for file in $FILES ; do if [ $VERBOSE -eq 1 ]; then echo "Checking file: $file" fi + # The src_path is a path which should be used in every command except git. # git is called with -C flag so filepaths should be relative to SOURCE_ROOT src_path="${SOURCE_ROOT}/$file" diff --git a/check_license/file-exceptions.sh b/check_license/file-exceptions.sh old mode 100644 new mode 100755 From e83ee3492730823978c474ecb5141fe1a84a4364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Mon, 16 Dec 2024 14:58:26 +0100 Subject: [PATCH 05/15] Minor cleanups and additions in docs includes: - add missing CUDA provider in the web docs, - proxy_pool is enabled by default, move req. info to proxy_lib, - add links in README. --- README.md | 17 ++++++++++++----- scripts/docs_config/api.rst | 13 ++++++++++++- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index df90b6852e..4cd1d8ff58 100644 --- a/README.md +++ b/README.md @@ -122,11 +122,16 @@ List of options provided by CMake: ## Architecture: memory pools and providers -A UMF memory pool is a combination of a pool allocator and a memory provider. A memory provider is responsible for coarse-grained memory allocations and management of memory pages, while the pool allocator controls memory pooling and handles fine-grained memory allocations. +A UMF memory pool is a combination of a pool allocator and a memory provider. A memory provider is responsible for +coarse-grained memory allocations and management of memory pages, while the pool allocator controls memory pooling +and handles fine-grained memory allocations. Pool allocator can leverage existing allocators (e.g. jemalloc or tbbmalloc) or be written from scratch. -UMF comes with predefined pool allocators (see include/pool) and providers (see include/provider). UMF can also work with user-defined pools and providers that implement a specific interface (see include/umf/memory_pool_ops.h and include/umf/memory_provider_ops.h). +UMF comes with predefined pool allocators (see [`include/umf/pools`](include/umf/pools)) and providers +(see [`include/umf/providers`](include/umf/providers)). UMF can also work with user-defined pools and +providers that implement a specific interface (see [`include/umf/memory_pool_ops.h`](include/umf/memory_pool_ops.h) +and [`include/umf/memory_provider_ops.h`](include/umf/memory_provider_ops.h)). More detailed documentation is available here: https://oneapi-src.github.io/unified-memory-framework/ @@ -152,6 +157,7 @@ a duplicate of another process's file descriptor (`pidfd_getfd(2)` is supported Permission to duplicate another process's file descriptor is governed by a ptrace access mode `PTRACE_MODE_ATTACH_REALCREDS` check (see `ptrace(2)`) that can be changed using the `/proc/sys/kernel/yama/ptrace_scope` interface in the following way: + ```sh $ sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope" ``` @@ -183,6 +189,7 @@ a duplicate of another process's file descriptor (`pidfd_getfd(2)` is supported Permission to duplicate another process's file descriptor is governed by a ptrace access mode `PTRACE_MODE_ATTACH_REALCREDS` check (see `ptrace(2)`) that can be changed using the `/proc/sys/kernel/yama/ptrace_scope` interface in the following way: + ```sh $ sudo bash -c "echo 0 > /proc/sys/kernel/yama/ptrace_scope" ``` @@ -203,7 +210,7 @@ Additionally, required for tests: #### DevDax memory provider (Linux only) -A memory provider that provides memory from a device DAX (a character device file /dev/daxX.Y). +A memory provider that provides memory from a device DAX (a character device file like `/dev/daxX.Y`). It can be used when large memory mappings are needed. ##### Requirements @@ -249,8 +256,6 @@ This memory pool is distributed as part of libumf. It forwards all requests to t memory provider. Currently umfPoolRealloc, umfPoolCalloc and umfPoolMallocUsableSize functions are not supported by the proxy pool. -To enable this feature, the `UMF_BUILD_SHARED_LIBRARY` option needs to be turned `ON`. - #### Disjoint pool TODO: Add a description @@ -326,6 +331,8 @@ Querying the latency value requires HMAT support on the platform. Calling `umfMe UMF provides the UMF proxy library (`umf_proxy`) that makes it possible to override the default allocator in other programs in both Linux and Windows. +To enable this feature, the `UMF_BUILD_SHARED_LIBRARY` option needs to be turned `ON`. + #### Linux In case of Linux it can be done without any code changes using the `LD_PRELOAD` environment variable: diff --git a/scripts/docs_config/api.rst b/scripts/docs_config/api.rst index c0448f1178..3eedc8f1d9 100644 --- a/scripts/docs_config/api.rst +++ b/scripts/docs_config/api.rst @@ -58,6 +58,9 @@ supported by the Proxy Pool. Scalable Pool ------------------------------------------ + +A oneTBB-based memory pool manager. + .. doxygenfile:: pool_scalable.h :sections: define enum typedef func var @@ -104,10 +107,18 @@ A memory provider that provides memory from L0 device. .. doxygenfile:: provider_level_zero.h :sections: define enum typedef func var +CUDA Provider +------------------------------------------ + +A memory provider that provides memory from CUDA device. + +.. doxygenfile:: provider_cuda.h + :sections: define enum typedef func var + DevDax Memory Provider ------------------------------------------ -A memory provider that provides memory from a device DAX (a character device file /dev/daxX.Y). +A memory provider that provides memory from a device DAX (a character device file like /dev/daxX.Y). .. doxygenfile:: provider_devdax_memory.h :sections: define enum typedef func var From 718c61dbf5ac76fd72166b9409d1a97644d4b34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Mon, 16 Dec 2024 15:51:24 +0100 Subject: [PATCH 06/15] Move docs content into a separate dir and update the script to work outside of scripts dir. --- .github/workflows/docs.yml | 8 +++--- .github/workflows/reusable_docs_build.yml | 6 +++-- .gitignore | 2 +- RELEASE_STEPS.md | 2 +- docs/README.md | 8 ++++++ .../assets/images/intro_architecture.png | Bin {scripts/docs_config => docs/config}/Doxyfile | 2 +- {scripts/docs_config => docs/config}/api.rst | 0 {scripts/docs_config => docs/config}/conf.py | 4 ++- .../docs_config => docs/config}/examples.rst | 0 .../docs_config => docs/config}/glossary.rst | 0 .../docs_config => docs/config}/index.rst | 0 .../config}/introduction.rst | 0 {scripts => docs}/generate_docs.py | 24 +++++++++++++----- scripts/README.md | 5 ---- 15 files changed, 41 insertions(+), 20 deletions(-) create mode 100644 docs/README.md rename {scripts => docs}/assets/images/intro_architecture.png (100%) rename {scripts/docs_config => docs/config}/Doxyfile (99%) rename {scripts/docs_config => docs/config}/api.rst (100%) rename {scripts/docs_config => docs/config}/conf.py (92%) rename {scripts/docs_config => docs/config}/examples.rst (100%) rename {scripts/docs_config => docs/config}/glossary.rst (100%) rename {scripts/docs_config => docs/config}/index.rst (100%) rename {scripts/docs_config => docs/config}/introduction.rst (100%) rename {scripts => docs}/generate_docs.py (71%) delete mode 100644 scripts/README.md diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 3d9bfc29b4..87e34cc749 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -41,13 +41,15 @@ jobs: run: echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Build the documentation - working-directory: scripts - run: python3 generate_docs.py + run: | + mkdir build + cd build + python3 ../docs/generate_docs.py - name: Upload artifact uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0 with: - path: docs/html + path: build/docs_build/generated/html deploy: name: Deploy docs to GitHub Pages diff --git a/.github/workflows/reusable_docs_build.yml b/.github/workflows/reusable_docs_build.yml index 269560c674..6702f9a66d 100644 --- a/.github/workflows/reusable_docs_build.yml +++ b/.github/workflows/reusable_docs_build.yml @@ -30,5 +30,7 @@ jobs: python3 -m pip install -r third_party/requirements.txt - name: Build the documentation - working-directory: scripts - run: python3 generate_docs.py + run: | + mkdir build + cd build + python3 ../docs/generate_docs.py diff --git a/.gitignore b/.gitignore index a1a488bc14..e177e395ef 100644 --- a/.gitignore +++ b/.gitignore @@ -58,7 +58,7 @@ __pycache__/ *.py[cod] # Generated docs -docs/ +docs_build/ # Build files /build*/ diff --git a/RELEASE_STEPS.md b/RELEASE_STEPS.md index fb46f156b9..efdadbe9fd 100644 --- a/RELEASE_STEPS.md +++ b/RELEASE_STEPS.md @@ -41,7 +41,7 @@ Do changes for a release: - For major releases mention API and ABI compatibility with the previous release - Update project's version in a few places: - For major and minor releases: `UMF_VERSION_CURRENT` in `include/umf/base.h` (the API version) - - `release` variable in `scripts/docs_config/conf.py` (for docs) + - `release` variable in `docs/config/conf.py` (for docs) - `UMF_VERSION` variable in `.github/workflows/reusable_basic.yml` (for installation test) - For major releases update ABI version in `.map` and `.def` files - These files are defined for all public libraries (`libumf` and `proxy_lib`, at the moment) diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..1124b53bd9 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,8 @@ +To generate HTML documentation run the `generate_docs.py` script from the `build` dir. +It will create extra `./docs_build` directory, where the intermediate and final files +will be created. HTML docs will be in the `./docs_build/generated/html` directory. + +The script requires: + * [Doxygen](http://www.doxygen.nl/) at least v1.9.1 + * [Python](https://www.python.org/downloads/) at least v3.8 + * and python pip requirements, as defined in `third_party/requirements.txt` diff --git a/scripts/assets/images/intro_architecture.png b/docs/assets/images/intro_architecture.png similarity index 100% rename from scripts/assets/images/intro_architecture.png rename to docs/assets/images/intro_architecture.png diff --git a/scripts/docs_config/Doxyfile b/docs/config/Doxyfile similarity index 99% rename from scripts/docs_config/Doxyfile rename to docs/config/Doxyfile index 43ff2a6037..f23117ff29 100644 --- a/scripts/docs_config/Doxyfile +++ b/docs/config/Doxyfile @@ -2058,7 +2058,7 @@ GENERATE_XML = YES # The default directory is: xml. # This tag requires that the tag GENERATE_XML is set to YES. -XML_OUTPUT = ../docs/xml +XML_OUTPUT = docs_build/doxyxml # If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program # listings (including syntax highlighting and cross-referencing information) to diff --git a/scripts/docs_config/api.rst b/docs/config/api.rst similarity index 100% rename from scripts/docs_config/api.rst rename to docs/config/api.rst diff --git a/scripts/docs_config/conf.py b/docs/config/conf.py similarity index 92% rename from scripts/docs_config/conf.py rename to docs/config/conf.py index 577bc0b484..3af2df3787 100644 --- a/scripts/docs_config/conf.py +++ b/docs/config/conf.py @@ -49,7 +49,9 @@ # -- Extension configuration ------------------------------------------------- # -- Options for breathe extension ------------------------------------------- -breathe_projects = {project: "../../docs/xml"} +# 'doxyxml' dir is generated with Doxygen; it's supposed to be in a directory +# one above the config directory. +breathe_projects = {project: "../doxyxml"} breathe_default_project = project breathe_show_include = False breathe_default_members = ("members", "undoc-members") diff --git a/scripts/docs_config/examples.rst b/docs/config/examples.rst similarity index 100% rename from scripts/docs_config/examples.rst rename to docs/config/examples.rst diff --git a/scripts/docs_config/glossary.rst b/docs/config/glossary.rst similarity index 100% rename from scripts/docs_config/glossary.rst rename to docs/config/glossary.rst diff --git a/scripts/docs_config/index.rst b/docs/config/index.rst similarity index 100% rename from scripts/docs_config/index.rst rename to docs/config/index.rst diff --git a/scripts/docs_config/introduction.rst b/docs/config/introduction.rst similarity index 100% rename from scripts/docs_config/introduction.rst rename to docs/config/introduction.rst diff --git a/scripts/generate_docs.py b/docs/generate_docs.py similarity index 71% rename from scripts/generate_docs.py rename to docs/generate_docs.py index d5b2a01282..1697eacfe6 100644 --- a/scripts/generate_docs.py +++ b/docs/generate_docs.py @@ -6,17 +6,20 @@ """ from pathlib import Path -from shutil import rmtree +from shutil import rmtree, copytree import subprocess # nosec B404 import time def _check_cwd() -> None: - script_path = Path(__file__).resolve().parent cwd = Path.cwd() - if script_path != cwd: + include_dir = Path(cwd, "../include") + # Verify if include dir is one level up (as defined in Doxyfile) + if not include_dir.exists(): print( - f"{__file__} script has to be run from the 'scripts' directory. Terminating..." + f"Include directory {include_dir.resolve()} not found! " + "Please run this script from /build!", + flush=True, ) exit(1) @@ -66,8 +69,17 @@ def _generate_html(config_path: Path, docs_path: Path) -> None: def main() -> None: _check_cwd() - config_path = Path("docs_config").resolve() - docs_path = Path("..", "docs").resolve() + + script_dir = Path(__file__).resolve().parent + docs_build_path = Path("docs_build").resolve() + + # Sphinx and breathe require access to a Doxygen generated dir ('doxyxml') + # so we copy the whole content of the 'docs' dir to the build dir. + copytree(Path(script_dir), docs_build_path, dirs_exist_ok=True) + + config_path = Path(docs_build_path, "config").resolve() + docs_path = Path(docs_build_path, "generated").resolve() + start = time.time() _prepare_docs_dir(docs_path) _generate_xml(config_path, docs_path) diff --git a/scripts/README.md b/scripts/README.md deleted file mode 100644 index e3a9ed533f..0000000000 --- a/scripts/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The documentation HTML files are generated using the following dependencies: - * [Python](https://www.python.org/downloads/) at least v3.8 - * [Doxygen](http://www.doxygen.nl/) at least v1.9.1 - - To generate files run the `generate_docs.py` script from the `scripts` directory. Files will be generated to the `docs/html` directory relative to the main directory of this repository. From 78d27981ba94512c27c6ac774f340eff71551a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Tue, 17 Dec 2024 10:57:31 +0100 Subject: [PATCH 07/15] [CMake] Add 'docs' target --- .github/workflows/docs.yml | 5 ++--- .github/workflows/reusable_docs_build.yml | 10 +++++++--- CMakeLists.txt | 11 +++++++++++ docs/README.md | 22 +++++++++++++++++++--- 4 files changed, 39 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 87e34cc749..c507f7994c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -42,9 +42,8 @@ jobs: - name: Build the documentation run: | - mkdir build - cd build - python3 ../docs/generate_docs.py + cmake -B build -DUMF_TESTS_FAIL_ON_SKIP=ON + cmake --build build --target docs - name: Upload artifact uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0 diff --git a/.github/workflows/reusable_docs_build.yml b/.github/workflows/reusable_docs_build.yml index 6702f9a66d..92dcda5558 100644 --- a/.github/workflows/reusable_docs_build.yml +++ b/.github/workflows/reusable_docs_build.yml @@ -31,6 +31,10 @@ jobs: - name: Build the documentation run: | - mkdir build - cd build - python3 ../docs/generate_docs.py + cmake -B build \ + -DUMF_BUILD_LEVEL_ZERO_PROVIDER=OFF \ + -DUMF_BUILD_CUDA_PROVIDER=OFF \ + -DUMF_BUILD_TESTS=OFF \ + -DUMF_BUILD_EXAMPLES=OFF \ + -DUMF_DISABLE_HWLOC=ON + cmake --build build --target docs diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b88f95b5f..4e181f246c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -760,6 +760,17 @@ if(UMF_FORMAT_CODE_STYLE) endif() endif() +find_package(Python3 3.8) +if(Python3_FOUND) + message(STATUS "Adding 'docs' target for creating a documentation.") + add_custom_target( + docs + WORKING_DIRECTORY ${CMAKE_BINARY_DIR} + COMMAND ${Python3_EXECUTABLE} + ${UMF_CMAKE_SOURCE_DIR}/docs/generate_docs.py + COMMENT "Generate HTML documentation using Doxygen") +endif() + # --------------------------------------------------------------------------- # # Configure make install/uninstall and packages # --------------------------------------------------------------------------- # diff --git a/docs/README.md b/docs/README.md index 1124b53bd9..3564d86db0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,8 +1,24 @@ -To generate HTML documentation run the `generate_docs.py` script from the `build` dir. -It will create extra `./docs_build` directory, where the intermediate and final files +# Documentation + +To generate HTML documentation run the `generate_docs.py` script from any sub-dir of the +repository (most likely `build`) or enable and use build target 'docs' (see details below). + +This script will create `./docs_build` sub-directory, where the intermediate and final files will be created. HTML docs will be in the `./docs_build/generated/html` directory. -The script requires: +## make docs + +To run documentation generation via build target use CMake commands below. +To enable this target, python executable (in required version) has to be found in the system. + +```bash +$ cmake -B build +$ cmake --build build --target docs +``` + +## Requirements + +Script to generate HTML docs requires: * [Doxygen](http://www.doxygen.nl/) at least v1.9.1 * [Python](https://www.python.org/downloads/) at least v3.8 * and python pip requirements, as defined in `third_party/requirements.txt` From c7fdc11978e965af6dd4a2fce52320967b20e434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Stolarczuk?= Date: Tue, 17 Dec 2024 11:04:19 +0100 Subject: [PATCH 08/15] [CI] make docs workflow reusable in deploy job --- .github/workflows/docs.yml | 43 ++++------------------- .github/workflows/reusable_docs_build.yml | 14 +++++++- 2 files changed, 19 insertions(+), 38 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c507f7994c..165cc1754f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -14,45 +14,14 @@ permissions: contents: read jobs: - build: - name: Build docs - runs-on: ${{ github.repository_owner == 'oneapi-src' && 'intel-ubuntu-22.04' || 'ubuntu-latest' }} - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - with: - fetch-depth: 0 - - - name: Install doxygen - run: | - sudo apt-get update - sudo apt-get install -y doxygen - - # Latest distros do not allow global pip installation - - name: Install Python requirements in venv - run: | - python3 -m venv .venv - . .venv/bin/activate - echo "$PATH" >> $GITHUB_PATH - python3 -m pip install -r third_party/requirements.txt - - - name: Setup PATH for python - run: echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Build the documentation - run: | - cmake -B build -DUMF_TESTS_FAIL_ON_SKIP=ON - cmake --build build --target docs - - - name: Upload artifact - uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0 - with: - path: build/docs_build/generated/html + DocsBuild: + uses: ./.github/workflows/reusable_docs_build.yml + with: + upload: true - deploy: + DocsDeploy: name: Deploy docs to GitHub Pages - needs: build + needs: DocsBuild permissions: pages: write diff --git a/.github/workflows/reusable_docs_build.yml b/.github/workflows/reusable_docs_build.yml index 92dcda5558..e90ca87aed 100644 --- a/.github/workflows/reusable_docs_build.yml +++ b/.github/workflows/reusable_docs_build.yml @@ -1,6 +1,12 @@ name: Docs build -on: workflow_call +on: + workflow_call: + inputs: + upload: + description: Should HTML documentation be uploaded as artifact? + type: boolean + default: false permissions: contents: read @@ -38,3 +44,9 @@ jobs: -DUMF_BUILD_EXAMPLES=OFF \ -DUMF_DISABLE_HWLOC=ON cmake --build build --target docs + + - name: Upload artifact + if: ${{ inputs.upload == true }} + uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0 + with: + path: build/docs_build/generated/html From 70c59068b314de0c6ac3459566bad138d3fdbd63 Mon Sep 17 00:00:00 2001 From: Lukasz Dorau Date: Mon, 30 Dec 2024 09:27:22 +0100 Subject: [PATCH 09/15] Fix paths of logs in test_valgrind.sh Signed-off-by: Lukasz Dorau --- test/test_valgrind.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/test_valgrind.sh b/test/test_valgrind.sh index 46bfe7d1cc..954a3a56bb 100755 --- a/test/test_valgrind.sh +++ b/test/test_valgrind.sh @@ -74,9 +74,12 @@ echo "Working directory: $(pwd)" echo "Running: \"valgrind $OPTION\" for the following tests:" ANY_TEST_FAILED=0 -rm -f umf_test-*.log umf_test-*.err +PATH_TESTS="./test/umf_test-*" +PATH_EXAMPLES="./examples/umf_example_*" -[ "$TESTS" = "" ] && TESTS=$(ls -1 ./test/umf_test-* ./examples/umf_example_*) +rm -f ${PATH_TESTS}.log ${PATH_TESTS}.err ${PATH_EXAMPLES}.log ${PATH_EXAMPLES}.err + +[ "$TESTS" = "" ] && TESTS=$(ls -1 ${PATH_TESTS} ${PATH_EXAMPLES}) for test in $TESTS; do if [ ! -f $test ]; then @@ -185,7 +188,7 @@ echo echo "======================================================================" echo -for log in $(ls -1 umf_test-*.log); do +for log in $(ls -1 ${PATH_TESTS}.log ${PATH_EXAMPLES}.log); do echo ">>>>>>> LOG $log" cat $log echo From 5844c5afed09b731f79e8fab5c2257bbeb0f6a2e Mon Sep 17 00:00:00 2001 From: Igor Chorazewicz Date: Thu, 26 Dec 2024 21:01:33 +0100 Subject: [PATCH 10/15] Fix L0 provider Set device_properties.stype during init. Found by L0 validation layer. --- src/provider/provider_level_zero.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/provider/provider_level_zero.c b/src/provider/provider_level_zero.c index 70f0acfe54..964d91e105 100644 --- a/src/provider/provider_level_zero.c +++ b/src/provider/provider_level_zero.c @@ -336,6 +336,10 @@ static umf_result_t ze_memory_provider_initialize(void *params, ze_provider->device = ze_params->level_zero_device_handle; ze_provider->memory_type = (ze_memory_type_t)ze_params->memory_type; + memset(&ze_provider->device_properties, 0, + sizeof(ze_provider->device_properties)); + ze_provider->device_properties.stype = ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES; + if (ze_provider->device) { umf_result_t ret = ze2umf_result(g_ze_ops.zeDeviceGetProperties( ze_provider->device, &ze_provider->device_properties)); @@ -345,9 +349,6 @@ static umf_result_t ze_memory_provider_initialize(void *params, umf_ba_global_free(ze_provider); return ret; } - } else { - memset(&ze_provider->device_properties, 0, - sizeof(ze_provider->device_properties)); } if (ze_params->resident_device_count) { From 58ba8e9ff09205dc1ccf4c998485e17ae894e7d5 Mon Sep 17 00:00:00 2001 From: Rafal Rudnicki Date: Tue, 31 Dec 2024 13:20:22 +0100 Subject: [PATCH 11/15] enable building examples on win static hwloc CI --- .github/workflows/reusable_basic.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable_basic.yml b/.github/workflows/reusable_basic.yml index 3b573453d8..ae67aae657 100644 --- a/.github/workflows/reusable_basic.yml +++ b/.github/workflows/reusable_basic.yml @@ -333,7 +333,7 @@ jobs: -B ${{env.BUILD_DIR}} -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" -DUMF_BUILD_SHARED_LIBRARY=ON - -DUMF_BUILD_EXAMPLES=OFF + -DUMF_BUILD_EXAMPLES=ON -DUMF_FORMAT_CODE_STYLE=OFF -DUMF_DEVELOPER_MODE=ON -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON @@ -376,7 +376,7 @@ jobs: -B ${{env.BUILD_DIR}} -DCMAKE_INSTALL_PREFIX="${{env.INSTL_DIR}}" -DUMF_BUILD_SHARED_LIBRARY=OFF - -DUMF_BUILD_EXAMPLES=OFF + -DUMF_BUILD_EXAMPLES=ON -DUMF_FORMAT_CODE_STYLE=OFF -DUMF_DEVELOPER_MODE=ON -DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON From 91f14d7d8039dc07f0a0595f0f2f441e7d526930 Mon Sep 17 00:00:00 2001 From: Rafal Rudnicki Date: Tue, 31 Dec 2024 13:20:41 +0100 Subject: [PATCH 12/15] fix setting LIBHWLOC_LIBRARIES on Windows --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b88f95b5f..4d00bc2c2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -251,8 +251,8 @@ else() set(LIBHWLOC_INCLUDE_DIRS ${hwloc_targ_SOURCE_DIR}/include;${hwloc_targ_BINARY_DIR}/include) - set(LIBHWLOC_LIBRARY_DIRS - ${hwloc_targ_BINARY_DIR}/Release;${hwloc_targ_BINARY_DIR}/Debug) + set(LIBHWLOC_LIBRARY_DIRS ${hwloc_targ_BINARY_DIR}/$) + set(LIBHWLOC_LIBRARIES ${hwloc_targ_BINARY_DIR}/$/hwloc.lib) else() include(FetchContent) message( From e82e88f6f75fad41d8c4fc7a59f6e87e9942df8e Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 11 Dec 2024 19:37:18 +0100 Subject: [PATCH 13/15] add license checker based on https://github.com/pmem/pmemstream/tree/master/utils/check_license --- CMakeLists.txt | 9 ++ check_license/check-headers.sh | 179 +++++++++++++++++++++++++++++++++ 2 files changed, 188 insertions(+) create mode 100644 check_license/check-headers.sh diff --git a/CMakeLists.txt b/CMakeLists.txt index f9cfc3a073..1f832cb1e0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,6 +184,15 @@ else() add_custom_target(jemalloc_prod DEPENDS ${jemalloc_targ_BINARY_DIR}/lib/libjemalloc.a) + add_custom_target(check-license + COMMAND ${PMEMSTREAM_ROOT_DIR}/check_license/check-headers.sh + ${PMEMSTREAM_ROOT_DIR} + Apache-2.0 WITH LLVM-exception -v) + add_custom_target(copyright-format + COMMAND ${PMEMSTREAM_ROOT_DIR}/check_license/check-headers.sh + ${PMEMSTREAM_ROOT_DIR} + Apache-2.0 WITH LLVM-exception -d) + add_library(jemalloc INTERFACE) target_link_libraries( jemalloc INTERFACE ${jemalloc_targ_BINARY_DIR}/lib/libjemalloc.a) diff --git a/check_license/check-headers.sh b/check_license/check-headers.sh new file mode 100644 index 0000000000..f3174cf741 --- /dev/null +++ b/check_license/check-headers.sh @@ -0,0 +1,179 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: BSD-3-Clause +# Copyright 2016-2022, Intel Corporation + +# check-headers.sh - check copyright and license in source files + +SELF=$0 + +function usage() { + echo "Usage: $SELF [-h|-v|-a]" + echo " -h, --help this help message" + echo " -v, --verbose verbose mode" + echo " -a, --all check all files (only modified files are checked by default)" + echo " -d, --update_dates change Copyright dates in all analyzed files (rather not use with -a)" +} + +if [ "$#" -lt 2 ]; then + usage >&2 + exit 2 +fi + +SOURCE_ROOT=$1 +shift +LICENSE=$1 +shift + +PATTERN=`mktemp` +TMP=`mktemp` +TMP2=`mktemp` +TEMPFILE=`mktemp` +rm -f $PATTERN $TMP $TMP2 + +if [ "$1" == "-h" -o "$1" == "--help" ]; then + usage + exit 0 +fi + +export GIT="git -C ${SOURCE_ROOT}" +$GIT rev-parse || exit 1 + +if [ -f $SOURCE_ROOT/.git/shallow ]; then + SHALLOW_CLONE=1 + echo + echo "Warning: This is a shallow clone. Checking dates in copyright headers" + echo " will be skipped in case of files that have no history." + echo +else + SHALLOW_CLONE=0 +fi + +VERBOSE=0 +CHECK_ALL=0 +UPDATE_DATES=0 +while [ "$1" != "" ]; do + case $1 in + -v|--verbose) + VERBOSE=1 + ;; + -a|--all) + CHECK_ALL=1 + ;; + -d|--update_dates) + UPDATE_DATES=1 + ;; + esac + shift +done + +if [ $CHECK_ALL -eq 0 ]; then + CURRENT_COMMIT=$($GIT log --pretty=%H -1) + MERGE_BASE=$($GIT merge-base HEAD origin/master 2>/dev/null) + [ -z $MERGE_BASE ] && \ + MERGE_BASE=$($GIT log --pretty="%cN:%H" | grep GitHub | head -n1 | cut -d: -f2) + [ -z $MERGE_BASE -o "$CURRENT_COMMIT" = "$MERGE_BASE" ] && \ + CHECK_ALL=1 +fi + +if [ $CHECK_ALL -eq 1 ]; then + echo "INFO: Checking copyright headers of all files..." + GIT_COMMAND="ls-tree -r --name-only HEAD" +else + echo "INFO: Checking copyright headers of modified files only..." + GIT_COMMAND="diff --name-only $MERGE_BASE $CURRENT_COMMIT" +fi + +FILES=$($GIT $GIT_COMMAND | ${SOURCE_ROOT}/utils/check_license/file-exceptions.sh | \ + grep -E -e '*\.[chs]$' -e '*\.[ch]pp$' -e '*\.sh$' -e '*\.py$' \ + -e 'TEST*' -e 'Makefile*' -e 'CMakeLists.txt$' -e '*\.cmake$' \ + -e '*\.link$' -e '*\.map$' -e '*\.Dockerfile$' -e 'LICENSE$' \ + -e '/common.inc$' -e '/match$' -e '/check_whitespace$' -e '/cppstyle$' | \ + xargs) + +RV=0 +for file in $FILES ; do + if [ $VERBOSE -eq 1 ]; then + echo "Checking file: $file" + fi + # The src_path is a path which should be used in every command except git. + # git is called with -C flag so filepaths should be relative to SOURCE_ROOT + src_path="${SOURCE_ROOT}/$file" + [ ! -f $src_path ] && continue + # ensure that file is UTF-8 encoded + ENCODING=`file -b --mime-encoding $src_path` + iconv -f $ENCODING -t "UTF-8" $src_path > $TEMPFILE + + if ! grep -q "SPDX-License-Identifier: $LICENSE" $src_path; then + echo >&2 "error: no $LICENSE SPDX tag in file: $src_path" + RV=1 + fi + + if [ $SHALLOW_CLONE -eq 0 ]; then + $GIT log --no-merges --format="%ai %aE" -- $file | sort > $TMP + else + # mark the grafted commits (commits with no parents) + $GIT log --no-merges --format="%ai %aE grafted-%p-commit" -- $file | sort > $TMP + fi + + # skip checking dates for non-Intel commits + [[ ! $(tail -n1 $TMP) =~ "@intel.com" ]] && continue + + # skip checking dates for new files + [ $(cat $TMP | wc -l) -le 1 ] && continue + + # grep out the grafted commits (commits with no parents) + # and skip checking dates for non-Intel commits + grep -v -e "grafted--commit" $TMP | grep -e "@intel.com" > $TMP2 + + [ $(cat $TMP2 | wc -l) -eq 0 ] && continue + + FIRST=`head -n1 $TMP2` + LAST=` tail -n1 $TMP2` + + YEARS=`sed ' +/Copyright [0-9-]\+.*, Intel Corporation/!d +s/.*Copyright \([0-9]\+\)-\([0-9]\+\),.*/\1-\2/ +s/.*Copyright \([0-9]\+\),.*/\1-\1/' $src_path` + if [ -z "$YEARS" ]; then + echo >&2 "No copyright years in $src_path" + RV=1 + continue + fi + + HEADER_FIRST=`echo $YEARS | cut -d"-" -f1` + HEADER_LAST=` echo $YEARS | cut -d"-" -f2` + + COMMIT_FIRST=`echo $FIRST | cut -d"-" -f1` + COMMIT_LAST=` echo $LAST | cut -d"-" -f1` + if [ "$COMMIT_FIRST" != "" -a "$COMMIT_LAST" != "" ]; then + if [ $HEADER_LAST -lt $COMMIT_LAST ]; then + if [ $HEADER_FIRST -lt $COMMIT_FIRST ]; then + COMMIT_FIRST=$HEADER_FIRST + fi + COMMIT_LAST=`date +%G` + if [ $COMMIT_FIRST -eq $COMMIT_LAST ]; then + NEW=$COMMIT_LAST + else + NEW=$COMMIT_FIRST-$COMMIT_LAST + fi + if [ ${UPDATE_DATES} -eq 1 ]; then + sed -i "s/Copyright ${YEARS}/Copyright ${NEW}/g" "${src_path}" + else + echo "$file:1: error: wrong copyright date: (is: $YEARS, should be: $NEW)" >&2 + RV=1 + fi + fi + else + echo "error: unknown commit dates in file: $file" >&2 + RV=1 + fi +done +rm -f $TMP $TMP2 $TEMPFILE + +# check if error found +if [ $RV -eq 0 ]; then + echo "Copyright headers are OK." +else + echo "Error(s) in copyright headers found!" >&2 +fi +exit $RV \ No newline at end of file From 86933e6428f56b0459c0e689d89a19ab59498331 Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Wed, 11 Dec 2024 19:51:58 +0100 Subject: [PATCH 14/15] Update license checker updated checker algoritm, added exception files, added correct license where needed, added calling checker --- .github/workflows/reusable_checks.yml | 9 +++- CMakeLists.txt | 8 ---- check_license/check-headers.sh | 60 ++++++++++++++++----------- check_license/file-exceptions.sh | 31 ++++++++++++++ include/umf.h | 2 +- include/umf/memory_pool_ops.h | 2 +- include/umf/pools/pool_jemalloc.h | 2 +- include/umf/pools/pool_scalable.h | 2 +- src/libumf.def | 2 +- src/libumf.map | 2 +- src/libumf.rc.in | 2 +- src/memory_pool_internal.h | 2 +- src/memory_provider_get_last_failed.c | 2 +- src/memory_provider_internal.h | 2 +- src/memspaces/memspace_numa.c | 2 +- src/memtargets/memtarget_numa.h | 2 +- src/pool/CMakeLists.txt | 2 +- src/pool/pool_disjoint.cpp | 2 +- src/proxy_lib/proxy_lib.rc.in | 2 +- src/utils/utils_common.h | 2 +- src/utils/utils_posix_concurrency.c | 2 +- src/utils/utils_windows_concurrency.c | 2 +- src/utils/utils_windows_math.c | 2 +- test/common/pool_null.c | 2 +- test/common/pool_trace.c | 2 +- test/common/test_helpers.c | 2 +- test/malloc_compliance_tests.cpp | 2 +- test/poolFixtures.hpp | 2 +- test/pools/jemalloc_pool.cpp | 2 +- test/pools/pool_base_alloc.cpp | 2 +- test/pools/scalable_pool.cpp | 2 +- test/provider_os_memory.cpp | 2 +- 32 files changed, 103 insertions(+), 61 deletions(-) create mode 100755 check_license/file-exceptions.sh diff --git a/.github/workflows/reusable_checks.yml b/.github/workflows/reusable_checks.yml index 6298b98831..77ea5b0c1d 100644 --- a/.github/workflows/reusable_checks.yml +++ b/.github/workflows/reusable_checks.yml @@ -1,5 +1,4 @@ # Basic checks on the code, incl. coding style, spelling, bandit analysis. -# TODO: add license check name: Basic checks on: workflow_call @@ -52,6 +51,14 @@ jobs: - name: Check Python formatting run: cmake --build build --target black-format-check + - name: Run check-license + run: | + bash ./check_license/check-headers.sh . "Apache-2.0 WITH LLVM-exception" -v + + - name: Run copyright-format + run: | + bash ./check_license/check-headers.sh . "Apache-2.0 WITH LLVM-exception" -d + - name: Run a spell check uses: crate-ci/typos@b63f421581dce830bda2f597a678cb7776b41877 # v1.18.2 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f832cb1e0..f0f83ec7e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,14 +184,6 @@ else() add_custom_target(jemalloc_prod DEPENDS ${jemalloc_targ_BINARY_DIR}/lib/libjemalloc.a) - add_custom_target(check-license - COMMAND ${PMEMSTREAM_ROOT_DIR}/check_license/check-headers.sh - ${PMEMSTREAM_ROOT_DIR} - Apache-2.0 WITH LLVM-exception -v) - add_custom_target(copyright-format - COMMAND ${PMEMSTREAM_ROOT_DIR}/check_license/check-headers.sh - ${PMEMSTREAM_ROOT_DIR} - Apache-2.0 WITH LLVM-exception -d) add_library(jemalloc INTERFACE) target_link_libraries( diff --git a/check_license/check-headers.sh b/check_license/check-headers.sh index f3174cf741..81d5d2bf4f 100644 --- a/check_license/check-headers.sh +++ b/check_license/check-headers.sh @@ -1,13 +1,14 @@ #!/usr/bin/env bash -# SPDX-License-Identifier: BSD-3-Clause -# Copyright 2016-2022, Intel Corporation +# Copyright (C) 2024 Intel Corporation +# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # check-headers.sh - check copyright and license in source files SELF=$0 function usage() { - echo "Usage: $SELF [-h|-v|-a]" + echo "Usage: $SELF [-h|-v|-a|-d]" echo " -h, --help this help message" echo " -v, --verbose verbose mode" echo " -a, --all check all files (only modified files are checked by default)" @@ -83,18 +84,15 @@ else GIT_COMMAND="diff --name-only $MERGE_BASE $CURRENT_COMMIT" fi -FILES=$($GIT $GIT_COMMAND | ${SOURCE_ROOT}/utils/check_license/file-exceptions.sh | \ - grep -E -e '*\.[chs]$' -e '*\.[ch]pp$' -e '*\.sh$' -e '*\.py$' \ - -e 'TEST*' -e 'Makefile*' -e 'CMakeLists.txt$' -e '*\.cmake$' \ - -e '*\.link$' -e '*\.map$' -e '*\.Dockerfile$' -e 'LICENSE$' \ - -e '/common.inc$' -e '/match$' -e '/check_whitespace$' -e '/cppstyle$' | \ - xargs) +FILES=$($GIT $GIT_COMMAND | ${SOURCE_ROOT}/check_license/file-exceptions.sh) RV=0 + for file in $FILES ; do if [ $VERBOSE -eq 1 ]; then echo "Checking file: $file" fi + # The src_path is a path which should be used in every command except git. # git is called with -C flag so filepaths should be relative to SOURCE_ROOT src_path="${SOURCE_ROOT}/$file" @@ -130,10 +128,10 @@ for file in $FILES ; do FIRST=`head -n1 $TMP2` LAST=` tail -n1 $TMP2` - YEARS=`sed ' -/Copyright [0-9-]\+.*, Intel Corporation/!d -s/.*Copyright \([0-9]\+\)-\([0-9]\+\),.*/\1-\2/ -s/.*Copyright \([0-9]\+\),.*/\1-\1/' $src_path` + YEARS=$(sed ' +/.*Copyright (C) \+.*[0-9-]\+ Intel Corporation/!d +s/.*Copyright (C) \([0-9]\+\)-\([0-9]\+\).*/\1-\2/ +s/.*Copyright (C) \([0-9]\+\).*/\1/' "$src_path") if [ -z "$YEARS" ]; then echo >&2 "No copyright years in $src_path" RV=1 @@ -145,22 +143,36 @@ s/.*Copyright \([0-9]\+\),.*/\1-\1/' $src_path` COMMIT_FIRST=`echo $FIRST | cut -d"-" -f1` COMMIT_LAST=` echo $LAST | cut -d"-" -f1` + if [ "$COMMIT_FIRST" != "" -a "$COMMIT_LAST" != "" ]; then - if [ $HEADER_LAST -lt $COMMIT_LAST ]; then - if [ $HEADER_FIRST -lt $COMMIT_FIRST ]; then - COMMIT_FIRST=$HEADER_FIRST + if [[ -n "$COMMIT_FIRST" && -n "$COMMIT_LAST" ]]; then + FL=0 + if [[ $HEADER_FIRST -lt $COMMIT_FIRST ]]; then + FL=1 fi + COMMIT_LAST=`date +%G` - if [ $COMMIT_FIRST -eq $COMMIT_LAST ]; then - NEW=$COMMIT_LAST + + if [[ $FL -eq 1 ]]; then + NEW=$HEADER_FIRST-$COMMIT_LAST else - NEW=$COMMIT_FIRST-$COMMIT_LAST + + if [[ $COMMIT_FIRST -eq $COMMIT_LAST ]]; then + NEW=$COMMIT_LAST + else + NEW=$COMMIT_FIRST-$COMMIT_LAST + fi fi - if [ ${UPDATE_DATES} -eq 1 ]; then - sed -i "s/Copyright ${YEARS}/Copyright ${NEW}/g" "${src_path}" - else - echo "$file:1: error: wrong copyright date: (is: $YEARS, should be: $NEW)" >&2 - RV=1 + + if [[ "$YEARS" == "$NEW" ]]; then + echo "No change needed: $YEARS" + else + if [[ ${UPDATE_DATES} -eq 1 ]]; then + sed -i "s/Copyright ${YEARS}/Copyright ${NEW}/g" "${src_path}" + else + echo "$file:1: error: wrong copyright date: (is: $YEARS, should be: $NEW)" >&2 + RV=1 + fi fi fi else diff --git a/check_license/file-exceptions.sh b/check_license/file-exceptions.sh new file mode 100755 index 0000000000..0fb94595c4 --- /dev/null +++ b/check_license/file-exceptions.sh @@ -0,0 +1,31 @@ +#!/bin/sh -e +# Copyright (C) 2024 Intel Corporation +# Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +# You can add an exception file +grep -v -E -e 'src/uthash/.*' \ + -e 'benchmark/ubench.h' \ + -e 'include/umf/proxy_lib_new_delete.h' \ + -e 'scripts/docs_config/conf.py' \ + -e 'src/uthash/utlist.h' \ + -e 'src/uthash/uthash.h' \ + -e '\.yml$'\ + -e '\.clang-format$' \ + -e '\.md$' \ + -e '\.cmake-format$' \ + -e 'CODEOWNERS$' \ + -e 'scripts/assets/images/.*' \ + -e 'scripts/docs_config/.*' \ + -e '\.xml$' \ + -e '\.txt$' \ + -e 'test/supp/.*' \ + -e '\.json$' \ + -e 'LICENSE.TXT' \ + -e '.github/workflows/.spellcheck-conf.toml' \ + -e '.gitignore' \ + -e '.mailmap' \ + -e '.trivyignore' \ + -e 'ChangeLog' \ + -e '\.cmake.in$' \ + -e '\.patch$' diff --git a/include/umf.h b/include/umf.h index 3e2d827991..ffc4631046 100644 --- a/include/umf.h +++ b/include/umf.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/memory_pool_ops.h b/include/umf/memory_pool_ops.h index 67afdd1669..1d9bb029d1 100644 --- a/include/umf/memory_pool_ops.h +++ b/include/umf/memory_pool_ops.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/pools/pool_jemalloc.h b/include/umf/pools/pool_jemalloc.h index c30df65092..cbaa04cb32 100644 --- a/include/umf/pools/pool_jemalloc.h +++ b/include/umf/pools/pool_jemalloc.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/pools/pool_scalable.h b/include/umf/pools/pool_scalable.h index 072169b68c..fe8449b9db 100644 --- a/include/umf/pools/pool_scalable.h +++ b/include/umf/pools/pool_scalable.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/libumf.def b/src/libumf.def index 5d1c5047f0..fc21029f06 100644 --- a/src/libumf.def +++ b/src/libumf.def @@ -1,5 +1,5 @@ ;;;; Begin Copyright Notice -; Copyright (C) 2024 Intel Corporation +; Copyright (C) 2023-2024 Intel Corporation ; Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. ; SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception ;;;; End Copyright Notice diff --git a/src/libumf.map b/src/libumf.map index d604dd64e6..9d04d6b99d 100644 --- a/src/libumf.map +++ b/src/libumf.map @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2023-2024 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/libumf.rc.in b/src/libumf.rc.in index 7aba79e7ed..bcb400fdf8 100644 --- a/src/libumf.rc.in +++ b/src/libumf.rc.in @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Intel Corporation +// Copyright (C) 2024 Intel Corporation // // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/memory_pool_internal.h b/src/memory_pool_internal.h index e556ace214..d2ec87995f 100644 --- a/src/memory_pool_internal.h +++ b/src/memory_pool_internal.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/memory_provider_get_last_failed.c b/src/memory_provider_get_last_failed.c index 9434eea976..ecaf789761 100644 --- a/src/memory_provider_get_last_failed.c +++ b/src/memory_provider_get_last_failed.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/memory_provider_internal.h b/src/memory_provider_internal.h index 60955e0fbd..c8aea57247 100644 --- a/src/memory_provider_internal.h +++ b/src/memory_provider_internal.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/memspaces/memspace_numa.c b/src/memspaces/memspace_numa.c index 0028e394dc..0f91bd5e54 100644 --- a/src/memspaces/memspace_numa.c +++ b/src/memspaces/memspace_numa.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/memtargets/memtarget_numa.h b/src/memtargets/memtarget_numa.h index 2d3e3fd704..b078f7be63 100644 --- a/src/memtargets/memtarget_numa.h +++ b/src/memtargets/memtarget_numa.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/pool/CMakeLists.txt b/src/pool/CMakeLists.txt index 17be932a45..c51ab815e5 100644 --- a/src/pool/CMakeLists.txt +++ b/src/pool/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2023 Intel Corporation +# Copyright (C) 2023-2024 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/pool/pool_disjoint.cpp b/src/pool/pool_disjoint.cpp index e0298b43df..a97098ee0f 100644 --- a/src/pool/pool_disjoint.cpp +++ b/src/pool/pool_disjoint.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/proxy_lib/proxy_lib.rc.in b/src/proxy_lib/proxy_lib.rc.in index dce151ec3e..39cab94002 100644 --- a/src/proxy_lib/proxy_lib.rc.in +++ b/src/proxy_lib/proxy_lib.rc.in @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Intel Corporation +// Copyright (C) 2024 Intel Corporation // // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/utils/utils_common.h b/src/utils/utils_common.h index 9ef2b3cf13..b9a30ec161 100644 --- a/src/utils/utils_common.h +++ b/src/utils/utils_common.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/utils/utils_posix_concurrency.c b/src/utils/utils_posix_concurrency.c index fcf04ed952..ce90268978 100644 --- a/src/utils/utils_posix_concurrency.c +++ b/src/utils/utils_posix_concurrency.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/utils/utils_windows_concurrency.c b/src/utils/utils_windows_concurrency.c index 696f4523bc..b6683faafe 100644 --- a/src/utils/utils_windows_concurrency.c +++ b/src/utils/utils_windows_concurrency.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/src/utils/utils_windows_math.c b/src/utils/utils_windows_math.c index 07c4c9978b..d765800934 100644 --- a/src/utils/utils_windows_math.c +++ b/src/utils/utils_windows_math.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/common/pool_null.c b/test/common/pool_null.c index c34bcfc169..f071c11e76 100644 --- a/test/common/pool_null.c +++ b/test/common/pool_null.c @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/common/pool_trace.c b/test/common/pool_trace.c index 29329f31c0..ee69cae9bc 100644 --- a/test/common/pool_trace.c +++ b/test/common/pool_trace.c @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/common/test_helpers.c b/test/common/test_helpers.c index 71f018d0f7..2f3d35800d 100644 --- a/test/common/test_helpers.c +++ b/test/common/test_helpers.c @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // This file contains tests for UMF pool API diff --git a/test/malloc_compliance_tests.cpp b/test/malloc_compliance_tests.cpp index 06e3b5dd78..9a7efcd9cd 100644 --- a/test/malloc_compliance_tests.cpp +++ b/test/malloc_compliance_tests.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/poolFixtures.hpp b/test/poolFixtures.hpp index 6f54fe1142..cb75d04c55 100644 --- a/test/poolFixtures.hpp +++ b/test/poolFixtures.hpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/pools/jemalloc_pool.cpp b/test/pools/jemalloc_pool.cpp index 042841fc48..e9139c04f9 100644 --- a/test/pools/jemalloc_pool.cpp +++ b/test/pools/jemalloc_pool.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/pools/pool_base_alloc.cpp b/test/pools/pool_base_alloc.cpp index ec07a7c2fe..b870a1eb9a 100644 --- a/test/pools/pool_base_alloc.cpp +++ b/test/pools/pool_base_alloc.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/pools/scalable_pool.cpp b/test/pools/scalable_pool.cpp index 51cc020305..fb3c1edc58 100644 --- a/test/pools/scalable_pool.cpp +++ b/test/pools/scalable_pool.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/test/provider_os_memory.cpp b/test/provider_os_memory.cpp index 4c81b84f9e..f2f286223a 100644 --- a/test/provider_os_memory.cpp +++ b/test/provider_os_memory.cpp @@ -1,4 +1,4 @@ -// Copyright (C) 2023 Intel Corporation +// Copyright (C) 2023-2024 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception From 90ec139d7d835362fbd71c6b0f04b0c4d542e6fd Mon Sep 17 00:00:00 2001 From: rbanka1 Date: Tue, 7 Jan 2025 13:16:29 +0100 Subject: [PATCH 15/15] Updated dates --- .github/docker/ubuntu-20.04.Dockerfile | 2 +- .github/docker/ubuntu-22.04.Dockerfile | 2 +- .github/scripts/check_dll_flags.ps1 | 2 +- .github/scripts/get_system_info.sh | 2 +- .github/scripts/install_hwloc.sh | 2 +- .github/scripts/run-codespell.py | 2 +- CMakeLists.txt | 2 +- benchmark/CMakeLists.txt | 2 +- benchmark/benchmark.cpp | 2 +- benchmark/benchmark.hpp | 2 +- benchmark/benchmark_interfaces.hpp | 2 +- benchmark/multithread.cpp | 2 +- benchmark/multithread.hpp | 2 +- benchmark/ubench.c | 2 +- check_license/check-headers.sh | 4 ++-- check_license/file-exceptions.sh | 10 ++++++---- cmake/FindCUDA.cmake | 2 +- cmake/FindJEMALLOC.cmake | 2 +- cmake/FindLIBHWLOC.cmake | 2 +- cmake/FindLIBNUMA.cmake | 2 +- cmake/FindTBB.cmake | 2 +- cmake/helpers.cmake | 2 +- docs/generate_docs.py | 2 +- examples/CMakeLists.txt | 2 +- examples/basic/CMakeLists.txt | 2 +- examples/basic/basic.c | 2 +- examples/cmake/FindCUDA.cmake | 2 +- examples/cmake/FindJEMALLOC.cmake | 2 +- examples/cmake/FindLIBHWLOC.cmake | 2 +- examples/cmake/FindLIBNUMA.cmake | 2 +- examples/cmake/FindLIBUMF.cmake | 2 +- examples/cmake/FindTBB.cmake | 2 +- examples/common/examples_level_zero_helpers.c | 2 +- examples/common/examples_level_zero_helpers.h | 2 +- examples/common/examples_utils.h | 2 +- examples/cuda_shared_memory/CMakeLists.txt | 2 +- examples/cuda_shared_memory/cuda_shared_memory.c | 2 +- examples/custom_file_provider/CMakeLists.txt | 2 +- examples/custom_file_provider/custom_file_provider.c | 2 +- examples/dram_and_fsdax/CMakeLists.txt | 2 +- examples/dram_and_fsdax/dram_and_fsdax.c | 2 +- examples/ipc_ipcapi/CMakeLists.txt | 2 +- examples/ipc_ipcapi/ipc_ipcapi_anon_fd.sh | 2 +- examples/ipc_ipcapi/ipc_ipcapi_consumer.c | 2 +- examples/ipc_ipcapi/ipc_ipcapi_producer.c | 2 +- examples/ipc_ipcapi/ipc_ipcapi_shm.sh | 2 +- examples/ipc_level_zero/CMakeLists.txt | 2 +- examples/ipc_level_zero/ipc_level_zero.c | 2 +- examples/level_zero_shared_memory/CMakeLists.txt | 2 +- .../level_zero_shared_memory.c | 2 +- examples/memspace_hmat/CMakeLists.txt | 2 +- examples/memspace_hmat/memspace_hmat.c | 2 +- examples/memspace_numa/CMakeLists.txt | 2 +- examples/memspace_numa/memspace_numa.c | 2 +- include/umf.h | 2 +- include/umf/base.h | 2 +- include/umf/ipc.h | 2 +- include/umf/memory_pool.h | 2 +- include/umf/memory_pool_ops.h | 2 +- include/umf/memory_provider.h | 2 +- include/umf/memory_provider_gpu.h | 2 +- include/umf/memory_provider_ops.h | 2 +- include/umf/mempolicy.h | 2 +- include/umf/memspace.h | 2 +- include/umf/memtarget.h | 2 +- include/umf/pools/pool_disjoint.h | 2 +- include/umf/pools/pool_jemalloc.h | 2 +- include/umf/pools/pool_proxy.h | 2 +- include/umf/pools/pool_scalable.h | 2 +- include/umf/providers/provider_cuda.h | 2 +- include/umf/providers/provider_devdax_memory.h | 2 +- include/umf/providers/provider_file_memory.h | 2 +- include/umf/providers/provider_fixed_memory.h | 2 +- include/umf/providers/provider_level_zero.h | 2 +- include/umf/providers/provider_os_memory.h | 2 +- include/umf/proxy_lib_new_delete.h | 2 +- scripts/coverage/coverage_capture.sh | 2 +- scripts/coverage/merge_coverage_files.sh | 2 +- scripts/qemu/configs/default.xml | 2 +- scripts/qemu/configs/sock_2_var1.xml | 2 +- scripts/qemu/configs/sock_2_var1_hmat.xml | 2 +- scripts/qemu/configs/sock_2_var2.xml | 2 +- scripts/qemu/configs/sock_2_var2_hmat.xml | 2 +- scripts/qemu/configs/sock_2_var3.xml | 2 +- scripts/qemu/configs/sock_2_var3_hmat.xml | 2 +- scripts/qemu/configs/sock_4_var1.xml | 2 +- scripts/qemu/configs/sock_4_var1_hmat.xml | 2 +- scripts/qemu/configs/sock_4_var2.xml | 2 +- scripts/qemu/configs/sock_4_var2_hmat.xml | 2 +- scripts/qemu/parse_config.py | 2 +- scripts/qemu/run-build.sh | 2 +- scripts/qemu/run-tests.sh | 2 +- scripts/qemu/start_qemu.sh | 2 +- src/CMakeLists.txt | 2 +- src/base_alloc/base_alloc.c | 2 +- src/base_alloc/base_alloc.h | 2 +- src/base_alloc/base_alloc_global.c | 2 +- src/base_alloc/base_alloc_global.h | 2 +- src/base_alloc/base_alloc_internal.h | 2 +- src/base_alloc/base_alloc_linear.c | 2 +- src/base_alloc/base_alloc_linear.h | 2 +- src/base_alloc/base_alloc_linux.c | 2 +- src/base_alloc/base_alloc_windows.c | 2 +- src/coarse/CMakeLists.txt | 2 +- src/coarse/coarse.c | 2 +- src/coarse/coarse.h | 2 +- src/cpp_helpers.hpp | 2 +- src/critnib/critnib.c | 2 +- src/critnib/critnib.h | 2 +- src/ctl/ctl.c | 2 +- src/ctl/ctl.h | 2 +- src/ipc.c | 2 +- src/ipc_cache.c | 2 +- src/ipc_cache.h | 2 +- src/ipc_internal.h | 2 +- src/libumf.c | 2 +- src/libumf.def | 2 +- src/libumf.h | 2 +- src/libumf.map | 2 +- src/libumf.rc.in | 4 ++-- src/libumf_linux.c | 2 +- src/libumf_windows.c | 2 +- src/memory_pool.c | 2 +- src/memory_pool_internal.h | 2 +- src/memory_provider.c | 2 +- src/memory_provider_get_last_failed.c | 2 +- src/memory_provider_internal.h | 2 +- src/mempolicy.c | 2 +- src/mempolicy_internal.h | 2 +- src/memspace.c | 2 +- src/memspace_internal.h | 2 +- src/memspaces/memspace_highest_bandwidth.c | 2 +- src/memspaces/memspace_highest_capacity.c | 2 +- src/memspaces/memspace_host_all.c | 2 +- src/memspaces/memspace_lowest_latency.c | 2 +- src/memspaces/memspace_numa.c | 2 +- src/memtarget.c | 2 +- src/memtarget_internal.h | 2 +- src/memtarget_ops.h | 2 +- src/memtargets/memtarget_numa.c | 2 +- src/memtargets/memtarget_numa.h | 2 +- src/pool/CMakeLists.txt | 2 +- src/pool/pool_disjoint.cpp | 2 +- src/pool/pool_jemalloc.c | 2 +- src/pool/pool_proxy.c | 2 +- src/pool/pool_scalable.c | 2 +- src/provider/provider_cuda.c | 2 +- src/provider/provider_devdax_memory.c | 2 +- src/provider/provider_file_memory.c | 2 +- src/provider/provider_fixed_memory.c | 2 +- src/provider/provider_level_zero.c | 2 +- src/provider/provider_os_memory.c | 2 +- src/provider/provider_os_memory_internal.h | 2 +- src/provider/provider_tracking.c | 2 +- src/provider/provider_tracking.h | 2 +- src/proxy_lib/CMakeLists.txt | 2 +- src/proxy_lib/proxy_lib.c | 2 +- src/proxy_lib/proxy_lib.def | 2 +- src/proxy_lib/proxy_lib.h | 2 +- src/proxy_lib/proxy_lib.map | 2 +- src/proxy_lib/proxy_lib.rc.in | 4 ++-- src/proxy_lib/proxy_lib_linux.c | 2 +- src/proxy_lib/proxy_lib_windows.c | 2 +- src/ravl/ravl.c | 2 +- src/ravl/ravl.h | 2 +- src/topology.c | 2 +- src/topology.h | 2 +- src/umf_hwloc.h | 2 +- src/utils/CMakeLists.txt | 2 +- src/utils/utils_assert.h | 2 +- src/utils/utils_common.c | 2 +- src/utils/utils_common.h | 2 +- src/utils/utils_concurrency.h | 2 +- src/utils/utils_level_zero.cpp | 2 +- src/utils/utils_level_zero.h | 2 +- src/utils/utils_linux_common.c | 2 +- src/utils/utils_load_library.c | 2 +- src/utils/utils_load_library.h | 2 +- src/utils/utils_log.c | 2 +- src/utils/utils_log.h | 2 +- src/utils/utils_macosx_common.c | 2 +- src/utils/utils_math.h | 2 +- src/utils/utils_posix_common.c | 2 +- src/utils/utils_posix_concurrency.c | 2 +- src/utils/utils_sanitizers.h | 2 +- src/utils/utils_windows_common.c | 2 +- src/utils/utils_windows_concurrency.c | 2 +- src/utils/utils_windows_intrin.h | 2 +- src/utils/utils_windows_math.c | 2 +- test/CMakeLists.txt | 2 +- test/c_api/disjoint_pool.c | 2 +- test/c_api/multi_pool.c | 2 +- test/c_api/test_ut_asserts.h | 2 +- test/coarse_lib.cpp | 2 +- test/common/CMakeLists.txt | 2 +- test/common/base.hpp | 2 +- test/common/ipc_common.c | 2 +- test/common/ipc_common.h | 2 +- test/common/ipc_os_prov_common.c | 2 +- test/common/ipc_os_prov_common.h | 2 +- test/common/multithread_helpers.hpp | 2 +- test/common/numa_helpers.hpp | 2 +- test/common/pool.hpp | 2 +- test/common/pool_null.c | 2 +- test/common/pool_null.h | 2 +- test/common/pool_trace.c | 2 +- test/common/pool_trace.h | 2 +- test/common/provider.hpp | 2 +- test/common/provider_null.c | 2 +- test/common/provider_null.h | 2 +- test/common/provider_trace.c | 2 +- test/common/provider_trace.h | 2 +- test/common/test_helpers.c | 2 +- test/common/test_helpers.h | 2 +- test/common/test_helpers_linux.c | 2 +- test/common/test_helpers_linux.h | 2 +- test/ctl/ctl_debug.c | 2 +- test/ctl/ctl_debug.h | 2 +- test/ctl/test.cpp | 2 +- test/disjointPoolFileProv.cpp | 2 +- test/fuzz/CMakeLists.txt | 2 +- test/fuzz/umfFuzz.cpp | 2 +- test/fuzz/utils.hpp | 2 +- test/ipcAPI.cpp | 2 +- test/ipcFixtures.hpp | 2 +- test/ipc_devdax_prov.sh | 2 +- test/ipc_devdax_prov_consumer.c | 2 +- test/ipc_devdax_prov_producer.c | 2 +- test/ipc_file_prov.sh | 2 +- test/ipc_file_prov_consumer.c | 2 +- test/ipc_file_prov_fsdax.sh | 2 +- test/ipc_file_prov_producer.c | 2 +- test/ipc_negative.cpp | 2 +- test/ipc_os_prov_anon_fd.sh | 2 +- test/ipc_os_prov_consumer.c | 2 +- test/ipc_os_prov_producer.c | 2 +- test/ipc_os_prov_proxy.c | 2 +- test/ipc_os_prov_proxy.sh | 2 +- test/ipc_os_prov_shm.sh | 2 +- test/malloc_compliance_tests.cpp | 2 +- test/memoryPoolAPI.cpp | 2 +- test/memoryProviderAPI.cpp | 2 +- test/memspaces/mempolicy.cpp | 2 +- test/memspaces/memspace.cpp | 2 +- test/memspaces/memspace_fixtures.hpp | 2 +- test/memspaces/memspace_helpers.hpp | 2 +- test/memspaces/memspace_highest_bandwidth.cpp | 2 +- test/memspaces/memspace_highest_capacity.cpp | 2 +- test/memspaces/memspace_host_all.cpp | 2 +- test/memspaces/memspace_lowest_latency.cpp | 2 +- test/memspaces/memspace_numa.cpp | 2 +- test/memspaces/memtarget.cpp | 2 +- test/poolFixtures.hpp | 2 +- test/pools/disjoint_pool.cpp | 2 +- test/pools/jemalloc_coarse_devdax.cpp | 2 +- test/pools/jemalloc_coarse_file.cpp | 2 +- test/pools/jemalloc_pool.cpp | 2 +- test/pools/pool_base_alloc.cpp | 2 +- test/pools/pool_coarse.hpp | 2 +- test/pools/scalable_coarse_devdax.cpp | 2 +- test/pools/scalable_coarse_file.cpp | 2 +- test/pools/scalable_pool.cpp | 2 +- test/provider_devdax_memory.cpp | 2 +- test/provider_devdax_memory_ipc.cpp | 2 +- test/provider_devdax_memory_not_impl.cpp | 2 +- test/provider_file_memory.cpp | 2 +- test/provider_file_memory_ipc.cpp | 2 +- test/provider_file_memory_not_impl.cpp | 2 +- test/provider_fixed_memory.cpp | 2 +- test/provider_os_memory.cpp | 2 +- test/provider_os_memory_config.cpp | 2 +- test/provider_os_memory_multiple_numa_nodes.cpp | 2 +- test/provider_os_memory_not_impl.cpp | 2 +- test/providers/cuda_helpers.cpp | 2 +- test/providers/cuda_helpers.h | 2 +- test/providers/ipc_cuda_prov.sh | 2 +- test/providers/ipc_cuda_prov_common.c | 2 +- test/providers/ipc_cuda_prov_common.h | 2 +- test/providers/ipc_cuda_prov_consumer.c | 2 +- test/providers/ipc_cuda_prov_producer.c | 2 +- test/providers/ipc_level_zero_prov.sh | 2 +- test/providers/ipc_level_zero_prov_common.c | 2 +- test/providers/ipc_level_zero_prov_common.h | 2 +- test/providers/ipc_level_zero_prov_consumer.c | 2 +- test/providers/ipc_level_zero_prov_producer.c | 2 +- test/providers/provider_cuda.cpp | 2 +- test/providers/provider_cuda_not_impl.cpp | 2 +- test/providers/provider_level_zero.cpp | 2 +- test/providers/provider_level_zero_not_impl.cpp | 2 +- test/test_base_alloc.cpp | 2 +- test/test_base_alloc_linear.cpp | 2 +- test/test_examples.sh | 2 +- test/test_init_teardown.c | 2 +- test/test_installation.py | 2 +- test/test_proxy_lib.cpp | 2 +- test/test_proxy_lib_size_threshold.cpp | 2 +- test/test_valgrind.sh | 2 +- test/utils/utils.cpp | 2 +- test/utils/utils_linux.cpp | 2 +- test/utils/utils_log.cpp | 2 +- 300 files changed, 308 insertions(+), 306 deletions(-) diff --git a/.github/docker/ubuntu-20.04.Dockerfile b/.github/docker/ubuntu-20.04.Dockerfile index a6a45a8c1b..4776c63921 100644 --- a/.github/docker/ubuntu-20.04.Dockerfile +++ b/.github/docker/ubuntu-20.04.Dockerfile @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/.github/docker/ubuntu-22.04.Dockerfile b/.github/docker/ubuntu-22.04.Dockerfile index 75c71c526c..b8df78d7e8 100644 --- a/.github/docker/ubuntu-22.04.Dockerfile +++ b/.github/docker/ubuntu-22.04.Dockerfile @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/.github/scripts/check_dll_flags.ps1 b/.github/scripts/check_dll_flags.ps1 index 85ab027ab4..c00af2c480 100644 --- a/.github/scripts/check_dll_flags.ps1 +++ b/.github/scripts/check_dll_flags.ps1 @@ -1,4 +1,4 @@ -# Copyright (C) 2023-2024 Intel Corporation +# Copyright (C) 2023-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/.github/scripts/get_system_info.sh b/.github/scripts/get_system_info.sh index 595d5e31ae..99c321cee4 100755 --- a/.github/scripts/get_system_info.sh +++ b/.github/scripts/get_system_info.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/.github/scripts/install_hwloc.sh b/.github/scripts/install_hwloc.sh index be9a76ab0b..e5e23de146 100755 --- a/.github/scripts/install_hwloc.sh +++ b/.github/scripts/install_hwloc.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/.github/scripts/run-codespell.py b/.github/scripts/run-codespell.py index b87bf37bd5..2f83cc3b24 100644 --- a/.github/scripts/run-codespell.py +++ b/.github/scripts/run-codespell.py @@ -1,5 +1,5 @@ """ - Copyright (C) 2024 Intel Corporation + Copyright (C) 2024-2025 Intel Corporation Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/CMakeLists.txt b/CMakeLists.txt index f0f83ec7e4..b16e5530c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2022-2024 Intel Corporation +# Copyright (C) 2022-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index efad0baf36..2c159cde29 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2023-2024 Intel Corporation +# Copyright (C) 2023-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/benchmark/benchmark.cpp b/benchmark/benchmark.cpp index 655545d1e2..c0a3c2494b 100644 --- a/benchmark/benchmark.cpp +++ b/benchmark/benchmark.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/benchmark/benchmark.hpp b/benchmark/benchmark.hpp index 6ac7a4dfa5..ffe407cc34 100644 --- a/benchmark/benchmark.hpp +++ b/benchmark/benchmark.hpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/benchmark/benchmark_interfaces.hpp b/benchmark/benchmark_interfaces.hpp index 516a20b697..79f14fe040 100644 --- a/benchmark/benchmark_interfaces.hpp +++ b/benchmark/benchmark_interfaces.hpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/benchmark/multithread.cpp b/benchmark/multithread.cpp index ecc2385292..b79a29e482 100644 --- a/benchmark/multithread.cpp +++ b/benchmark/multithread.cpp @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/benchmark/multithread.hpp b/benchmark/multithread.hpp index a3ba375418..ec39cd6d3b 100644 --- a/benchmark/multithread.hpp +++ b/benchmark/multithread.hpp @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/benchmark/ubench.c b/benchmark/ubench.c index 845dc881db..4a2d04a954 100644 --- a/benchmark/ubench.c +++ b/benchmark/ubench.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/check_license/check-headers.sh b/check_license/check-headers.sh index 81d5d2bf4f..bdb8383a1e 100644 --- a/check_license/check-headers.sh +++ b/check_license/check-headers.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception @@ -188,4 +188,4 @@ if [ $RV -eq 0 ]; then else echo "Error(s) in copyright headers found!" >&2 fi -exit $RV \ No newline at end of file +exit $RV diff --git a/check_license/file-exceptions.sh b/check_license/file-exceptions.sh index 0fb94595c4..c1318de128 100755 --- a/check_license/file-exceptions.sh +++ b/check_license/file-exceptions.sh @@ -1,13 +1,14 @@ #!/bin/sh -e -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # You can add an exception file +# list for license and copyright check grep -v -E -e 'src/uthash/.*' \ -e 'benchmark/ubench.h' \ -e 'include/umf/proxy_lib_new_delete.h' \ - -e 'scripts/docs_config/conf.py' \ + -e 'docs/config/conf.py' \ -e 'src/uthash/utlist.h' \ -e 'src/uthash/uthash.h' \ -e '\.yml$'\ @@ -15,8 +16,9 @@ grep -v -E -e 'src/uthash/.*' \ -e '\.md$' \ -e '\.cmake-format$' \ -e 'CODEOWNERS$' \ - -e 'scripts/assets/images/.*' \ - -e 'scripts/docs_config/.*' \ + -e '\.rst$' \ + -e 'docs/assets/images/.*' \ + -e 'docs/config/Doxyfile' \ -e '\.xml$' \ -e '\.txt$' \ -e 'test/supp/.*' \ diff --git a/cmake/FindCUDA.cmake b/cmake/FindCUDA.cmake index 5e4e2eeada..2b7a494b85 100644 --- a/cmake/FindCUDA.cmake +++ b/cmake/FindCUDA.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/cmake/FindJEMALLOC.cmake b/cmake/FindJEMALLOC.cmake index 89d488ecc0..757e8cb153 100644 --- a/cmake/FindJEMALLOC.cmake +++ b/cmake/FindJEMALLOC.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/cmake/FindLIBHWLOC.cmake b/cmake/FindLIBHWLOC.cmake index 8d7998f8d5..25f5956dd7 100644 --- a/cmake/FindLIBHWLOC.cmake +++ b/cmake/FindLIBHWLOC.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/cmake/FindLIBNUMA.cmake b/cmake/FindLIBNUMA.cmake index 8c23f481c7..4346931496 100644 --- a/cmake/FindLIBNUMA.cmake +++ b/cmake/FindLIBNUMA.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake index 6536e8c4ae..4d799af93f 100644 --- a/cmake/FindTBB.cmake +++ b/cmake/FindTBB.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/cmake/helpers.cmake b/cmake/helpers.cmake index 56692ff6ec..f24d9d3827 100644 --- a/cmake/helpers.cmake +++ b/cmake/helpers.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2023-2024 Intel Corporation +# Copyright (C) 2023-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/docs/generate_docs.py b/docs/generate_docs.py index 1697eacfe6..dc7cf11af9 100644 --- a/docs/generate_docs.py +++ b/docs/generate_docs.py @@ -1,5 +1,5 @@ """ - Copyright (C) 2023-2024 Intel Corporation + Copyright (C) 2023-2025 Intel Corporation Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 986ad56412..db7f3dc5e6 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/basic/CMakeLists.txt b/examples/basic/CMakeLists.txt index ebd1822ab5..11a3bc46b1 100644 --- a/examples/basic/CMakeLists.txt +++ b/examples/basic/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/basic/basic.c b/examples/basic/basic.c index 846e71edaa..6ab39973d6 100644 --- a/examples/basic/basic.c +++ b/examples/basic/basic.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/cmake/FindCUDA.cmake b/examples/cmake/FindCUDA.cmake index 5e4e2eeada..2b7a494b85 100644 --- a/examples/cmake/FindCUDA.cmake +++ b/examples/cmake/FindCUDA.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/cmake/FindJEMALLOC.cmake b/examples/cmake/FindJEMALLOC.cmake index e6db190d4a..f5d2c6412f 100644 --- a/examples/cmake/FindJEMALLOC.cmake +++ b/examples/cmake/FindJEMALLOC.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/cmake/FindLIBHWLOC.cmake b/examples/cmake/FindLIBHWLOC.cmake index aa7620bc2d..1b82f6747c 100644 --- a/examples/cmake/FindLIBHWLOC.cmake +++ b/examples/cmake/FindLIBHWLOC.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/cmake/FindLIBNUMA.cmake b/examples/cmake/FindLIBNUMA.cmake index 8c23f481c7..4346931496 100644 --- a/examples/cmake/FindLIBNUMA.cmake +++ b/examples/cmake/FindLIBNUMA.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/cmake/FindLIBUMF.cmake b/examples/cmake/FindLIBUMF.cmake index 12bdc18239..885a138afd 100644 --- a/examples/cmake/FindLIBUMF.cmake +++ b/examples/cmake/FindLIBUMF.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/cmake/FindTBB.cmake b/examples/cmake/FindTBB.cmake index 6536e8c4ae..4d799af93f 100644 --- a/examples/cmake/FindTBB.cmake +++ b/examples/cmake/FindTBB.cmake @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/common/examples_level_zero_helpers.c b/examples/common/examples_level_zero_helpers.c index 5e00838c27..b7f15053fe 100644 --- a/examples/common/examples_level_zero_helpers.c +++ b/examples/common/examples_level_zero_helpers.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/common/examples_level_zero_helpers.h b/examples/common/examples_level_zero_helpers.h index 2d8e92ff21..a1c9b1edfb 100644 --- a/examples/common/examples_level_zero_helpers.h +++ b/examples/common/examples_level_zero_helpers.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/common/examples_utils.h b/examples/common/examples_utils.h index 9e4a93bcff..f1729511be 100644 --- a/examples/common/examples_utils.h +++ b/examples/common/examples_utils.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/cuda_shared_memory/CMakeLists.txt b/examples/cuda_shared_memory/CMakeLists.txt index dd8567c141..7a1f4a1942 100644 --- a/examples/cuda_shared_memory/CMakeLists.txt +++ b/examples/cuda_shared_memory/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/cuda_shared_memory/cuda_shared_memory.c b/examples/cuda_shared_memory/cuda_shared_memory.c index 50c8f92400..5e0c435149 100644 --- a/examples/cuda_shared_memory/cuda_shared_memory.c +++ b/examples/cuda_shared_memory/cuda_shared_memory.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/custom_file_provider/CMakeLists.txt b/examples/custom_file_provider/CMakeLists.txt index 9d4e336c78..f256aa4e92 100644 --- a/examples/custom_file_provider/CMakeLists.txt +++ b/examples/custom_file_provider/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/custom_file_provider/custom_file_provider.c b/examples/custom_file_provider/custom_file_provider.c index b17fdc0f08..8ccf1923aa 100644 --- a/examples/custom_file_provider/custom_file_provider.c +++ b/examples/custom_file_provider/custom_file_provider.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/dram_and_fsdax/CMakeLists.txt b/examples/dram_and_fsdax/CMakeLists.txt index dcb538085e..d25f8a22b3 100644 --- a/examples/dram_and_fsdax/CMakeLists.txt +++ b/examples/dram_and_fsdax/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/dram_and_fsdax/dram_and_fsdax.c b/examples/dram_and_fsdax/dram_and_fsdax.c index 970242e109..f77d62df71 100644 --- a/examples/dram_and_fsdax/dram_and_fsdax.c +++ b/examples/dram_and_fsdax/dram_and_fsdax.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/ipc_ipcapi/CMakeLists.txt b/examples/ipc_ipcapi/CMakeLists.txt index 41fae58993..e17099765e 100644 --- a/examples/ipc_ipcapi/CMakeLists.txt +++ b/examples/ipc_ipcapi/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/ipc_ipcapi/ipc_ipcapi_anon_fd.sh b/examples/ipc_ipcapi/ipc_ipcapi_anon_fd.sh index 615271eebb..b2d413fe40 100755 --- a/examples/ipc_ipcapi/ipc_ipcapi_anon_fd.sh +++ b/examples/ipc_ipcapi/ipc_ipcapi_anon_fd.sh @@ -1,5 +1,5 @@ # -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/ipc_ipcapi/ipc_ipcapi_consumer.c b/examples/ipc_ipcapi/ipc_ipcapi_consumer.c index 2f55c473f2..6924ae71cb 100644 --- a/examples/ipc_ipcapi/ipc_ipcapi_consumer.c +++ b/examples/ipc_ipcapi/ipc_ipcapi_consumer.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/ipc_ipcapi/ipc_ipcapi_producer.c b/examples/ipc_ipcapi/ipc_ipcapi_producer.c index 4157e8284f..e03a13fd21 100644 --- a/examples/ipc_ipcapi/ipc_ipcapi_producer.c +++ b/examples/ipc_ipcapi/ipc_ipcapi_producer.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/ipc_ipcapi/ipc_ipcapi_shm.sh b/examples/ipc_ipcapi/ipc_ipcapi_shm.sh index 57a344c1e4..7d25b6d3dd 100755 --- a/examples/ipc_ipcapi/ipc_ipcapi_shm.sh +++ b/examples/ipc_ipcapi/ipc_ipcapi_shm.sh @@ -1,5 +1,5 @@ # -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/ipc_level_zero/CMakeLists.txt b/examples/ipc_level_zero/CMakeLists.txt index 5c17d4c9cb..696af4f036 100644 --- a/examples/ipc_level_zero/CMakeLists.txt +++ b/examples/ipc_level_zero/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/ipc_level_zero/ipc_level_zero.c b/examples/ipc_level_zero/ipc_level_zero.c index 9579244abf..f9cfd6b21e 100644 --- a/examples/ipc_level_zero/ipc_level_zero.c +++ b/examples/ipc_level_zero/ipc_level_zero.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/level_zero_shared_memory/CMakeLists.txt b/examples/level_zero_shared_memory/CMakeLists.txt index 3711b40941..199a849fd4 100644 --- a/examples/level_zero_shared_memory/CMakeLists.txt +++ b/examples/level_zero_shared_memory/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/level_zero_shared_memory/level_zero_shared_memory.c b/examples/level_zero_shared_memory/level_zero_shared_memory.c index b0f646861d..eee4817ce5 100644 --- a/examples/level_zero_shared_memory/level_zero_shared_memory.c +++ b/examples/level_zero_shared_memory/level_zero_shared_memory.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/memspace_hmat/CMakeLists.txt b/examples/memspace_hmat/CMakeLists.txt index 5f0fffaa12..c863d90d5b 100644 --- a/examples/memspace_hmat/CMakeLists.txt +++ b/examples/memspace_hmat/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/memspace_hmat/memspace_hmat.c b/examples/memspace_hmat/memspace_hmat.c index 9f3f8d17e9..c6076f8d70 100644 --- a/examples/memspace_hmat/memspace_hmat.c +++ b/examples/memspace_hmat/memspace_hmat.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/memspace_numa/CMakeLists.txt b/examples/memspace_numa/CMakeLists.txt index d9c41a8433..df61cc009f 100644 --- a/examples/memspace_numa/CMakeLists.txt +++ b/examples/memspace_numa/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/examples/memspace_numa/memspace_numa.c b/examples/memspace_numa/memspace_numa.c index 4f225cd694..00e22297d6 100644 --- a/examples/memspace_numa/memspace_numa.c +++ b/examples/memspace_numa/memspace_numa.c @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf.h b/include/umf.h index ffc4631046..57bebef8a9 100644 --- a/include/umf.h +++ b/include/umf.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/base.h b/include/umf/base.h index 32d84771f3..cbada00298 100644 --- a/include/umf/base.h +++ b/include/umf/base.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/ipc.h b/include/umf/ipc.h index ab47b09713..9484a827dc 100644 --- a/include/umf/ipc.h +++ b/include/umf/ipc.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/memory_pool.h b/include/umf/memory_pool.h index de045acf49..05ababe963 100644 --- a/include/umf/memory_pool.h +++ b/include/umf/memory_pool.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/memory_pool_ops.h b/include/umf/memory_pool_ops.h index 1d9bb029d1..829f49fb76 100644 --- a/include/umf/memory_pool_ops.h +++ b/include/umf/memory_pool_ops.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/memory_provider.h b/include/umf/memory_provider.h index cff6f9eecb..566a6eca38 100644 --- a/include/umf/memory_provider.h +++ b/include/umf/memory_provider.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/memory_provider_gpu.h b/include/umf/memory_provider_gpu.h index cc3cc3e3e3..bef2a71617 100644 --- a/include/umf/memory_provider_gpu.h +++ b/include/umf/memory_provider_gpu.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/memory_provider_ops.h b/include/umf/memory_provider_ops.h index a61e0aad07..9d8b3d66b2 100644 --- a/include/umf/memory_provider_ops.h +++ b/include/umf/memory_provider_ops.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/mempolicy.h b/include/umf/mempolicy.h index 59ca5bdd77..350baad5cc 100644 --- a/include/umf/mempolicy.h +++ b/include/umf/mempolicy.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/memspace.h b/include/umf/memspace.h index 85b6b36815..726f841bd6 100644 --- a/include/umf/memspace.h +++ b/include/umf/memspace.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/memtarget.h b/include/umf/memtarget.h index d74947f14e..3ee656904f 100644 --- a/include/umf/memtarget.h +++ b/include/umf/memtarget.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/pools/pool_disjoint.h b/include/umf/pools/pool_disjoint.h index fdf682ae5b..33e08d43d0 100644 --- a/include/umf/pools/pool_disjoint.h +++ b/include/umf/pools/pool_disjoint.h @@ -1,4 +1,4 @@ -// Copyright (C) 2023-2024 Intel Corporation +// Copyright (C) 2023-2025 Intel Corporation // Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/pools/pool_jemalloc.h b/include/umf/pools/pool_jemalloc.h index cbaa04cb32..5974e6440a 100644 --- a/include/umf/pools/pool_jemalloc.h +++ b/include/umf/pools/pool_jemalloc.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/pools/pool_proxy.h b/include/umf/pools/pool_proxy.h index c13cb3b228..ee7c3adc34 100644 --- a/include/umf/pools/pool_proxy.h +++ b/include/umf/pools/pool_proxy.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/pools/pool_scalable.h b/include/umf/pools/pool_scalable.h index fe8449b9db..1915ad0b7a 100644 --- a/include/umf/pools/pool_scalable.h +++ b/include/umf/pools/pool_scalable.h @@ -1,6 +1,6 @@ /* * - * Copyright (C) 2023-2024 Intel Corporation + * Copyright (C) 2023-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/providers/provider_cuda.h b/include/umf/providers/provider_cuda.h index 5f1d5a6e2a..41f87710fe 100644 --- a/include/umf/providers/provider_cuda.h +++ b/include/umf/providers/provider_cuda.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/providers/provider_devdax_memory.h b/include/umf/providers/provider_devdax_memory.h index 0fb5218bcf..8535815d6d 100644 --- a/include/umf/providers/provider_devdax_memory.h +++ b/include/umf/providers/provider_devdax_memory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/providers/provider_file_memory.h b/include/umf/providers/provider_file_memory.h index f652e2cb8a..52acc62440 100644 --- a/include/umf/providers/provider_file_memory.h +++ b/include/umf/providers/provider_file_memory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/providers/provider_fixed_memory.h b/include/umf/providers/provider_fixed_memory.h index 2351faf312..a8723e9024 100644 --- a/include/umf/providers/provider_fixed_memory.h +++ b/include/umf/providers/provider_fixed_memory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/providers/provider_level_zero.h b/include/umf/providers/provider_level_zero.h index f760c57244..432cc39c0f 100644 --- a/include/umf/providers/provider_level_zero.h +++ b/include/umf/providers/provider_level_zero.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2024 Intel Corporation + * Copyright (C) 2024-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/providers/provider_os_memory.h b/include/umf/providers/provider_os_memory.h index a6bf43a7d9..d3408b677e 100644 --- a/include/umf/providers/provider_os_memory.h +++ b/include/umf/providers/provider_os_memory.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/include/umf/proxy_lib_new_delete.h b/include/umf/proxy_lib_new_delete.h index 87e32d1351..a7904f8bcd 100644 --- a/include/umf/proxy_lib_new_delete.h +++ b/include/umf/proxy_lib_new_delete.h @@ -1,6 +1,6 @@ /* ---------------------------------------------------------------------------- Copyright (c) 2018-2020 Microsoft Research, Daan Leijen -Copyright (C) 2024 Intel Corporation +Copyright (C) 2024-2025 Intel Corporation This is free software; you can redistribute it and/or modify it under the terms of the MIT license: diff --git a/scripts/coverage/coverage_capture.sh b/scripts/coverage/coverage_capture.sh index c77f1b141e..26f92fdec4 100755 --- a/scripts/coverage/coverage_capture.sh +++ b/scripts/coverage/coverage_capture.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/scripts/coverage/merge_coverage_files.sh b/scripts/coverage/merge_coverage_files.sh index 1936005566..9ea759904d 100755 --- a/scripts/coverage/merge_coverage_files.sh +++ b/scripts/coverage/merge_coverage_files.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright (C) 2024 Intel Corporation +# Copyright (C) 2024-2025 Intel Corporation # Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception diff --git a/scripts/qemu/configs/default.xml b/scripts/qemu/configs/default.xml index 5654687949..050b35cb6a 100644 --- a/scripts/qemu/configs/default.xml +++ b/scripts/qemu/configs/default.xml @@ -1,5 +1,5 @@