Skip to content

Commit d291734

Browse files
authored
Merge pull request #1471 from lplewa/ctl_by_name
Ctl by name
2 parents 5ae8f12 + 8b6d3a0 commit d291734

22 files changed

+740
-71
lines changed

.github/workflows/reusable_compatibility.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,12 @@ jobs:
9595
9696
- name: Run "tag" UMF tests with latest UMF libs (warnings enabled)
9797
working-directory: ${{github.workspace}}/tag_version/build
98-
run: >
99-
UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
100-
LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
101-
ctest --verbose
98+
env:
99+
UMF_LOG: level:warning;flush:debug;output:stderr;pid:no
100+
LD_LIBRARY_PATH: ${{github.workspace}}/latest_version/build/lib/
101+
run: |
102+
ctest --verbose -E test_memoryProvider
103+
test/test_memoryProvider --gtest_filter="-*Trace"
102104
103105
# Browse all folders in the examples directory, build them using the
104106
# latest UMF version, and run them, excluding those in the exclude list.
@@ -220,10 +222,11 @@ jobs:
220222

221223
- name: Run "tag" UMF tests with latest UMF libs (warnings enabled)
222224
working-directory: ${{github.workspace}}/tag_version/build
225+
env:
226+
UMF_LOG: level:warning;flush:debug;output:stderr;pid:no
223227
run: |
224-
$env:UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
225228
cp ${{github.workspace}}/latest_version/build/bin/Debug/umf.dll ${{github.workspace}}/tag_version/build/bin/Debug/umf.dll
226-
ctest -C Debug --verbose
229+
ctest -C Debug --verbose -E test_memoryProvider
227230
228231
# Browse all folders in the examples directory, build them using the
229232
# latest UMF version, and run them, excluding those in the exclude list.
@@ -361,10 +364,12 @@ jobs:
361364
362365
- name: Run "tag" UMF tests with latest UMF libs (warnings enabled)
363366
working-directory: ${{github.workspace}}/tag_version/build
364-
run: >
365-
UMF_LOG="level:warning;flush:debug;output:stderr;pid:no"
366-
LD_LIBRARY_PATH=${{github.workspace}}/latest_version/build/lib/
367-
ctest --verbose
367+
env:
368+
UMF_LOG: level:warning;flush:debug;output:stderr;pid:no
369+
LD_LIBRARY_PATH: ${{github.workspace}}/latest_version/build/lib/
370+
run: |
371+
ctest --verbose -E test_memoryProvider
372+
test/test_memoryProvider --gtest_filter="-*Trace"
368373
369374
# Browse all folders in the examples directory, build them using the
370375
# latest UMF version, and run them, excluding those in the exclude list.

docs/config/spelling_exceptions.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,5 @@ umfPoolMallocUsableSize
7272
umfPoolRealloc
7373
umfMemspaceUserFilter
7474
umfMemspaceMemtargetAdd
75-
unfreed
75+
unfreed
76+
zA

