Skip to content

Commit 8b72607

Browse files
committed
disable proxy bla bla
1 parent 73dc074 commit 8b72607

File tree

5 files changed

+42
-40
lines changed

5 files changed

+42
-40
lines changed

.github/workflows/reusable_basic.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ jobs:
210210
--build-type ${{matrix.build_type}}
211211
--disjoint-pool
212212
--jemalloc-pool
213-
${{ matrix.install_tbb == 'ON' && matrix.disable_hwloc != 'ON' && '--proxy' || '' }}
213+
${{ matrix.install_tbb == 'ON' && matrix.disable_hwloc != 'ON' && matrix.shared_library == 'ON' && '--proxy' || '' }}
214214
--umf-version ${{env.UMF_VERSION}}
215215
${{ matrix.shared_library == 'ON' && '--shared-library' || '' }}
216216
@@ -300,7 +300,7 @@ jobs:
300300
--build-type ${{matrix.build_type}}
301301
--disjoint-pool
302302
--jemalloc-pool
303-
--proxy
303+
${{matrix.shared_library == 'ON' && '--proxy' || '' }}
304304
--umf-version ${{env.UMF_VERSION}}
305305
${{ matrix.shared_library == 'ON' && '--shared-library' || ''}}
306306
@@ -310,7 +310,7 @@ jobs:
310310
shell: pwsh
311311

312312
- name: check /DEPENDENTLOADFLAG in umf_proxy.dll
313-
if: ${{matrix.compiler.cxx == 'cl'}}
313+
if: ${{matrix.shared_library == 'ON' && matrix.compiler.cxx == 'cl'}}
314314
run: ${{github.workspace}}/.github/scripts/check_dll_flags.ps1 ${{env.BUILD_DIR}}/src/proxy_lib/${{matrix.build_type}}/umf_proxy.dll
315315
shell: pwsh
316316

.github/workflows/reusable_fast.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ jobs:
136136
# TODO: We could add some script to verify metadata of dll's (selected fields, perhaps)
137137
# ref. https://superuser.com/questions/381276/what-are-some-nice-command-line-ways-to-inspect-dll-exe-details
138138
- name: Print metadata of our dll's
139-
if: matrix.os == 'windows-latest'
139+
if: ${{matrix.shared_library == 'ON' && matrix.os == 'windows-latest' }}
140140
run: |
141141
get-command ${{github.workspace}}/build/bin/Release/umf.dll | format-list
142142
get-command ${{github.workspace}}/build/src/proxy_lib/Release/umf_proxy.dll | format-list

.github/workflows/reusable_sanitizers.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ jobs:
1515
name: Ubuntu
1616
strategy:
1717
matrix:
18-
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++}, {c: icx, cxx: icpx}]
18+
compiler: [{c: gcc, cxx: g++}, {c: clang, cxx: clang++},
19+
# {c: icx, cxx: icpx}
20+
]
1921
# TSAN is mutually exclusive with other sanitizers
2022
sanitizers: [{asan: ON, ubsan: ON, tsan: OFF}, {asan: OFF, ubsan: OFF, tsan: ON}]
2123
runs-on: ubuntu-22.04

src/provider/provider_tracking.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,3 +699,38 @@ umf_result_t umfTrackingMemoryProviderCreate(
699699
return umfMemoryProviderCreate(umfTrackingMemoryProviderOps(), &params,
700700
hTrackingProvider);
701701
}
702+
703+
umf_result_t
704+
umfMemoryTrackerGetAllocInfoTracker(const void *ptr,
705+
umf_memory_tracker_handle_t tracker,
706+
umf_alloc_info_t *pAllocInfo) {
707+
assert(ptr);
708+
assert(pAllocInfo);
709+
710+
if (tracker == NULL) {
711+
LOG_ERR("tracker is NULL");
712+
return UMF_RESULT_ERROR_NOT_SUPPORTED;
713+
}
714+
715+
if (tracker->map == NULL) {
716+
LOG_ERR("tracker's map is not created");
717+
return UMF_RESULT_ERROR_NOT_SUPPORTED;
718+
}
719+
720+
uintptr_t rkey;
721+
umf_tracker_value_t *rvalue;
722+
int found = critnib_find(tracker->map, (uintptr_t)ptr, FIND_LE,
723+
(void *)&rkey, (void **)&rvalue);
724+
if (!found || (uintptr_t)ptr >= rkey + rvalue->size) {
725+
LOG_WARN("pointer %p not found in the tracker, tracker=%p", ptr,
726+
(void *)tracker);
727+
return UMF_RESULT_ERROR_INVALID_ARGUMENT;
728+
}
729+
730+
pAllocInfo->base = (void *)rkey;
731+
pAllocInfo->baseSize = rvalue->size;
732+
// TODO proxy pool?
733+
pAllocInfo->pool = rvalue->pool;
734+
735+
return UMF_RESULT_SUCCESS;
736+
}

src/tracker.c

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -156,41 +156,6 @@ void umfMemoryTrackerDestroy(umf_memory_tracker_handle_t handle) {
156156
umf_ba_global_free(handle);
157157
}
158158

159-
umf_result_t
160-
umfMemoryTrackerGetAllocInfoTracker(const void *ptr,
161-
umf_memory_tracker_handle_t tracker,
162-
umf_alloc_info_t *pAllocInfo) {
163-
assert(ptr);
164-
assert(pAllocInfo);
165-
166-
if (tracker == NULL) {
167-
LOG_ERR("tracker is NULL");
168-
return UMF_RESULT_ERROR_NOT_SUPPORTED;
169-
}
170-
171-
if (tracker->map == NULL) {
172-
LOG_ERR("tracker's map is not created");
173-
return UMF_RESULT_ERROR_NOT_SUPPORTED;
174-
}
175-
176-
uintptr_t rkey;
177-
umf_tracker_value_t *rvalue;
178-
int found = critnib_find(tracker->map, (uintptr_t)ptr, FIND_LE,
179-
(void *)&rkey, (void **)&rvalue);
180-
if (!found || (uintptr_t)ptr >= rkey + rvalue->size) {
181-
LOG_WARN("pointer %p not found in the tracker, tracker=%p", ptr,
182-
(void *)tracker);
183-
return UMF_RESULT_ERROR_INVALID_ARGUMENT;
184-
}
185-
186-
pAllocInfo->base = (void *)rkey;
187-
pAllocInfo->baseSize = rvalue->size;
188-
// TODO proxy pool?
189-
pAllocInfo->pool = rvalue->pool;
190-
191-
return UMF_RESULT_SUCCESS;
192-
}
193-
194159
#ifdef __cplusplus
195160
}
196161
#endif

0 commit comments

Comments
 (0)