11/*
2- * Copyright (C) 2024-2025 Intel Corporation
2+ * Copyright (C) 2024-2026 Intel Corporation
33 *
44 * Under the Apache License v2.0 with LLVM Exceptions. See LICENSE.TXT.
55 * SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
@@ -1131,8 +1131,8 @@ static int ze_memory_provider_resident_device_change_helper(uintptr_t key,
11311131 tracker_alloc_info_t * info = value ;
11321132 if (info -> props .provider -> provider_priv !=
11331133 (void * )change_data -> source_memory_provider ) {
1134- LOG_DEBUG ("ze_memory_provider_resident_device_change found not our "
1135- "pointer %p" ,
1134+ LOG_DEBUG ("ze_memory_provider_resident_device_change() did not find "
1135+ "our pointer %p" ,
11361136 (void * )key );
11371137 return 0 ;
11381138 }
@@ -1152,17 +1152,22 @@ static int ze_memory_provider_resident_device_change_helper(uintptr_t key,
11521152
11531153 if (result != ZE_RESULT_SUCCESS ) {
11541154 LOG_ERR (
1155- "ze_memory_provider_resident_device_change found our pointer "
1156- "%p but failed to make it resident on device: %p due to err: %d" ,
1157- (void * )key , (void * )change_data -> peer_device , result );
1155+ "ze_memory_provider_resident_device_change() found our pointer "
1156+ "%p but failed to %s device: %p due to err: %d" ,
1157+ (void * )key ,
1158+ (change_data -> is_adding ? "make it resident on" : "evict it from" ),
1159+ (void * )change_data -> peer_device , result );
11581160 ++ change_data -> failed_changes ;
11591161 store_last_native_error (result );
11601162 return 1 ;
11611163 }
11621164
1163- LOG_DEBUG ("ze_memory_provider_resident_device_change found our pointer %p "
1164- "and made it resident on device: %p" ,
1165- (void * )key , (void * )change_data -> peer_device );
1165+ LOG_DEBUG (
1166+ "ze_memory_provider_resident_device_change() found our pointer %p "
1167+ "and %s device: %p" ,
1168+ (void * )key ,
1169+ (change_data -> is_adding ? "made it resident on" : "evicted it from" ),
1170+ (void * )change_data -> peer_device );
11661171 ++ change_data -> success_changes ;
11671172 return 0 ;
11681173}
@@ -1270,7 +1275,7 @@ umf_result_t umfLevelZeroMemoryProviderResidentDeviceChange(
12701275 return UMF_RESULT_ERROR_MEMORY_PROVIDER_SPECIFIC ;
12711276 }
12721277
1273- LOG_INFO ("ze_memory_provider_resident_device_change done, numSuccess: %d" ,
1278+ LOG_INFO ("ze_memory_provider_resident_device_change() done, numSuccess: %d" ,
12741279 privData .success_changes );
12751280 return UMF_RESULT_SUCCESS ;
12761281}
0 commit comments