include/umf/memory_pool_ops.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,13 @@ typedef struct umf_memory_pool_ops_t {
138138
///
139139
/// * Implementations *must* return default pool name when NULL is provided,
140140
/// otherwise the pool's name is returned.
141-
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
142141
///
142+
/// * The returned name should not exceed 64 characters including null character and may contain
143+
/// only [a-zA-Z0-9_-] characters. Names violating these rules are deprecated
144+
/// and will not be supported in the next major API release.
145+
/// CTL functionality may be limited if other characters are returned.
146+
///
147+
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
143148
umf_result_t (*get_name)(void *pool, const char **name);
144149

145150
///

include/umf/memory_provider_ops.h

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,18 @@ typedef struct umf_memory_provider_ops_t {
123123
/// @brief Retrieve name of a given memory \p provider.
124124
/// @param provider pointer to the memory provider
125125
/// @param name [out] pointer to a string containing the name of the \p provider
126-
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
126+
/// \details
127+
/// * Implementations *must* return a literal null-terminated string.
128+
///
129+
/// * Implementations *must* return default pool name when NULL is provided,
130+
/// otherwise the pool's name is returned.
127131
///
132+
/// * The returned name should not exceed 64 characters and may contain
133+
/// only [a-zA-Z0-9_-] characters. Names violating these rules are deprecated
134+
/// and will not be supported in the next major API release.
135+
/// CTL functionality may be limited if other characters are returned.
136+
///
137+
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
128138
umf_result_t (*get_name)(void *provider, const char **name);
129139

130140
///

include/umf/pools/pool_disjoint.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ umf_result_t umfDisjointPoolParamsSetSharedLimits(
111111
/// @param hParams handle to the parameters of the disjoint pool.
112112
/// @param name custom name of the pool. Must not be NULL. Name longer than 63
113113
/// characters will be truncated.
114+
/// \details Name should contain only [a-zA-Z0-9_-] characters.
115+
/// Other names are deprecated and may limit CTL functionality.
114116
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
115117
umf_result_t
116118
umfDisjointPoolParamsSetName(umf_disjoint_pool_params_handle_t hParams,

include/umf/pools/pool_jemalloc.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ umfJemallocPoolParamsSetNumArenas(umf_jemalloc_pool_params_handle_t hParams,
4747
/// @param hParams handle to the parameters of the jemalloc pool.
4848
/// @param name custom name. Must not be NULL. Name longer than 63 characters
4949
/// will be truncated.
50+
/// \details Name should contain only [a-zA-Z0-9_-] characters.
51+
/// Other names are deprecated and may limit CTL functionality.
5052
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
5153
umf_result_t
5254
umfJemallocPoolParamsSetName(umf_jemalloc_pool_params_handle_t hParams,

include/umf/pools/pool_scalable.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ umfScalablePoolParamsSetKeepAllMemory(umf_scalable_pool_params_handle_t hParams,
5757
/// @param hParams handle to the parameters of the scalable pool.
5858
/// @param name custom name. Must not be NULL. Name longer than 63 characters
5959
/// will be truncated.
60+
/// \details Name should contain only [a-zA-Z0-9_-] characters.
61+
/// Other names are deprecated and may limit CTL functionality.
6062
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
6163
umf_result_t
6264
umfScalablePoolParamsSetName(umf_scalable_pool_params_handle_t hParams,

include/umf/providers/provider_cuda.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ umf_result_t umfCUDAMemoryProviderParamsSetAllocFlags(
6565
/// @param hParams handle to the parameters of the CUDA Memory Provider.
6666
/// @param name custom name. Must not be NULL. Name longer than 63 characters
6767
/// will be truncated.
68+
/// \details Name should contain only [a-zA-Z0-9_-] characters.
69+
/// Other names are deprecated and may limit CTL functionality.
6870
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
6971
umf_result_t umfCUDAMemoryProviderParamsSetName(
7072
umf_cuda_memory_provider_params_handle_t hParams, const char *name);

include/umf/providers/provider_devdax_memory.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ umf_result_t umfDevDaxMemoryProviderParamsSetProtection(
6060
/// @param hParams [in] handle to the parameters of the Devdax Memory Provider.
6161
/// @param name [in] custom name. Must not be NULL. Name longer than 63 characters
6262
/// will be truncated.
63+
/// \details Name should contain only [a-zA-Z0-9_-] characters.
64+
/// Other names are deprecated and may limit CTL functionality.
6365
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
6466
umf_result_t umfDevDaxMemoryProviderParamsSetName(
6567
umf_devdax_memory_provider_params_handle_t hParams, const char *name);

include/umf/providers/provider_file_memory.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ const umf_memory_provider_ops_t *umfFileMemoryProviderOps(void);
7272
/// @param hParams handle to the parameters of the File Memory Provider.
7373
/// @param name custom name. Must not be NULL. Name longer than 63 characters
7474
/// will be truncated.
75+
/// \details Name should contain only [a-zA-Z0-9_-] characters.
76+
/// Other names are deprecated and may limit CTL functionality.
7577
/// @return UMF_RESULT_SUCCESS on success or appropriate error code on failure.
7678
umf_result_t umfFileMemoryProviderParamsSetName(
7779
umf_file_memory_provider_params_handle_t hParams, const char *name);

0 commit comments

Comments
 (0)