Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the get_umf_debug_info.sh script to print saved strings #993

Open
wants to merge 1 commit into
base: v0.10.x
Choose a base branch
from

Conversation

ldorau
Copy link
Contributor

@ldorau ldorau commented Dec 12, 2024

Description

Add the get_umf_debug_info.sh script to print saved strings.
It can be used with any user binary:

$ scripts/get_umf_debug_info.sh ./build/test/umf_test-base
./test/umf_test-base does not contain magic strings of the UMF library.

$ scripts/get_umf_debug_info.sh ./build/test/umf_test-ipc
./test/umf_test-ipc is statically linked with the UMF library.
Strings in /mnt/wsl/files/repos/unified-memory-framework/build/test/umf_test-ipc:
@(#) Intel(R) UMF version: 0.10.0-git4.g806ce00c
@(#) Intel(R) UMF CMake variables: "CMAKE_BUILD_TYPE:Debug,UMF_BUILD_BENCHMARKS:OFF,UMF_BUILD_BENCHMARKS_MT:OFF,UMF_BUILD_CUDA_PROVIDER:ON,UMF_BUILD_EXAMPLES:ON,UMF_BUILD_FUZZTESTS:OFF,UMF_BUILD_GPU_EXAMPLES:OFF,UMF_BUILD_GPU_TESTS:OFF,UMF_BUILD_LEVEL_ZERO_PROVIDER:ON,UMF_BUILD_LIBUMF_POOL_DISJOINT:OFF,UMF_BUILD_LIBUMF_POOL_JEMALLOC:ON,UMF_BUILD_SHARED_LIBRARY:ON,UMF_BUILD_TESTS:ON,UMF_DEVELOPER_MODE:ON,UMF_DISABLE_HWLOC:OFF,UMF_FORMAT_CODE_STYLE:ON,UMF_HWLOC_NAME:hwloc,UMF_LINK_HWLOC_STATICALLY:OFF,UMF_PROXY_LIB_BASED_ON_POOL:SCALABLE,UMF_TESTS_FAIL_ON_SKIP:OFF,UMF_USE_ASAN:OFF,UMF_USE_COVERAGE:OFF,UMF_USE_MSAN:OFF,UMF_USE_TSAN:OFF,UMF_USE_UBSAN:OFF,UMF_USE_VALGRIND:OFF,"

$ scripts/get_umf_debug_info.sh ./build/test/umf_test-c_api_disjoint_pool
./test/umf_test-c_api_disjoint_pool is dynamically linked with the UMF library (/mnt/wsl/files/repos/unified-memory-framework/build/lib/libumf.so.0.10.0).
Strings in /mnt/wsl/files/repos/unified-memory-framework/build/lib/libumf.so.0.10.0:
@(#) Intel(R) UMF version: 0.10.0-git4.g806ce00c
@(#) Intel(R) UMF CMake variables: "CMAKE_BUILD_TYPE:Debug,UMF_BUILD_BENCHMARKS:OFF,UMF_BUILD_BENCHMARKS_MT:OFF,UMF_BUILD_CUDA_PROVIDER:ON,UMF_BUILD_EXAMPLES:ON,UMF_BUILD_FUZZTESTS:OFF,UMF_BUILD_GPU_EXAMPLES:OFF,UMF_BUILD_GPU_TESTS:OFF,UMF_BUILD_LEVEL_ZERO_PROVIDER:ON,UMF_BUILD_LIBUMF_POOL_DISJOINT:OFF,UMF_BUILD_LIBUMF_POOL_JEMALLOC:ON,UMF_BUILD_SHARED_LIBRARY:ON,UMF_BUILD_TESTS:ON,UMF_DEVELOPER_MODE:ON,UMF_DISABLE_HWLOC:OFF,UMF_FORMAT_CODE_STYLE:ON,UMF_HWLOC_NAME:hwloc,UMF_LINK_HWLOC_STATICALLY:OFF,UMF_PROXY_LIB_BASED_ON_POOL:SCALABLE,UMF_TESTS_FAIL_ON_SKIP:OFF,UMF_USE_ASAN:OFF,UMF_USE_COVERAGE:OFF,UMF_USE_MSAN:OFF,UMF_USE_TSAN:OFF,UMF_USE_UBSAN:OFF,UMF_USE_VALGRIND:OFF,"

$ scripts/get_umf_debug_info.sh ./build/lib/libumf.so
./build/lib/libumf.so is the UMF library (/mnt/wsl/files/repos/unified-memory-framework/build/lib/libumf.so.0.10.0).
Strings in /mnt/wsl/files/repos/unified-memory-framework/build/lib/libumf.so.0.10.0:
@(#) Intel(R) UMF version: 0.10.0-git4.g806ce00c
@(#) Intel(R) UMF CMake variables: "CMAKE_BUILD_TYPE:Debug,UMF_BUILD_BENCHMARKS:OFF,UMF_BUILD_BENCHMARKS_MT:OFF,UMF_BUILD_CUDA_PROVIDER:ON,UMF_BUILD_EXAMPLES:ON,UMF_BUILD_FUZZTESTS:OFF,UMF_BUILD_GPU_EXAMPLES:OFF,UMF_BUILD_GPU_TESTS:OFF,UMF_BUILD_LEVEL_ZERO_PROVIDER:ON,UMF_BUILD_LIBUMF_POOL_DISJOINT:OFF,UMF_BUILD_LIBUMF_POOL_JEMALLOC:ON,UMF_BUILD_SHARED_LIBRARY:ON,UMF_BUILD_TESTS:ON,UMF_DEVELOPER_MODE:ON,UMF_DISABLE_HWLOC:OFF,UMF_FORMAT_CODE_STYLE:ON,UMF_HWLOC_NAME:hwloc,UMF_LINK_HWLOC_STATICALLY:OFF,UMF_PROXY_LIB_BASED_ON_POOL:SCALABLE,UMF_TESTS_FAIL_ON_SKIP:OFF,UMF_USE_ASAN:OFF,UMF_USE_COVERAGE:OFF,UMF_USE_MSAN:OFF,UMF_USE_TSAN:OFF,UMF_USE_UBSAN:OFF,UMF_USE_VALGRIND:OFF,"

Checklist

  • Code compiles without errors locally
  • All tests pass locally
  • CI workflows execute properly

@ldorau ldorau requested a review from a team as a code owner December 12, 2024 11:08
@ldorau ldorau force-pushed the Add_get_umf_debug_info.sh_to_print_saved_strings branch from 6a5b72a to 19f847b Compare December 12, 2024 11:10
Copy link
Contributor

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps we should wait with this for #992 and re-base it to v0.10.x ?

scripts/get_umf_debug_info.sh Outdated Show resolved Hide resolved
@ldorau ldorau changed the base branch from main to v0.10.x December 12, 2024 11:41
@ldorau ldorau force-pushed the Add_get_umf_debug_info.sh_to_print_saved_strings branch from 19f847b to ab1f260 Compare December 12, 2024 11:41
@ldorau
Copy link
Contributor Author

ldorau commented Dec 12, 2024

perhaps we should wait with this for #992 and re-base it to v0.10.x ?

Rebased

@ldorau ldorau force-pushed the Add_get_umf_debug_info.sh_to_print_saved_strings branch from ab1f260 to bd6b240 Compare December 12, 2024 11:44
@lukaszstolarczuk lukaszstolarczuk added the v0.10.x Should be included in stable branch v0.10.x label Dec 12, 2024
@ldorau ldorau force-pushed the Add_get_umf_debug_info.sh_to_print_saved_strings branch 2 times, most recently from 9c5807f to 2bf2c08 Compare December 12, 2024 14:23
@ldorau
Copy link
Contributor Author

ldorau commented Dec 12, 2024

@bratpiorka @lukaszstolarczuk please review

@lplewa
Copy link
Contributor

lplewa commented Dec 12, 2024

Do we need this script in repo? What is an usecase? This is literally debug feature, that anyone with basic skills should use without helper scripts.

@lukaszstolarczuk
Copy link
Contributor

Do we need this script in repo? What is an usecase? This is literally debug feature, that anyone with basic skills should use without helper scripts.

I think it could be useful on our other repos; it's just a script 😉

@ldorau ldorau force-pushed the Add_get_umf_debug_info.sh_to_print_saved_strings branch from 2bf2c08 to dbacb0e Compare December 13, 2024 08:46
@ldorau
Copy link
Contributor Author

ldorau commented Dec 13, 2024

@bratpiorka please review

@PatKamin
Copy link
Contributor

Do we need this script in repo? What is an usecase? This is literally debug feature, that anyone with basic skills should use without helper scripts.

It can be useful in retrieving a complete information on the build used by someone who filed a bug. It's easier to just ask to run this script than explaining what packages one needs and what to grep for each time, I think.

@ldorau ldorau force-pushed the Add_get_umf_debug_info.sh_to_print_saved_strings branch from dbacb0e to b5e23b0 Compare December 13, 2024 12:58
@ldorau ldorau requested a review from PatKamin December 13, 2024 12:59
Copy link
Contributor

@lukaszstolarczuk lukaszstolarczuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably if there's any doubt, we could discuss if this should go into an internal repo...?

@ldorau ldorau force-pushed the Add_get_umf_debug_info.sh_to_print_saved_strings branch from b5e23b0 to 9717f3b Compare December 13, 2024 14:33
Add the `get_umf_debug_info.sh` script to print saved strings.
It can be used with any user binary:

$ scripts/get_umf_debug_info.sh ./build/test/umf_test-base
./build/test/umf_test-base does not contain magic strings of the UMF library.

$ scripts/get_umf_debug_info.sh ./build/test/umf_test-ipc
./build/test/umf_test-ipc is statically linked with the UMF library.
Strings in /mnt/wsl/files/repos/unified-memory-framework/build/test/umf_test-ipc:
@(#) Intel(R) UMF version: 0.10.0-git4.gbf701ee8
@(#) Intel(R) UMF CMake variables: "CMAKE_BUILD_TYPE:Debug, ..."

$ scripts/get_umf_debug_info.sh ./build/test/umf_test-c_api_disjoint_pool
./build/test/umf_test-c_api_disjoint_pool is dynamically linked with the UMF library \
(/mnt/wsl/files/repos/unified-memory-framework/build/lib/libumf.so.0.10.0).
Strings in /mnt/wsl/files/repos/unified-memory-framework/build/lib/libumf.so.0.10.0:
@(#) Intel(R) UMF version: 0.10.0-git4.gbf701ee8
@(#) Intel(R) UMF CMake variables: "CMAKE_BUILD_TYPE:Debug, ..."

$ scripts/get_umf_debug_info.sh ./build/lib/libumf.so
./build/lib/libumf.so is the UMF library (/mnt/wsl/files/repos/unified-memory-framework/build/lib/libumf.so.0.10.0).
Strings in /mnt/wsl/files/repos/unified-memory-framework/build/lib/libumf.so.0.10.0:
@(#) Intel(R) UMF version: 0.10.0-git4.g806ce00c
@(#) Intel(R) UMF CMake variables: "CMAKE_BUILD_TYPE:Debug, ..."

Signed-off-by: Lukasz Dorau <[email protected]>
@ldorau ldorau force-pushed the Add_get_umf_debug_info.sh_to_print_saved_strings branch from 9717f3b to b3d87e1 Compare December 13, 2024 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v0.10.x Should be included in stable branch v0.10.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants